CN-122028164-A - Time determination method, apparatus, computer device, storage medium, and program product
Abstract
The present application relates to a time determination method, apparatus, computer device, storage medium and program product. The method comprises the steps of determining clock errors of a local clock based on a power delay spectrum corresponding to a local clock of terminal equipment, determining air interface delay between the terminal equipment and a base station according to a moving state of the terminal equipment, and determining initial time of the local clock corresponding to standard time according to local time, clock errors and air interface delay when standard time sent by the base station is received, so that the clock errors determined based on the power delay spectrum can be introduced when the initial time of the local time corresponding to the standard time is calculated, the calculated initial time is not influenced by the clock errors, the accuracy of the initial time is improved, and further the accuracy of external time service information is improved when external time service information at a certain moment in the future is determined based on the initial time of the local clock.
Inventors
- ZHANG XUN
Assignees
- 西安紫光展锐科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260325
Claims (10)
- 1. A method for determining time, wherein the method is applied to a terminal device, the method comprising: determining a clock error of a local clock based on a power delay spectrum corresponding to the local clock of the terminal equipment; according to the moving state of the terminal equipment, determining the air interface time delay between the terminal equipment and the base station; And determining the initial time of the local clock corresponding to the standard time according to the local time when the standard time sent by the base station is received, the clock error and the air interface time delay.
- 2. The method of claim 1, wherein the determining the clock error of the local clock based on the power delay profile corresponding to the local clock of the terminal device comprises: Acquiring a coordinate point corresponding to the maximum delay on the power delay spectrum; and determining the clock error according to the coordinate point and the standard power delay spectrum point.
- 3. The method of claim 2, wherein the clock error comprises a magnitude and a sign of the clock error, and wherein the determining the clock error from the coordinate point and a standard power delay profile point comprises: Determining the magnitude of the clock error according to the absolute value of the difference between the coordinate point and the standard power delay spectrum point; And determining the sign of the clock error according to the position relation between the coordinate point and the standard power time delay spectrum point.
- 4. The method according to claim 1, wherein the determining the air-interface delay between the terminal device and the base station according to the mobile state of the terminal device comprises: And under the condition that the mobile state is that the terminal equipment is static, determining the received historical air interface time delay sent by the base station as the air interface time delay between the terminal equipment and the base station.
- 5. The method of claim 4, wherein determining the air interface delay between the terminal device and the base station based on the mobile state of the terminal device comprises: Acquiring the distance between the terminal equipment and the base station under the condition that the mobile state is that the terminal equipment moves; acquiring new air interface time delay from the base station under the condition that the distance exceeds a preset distance threshold value, and determining the new air interface time delay as the air interface time delay between the terminal equipment and the base station; And under the condition that the distance does not exceed the preset distance threshold, determining the historical air interface time delay as the air interface time delay between the terminal equipment and the base station.
- 6. The method according to any one of claims 1-5, wherein determining an initial time of the local clock corresponding to the standard time based on a local time when the standard time sent by the base station is received, the clock error, and the air interface delay comprises: Determining a difference between the local time and the air interface time delay; and determining a summation result between the difference value and the clock error as the initial time.
- 7. A time determining apparatus, the apparatus comprising: the first determining module is used for determining clock errors of the local clock based on a power delay spectrum corresponding to the local clock of the terminal equipment; the second determining module is used for determining the air interface time delay between the terminal equipment and the base station according to the moving state of the terminal equipment; and the third determining module is used for determining the initial time of the local clock corresponding to the standard time according to the local time when the standard time sent by the base station is received, the clock error and the air interface time delay.
- 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
- 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Description
Time determination method, apparatus, computer device, storage medium, and program product Technical Field The present application relates to the field of clock synchronization technology, and in particular, to a time determining method, apparatus, computer device, storage medium, and program product. Background With the rapid development of 5G systems, high-precision time synchronization has become one of the basic capabilities for supporting stable operation of power systems. At present, a terminal device generally receives coordinated Universal Time (UTC) issued by a base station through an air interface system information block by using a 5G network, determines time service information according to a local clock of the terminal device by taking UTC time as a reference, and converts the time service information into a standard IRIG-B code to be output to the outside. However, due to the influence of factors such as ageing, temperature drift and initial frequency deviation of the device, the error of the local clock of the terminal equipment is larger and larger along with the time, so that the accuracy of time service information externally output by the terminal equipment is reduced. Disclosure of Invention In view of the foregoing, it is desirable to provide a time determining method, apparatus, computer device, storage medium, and program product. In a first aspect, the present application provides a method of time determination. The method comprises the following steps: Determining a clock error of the local clock based on a power delay spectrum corresponding to the local clock of the terminal equipment; according to the moving state of the terminal equipment, determining the air interface time delay between the terminal equipment and the base station; And determining the initial time of the local clock corresponding to the standard time according to the local time when the standard time sent by the base station is received, the clock error and the air interface time delay. In one embodiment, the determining the clock error of the local clock based on the power delay profile corresponding to the local clock of the terminal device includes: acquiring a coordinate point corresponding to the maximum time delay on the power time delay spectrum; And determining the clock error according to the coordinate point and the standard power time delay spectrum point. In one embodiment, the clock error includes a magnitude and a sign of the clock error, and determining the clock error based on the coordinate point and the standard power delay profile point includes: determining the magnitude of the clock error according to the absolute value of the difference between the coordinate point and the standard power delay spectrum point; and determining the sign of the clock error according to the position relation between the coordinate point and the standard power time delay spectrum point. In one embodiment, the determining, according to the mobile state of the terminal device, the air interface delay between the terminal device and the base station includes: And under the condition that the mobile state is that the terminal equipment is static, determining the received historical air interface time delay sent by the base station as the air interface time delay between the terminal equipment and the base station. In one embodiment, the determining, according to the mobile state of the terminal device, the air interface delay between the terminal device and the base station includes: Under the condition that the mobile state is that the terminal equipment moves, acquiring the distance between the terminal equipment and the base station; under the condition that the distance exceeds a preset distance threshold value, acquiring new air interface time delay from the base station, and determining the new air interface time delay as the air interface time delay between the terminal equipment and the base station; and under the condition that the distance does not exceed the preset distance threshold, determining the historical air interface time delay as the air interface time delay between the terminal equipment and the base station. In one embodiment, the determining the initial time of the local clock corresponding to the standard time according to the local time when the standard time sent by the base station is received, the clock error and the air interface delay includes: Determining a difference between the local time and the air interface time delay; the result of the summation between the difference and the clock error is determined as the initial time. In a second aspect, the application further provides a time determining device. The device comprises: The first determining module is used for determining the clock error of the local clock based on the power delay spectrum corresponding to the local clock of the terminal equipment; the second determining module is used for determining the air interface time delay