A synchronization method, device and terminal

By receiving and filtering basic synchronization messages sent by communication devices, determining the target synchronization source, and performing synchronization requests and responses, the problem of data redundancy and large amount of calculation caused by unrelated user timing offset measurement is solved, and a more efficient synchronization process is achieved. .

CN115632738BActive Publication Date: 2024-12-17DATANG GOHIGH INTELLIGENT & CONNECTED TECH (CHONGQING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211272697.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2024-12-17
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

There are timing offset measurements that are unrelated to users in the existing communication device synchronization scheme, resulting in redundant data in the synchronization message and large calculation amount.

Method used

By receiving basic synchronization messages sent by multiple terminals, the target synchronization source is determined, and a synchronization request message is sent to the target synchronization source, and its synchronization response message is received, thereby synchronizing with the reference time to avoid timing offset measurements of unrelated user terminals .

Benefits of technology

Reduces data redundancy in synchronization messages, reduces calculation amount, and improves synchronization accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115632738B_ABST
    Figure CN115632738B_ABST
Patent Text Reader

Abstract

The present invention provides a synchronization method, device and terminal. The method is applied to a first terminal, including receiving basic synchronization messages sent by multiple second terminals; determining a target synchronization source according to the synchronization level in the basic synchronization message; sending a synchronization request message to the target synchronization source in the nth cycle; receiving a synchronization response message sent by the target synchronization source in the n+1th cycle, the synchronization response message including the system time, the identifier of the target synchronization source, the first timing offset measurement value of the target synchronization source relative to the reference time in the n+1th cycle, the difference between the second timing offset measurement value and the first timing adjustment amount, and the identifier of the first terminal; obtaining the third timing offset measurement value of the first terminal relative to the target synchronization source in the n+1th cycle according to the synchronization response message; and synchronizing according to the difference, the first timing offset measurement value and the second timing offset measurement value. The present invention can avoid timing offset measurements of irrelevant users and reduce data redundancy in synchronization messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a synchronization method, device and terminal. Background Art

[0002] Communication devices will synchronize with each other based on synchronization message measurements. However, since synchronization messages have no definite recipient, the synchronization source device will measure the timing offset of the synchronization messages received from all surrounding users, and then broadcast the device's own timing offset relative to the reference time and the timing offset relative to other surrounding users.

[0003] Therefore, there are timing offset measurements of irrelevant users in the existing schemes, which leads to data redundancy in the synchronization message and a relatively large amount of calculation. Summary of the invention

[0004] The present invention provides a synchronization method, device and terminal, which solve the problem in the existing solution that there is timing offset measurement of irrelevant users, resulting in data redundancy in synchronization messages and relatively large calculation amount.

[0005] In a first aspect, an embodiment of the present invention provides a synchronization method, applied to a first terminal, the method comprising:

[0006] receiving a basic synchronization message sent by a plurality of second terminals, wherein the basic synchronization message includes a synchronization level of the second terminal;

[0007] Determining a target synchronization source according to the synchronization levels of the plurality of second terminals; wherein the target synchronization source is at least one of the plurality of second terminals;

[0008] In the nth cycle, a synchronization request message is sent to the target synchronization source, wherein the synchronization request message includes: an identifier of the target synchronization source and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0009] In the n+1th cycle, a synchronization response message sent by the target synchronization source is received, wherein the synchronization response message includes: system time, an identifier of the target synchronization source, a first timing offset measurement value of the target synchronization source relative to a reference time in the n+1th cycle, a difference between a second timing offset measurement value and a first timing adjustment amount, and an identifier of the first terminal; wherein the second timing offset measurement value is a timing offset measurement value of the target synchronization source relative to the first terminal in the nth cycle; and the first timing adjustment amount is a timing adjustment amount of the target synchronization source in the nth cycle;

[0010] Obtaining, according to the synchronization response message, a third timing offset measurement value of the first terminal relative to the target synchronization source in the (n+1)th cycle;

[0011] The first terminal is synchronized with a reference time based on the difference, the first timing offset measurement value, and the second timing offset measurement value.

[0012] In a second aspect, an embodiment of the present invention provides a synchronization method, applied to a second terminal, the method comprising:

[0013] Sending a basic synchronization message, wherein the basic synchronization message includes a synchronization level of the second terminal;

[0014] In an nth cycle, receiving a synchronization request message sent by the first terminal, the synchronization request message including: an identifier of the second terminal and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0015] Obtaining, according to the synchronization request message, a second timing offset measurement value of the second terminal relative to the first terminal in the nth period;

[0016] In the n+1th cycle, a synchronization response message is sent to the first terminal, and the synchronization response message includes: system time, the identifier of the second terminal, the first timing offset measurement value of the second terminal relative to the reference time in the n+1th cycle, the difference between the second timing offset measurement value and the first timing adjustment amount, and the identifier of the first terminal; the first timing adjustment amount is the timing adjustment amount of the second terminal in the nth cycle.

[0017] In a third aspect, an embodiment of the present invention provides a synchronization device, applied to a first terminal, the device comprising:

[0018] A first receiving module, configured to receive basic synchronization messages sent by multiple second terminals, wherein the basic synchronization messages include synchronization levels of the second terminals;

[0019] A first determination module, configured to determine a target synchronization source according to the synchronization levels of the plurality of second terminals; wherein the target synchronization source is at least one of the plurality of second terminals;

[0020] A first sending module, configured to send a synchronization request message to the target synchronization source in an nth cycle, wherein the synchronization request message includes: an identifier of the target synchronization source and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0021] A second receiving module is used to receive a synchronization response message sent by the target synchronization source in the n+1th cycle, wherein the synchronization response message includes: system time, an identifier of the target synchronization source, a first timing offset measurement value of the target synchronization source relative to a reference time in the n+1th cycle, a difference between a second timing offset measurement value and a first timing adjustment amount, and an identifier of the first terminal; wherein the second timing offset measurement value is a timing offset measurement value of the target synchronization source relative to the first terminal in the nth cycle; and the first timing adjustment amount is a timing adjustment amount of the target synchronization source in the nth cycle;

[0022] A first measurement module, configured to obtain, according to the synchronization response message, a third timing offset measurement value of the first terminal relative to the target synchronization source in the (n+1)th cycle;

[0023] A synchronization processing module is used to synchronize the first terminal with a reference time according to the difference, the first timing offset measurement value and the third timing offset measurement value.

[0024] In a fourth aspect, an embodiment of the present invention provides a synchronization device, applied to a second terminal, the device comprising:

[0025] A second sending module, configured to send a basic synchronization message, wherein the basic synchronization message includes a synchronization level of the second terminal;

[0026] A third receiving module is used to receive a synchronization request message sent by the first terminal in the nth cycle, wherein the synchronization request message includes: an identifier of the second terminal and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0027] A second measurement module, configured to obtain, according to the synchronization request message, a second timing offset measurement value of the second terminal relative to the first terminal in the nth period;

[0028] The third sending module is used to send a synchronization response message to the first terminal in the n+1 period, and the synchronization response message includes: system time, the identifier of the second terminal, the first timing offset measurement value of the second terminal relative to the reference time in the nth period, the difference between the second timing offset measurement value and the first timing adjustment amount, and the identifier of the first terminal; the first timing adjustment amount is the timing adjustment amount of the second terminal in the nth period.

[0029] In the fifth aspect, an embodiment of the present invention provides a terminal, comprising: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, it implements the steps of the synchronization method described in the first aspect, or implements the steps of the synchronization method described in the second aspect.

[0030] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the synchronization method described in the first aspect are implemented, or the steps of the synchronization method described in the second aspect are implemented.

[0031] The beneficial effects of the above technical solution of the present invention are:

[0032] In the above scheme, the first terminal receives a basic synchronization message sent by multiple second terminals, and the basic synchronization message includes the synchronization level of the second terminal; determines the target synchronization source according to the synchronization levels of the multiple second terminals; wherein the target synchronization source is at least one of the multiple second terminals; in the nth cycle, sends a synchronization request message to the target synchronization source, and the synchronization request message includes: the identifier of the target synchronization source and the identifier of the first terminal; n is an integer greater than or equal to 1; in the n+1th cycle, receives a synchronization response message sent by the target synchronization source, and the synchronization response message includes: system time, the identifier of the target synchronization source, the identifier of the target synchronization source, The first terminal is synchronized with the reference time according to the first timing offset measurement value, the difference between the second timing offset measurement value and the first timing adjustment value, and the identifier of the first terminal; wherein the second timing offset measurement value is the timing offset measurement value of the target synchronization source relative to the first terminal in the nth period; the first timing adjustment value is the timing adjustment value of the target synchronization source in the nth period; according to the synchronization response message, the third timing offset measurement value of the first terminal relative to the target synchronization source in the n+1th period is obtained; according to the difference, the first timing offset measurement value and the second timing offset measurement value, the first terminal is synchronized with the reference time. This scheme determines the target synchronization source based on the basic synchronization message sent by the second terminal, and further sends a synchronization request message to the target synchronization source. In this way, after receiving the synchronization request message sent by the first terminal, the target synchronization source measures the difference between the first timing offset measurement value, the second timing offset measurement value and the first timing adjustment amount of the target synchronization source relative to the reference time in the n+1th cycle. In this way, the target synchronization source only measures the second timing offset measurement value of the first terminal related to the sending of the synchronization request message, which can avoid measuring the timing offset of irrelevant user terminals, avoid data redundancy in the synchronization message, and reduce the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 One of the flowcharts showing the synchronization message of an embodiment of the present invention;

[0034] Figure 2 A second flowchart showing synchronization messages according to an embodiment of the present invention;

[0035] Figure 3 A third flowchart showing a synchronization message according to an embodiment of the present invention;

[0036] Figure 4 A fourth flowchart showing synchronization messages according to an embodiment of the present invention;

[0037] Figure 5 A fifth flowchart showing synchronization messages according to an embodiment of the present invention;

[0038] Figure 6 One of the structural block diagrams of the synchronization device according to the embodiment of the present invention;

[0039] Figure 7 A second structural block diagram showing a synchronization device according to an embodiment of the present invention;

[0040] Figure 8 A block diagram showing a first terminal of the present invention;

[0041] Fig. 9 A block diagram showing the structure of a second terminal according to the present invention. DETAILED DESCRIPTION

[0042] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail in conjunction with the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the present invention. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. In addition, for clarity and brevity, the description of known functions and structures is omitted.

[0043] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0044] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0045] Additionally, the terms "system" and "network" are often used interchangeably herein.

[0046] In the embodiments provided in the present application, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.

[0048] The following first introduces the contents involved in the solution provided in the embodiment of the present application.

[0049] Specifically, the embodiments of the present invention provide a synchronization method, device and terminal, which solve the problem in existing solutions that timing offset measurements of irrelevant users result in data redundancy in synchronization messages and a relatively large amount of calculation.

[0050] First embodiment

[0051] like Figure 1 As shown, an embodiment of the present invention provides a synchronization method, which is applied to a first terminal and specifically includes the following steps:

[0052] Step 101: receiving basic synchronization messages sent by multiple second terminals, where the basic synchronization messages include synchronization levels of the second terminals;

[0053] In this step, the second terminal may send the basic synchronization message in a broadcasting form.

[0054] The synchronization level of the second terminal includes one of the following:

[0055] a first synchronization level, wherein the first synchronization level indicates that a synchronization source of the second terminal is a Global Navigation Satellite System GNSS signal;

[0056] The (m+1)th synchronization level, wherein the (m+1)th synchronization level indicates that the synchronization source of the second terminal is a terminal of the (m)th synchronization level; wherein m≥1, and m is a positive integer.

[0057] Exemplarily, the minimum value of the synchronization level number is 0. If the synchronization source of the roadside equipment is the Global Navigation Satellite System (GNSS) signal or the synchronization signal sent by other high-precision synchronization equipment, the synchronization level is 0. If a node with a high synchronization level number uses a node with a low synchronization level number as its synchronization source, and the synchronization source is numbered m, then the synchronization level of the node that uses this node as its synchronization source is m+1.

[0058] Step 102: determining a target synchronization source according to the synchronization levels of the plurality of second terminals; wherein the target synchronization source is at least one of the plurality of second terminals;

[0059] In this step, one or more second terminals with the highest synchronization level may be used as target synchronization sources.

[0060] Step 103: In the nth cycle, a synchronization request message is sent to the target synchronization source, wherein the synchronization request message includes: an identifier of the target synchronization source and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0061] In this step, when the second terminal receives the synchronization request message, it determines that the device to be synchronized is the first terminal based on the identifier of the first terminal in the synchronization request message; further, based on the synchronization request message, the second timing offset measurement value of the second terminal relative to the first terminal in the nth period is obtained by physical measurement.

[0062] Step 104: In the n+1th cycle, a synchronization response message sent by the target synchronization source is received, wherein the synchronization response message includes: system time, an identifier of the target synchronization source, a first timing offset measurement value of the target synchronization source relative to a reference time in the n+1th cycle, a difference between a second timing offset measurement value and a first timing adjustment amount, and an identifier of the first terminal; wherein the second timing offset measurement value is a timing offset measurement value of the target synchronization source relative to the first terminal in the nth cycle; and the first timing adjustment amount is a timing adjustment amount of the target synchronization source in the nth cycle;

[0063] In this step, the first timing offset measurement value is the timing offset of each target synchronization source relative to the reference time measured by each target synchronization source in the n+1th cycle. The difference between the second timing offset measurement value and the first timing adjustment amount is the timing offset value of the target synchronization source budgeted by the second terminal in the nth cycle relative to the first terminal in the n+1th cycle.

[0064] It should be noted that the difference between the second timing offset measurement value and the first timing adjustment amount is a pseudo-predicted timing offset, which needs to be corrected using the timing adjustment amount of the first terminal in the nth cycle to reduce the hysteresis effect and increase calculation accuracy.

[0065] The system time can be a radio frame and subframe or Coordinated Universal Time (UTC), and the system time is used to achieve millisecond-level synchronization.

[0066] Step 105: Obtaining, according to the synchronization response message, a third timing offset measurement value of the first terminal relative to the target synchronization source in the (n+1)th cycle;

[0067] In specific implementation, in the (n+1)th cycle, the first terminal may obtain, according to the synchronization response message, a third timing offset measurement value of the first terminal relative to the target synchronization source in the (n+1)th cycle by means of physical measurement.

[0068] Step 106: The first terminal is synchronized with a reference time according to the difference, the first timing offset measurement value and the second timing offset measurement value.

[0069] In specific implementation, step 106 may include: the first terminal determines the second timing adjustment amount of the first terminal during the nth cycle; according to the second timing adjustment amount, corrects the difference to obtain the sum of the difference and the second timing adjustment amount; according to the sum of the difference and the second timing adjustment amount, and the third timing offset measurement value, determines the actual timing deviation of the first terminal relative to the target synchronization source; according to the actual timing deviation and the first timing offset measurement value, determines the timing offset of the first terminal from the reference time, and the first terminal is synchronized with the reference time.

[0070] In an exemplary application scenario, the distance L between communication devices A and B is AB , in the nth synchronization cycle, the relative timing offset values ​​of device A and device B from the reference time are T A,n and T B,n , device A receives the synchronization request message sent by device B, and the measured relative timing offset is Ta AB,n (i.e., the second timing offset measurement value), device A and device B adjust the timing Td A,n (i.e., the first timing adjustment amount) and T B,n (i.e., the second timing adjustment amount), in the n+1th synchronization cycle, the relative timing offset value between device A and the reference time is T A,n+1 (i.e., the first timing offset measurement value), device A sends a synchronization response message, and device B receives the synchronization response message sent by device A. The measured relative timing offset is TaBA,n+1 (i.e., the third timing offset measurement value), during period n to period n+1, device A or device B makes timing adjustments, and the adjustment amounts are Td A,n and Td B,n The synchronization calculation process on device B is as follows:

[0071] The pseudo predicted timing offset sent by device A in the n+1 synchronization period is:

[0072] Ta' AB,n+1 =Ta AB,n -Td A,n

[0073] Device B receives Ta' in the n+1 synchronization cycle AB,n+1 , correct it to:

[0074] Ta″ AB,n+1 =Ta′ AB,n+1 +Td B,n

[0075] Considering that the interval between period n and period n+1 is short, we have:

[0076] Ta″ AB,n+1 ≈Ta AB,n+1

[0077] Among them, Ta′ AB,n+1 is the difference between the second timing offset measurement value and the first timing adjustment value, that is, the pseudo-predicted timing offset; Ta AB,n is the second timing offset measurement value; Td A,n is the first timing adjustment amount; Td B,n is the second timing adjustment amount; Ta″ AB,n+1 It is the sum of the difference and the second timing adjustment amount, that is, the corrected pseudo-prediction timing offset.

[0078] Furthermore, due to Ta AB,n and Ta BA,n+1 Satisfies the following formula:

[0079]

[0080]

[0081] Among them, Δ AB,n and Δ BA,n+1 is the timing offset measurement error.

[0082] In practical applications, due to Ta AB,n and Ta BA,n+1 The measurement time is close, so in the n+1th synchronization cycle, the relative timing offset of device A relative to device B obtained by device B can be approximately equal to Ta"AB,n+1 , that is, it satisfies the following formula:

[0083] Ta AB,n+1 ≈Ta″ AB,n+1 =Ta AB,n -Td A,n +Td B,n Formula (3).

[0084] Therefore, substituting formula (1) into formula (3), we can get:

[0085] That is:

[0086]

[0087] Then, using equation (2) minus equation (4), we get T B,n+1 and T A,n+1 The actual deviation between BA,n+1 Approximately:

[0088]

[0089] Therefore, by transmitting the timing offset between communication devices in the synchronization message, the influence of the propagation distance delay on the timing can be eliminated and the synchronization accuracy can be improved.

[0090] Finally, in the n+1 synchronization cycle, the relative timing offset value T between device B and the reference time is B,n+1 for:

[0091] T B,n+1 =Rt BA,n+1 +T A,n+1

[0092] Among them, Rt BA,n+1 is the actual deviation between the first terminal and the second terminal in the n+1th cycle, T A,n+1 It is the relative timing offset value between device A and the reference time in the n+1th synchronization cycle.

[0093] In the above embodiment, the synchronized static device periodically sends a basic synchronization message. After receiving the basic synchronization message, the unsynchronized device uses one or more devices with the highest synchronization level as the synchronization source, broadcasts a synchronization request message with the synchronization source ID for the synchronization request, and after receiving the synchronization request message, the synchronization source device broadcasts a synchronization response message for the synchronization response. The synchronization response message carries the relative timing offset value between the local device and the reference time. When the local device is used as the synchronization source and other devices are synchronized with the local device, the relative timing offset between the synchronization source device and the reference time can be directly obtained, and then synchronized with the reference time. Compared with the synchronization technology that does not carry the relative timing offset value with the reference time, it can effectively reduce the probability of misadjustment, reduce the accumulation of multi-level synchronization adjustment errors, facilitate Kalman filtering, and improve synchronization accuracy. Moreover, the relative timing offset between the transmission and the device to be synchronized in the synchronization response message can eliminate the influence of the propagation distance delay on the timing and improve the synchronization accuracy.

[0094] In particular, since in the above embodiment, the first terminal determines the target synchronization source from multiple second terminals based on the basic synchronization messages sent by multiple second terminals, and further sends a synchronization request message to the target synchronization source, after receiving the synchronization request message sent by the first terminal, the target synchronization source measures the second timing offset measurement value, and calculates the difference between the second timing offset measurement value and the first timing adjustment amount. In this way, the target synchronization source only measures the second timing offset measurement value of the first terminal related to the sending of the synchronization request message, and does not measure the offset value between devices for the terminal that has not sent the synchronization request message. This can avoid the second terminal from measuring the timing offset of an irrelevant user terminal, avoid data redundancy in the synchronization message, and reduce the amount of calculation.

[0095] Among them, during the synchronization process, synchronization messages (such as basic synchronization messages, synchronization request messages and synchronization response messages) can be carried through dedicated physical channels or service channels, such as physical sidelink broadcast channels (PSBCH) or physical sidelink shared channels (PSSCH).

[0096] It should be noted that each synchronized communication device needs to send a basic synchronization message; when a communication device uses other devices as a synchronization source, it needs to send a synchronization request message; when it is a synchronization source for other devices, it needs to send a synchronization response message. In order to reduce the system load, the first terminal can send a basic synchronization message, a synchronization request message, and a synchronization response message in a combined manner. For details, please refer to the following embodiments:

[0097] In one embodiment, after the first terminal is synchronized with the reference time, the method further includes:

[0098] When the first synchronized terminal takes the second terminal as a target synchronization source, and the first terminal is a target synchronization source of a third terminal, sending a first synchronization message frame;

[0099] The first synchronization message frame carries at least one of the following synchronization data:

[0100] a synchronization level of the first terminal;

[0101] an identifier of the first terminal;

[0102] an identifier of the second terminal serving as a target synchronization source for the first terminal;

[0103] System time;

[0104] A timing offset measurement value of the first terminal relative to a reference time in a current synchronization period;

[0105] The difference between the timing offset measurement value of the first terminal relative to the third terminal in the current synchronization period and the timing adjustment amount of the first terminal in the current synchronization period, and the identifier of the third terminal.

[0106] Exemplarily, device A is synchronized based on device B, device C is synchronized based on device A, and device D is not synchronized yet. Then the first synchronization message frame sent by device A is a synchronization request message for device B, a synchronization response message for device C, and a basic synchronization message for device D.

[0107] Specifically, the frame format of the first synchronization message frame can be seen in the following table:

[0108]

[0109] It should be pointed out that there can be multiple IDs of the synchronization source device; the inter-device timing offset measurement value is the timing offset relative to the local time measured by the local device by monitoring the synchronization request messages sent by N nearby communication devices to be synchronized, that is, each device ID that sends a synchronization request corresponds to a timing offset measurement value between devices (between the synchronization source device and the device that sends the synchronization request).

[0110] In the above embodiment, after the messages are merged, the device periodically sends the first synchronization message frame, and only one synchronization message needs to be sent in each cycle, which can effectively reduce the system overhead of the synchronization message.

[0111] In one embodiment, in the above step 102, determining a target synchronization source according to the synchronization levels of the plurality of second terminals includes:

[0112] determining the second terminal having the highest synchronization level as the target synchronization source;

[0113] When there are multiple second terminals with the highest synchronization level, the second terminal whose reference signal receiving power (RSRP) is greater than a threshold value is determined as the target synchronization source.

[0114] In this embodiment, if the first terminal to be synchronized receives a synchronization request message sent by multiple synchronized second terminals, the target synchronization source is determined from the multiple second terminals according to the synchronization level in the synchronization request message. If the target synchronization source includes multiple second terminals with the same synchronization level, the RSRP threshold value can be used to screen the target synchronization source, and the second terminal whose reference signal received power RSRP is greater than the threshold value is determined as the target synchronization source.

[0115] In a specific embodiment, when the number of the target synchronization sources is N, and N≥2, the first terminal is synchronized with the reference time according to the difference, the first timing offset measurement value, and the second timing offset measurement value, including:

[0116] Determine a calculated timing offset between the first terminal and a reference time corresponding to each of the target synchronization sources according to the difference corresponding to the N target synchronization sources, the first timing offset measurement value, and the third timing offset measurement value;

[0117] Determining a weight corresponding to each of the timing offset calculation values ​​according to the RSRP of the target synchronization source;

[0118] Performing weighted summation on the N timing offset calculation values ​​to obtain a first offset value;

[0119] The first terminal is synchronized with a reference time according to the first offset value.

[0120] Exemplarily, static device B is the device to be synchronized, and static devices A and C are synchronized devices. The synchronization level of device A is 1, and the synchronization level of device C is 1. The RSRP value of device B receiving the synchronization message of device A is -76dBm, and the RSRP value of device B receiving the synchronization message of device C is -80dBm. The RSRP threshold value configured by device B is -128dBm. The synchronization process is as follows:

[0121] Device B uses device A and device C as synchronization sources for synchronization, sends synchronization request messages to devices A and C, and then receives synchronization response messages sent by devices A and C. Based on the timing offset and other measurement values ​​in the synchronization response messages of devices A and C, as well as the relative timing offset measured by device B with device A and the relative timing offset with device C, the timing offset T of device B relative to the reference time is calculated.B|A and T B|C , determine T based on the RSRP value received from device A and the RSRP value received from device C B|A and T B|C The weight value distribution is w A and w C ,in:

[0122]

[0123]

[0124] That is:

[0125] w A =10 -7.6 / (10 -7.6 +10 -8 )=0.72,w C =10 -8 / (10 -7.6 +10 -8 )=0.28, then the timing offset of B relative to the reference time is T B =0.72×T B|A +0.28×T B|C .

[0126] It should be noted that dBm is a value representing the absolute value of power (it can also be considered as a ratio based on 1mW power), and the calculation formula is: RSRP threshold value = lg (power value / 1mw).

[0127] The synchronization method of the present application is introduced below with reference to specific examples.

[0128] Example 1

[0129] like Figure 2 In the synchronization method, the following processes are mainly included:

[0130] Step 1: Device A sends a basic synchronization message.

[0131] Specifically, the synchronized device A sends a basic synchronization message in a broadcast manner in the (n-1)th synchronization cycle; the basic synchronization message carries the synchronization level of the device A.

[0132] Step 2: Device B to be synchronized receives the basic synchronization message sent by device A.

[0133] If device B receives synchronization messages sent by multiple synchronized devices, it determines the synchronization source based on the synchronization level. If the synchronization levels are the same, it can use the RSRP threshold value for further screening.

[0134] Step 3: Device B sends a synchronization request message.

[0135] Specifically, if device B determines to use device A as its target synchronization source, it sends a synchronization request message in a broadcast manner in the nth synchronization cycle; the synchronization request message carries the ID of device A and the ID of device B.

[0136] Step 4: Device A sends a synchronization response message.

[0137] Specifically, device A receives the synchronization request message from device B, performs timing offset measurement, and determines to perform a synchronization response. Device A sends a synchronization response message in a broadcast manner in the (n+1)th synchronization cycle.

[0138] Step 5: Device B measures the timing offset between itself and device A based on the synchronization response message, and performs timing adjustment based on the timing offsets of device A and device B in the synchronization response message.

[0139] Device B and device A can repeat steps 1 to 5 above to achieve continuous system synchronization.

[0140] Example 2

[0141] like Figure 3 In the example, communication device B is the device to be synchronized, stationary device A, stationary device C and stationary device D are synchronized devices, the synchronization level of device A is 1, the synchronization level of device C is 2, and the synchronization level of device D is 1. The RSRP value of device B receiving the synchronization message from device A is -76dBm, the RSRP value of the synchronization message from device C is -80dBm, the RSRP value of the synchronization message from device D is -130dBm, and the RSRP threshold value configured for device B is -128dBm. The specific synchronization process is as follows:

[0142] Step 1: Device B receives synchronization messages from devices A, C, and D in the T1 synchronization period.

[0143] Since the synchronization levels of devices A and D are higher than C (the smaller the value, the higher the synchronization level), C is not selected as the synchronization source. Since the RSRP value of device D is less than the threshold value, device B selects device A as the target synchronization source.

[0144] Step 2: Device B broadcasts a synchronization message (i.e., a synchronization message frame formed by merging three messages) to send a synchronization request message to device A.

[0145] The target synchronization source ID field of the synchronization message is filled with the ID of device A. Since device B is not synchronized, except for the device ID and target synchronization source ID fields, the remaining fields are filled with invalid values.

[0146] Step 3: The stationary devices A, C and D simultaneously receive the synchronization message from device B in the T2 synchronization period.

[0147] Since the target synchronization source ID carried in the synchronization message is the ID of device A, devices C and D filter the synchronization message, and device A receives and processes the synchronization message, and performs relative timing offset measurement at the same time. Device A responds to device B synchronously, fills its synchronization level, system time, timing offset relative to the reference clock, device A's ID, the difference between the relative timing offset between devices (between device A and device B) measured by device A and the timing adjustment of device A, and device B's ID into the corresponding fields of the synchronization message, and broadcasts the synchronization message in the T3 synchronization period.

[0148] Step 4: Device B receives the synchronization message from device A in the T3 synchronization period.

[0149] In this step, the device ID is determined to be the synchronization source device. Synchronization is performed based on the measured values ​​such as the timing offset in the synchronization message of device A and the relative timing offset between device B and device A measured.

[0150] In order to maintain the synchronization state and provide a synchronization source for other unsynchronized roadside devices, roadside device B continues to broadcast synchronization messages in the T4 synchronization cycle. Because roadside device B is synchronized at this time, its synchronization level (synchronization source level + 1, so B's synchronization level is 2), system time, timing offset relative to the reference clock, device ID, target synchronization source ID (still needs to be synchronized with device A), the difference between the relative timing offset between devices measured by device B (device B relative to device A) and the timing adjustment of device B, and the ID of device A are filled in the corresponding fields of the synchronization message, and the synchronization message is broadcast.

[0151] Example 3

[0152] like Figure 4 In the example, static device B is the device to be synchronized, and static devices A and C are synchronized devices. The synchronization level of device A is 1, and the synchronization level of device C is 1. The RSRP value of device B receiving the synchronization message from device A is -76dBm, and the RSRP value of device B receiving the synchronization message from device C is -80dBm. The RSRP threshold value configured for device B is -128dBm. The synchronization process is as follows:

[0153] Step 1: The stationary device B receives the synchronization message (i.e., the synchronization message frame after the three messages are merged) from the communication devices A and C in the T1 synchronization period.

[0154] Among them, since the synchronization level of device A is the same as that of device C, and the RSRP values ​​of both are less than the threshold value, device B uses both devices A and C as synchronization sources.

[0155] Step 2: Device B broadcasts a synchronization message to request synchronization of devices A and C.

[0156] The target synchronization source ID field of the synchronization message is filled with the ID of device A, and the ID of device C is also filled in. Since device B is not synchronized, except for the device ID and target synchronization source ID fields, the remaining fields are filled with invalid values.

[0157] Step 3: Device A and device C simultaneously receive the synchronization message from device B in the T2 synchronization period.

[0158] Since the target synchronization source ID in the synchronization message carries the IDs of device A and device C, both device A and device C receive and process the synchronization message and perform relative timing offset measurement at the same time. Both devices A and C perform synchronization responses to device B, and fill in the corresponding fields of the synchronization message with their synchronization level, system time, timing offset relative to the reference clock, device ID, the difference between the relative timing offset between devices measured by device B (device B relative to device A, device B relative to device C) and the timing adjustment of device B, and the ID of device B, and broadcast the synchronization message in the T3 synchronization period.

[0159] Step 4: Device B receives synchronization messages from devices A and C in the T3 synchronization period.

[0160] Among them, devices A and C are identified as synchronization source devices by judging the device ID. Based on the measurement values ​​such as the timing offset in the synchronization message of devices A and C, and the difference between the relative timing offset between devices (between devices A and C) measured by device B and the timing adjustment of device B, the timing offset T of B relative to the reference time is calculated respectively. B|A and T B|C , for T B|A and T B|C Take the average or assign different weight values ​​according to some prior information, perform weighted summation, and finally obtain the timing offset T of B relative to the reference time. B , the synchronization is completed.

[0161] Step 5: Device B continues to broadcast and send synchronization messages.

[0162] In order to maintain the synchronization state and provide a synchronization source for other unsynchronized communication devices, device B continues to broadcast synchronization messages in the T4 synchronization cycle. Because device B is synchronized at this time, its synchronization level (synchronization source level + 1, so B's synchronization level is 2), system time, timing offset relative to the reference clock, device ID, target synchronization source ID (still needs to be synchronized with A and C), the difference between the relative timing offset between devices (between device B and devices A and C) and the timing adjustment of device B, and the IDs of devices A and C are filled in the corresponding fields of the synchronization message, and the synchronization message is broadcast.

[0163] The above scheme has the following technical effects:

[0164] 1. Communication devices achieve synchronization through request and response interaction, and can combine synchronization request messages, synchronization response messages and basic synchronization messages to reduce synchronization message overhead.

[0165] 2. The synchronization message carries the relative timing offset value between the synchronization source device and the reference time. The unsynchronized device is directly synchronized and calibrated relative to the reference time, reducing the accumulation of multi-level synchronization adjustment errors.

[0166] 3. The target synchronization source only measures the second timing offset measurement value of the first terminal related to sending the synchronization request message, and does not measure the offset value between devices for the terminal that has not sent the synchronization request message. This can avoid the second terminal from measuring the timing offset of an irrelevant user terminal, avoid data redundancy in the synchronization message, and reduce the amount of calculation.

[0167] Second embodiment

[0168] like Figure 5 As shown, an embodiment of the present invention provides a synchronization method, which is applied to a second terminal, and the method includes:

[0169] Step 201: Send a basic synchronization message, where the basic synchronization message includes the synchronization level of the second terminal.

[0170] In this step, the second terminal may send the basic synchronization message in a broadcasting form.

[0171] The synchronization level of the second terminal includes one of the following:

[0172] a first synchronization level, wherein the first synchronization level indicates that a synchronization source of the second terminal is a Global Navigation Satellite System GNSS signal;

[0173] The (m+1)th synchronization level, wherein the (m+1)th synchronization level indicates that the synchronization source of the second terminal is a terminal of the (m)th synchronization level; wherein m≥1, and m is a positive integer.

[0174] Exemplarily, the minimum value of the synchronization level number is 0. If the synchronization source of the roadside equipment is a GNSS signal or a synchronization signal sent by other high-precision synchronization equipment, the synchronization level is 0. A node with a high synchronization level number uses a node with a low synchronization level number as its synchronization source. If the synchronization source is numbered m, the synchronization level of the node that uses this node as its synchronization source is m+1.

[0175] Step 202: In the nth cycle, a synchronization request message sent by the first terminal is received, where the synchronization request message includes: an identifier of the second terminal and an identifier of the first terminal; n is an integer greater than or equal to 1.

[0176] In this step, when the second terminal receives the synchronization request message, it determines that the device to be synchronized is the first terminal according to the identifier of the first terminal in the synchronization request message.

[0177] Step 203: Obtain, according to the synchronization request message, a second timing offset measurement value of the second terminal relative to the first terminal in the nth period.

[0178] In this step, according to the synchronization request message, a second timing offset measurement value of the second terminal relative to the first terminal in the nth period is obtained by physical measurement.

[0179] Step 204: In the n+1th period, a synchronization response message is sent to the first terminal, wherein the synchronization response message includes: the system time, the identifier of the second terminal, the first timing offset measurement value of the second terminal relative to the reference time in the n+1th period, the difference between the second timing offset measurement value and the first timing adjustment amount, and the identifier of the first terminal; the first timing adjustment amount is the timing adjustment amount of the second terminal in the nth period.

[0180] In this step, the first timing offset measurement value is the timing offset of each target synchronization source relative to the reference time measured by each target synchronization source in the n+1th cycle. The difference between the second timing offset measurement value and the first timing adjustment amount is the timing offset value of the target synchronization source budgeted by the second terminal in the nth cycle relative to the first terminal in the n+1th cycle.

[0181] It should be noted that the difference between the second timing offset measurement value and the first timing adjustment amount is a pseudo-predicted timing offset, which needs to be corrected using the timing adjustment amount of the first terminal in the nth cycle to reduce the hysteresis effect and increase calculation accuracy.

[0182] It should be noted that each synchronized communication device needs to send a basic synchronization message; when a communication device uses other devices as a synchronization source, it needs to send a synchronization request message; when it is a synchronization source for other devices, it needs to send a synchronization response message. In order to reduce the system load, the second terminal can send a basic synchronization message, a synchronization request message, and a synchronization response message in a combined manner. For details, please refer to the following embodiments:

[0183] In a specific embodiment, the method further includes:

[0184] When the synchronized second terminal takes the fourth terminal as a target synchronization source and the second terminal is the target synchronization source of the first terminal, sending a second synchronization message frame;

[0185] The second synchronization message frame carries at least one of the following synchronization data:

[0186] a synchronization level of the second terminal;

[0187] an identifier of the second terminal;

[0188] an identifier of the fourth terminal that takes the second terminal as a target synchronization source;

[0189] System time;

[0190] A timing offset measurement value of the second terminal relative to a reference time in a current synchronization period;

[0191] A difference between a timing offset measurement value of the second terminal relative to the first terminal in a current synchronization period and a timing adjustment amount of the second terminal in the current synchronization period, and an identifier of the first terminal.

[0192] Exemplarily, device A is synchronized based on device B, device C is synchronized based on device A, and device D is not synchronized yet. Then the second synchronization message frame sent by device A is a synchronization request message for device B, a synchronization response message for device C, and a basic synchronization message for device D.

[0193] In the above embodiment, after the messages are merged, the device periodically sends the first synchronization message frame, and only one synchronization message needs to be sent in each cycle, which can effectively reduce the system overhead of the synchronization message.

[0194] Third embodiment

[0195] like Figure 6 As shown, an embodiment of the present invention provides a synchronization device 600, which is applied to a first terminal. The synchronization device 600 includes:

[0196] A first receiving module 601 is configured to receive a basic synchronization message sent by a plurality of second terminals, wherein the basic synchronization message includes a synchronization level of the second terminal;

[0197] A first determination module 602 is configured to determine a target synchronization source according to the synchronization levels of the plurality of second terminals; wherein the target synchronization source is at least one of the plurality of second terminals;

[0198] The first sending module 603 is used to send a synchronization request message to the target synchronization source in the nth cycle, where the synchronization request message includes: an identifier of the target synchronization source and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0199] The second receiving module 604 is used to receive a synchronization response message sent by the target synchronization source in the n+1th cycle, wherein the synchronization response message includes: system time, an identifier of the target synchronization source, a first timing offset measurement value of the target synchronization source relative to a reference time in the n+1th cycle, a difference between a second timing offset measurement value and a first timing adjustment amount, and an identifier of the first terminal; wherein the second timing offset measurement value is a timing offset measurement value of the target synchronization source relative to the first terminal in the nth cycle; and the first timing adjustment amount is a timing adjustment amount of the target synchronization source in the nth cycle;

[0200] A first measurement module 605 is configured to obtain, according to the synchronization response message, a third timing offset measurement value of the first terminal relative to the target synchronization source in the (n+1)th cycle;

[0201] The synchronization processing module 606 is used to synchronize the first terminal with a reference time according to the difference, the first timing offset measurement value and the third timing offset measurement value.

[0202] Optionally, the apparatus 600 further includes:

[0203] A fourth sending module, configured to send a first synchronization message frame when the synchronized first terminal takes the second terminal as a target synchronization source and the first terminal is a target synchronization source of a third terminal;

[0204] The first synchronization message frame carries at least one of the following synchronization data:

[0205] a synchronization level of the first terminal;

[0206] an identifier of the first terminal;

[0207] an identifier of the second terminal serving as a target synchronization source for the first terminal;

[0208] System time;

[0209] A timing offset measurement value of the first terminal relative to a reference time in a current synchronization period;

[0210] The difference between the timing offset measurement value of the first terminal relative to the third terminal in the current synchronization period and the timing adjustment amount of the first terminal in the current synchronization period, and the identifier of the third terminal.

[0211] Optionally, the first determining module 602 includes:

[0212] A first determining submodule, configured to determine the second terminal having the highest synchronization level as the target synchronization source;

[0213] When there are multiple second terminals with the highest synchronization level, the second terminal whose reference signal received power RSRP is greater than a threshold value is determined as the target synchronization source.

[0214] Optionally, when the number of the target synchronization sources is N, and N≥2, the synchronization processing module 606 includes:

[0215] A first synchronization processing submodule, configured to determine a timing offset calculation value between the first terminal and a reference time corresponding to each of the target synchronization sources according to the difference corresponding to the N target synchronization sources, the first timing offset measurement value, and the third timing offset measurement value;

[0216] A second synchronization processing submodule, configured to determine a weight corresponding to each of the timing offset calculation values ​​according to the RSRP of the target synchronization source;

[0217] A third synchronization processing submodule, configured to perform weighted summation on the N timing offset calculation values ​​to obtain a first offset value;

[0218] The fourth synchronization processing submodule is used to synchronize the first terminal with a reference time according to the first offset value.

[0219] Optionally, the synchronization processing module 606 includes:

[0220] a fifth synchronization processing submodule, configured to determine a second timing adjustment amount of the first terminal during the nth period;

[0221] a sixth synchronization processing submodule, configured to correct the difference according to the second timing adjustment amount to obtain a sum of the difference and the second timing adjustment amount;

[0222] a seventh synchronization processing submodule, configured to determine an actual timing deviation of the first terminal relative to the target synchronization source according to the sum of the difference and the second timing adjustment amount, and the third timing offset measurement value;

[0223] An eighth synchronization processing submodule is used to determine the timing offset between the first terminal and a reference time according to the actual timing deviation and the first timing offset measurement value, and the first terminal is synchronized with the reference time.

[0224] Optionally, the synchronization level of the second terminal includes one of the following:

[0225] a first synchronization level, wherein the first synchronization level indicates that a synchronization source of the second terminal is a Global Navigation Satellite System GNSS signal;

[0226] The (m+1)th synchronization level, wherein the (m+1)th synchronization level indicates that the synchronization source of the second terminal is a terminal of the (m)th synchronization level; wherein m≥1, and m is a positive integer.

[0227] The synchronization device 600 of the present invention corresponds to the method of the first embodiment described above. All implementation means in the first embodiment described above are applicable to the embodiment of the synchronization device and can achieve the same technical effects.

[0228] Fourth embodiment

[0229] like Figure 7 As shown, a synchronization device 700 according to an embodiment of the present invention is applied to a second terminal, and the synchronization device 700 includes:

[0230] A second sending module 701 is used to send a basic synchronization message, where the basic synchronization message includes a synchronization level of the second terminal;

[0231] The third receiving module 702 is used to receive a synchronization request message sent by the first terminal in the nth cycle, where the synchronization request message includes: an identifier of the second terminal and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0232] A second measurement module 703 is configured to obtain, according to the synchronization request message, a second timing offset measurement value of the second terminal relative to the first terminal in the nth period;

[0233] The third sending module 704 is used to send a synchronization response message to the first terminal in the n+1 period, and the synchronization response message includes: system time, the identifier of the second terminal, the first timing offset measurement value of the second terminal relative to the reference time in the nth period, the difference between the second timing offset measurement value and the first timing adjustment amount, and the identifier of the first terminal; the first timing adjustment amount is the timing adjustment amount of the second terminal in the nth period.

[0234] Optionally, the apparatus 700 further includes:

[0235] a fifth sending module, configured to send a second synchronization message frame when the synchronized second terminal takes the fourth terminal as a target synchronization source and the second terminal is the target synchronization source of the first terminal;

[0236] The second synchronization message frame carries at least one of the following synchronization data:

[0237] a synchronization level of the second terminal;

[0238] an identifier of the second terminal;

[0239] an identifier of the fourth terminal that takes the second terminal as a target synchronization source;

[0240] System time;

[0241] A timing offset measurement value of the second terminal relative to a reference time in a current synchronization period;

[0242] A difference between a timing offset measurement value of the second terminal relative to the first terminal in a current synchronization period and a timing adjustment amount of the second terminal in the current synchronization period, and an identifier of the first terminal.

[0243] The synchronization device 700 is a device corresponding to the method in the second embodiment above. All implementation means in the above method embodiment are applicable to the embodiment of the synchronization device and can achieve the same technical effect.

[0244] Fifth embodiment

[0245] In order to better achieve the above goals, Figure 8 As shown, the fifth embodiment of the present invention further provides a first terminal, including:

[0246] A processor 800; and a memory 820 connected to the processor 800 via a bus interface, wherein the memory 820 is used to store programs and data used by the processor 800 when performing operations, and the processor 800 calls and executes the programs and data stored in the memory 820.

[0247] The transceiver 810 is connected to the bus interface and is used to receive and send data under the control of the processor 800 ; the processor 800 is used to read the program in the memory 820 .

[0248] Specifically, the transceiver 810 is used to receive basic synchronization messages sent by multiple second terminals, where the basic synchronization messages include synchronization levels of the second terminals;

[0249] The processor 800 is configured to determine a target synchronization source according to the synchronization levels of the plurality of second terminals; wherein the target synchronization source is at least one of the plurality of second terminals;

[0250] The transceiver 810 is further configured to, in the nth cycle, send a synchronization request message to the target synchronization source, wherein the synchronization request message includes: an identifier of the target synchronization source and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0251] The transceiver 810 is also used to receive, in the n+1th cycle, a synchronization response message sent by the target synchronization source, wherein the synchronization response message includes: system time, an identifier of the target synchronization source, a first timing offset measurement value of the target synchronization source relative to a reference time in the n+1th cycle, a difference between a second timing offset measurement value and a first timing adjustment amount, and an identifier of the first terminal; wherein the second timing offset measurement value is a timing offset measurement value of the target synchronization source relative to the first terminal in the nth cycle; and the first timing adjustment amount is a timing adjustment amount of the target synchronization source in the nth cycle;

[0252] The processor 800 is further configured to obtain, according to the synchronization response message, a third timing offset measurement value of the first terminal relative to the target synchronization source in the (n+1)th cycle;

[0253] The processor 800 is further configured to synchronize the first terminal with a reference time based on the difference, the first timing offset measurement value, and the second timing offset measurement value.

[0254] Among them, Figure 8 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by the processor 800 and various circuits of the memory represented by the memory 820 are linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 810 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. For different terminals, the user interface 830 may also be an interface capable of externally connecting or internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like. The processor 800 is responsible for managing the bus architecture and general processing, and the memory 820 may store data used by the processor 800 when performing operations.

[0255] Optionally, after the first terminal is synchronized with the reference time, the transceiver 810 is further configured to send a first synchronization message frame when the synchronized first terminal takes the second terminal as a target synchronization source and the first terminal is a target synchronization source of a third terminal;

[0256] The first synchronization message frame carries at least one of the following synchronization data:

[0257] a synchronization level of the first terminal;

[0258] an identifier of the first terminal;

[0259] an identifier of the second terminal serving as a target synchronization source for the first terminal;

[0260] System time;

[0261] A timing offset measurement value of the first terminal relative to a reference time in a current synchronization period;

[0262] The difference between the timing offset measurement value of the first terminal relative to the third terminal in the current synchronization period and the timing adjustment amount of the first terminal in the current synchronization period, and the identifier of the third terminal.

[0263] Optionally, the processor 800 is specifically configured to determine the second terminal with the highest synchronization level as the target synchronization source;

[0264] When there are multiple second terminals with the highest synchronization level, the second terminal whose reference signal received power RSRP is greater than a threshold value is determined as the target synchronization source.

[0265] Optionally, when the number of the target synchronization sources is N, and N≥2, the processor 800 is specifically configured to:

[0266] Determine a timing offset calculation value between the first terminal and a reference time corresponding to each of the target synchronization sources according to the difference values ​​corresponding to the N target synchronization sources, the first timing offset measurement value, and the third timing offset measurement value;

[0267] Determining a weight corresponding to each of the timing offset calculation values ​​according to the RSRP of the target synchronization source;

[0268] Performing weighted summation on the N timing offset calculation values ​​to obtain a first offset value;

[0269] The first terminal is synchronized with a reference time according to the first offset value.

[0270] Optionally, the processor 800 is specifically configured to:

[0271] determining a second timing adjustment amount of the first terminal during the nth period;

[0272] According to the second timing adjustment amount, correct the difference to obtain the sum of the difference and the second timing adjustment amount;

[0273] Determine an actual timing deviation of the first terminal relative to the target synchronization source according to the sum of the difference and the second timing adjustment amount, and the third timing offset measurement value;

[0274] The timing offset between the first terminal and a reference time is determined according to the actual timing deviation and the first timing offset measurement value, and the first terminal is synchronized with the reference time.

[0275] Optionally, the synchronization level of the second terminal includes one of the following:

[0276] a first synchronization level, wherein the first synchronization level indicates that a synchronization source of the second terminal is a Global Navigation Satellite System GNSS signal;

[0277] The (m+1)th synchronization level, wherein the (m+1)th synchronization level indicates that the synchronization source of the second terminal is a terminal of the (m)th synchronization level; wherein m≥1, and m is a positive integer.

[0278] The first terminal provided by the present invention determines a target synchronization source from multiple second terminals based on basic synchronization messages sent by multiple second terminals, and further sends a synchronization request message to the target synchronization source. In this way, after receiving the synchronization request message sent by the first terminal, the target synchronization source measures the second timing offset measurement value and calculates the difference between the second timing offset measurement value and the first timing adjustment amount. In this way, the target synchronization source only measures the second timing offset measurement value of the first terminal related to the sending of the synchronization request message, and does not measure the offset value between devices for the terminal that has not sent the synchronization request message. In this way, the second terminal can avoid measuring the timing offset of an irrelevant user terminal, and also avoids data redundancy in the synchronization message, thereby reducing the amount of calculation.

[0279] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing relevant hardware through a computer program, wherein the computer program includes instructions for executing part or all of the steps of the above method; and the computer program may be stored in a readable storage medium, and the storage medium may be any form of storage medium.

[0280] Sixth embodiment

[0281] In order to better achieve the above goals, Fig. 9 As shown, the sixth embodiment of the present invention further provides a second terminal, including:

[0282] A processor 900; and a memory 920 connected to the processor 900 via a bus interface, wherein the memory 920 is used to store programs and data used by the processor 900 when performing operations, and the processor 900 calls and executes the programs and data stored in the memory 920.

[0283] The transceiver 910 is connected to the bus interface and is used to receive and send data under the control of the processor 900 ; the processor 900 is used to read the program in the memory 920 .

[0284] Specifically, the transceiver 910 is used to send a basic synchronization message, where the basic synchronization message includes a synchronization level of the second terminal;

[0285] The transceiver 910 is further configured to receive, in the nth cycle, a synchronization request message sent by the first terminal, wherein the synchronization request message includes: an identifier of the second terminal and an identifier of the first terminal; n is an integer greater than or equal to 1;

[0286] The transceiver 910 is further configured to obtain, according to the synchronization request message, a second timing offset measurement value of the second terminal relative to the first terminal in the nth period;

[0287] The transceiver 910 is also used to send a synchronization response message to the first terminal in the n+1th cycle, and the synchronization response message includes: system time, the identifier of the second terminal, the first timing offset measurement value of the second terminal relative to the reference time in the n+1th cycle, the difference between the second timing offset measurement value and the first timing adjustment amount, and the identifier of the first terminal; the first timing adjustment amount is the timing adjustment amount of the second terminal in the nth cycle.

[0288] Among them, Fig. 9 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by the processor 900 and various circuits of the memory represented by the memory 920 are linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 910 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. For different terminals, the user interface 930 may also be an interface capable of externally connecting to required internal devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like. The processor 900 is responsible for managing the bus architecture and general processing, and the memory 920 may store data used by the processor 900 when performing operations.

[0289] Optionally, when the synchronized second terminal takes the fourth terminal as the target synchronization source, and the second terminal is the target synchronization source of the first terminal, the transceiver 910 is further configured to send a second synchronization message frame;

[0290] The second synchronization message frame carries at least one of the following synchronization data:

[0291] a synchronization level of the second terminal;

[0292] an identifier of the second terminal;

[0293] an identifier of the fourth terminal that takes the second terminal as a target synchronization source;

[0294] System time;

[0295] A timing offset measurement value of the second terminal relative to a reference time in a current synchronization period;

[0296] A difference between a timing offset measurement value of the second terminal relative to the first terminal in a current synchronization period and a timing adjustment amount of the second terminal in the current synchronization period, and an identifier of the first terminal.

[0297] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing relevant hardware through a computer program, wherein the computer program includes instructions for executing part or all of the steps of the above method; and the computer program may be stored in a readable storage medium, and the storage medium may be any form of storage medium.

[0298] In addition, a specific embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method in the first embodiment or the second embodiment are implemented. And the same technical effect can be achieved, so it will not be repeated here to avoid repetition.

[0299] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.

[0300] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.

[0301] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A synchronization method, characterized in that: Applied to a first terminal, the method includes: In an n-1th synchronization cycle, receiving basic synchronization messages sent by multiple second terminals, the basic synchronization messages including synchronization levels of the second terminals; Determining a target synchronization source according to the synchronization levels of the plurality of second terminals; wherein the target synchronization source is at least one of the plurality of second terminals; In the nth synchronization cycle, a synchronization request message is sent to the target synchronization source, wherein the synchronization request message includes: an identifier of the target synchronization source and an identifier of the first terminal; n is an integer greater than or equal to 1; In the n+1th synchronization cycle, a synchronization response message sent by the target synchronization source is received, wherein the synchronization response message includes: system time, an identifier of the target synchronization source, a first timing offset measurement value of the target synchronization source relative to a reference time in the n+1th synchronization cycle, a difference between a second timing offset measurement value and a first timing adjustment amount, and an identifier of the first terminal; wherein the second timing offset measurement value is a timing offset measurement value of the target synchronization source relative to the first terminal in the nth synchronization cycle; and the first timing adjustment amount is a timing adjustment amount of the target synchronization source in the nth synchronization cycle; Obtaining, according to the synchronization response message, a third timing offset measurement value of the first terminal relative to the target synchronization source in the (n+1)th synchronization period; The first terminal is synchronized with a reference time based on the difference, the first timing offset measurement value, and the second timing offset measurement value.

2. The synchronization method according to claim 1, characterized in that: After the first terminal is synchronized with the reference time, the method further includes: When the first synchronized terminal takes the second terminal as a target synchronization source, and the first terminal is a target synchronization source of a third terminal, sending a first synchronization message frame; The first synchronization message frame carries at least one of the following synchronization data: a synchronization level of the first terminal; an identifier of the first terminal; an identifier of the second terminal serving as a target synchronization source for the first terminal; System time; A timing offset measurement value of the first terminal relative to a reference time in a current synchronization period; The difference between the timing offset measurement value of the first terminal relative to the third terminal in the current synchronization period and the timing adjustment amount of the first terminal in the current synchronization period, and the identifier of the third terminal.

3. The synchronization method according to claim 1, characterized in that: The determining a target synchronization source according to the synchronization levels of the plurality of second terminals comprises: determining the second terminal having the highest synchronization level as the target synchronization source; When there are multiple second terminals with the highest synchronization level, the second terminal whose reference signal received power RSRP is greater than a threshold value is determined as the target synchronization source.

4. The synchronization method according to claim 1, characterized in that: When the number of the target synchronization sources is N, and N≥2, synchronizing the first terminal with a reference time according to the difference, the first timing offset measurement value, and the second timing offset measurement value, includes: Determine a calculated timing offset between the first terminal and a reference time corresponding to each of the target synchronization sources according to the difference corresponding to the N target synchronization sources, the first timing offset measurement value, and the third timing offset measurement value; Determining a weight corresponding to each of the timing offset calculation values ​​according to the RSRP of the target synchronization source; Performing weighted summation on the N timing offset calculation values ​​to obtain a first offset value; The first terminal is synchronized with a reference time according to the first offset value.

5. The synchronization method according to claim 1, characterized in that: The first terminal synchronizing with a reference time according to the difference, the first timing offset measurement value, and the third timing offset measurement value includes: determining a second timing adjustment amount of the first terminal during the nth synchronization period; According to the second timing adjustment amount, correct the difference to obtain the sum of the difference and the second timing adjustment amount; Determine an actual timing deviation of the first terminal relative to the target synchronization source according to the sum of the difference and the second timing adjustment amount, and the third timing offset measurement value; The timing offset between the first terminal and a reference time is determined according to the actual timing deviation and the first timing offset measurement value, and the first terminal is synchronized with the reference time.

6. The synchronization method according to claim 1, characterized in that: The synchronization level of the second terminal includes one of the following: a first synchronization level, wherein the first synchronization level indicates that a synchronization source of the second terminal is a Global Navigation Satellite System GNSS signal; The (m+1)th synchronization level, wherein the (m+1)th synchronization level indicates that the synchronization source of the second terminal is a terminal of the (m)th synchronization level; wherein m≥1, and m is a positive integer.

7. A synchronization method, characterized in that: Applied to the second terminal, the method includes: In an n-1th synchronization cycle, sending a basic synchronization message, wherein the basic synchronization message includes a synchronization level of the second terminal; In an nth synchronization cycle, receiving a synchronization request message sent by the first terminal, the synchronization request message including: an identifier of the second terminal and an identifier of the first terminal; n is an integer greater than or equal to 1; Obtaining, according to the synchronization request message, a second timing offset measurement value of the second terminal relative to the first terminal in the nth synchronization period; In the n+1th synchronization cycle, a synchronization response message is sent to the first terminal, and the synchronization response message includes: system time, the identifier of the second terminal, the first timing offset measurement value of the second terminal relative to the reference time in the n+1th synchronization cycle, the difference between the second timing offset measurement value and the first timing adjustment amount, and the identifier of the first terminal; the first timing adjustment amount is the timing adjustment amount of the second terminal in the nth synchronization cycle.

8. The synchronization method according to claim 7, characterized in that: The method further comprises: When the synchronized second terminal takes the fourth terminal as a target synchronization source and the second terminal is the target synchronization source of the first terminal, sending a second synchronization message frame; The second synchronization message frame carries at least one of the following synchronization data: a synchronization level of the second terminal; an identifier of the second terminal; an identifier of the fourth terminal that takes the second terminal as a target synchronization source; System time; A timing offset measurement value of the second terminal relative to a reference time in a current synchronization period; A difference between a timing offset measurement value of the second terminal relative to the first terminal in a current synchronization period and a timing adjustment amount of the second terminal in the current synchronization period, and an identifier of the first terminal.

9. A terminal, comprising: A transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the synchronization method as described in any one of claims 1 to 6, or implements the steps of the synchronization method as described in any one of claims 7 to 8 when executing the computer program.

10. A synchronization device, characterized in that: Applied to a first terminal, the device includes: A first receiving module, configured to receive, in an n-1th synchronization period, a basic synchronization message sent by a plurality of second terminals, wherein the basic synchronization message includes a synchronization level of the second terminal; A first determination module, configured to determine a target synchronization source according to the synchronization levels of the plurality of second terminals; wherein the target synchronization source is at least one of the plurality of second terminals; A first sending module, configured to send a synchronization request message to the target synchronization source in an nth synchronization cycle, wherein the synchronization request message includes: an identifier of the target synchronization source and an identifier of the first terminal; n is an integer greater than or equal to 1; A second receiving module is used to receive a synchronization response message sent by the target synchronization source in the n+1th synchronization cycle, wherein the synchronization response message includes: system time, an identifier of the target synchronization source, a first timing offset measurement value of the target synchronization source relative to a reference time in the n+1th synchronization cycle, a difference between a second timing offset measurement value and a first timing adjustment amount, and an identifier of the first terminal; wherein the second timing offset measurement value is a timing offset measurement value of the target synchronization source relative to the first terminal in the nth synchronization cycle; and the first timing adjustment amount is a timing adjustment amount of the target synchronization source in the nth synchronization cycle; A first measurement module, configured to obtain, according to the synchronization response message, a third timing offset measurement value of the first terminal relative to the target synchronization source in the n+1th synchronization period; A synchronization processing module is used to synchronize the first terminal with a reference time according to the difference, the first timing offset measurement value and the third timing offset measurement value.

11. A synchronization device, characterized in that: Applied to a second terminal, the device includes: A second sending module, configured to send a basic synchronization message in an n-1th synchronization cycle, where the basic synchronization message includes a synchronization level of the second terminal; A third receiving module is used to receive a synchronization request message sent by the first terminal in an nth synchronization cycle, wherein the synchronization request message includes: an identifier of the second terminal and an identifier of the first terminal; n is an integer greater than or equal to 1; A second measurement module, configured to obtain, according to the synchronization request message, a second timing offset measurement value of the second terminal relative to the first terminal in the nth synchronization period; The third sending module is used to send a synchronization response message to the first terminal in the n+1th synchronization cycle, and the synchronization response message includes: system time, the identifier of the second terminal, the first timing offset measurement value of the second terminal relative to the reference time in the nth synchronization cycle, the difference between the second timing offset measurement value and the first timing adjustment amount, and the identifier of the first terminal; the first timing adjustment amount is the timing adjustment amount of the second terminal in the nth synchronization cycle.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the steps of the synchronization method according to any one of claims 1 to 6, or implements the steps of the synchronization method according to any one of claims 7 to 8.

Citation Information

Patent Citations

  • Cellular vehicle-to-everything out of coverage synchronization

    CN112806072A

  • Synchronization method, device and terminal

    CN114698085A