A time synchronization method and related device for V2X equipment

By interacting with time synchronization message between slave devices and master devices in the V2X system, calculating the waiting time difference and adjusting the local time, the problem of time error between V2X devices is solved, ensuring system time consistency and communication stability.

CN114698091BActive Publication Date: 2024-12-27SAIC MOTOR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210326518.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2024-12-27
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

In the V2X system, since the timing of the satellite positioning system is always ongoing, there is a system time error between the local system clocks of different V2X devices. Especially in areas with poor satellite signals, the timing may not be successful, which further increases Time error affects communication.

Method used

When the slave device enters the communication coverage range of the main device, it receives the time synchronization message sent by the main device, and sends the corresponding message according to the preset time synchronization message response time, calculates the difference between the first waiting time and the second waiting time, and adjusts the Local system time to achieve time synchronization with the master device.

Benefits of technology

The system time error between V2X devices is eliminated, ensuring that communication between devices is carried out normally, and communication failures caused by time errors are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114698091B_ABST
    Figure CN114698091B_ABST
Patent Text Reader

Abstract

The present application discloses a time synchronization method and related device for V2X devices. When a slave device enters the communication coverage of a master device, the slave device receives a first message of time synchronization sent by the master device, and responds to the first message according to a preset time synchronization response duration, sends a second message to the master device, and then receives a third message returned by the master device based on the second message; further, according to the relationship between the sending time and the receiving time of each message, the difference between the first waiting time and the second waiting time is determined, and the local system time is adjusted according to the difference and the preset time interval; wherein the first waiting time is used to identify the time between the sending time of the first message and the receiving time of the second message, and the second waiting time is used to mark the time between the sending time of the second message and the receiving time of the third message. It can be seen that based on the interaction of the time synchronization message with the master device, the local system time is adjusted to achieve time synchronization with the master device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a time synchronization method and related apparatus for V2X equipment. Background Art

[0002] V2X (Vehicle to everything) technology is based on wireless communication, sensor detection and other technologies to obtain vehicle-road information, so as to realize real-time information interaction between vehicles, vehicles and road infrastructure, vehicles and people, vehicles and networks, etc., conduct vehicle safety control and road collaborative management, ensure traffic safety and improve traffic efficiency.

[0003] In the V2X system, the normal operation of many services such as wireless communication between devices requires clock synchronization between devices. In the related art, clock synchronization is achieved through the timing of the satellite positioning system. However, the timing of the satellite positioning system is not performed all the time, and the local system clocks of different devices are different. Therefore, there is a system time error between the local system clocks of different V2X devices, and in areas with poor satellite positioning signals, the timing of the satellite positioning system may not be successful, which will further increase the system time error between the local clocks of different V2X devices.

[0004] It can be seen that the existence of system time error will affect the communication between V2X devices and even cause V2X devices to be unable to receive and send communication messages. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides a time synchronization method and related devices for V2X devices, which eliminate the system time error of the local system clock of the V2X device and realize the time synchronization of the V2X device.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] On the one hand, an embodiment of the present application provides a time synchronization method for a V2X device, the method comprising:

[0008] When the slave device enters the communication coverage of the master device, the slave device receives a first time synchronization message sent by the master device at a preset time interval; the first message carries timestamp information including the sending time of the first message and an identifier of the master device;

[0009] After receiving the first message, the slave device sends a second time synchronization message to the master device according to a preset time synchronization message response duration, and records the sending time of the second message; the second message carries the timestamp information of the receiving time of the first message by the slave device and the identifier of the slave device;

[0010] The slave device receives a third message sent by the master device, and records a reception time of the third message; the third message is sent by the master device according to the preset time synchronization message response duration after receiving the second message; the third message carries timestamp information of the reception time when the master device receives the second message and an identifier of the master device;

[0011] The slave device calculates a difference between a first waiting time and a second waiting time; the first waiting time is used to identify a time between a sending time of the first message and a receiving time of the second message; the second waiting time is used to identify a time between a sending time of the second message and a receiving time of the third message;

[0012] The slave device adjusts the local system time according to the difference and the preset time interval.

[0013] On the other hand, an embodiment of the present application provides a time synchronization device for a V2X device, the device comprising a receiving unit, a sending unit, a calculating unit, and an adjusting unit:

[0014] The receiving unit is configured to receive, by the slave device, a first time synchronization message sent by the master device at preset time intervals when the slave device enters the communication coverage of the master device; the first message carries timestamp information including the sending time of the first message and an identifier of the master device;

[0015] The sending unit is used for sending a second time synchronization message to the master device according to a preset time synchronization message response duration after the slave device receives the first message, and recording the sending time of the second message; the second message carries the timestamp information of the receiving time of the first message by the slave device and the identifier of the slave device;

[0016] The receiving unit is further configured to receive, by the slave device, a third message sent by the master device, and record a reception time of the third message; the third message is sent by the master device according to the preset time synchronization message response duration after receiving the second message; the third message carries timestamp information of the reception time when the master device receives the second message and an identifier of the master device;

[0017] The calculation unit is used for the slave device to calculate the difference between the first waiting time and the second waiting time; the first waiting time is used to identify the time between the sending time of the first message and the receiving time of the second message; the second waiting time is used to identify the time between the sending time of the second message and the receiving time of the third message;

[0018] The adjusting unit is used for the slave device to adjust the local system time according to the difference and the preset time interval.

[0019] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:

[0020] The memory is used to store program code and transmit the program code to the processor;

[0021] The processor is used to execute the time synchronization method of the V2X device described in the above aspects according to the instructions in the program code.

[0022] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the time synchronization method of the V2X device described in the above aspects.

[0023] On the other hand, an embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the time synchronization method of the V2X device described in the above aspects.

[0024] It can be seen from the above technical solution that in the V2X system, when the slave device enters the communication coverage of the master device, the slave device receives the first time synchronization message sent by the master device. Since the first message carries the identification of the master device, after receiving the first message, the slave device responds to the first message sent by the master device according to the preset time synchronization response time, sends a second message to the master device, and then receives the third message returned by the master device based on the second message; finally, according to the relationship between the sending and receiving time of the first message, the second message and the third message, the difference between the first waiting time and the second waiting time is determined, and the slave device adjusts the local system time according to the difference and the preset time interval; wherein the first waiting time is used to identify the time between the sending time of the first message and the receiving time of the second message; the second waiting time is used to mark the time between the sending time of the second message and the receiving time of the third message. Since both the master device and the slave device respond to the time synchronization message sent by the other party according to the preset time synchronization message response time, the slave device can adjust the local time system according to the difference determined based on the first waiting time and the second waiting time and the preset time interval to achieve time synchronization with the master device. It can be seen that the present application provides a method based on the interaction of time synchronization messages between a master device and a slave device, in which the slave device adjusts the local system time to achieve time synchronization with the master device, thereby eliminating the system time error between the slave device and the master device and avoiding related problems caused by the system time error. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 A method flow chart of a time synchronization method for a V2X device provided in an embodiment of the present application;

[0027] Figure 2 A schematic diagram of the structure of a time synchronization system for a V2X device provided in an embodiment of the present application;

[0028] Figure 3 A schematic diagram of signaling interaction for time synchronization between a slave device and a master device provided in an embodiment of the present application;

[0029] Figure 4 A device structure diagram of a time synchronization device for a V2X device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0031] The present application provides a time synchronization method and related apparatus for a V2X device, which eliminates the system time error of a local system clock of the V2X device and realizes the time synchronization of the V2X device.

[0032] The specific examples are as follows:

[0033] Figure 1 A method flow chart of a time synchronization method for a V2X device provided in an embodiment of the present application, the method comprising S101-S105:

[0034] S101: When a slave device enters a communication coverage area of ​​a master device, the slave device receives a first time synchronization message sent by the master device at preset time intervals.

[0035] The first message carries timestamp information including the sending time of the first message and the identifier of the master device.

[0036] In one possible implementation, when the slave device enters the communication coverage of the master device, a binding relationship exists between the slave device and the master device. Specifically, the binding can be performed through the identifications of the two. Based on this, after the slave device receives the first message sent by the master device carrying the identification of the master device, it can confirm that the master device is the reference device bound to the slave device for time synchronization based on the identification of the master device and the binding relationship.

[0037] It should be noted that since the purpose of the time synchronization method between the master device and the slave device is to achieve time synchronization, the master device and the slave device can be configured with the same time synchronization function parameters, which include the time synchronization interval, time synchronization response duration, and time synchronization frequency.

[0038] In one possible implementation, the relationship between the master device and the slave device can be configured and deployed during the actual construction process according to the actual application scenario. For example, in the V2X roadside application scenario, the roadside device is deployed as the master device and the vehicle-side device is deployed as the slave device.

[0039] Since the system time error of the local clock of the slave device can meet the time error requirement of V2X device communication within a period of time after a time synchronization, in the V2X system, when the slave device enters the communication coverage of the master device, the master device can send the first time synchronization message at a preset time interval, and the preset time interval is the functional parameter of the above-mentioned time synchronization interval.

[0040] In a possible implementation, S101 includes:

[0041] When the slave device enters the communication coverage of the master device, the slave device receives a first time synchronization message sent by the master device at preset time intervals after obtaining the reference time.

[0042] Specifically, when the slave device enters the communication coverage of the master device, the master device sends the first message of time synchronization to the slave device after obtaining the reference time. Since the master device is the reference device for the slave device time synchronization, the reference time obtained by the master device can be a high-precision time, which can be obtained specifically in the following way:

[0043] The master device obtains the reference time by means of system time synthesis selection; the reference time is the first time or the second time; the first time is determined by satellite system timing, and the second time is determined by the local system clock timing of the master device.

[0044] It can be seen that the first time can be determined by satellite system timing, and the second time can be determined by local system clock timing. Furthermore, the master device obtains the reference time by system time synthesis selection. The reference time can be the first time or the second time, which can be determined according to the actual application scenario. For example: when the satellite system timing is unsuccessful or the satellite system timing has not been obtained for a long period of time, the second time determined by the local system clock timing can be used as the reference time, and time synchronization can still be achieved. Based on this, it is possible to avoid related problems caused by relying on the satellite system as a single timing source in some application scenarios. For example, in application scenarios where the GPS signal is weak, such as tunnel road conditions or mountain road conditions, relying on a single satellite system for timing may result in unsuccessful timing, which may lead to V2X communication failure.

[0045] S102: After receiving the first message, the slave device sends a second time synchronization message to the master device according to a preset time synchronization message response duration, and records the sending time of the second message.

[0046] The second message carries timestamp information of the time when the slave device receives the first message and an identifier of the slave device.

[0047] The slave device responds to the first time synchronization message of the master device, and after receiving the first message, returns the second time synchronization message to the master device according to the preset time synchronization message response duration, and records the time of sending the second message; the second message carries the timestamp information of the reception time of the first message by the slave device and the identification of the slave device. In a possible implementation method, after receiving the second message, the master device can determine whether there is an error in the system time of the slave device according to the identification of the slave device, the reception time of the first message received by the slave device, the sending time of the first message, and the preset time synchronization message response duration.

[0048] S103: The slave device receives the third message sent by the master device, and records the receiving time of the third message;

[0049] Among them, the third message is sent by the master device according to the preset time synchronization message response duration after receiving the second message; the third message carries the timestamp information of the time when the master device receives the second message and the identifier of the master device.

[0050] The slave device receives a third message sent by the master device in response to the second message, and the third message carries the timestamp information of the time when the master device receives the second message and the identification of the master device, so as to calculate the difference in waiting time based on this.

[0051] S104: The slave device calculates a difference between the first waiting time and the second waiting time;

[0052] Among them, the first waiting time is used to identify the time between the sending time of the first message and the receiving time of the second message; the second waiting time is used to identify the time between the sending time of the second message and the receiving time of the third message.

[0053] Specifically, based on the relationship between the sending time and receiving time of the first message, the second message and the third message, the duration between the sending time of the first message and the receiving time of the second message is determined as the first waiting time, and the duration between the sending time of the second message and the receiving time of the third message is determined as the second waiting time, and further, the difference between the first waiting time and the second waiting time is calculated.

[0054] S105: The slave device adjusts the local system time according to the difference and the preset time interval.

[0055] After a time synchronization, the system time error of the local clock of the device accumulates over a period of time. Therefore, after determining the difference between the first waiting time and the second waiting time, the slave device adjusts the local system time according to the difference and the preset time interval.

[0056] In a possible implementation, S105 includes:

[0057] The slave device adjusts the local system time according to the difference and the preset time interval and in accordance with a preset time compensation rule.

[0058] Specifically, the specific adjustment amount for adjusting the local system time may be determined according to the difference and the preset time interval and in accordance with a preset time compensation rule.

[0059] During the time synchronization process of the V2X device, the parameter accuracy of each time parameter can be adjusted according to actual needs. In one possible implementation, the parameter accuracy of each time parameter is microseconds.

[0060] It can be seen that in the V2X system, when the slave device enters the communication coverage of the master device, the slave device receives the first time synchronization message sent by the master device. Since the first message carries the identifier of the master device, after receiving the first message, the slave device responds to the first message sent by the master device according to the preset time synchronization response time, sends the second message to the master device, and then receives the third message returned by the master device based on the second message; finally, according to the relationship between the sending and receiving time of the first message, the second message and the third message, the difference between the first waiting time and the second waiting time is determined, and the slave device adjusts the local system time according to the difference and the preset time interval; wherein the first waiting time is used to identify the time between the sending time of the first message and the receiving time of the second message; the second waiting time is used to mark the time between the sending time of the second message and the receiving time of the third message. Since both the master device and the slave device respond to the time synchronization message sent by the other party according to the preset time synchronization message response time, the slave device can adjust the local time system according to the difference determined based on the first waiting time and the second waiting time and the preset time interval to achieve time synchronization with the master device. It can be seen that the present application provides a method based on the interaction of time synchronization messages between a master device and a slave device, in which the slave device adjusts the local system time to achieve time synchronization with the master device, thereby eliminating the system time error between the slave device and the master device and avoiding related problems caused by the system time error.

[0061] Figure 2 A schematic diagram of the structure of a time synchronization system for a V2X device provided in an embodiment of the present application includes a satellite system module, a local system clock module and a V2X time synchronization module, specifically:

[0062] The satellite system module includes a CPS antenna, a satellite signal receiving link and a satellite system timing module. The module provides the first time for the system time synthesis selection module through the satellite system timing. The time accuracy of the first time can be millisecond level.

[0063] The local system clock module includes a crystal oscillator circuit, a local system clock generation circuit and a local system time error compensation module. The module provides a second time for the system time synthesis selection module by means of the local system clock timing. The time accuracy of the second time can be in the microsecond level.

[0064] The V2X time synchronization module includes a system time synthesis selection module, a V2X time synchronization processing module, a V2X signaling management module, a V2X information sending module, a V2X information receiving module and a V2X antenna, which are used to realize message signaling interaction between V2X devices, calculation of time errors between devices and time synchronization processing mechanism.

[0065] Specifically, the GPS antenna receives the satellite system signal and transmits the received RF signal to the satellite signal processing module through the satellite signal receiving link, obtains the timestamp information of the satellite system timing, implements satellite time calibration based on this, and provides the first time for the system time synthesis selection module; the local system clock generation circuit generates the local system time through the oscillator of the crystal oscillator circuit, transmits it to the local time system compensation module for time feedback deviation compensation, and provides the second time for the system time synthesis selection module; the system time synthesis selection module, according to the synchronization mechanism of the satellite system timing information and the local system clock timing information, realizes unified timestamp information for the first time and the second time, and then provides the V2X signaling management module and the V2X time synchronization processing module with a unique time information service. It should be noted that each functional system can obtain millisecond, ten milliseconds, one hundred milliseconds, and second-level clock services from the time synthesis selection module according to actual application requirements.

[0066] It can be seen that the embodiment of the present application provides a V2X time synthesis selection mechanism, which provides the system time synthesis selection module through the local system clock timing and the satellite system timing, and then to the V2X time synchronization module to form a feedback closed loop. Based on this, when the satellite system timing is unsuccessful or the satellite system timing is not obtained for a long period of time, the reference time can be determined according to the local system clock timing, and the time synchronization between V2X devices can still be achieved, avoiding the related problems of relying on a single timing source of satellite timing, such as application scenarios where the GPS signal is weak, such as tunnel road conditions or mountain road conditions.

[0067] Figure 3 A schematic diagram of signaling interaction for time synchronization between a slave device and a master device provided in an embodiment of the present application, specifically:

[0068] The master device serves as a time synchronization device and the slave device serves as a time receiving device. Both devices use the same time synchronization system structure and are configured with the same time synchronization function parameters, including the time synchronization interval, the time synchronization response time, and the time synchronization frequency. The accuracy of each parameter can be microseconds.

[0069] The master device periodically sends the first time synchronization message RN1 to the slave device according to the frequency and interval of time synchronization. After receiving RN1, the slave device sends the second time synchronization message RN2 according to the response duration of time synchronization. After receiving RN2, the master device sends the third time synchronization message RN3 according to the response duration of time synchronization. Among them, the RN1, RN2 and RN3 messages carry timestamp information.

[0070] The difference between the time when the master device receives the RN2 message and the time when the master device sends the RN1 message is determined as △T1, and the difference between the time when the slave device sends the RN2 message and the time when the slave device receives the RN3 message is determined as △T2; the transmission time of the RN1, RN2 and RN3 messages is set to T0, the actual synchronization response time of the master device is T1, and the time synchronization response time of the slave device is T2, then:

[0071] The time calculation formula is: △T1=T2+2T0, △T2=T1+2T0, and then the difference between △T2 and △T1 is determined as Tn, so that the local system time can be adjusted through the local system time error compensation module according to Tn and the time synchronization interval to complete the time synchronization operation.

[0072] Figure 4 A device structure diagram of a time synchronization device for a V2X device provided in an embodiment of the present application, wherein the device includes a receiving unit 401, a sending unit 402, a calculating unit 403 and an adjusting unit 404:

[0073] The receiving unit 401 is configured to receive, by the slave device, a first time synchronization message sent by the master device at preset time intervals when the slave device enters the communication coverage of the master device; the first message carries timestamp information including the sending time of the first message and an identifier of the master device;

[0074] The sending unit 402 is used for sending a second time synchronization message to the master device according to a preset time synchronization message response duration after the slave device receives the first message, and recording the sending time of the second message; the second message carries the timestamp information of the receiving time of the first message received by the slave device and the identifier of the slave device;

[0075] The receiving unit 401 is further configured to receive, by the slave device, a third message sent by the master device, and record a reception time of the third message; the third message is sent by the master device according to the preset time synchronization message response duration after receiving the second message; the third message carries timestamp information of the reception time when the master device receives the second message and an identifier of the master device;

[0076] The calculation unit 403 is used for the slave device to calculate the difference between the first waiting time and the second waiting time; the first waiting time is used to identify the time between the sending time of the first message and the receiving time of the second message; the second waiting time is used to identify the time between the sending time of the second message and the receiving time of the third message;

[0077] The adjusting unit 404 is configured for the slave device to adjust the local system time according to the difference and the preset time interval.

[0078] In a possible implementation manner, the receiving unit is further configured to:

[0079] When the slave device enters the communication coverage of the master device, the slave device receives a first time synchronization message sent by the master device at preset time intervals after obtaining the reference time.

[0080] In a possible implementation manner, the reference time of the master device is obtained in the following manner:

[0081] The master device obtains the reference time by means of system time synthesis selection; the reference time is the first time or the second time; the first time is determined by satellite system timing, and the second time is determined by the local system clock timing of the master device.

[0082] In a possible implementation manner, the adjusting unit is further configured to:

[0083] The slave device adjusts the local system time according to the difference and the preset time interval and in accordance with a preset time compensation rule.

[0084] In a possible implementation, when a slave device enters a communication coverage area of ​​a master device, a binding relationship exists between the slave device and the master device.

[0085] In a possible implementation, the parameter precision of each time parameter is microseconds.

[0086] It can be seen that in the V2X system, when the slave device enters the communication coverage of the master device, the slave device receives the first time synchronization message sent by the master device. Since the first message carries the identifier of the master device, after receiving the first message, the slave device responds to the first message sent by the master device according to the preset time synchronization response time, sends the second message to the master device, and then receives the third message returned by the master device based on the second message; finally, according to the relationship between the sending and receiving time of the first message, the second message and the third message, the difference between the first waiting time and the second waiting time is determined, and the slave device adjusts the local system time according to the difference and the preset time interval; wherein the first waiting time is used to identify the time between the sending time of the first message and the receiving time of the second message; the second waiting time is used to mark the time between the sending time of the second message and the receiving time of the third message. Since both the master device and the slave device respond to the time synchronization message sent by the other party according to the preset time synchronization message response time, the slave device can adjust the local time system according to the difference determined based on the first waiting time and the second waiting time and the preset time interval to achieve time synchronization with the master device. It can be seen that the present application provides a method based on the interaction of time synchronization messages between a master device and a slave device, in which the slave device adjusts the local system time to achieve time synchronization with the master device, thereby eliminating the system time error between the slave device and the master device and avoiding related problems caused by the system time error.

[0087] In another aspect, an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:

[0088] The memory is used to store program code and transmit the program code to the processor;

[0089] The processor is used to execute the time synchronization method of the V2X device provided in the above embodiment according to the instructions in the program code.

[0090] The computer device may include a terminal device or a server, and the time synchronization device of the aforementioned V2X device may be configured in the computer device.

[0091] On the other hand, an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to execute the time synchronization method of the V2X device provided in the above embodiment.

[0092] In addition, an embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the time synchronization method of the V2X device provided in the above embodiment.

[0093] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc. Various media that can store program codes.

[0094] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0095] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0096] The above is a detailed introduction to a time synchronization method and related devices for a V2X device provided in an embodiment of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application. At the same time, for those skilled in the art, according to the method of the present application, there will be changes in the specific implementation method and application scope.

[0097] In summary, the content of this specification should not be understood as limiting the present application, and any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in this application should be included in the protection scope of this application. Moreover, based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations.

Claims

1. A time synchronization method for a V2X device, characterized in that: The method comprises: When the slave device enters the communication coverage of the master device, the slave device receives a first time synchronization message sent by the master device at a preset time interval; the first message carries timestamp information including the sending time of the first message and an identifier of the master device; After receiving the first message, the slave device sends a second time synchronization message to the master device according to a preset time synchronization message response duration, and records the sending time of the second message; the second message carries the timestamp information of the receiving time of the first message by the slave device and the identifier of the slave device; The slave device receives a third message sent by the master device, and records a reception time of the third message; the third message is sent by the master device according to the preset time synchronization message response duration after receiving the second message; the third message carries timestamp information of the reception time when the master device receives the second message and an identifier of the master device; The slave device calculates a difference between a first waiting time and a second waiting time; the first waiting time is used to identify a time between a sending time of the first message and a receiving time of the second message; the second waiting time is used to identify a time between a sending time of the second message and a receiving time of the third message; The slave device adjusts the local system time according to the difference and the preset time interval.

2. The method according to claim 1, characterized in that When the slave device enters the communication coverage of the master device, the slave device receives a first time synchronization message sent by the master device at preset time intervals, including: When the slave device enters the communication coverage of the master device, the slave device receives a first time synchronization message sent by the master device at preset time intervals after obtaining the reference time.

3. The method according to claim 2, characterized in that The reference time of the master device is obtained by: The master device obtains the reference time by means of system time synthesis selection; the reference time is the first time or the second time; the first time is determined by satellite system timing, and the second time is determined by the local system clock timing of the master device.

4. The method according to claim 1, characterized in that: The slave device adjusts the local system time according to the difference and the preset time interval, including: The slave device adjusts the local system time according to the difference and the preset time interval and in accordance with a preset time compensation rule.

5. The method according to any one of claims 1 to 4, characterized in that: When a slave device enters the communication coverage of a master device, a binding relationship exists between the slave device and the master device.

6. The method according to any one of claims 1 to 4, characterized in that: The parameter precision of each time parameter is microseconds.

7. A time synchronization device for a V2X device, characterized in that: The device comprises a receiving unit, a sending unit, a calculating unit and an adjusting unit: The receiving unit is configured to receive, by the slave device, a first time synchronization message sent by the master device at preset time intervals when the slave device enters the communication coverage of the master device; the first message carries timestamp information including the sending time of the first message and an identifier of the master device; The sending unit is used for sending a second time synchronization message to the master device according to a preset time synchronization message response duration after the slave device receives the first message, and recording the sending time of the second message; The second message carries timestamp information of a time when the slave device receives the first message and an identifier of the slave device; The receiving unit is further configured to receive, by the slave device, a third message sent by the master device, and record a receiving time of the third message; The third message is sent by the master device according to the preset time synchronization message response duration after the master device receives the second message; the third message carries the timestamp information of the time when the master device receives the second message and the identifier of the master device; The calculation unit is used for calculating the difference between the first waiting time and the second waiting time by the slave device; The first waiting time is used to identify the time between the sending time of the first message and the receiving time of the second message; The second waiting time is used to identify the time between the sending time of the second message and the receiving time of the third message; The adjusting unit is used for the slave device to adjust the local system time according to the difference and the preset time interval.

8. A computer device, characterized in that: The computer device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 6 according to the instructions in the program code.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 6.

10. A computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • PON bus time synchronization method and device, computer equipment and storage medium

    CN112187393A

  • Wireless ad hoc network time synchronization method with motion compensation

    CN113645686A