Time synchronization method, communication apparatus, time synchronization system and storage medium
By applying a passive optical network topology in the vehicle network and using frame transmission to determine the transmission delay, the time synchronization of master and slave nodes is achieved, which solves the problem of poor time synchronization accuracy in the vehicle network and improves network synchronization and control accuracy.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- BYD CO LTD
- Filing Date
- 2025-10-09
- Publication Date
- 2026-05-07
AI Technical Summary
Poor time synchronization accuracy between different nodes in vehicular networks leads to increased network synchronization and bandwidth requirements, and existing improvement methods may result in increased network structure complexity and cost.
A passive optical network (PON) topology is adopted. The transmission delay is determined by the frame transmission between the master node and the slave node, and the time synchronization is achieved by using a reference frame. This ensures that the slave node synchronizes with the master node's time, thereby improving the time synchronization accuracy.
Without increasing costs, high-precision time synchronization in the vehicle network was achieved, ensuring the consistency of time synchronization among all nodes and improving network performance and control accuracy.
Smart Images

Figure CN2025126579_07052026_PF_FP_ABST
Abstract
Description
Time synchronization method, communication device, time synchronization system and storage medium
[0001] This application claims priority to Chinese patent application No. 202411555514.3, filed on October 31, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of communication technology, and in particular to a time synchronization method, communication device, time synchronization system and storage medium. Background Technology
[0003] With the development of vehicle intelligence, technologies such as advanced driver assistance systems (ADAS), autonomous driving assistance, and smart cockpits have become key areas of research for manufacturers. As vehicle functions increase, the complexity of in-vehicle networks also gradually increases, leading to higher requirements for bandwidth and synchronization of in-vehicle networks. Summary of the Invention
[0004] This disclosure provides a time synchronization method, a communication device, a time synchronization system, and a storage medium.
[0005] In a first aspect, a time synchronization method is provided, comprising: a slave node receiving a first frame sent by a master node to determine a first delay, the first delay being the transmission delay from the master node to the slave node; the slave node receiving a second frame sent by the master node, the first delay being used for time synchronization each time the slave node receives the second frame. The first frame is a reference frame.
[0006] The time synchronization method provided in some embodiments of this disclosure addresses the issue of unavoidable transmission delays between different nodes in a network, leading to time discrepancies between the master and slave nodes. Therefore, in some embodiments of this disclosure, the slave node determines the transmission time used to transmit data from the master node to the slave node by receiving a reference frame sent by the master node. Since the transmission time from the master node to the slave node is usually stable, after determining the transmission time used, the slave node can directly determine the master node's time for each received second frame based on this time. This allows for continuous synchronization of the slave node's local time with the master node's time, improving the synchronization accuracy.
[0007] In some embodiments, the method further includes: the slave node performing time synchronization according to time synchronization parameters, the time synchronization parameters including a first delay and a transmission reference time of the first frame.
[0008] The reference time for sending the first frame refers to the time when the master node sends the first frame.
[0009] Based on this, in some embodiments of this disclosure, after determining the transmission time used for data transmission from the master node to the slave node, the slave node can synchronize the master and slave node times according to the time point when the master node sends the reference frame and the transmission time used for data transmission from the master node to the slave node, thereby improving the synchronization accuracy of time synchronization.
[0010] In some embodiments, the slave node performs time synchronization according to the time synchronization parameters, including: the slave node determines the reception reference time of the second frame according to the time synchronization parameters; and the slave node performs time synchronization according to the reception reference time of the second frame.
[0011] The reception reference time of the second frame refers to the time of the master node when the slave node receives the second frame. In other words, the reception time of the second frame refers to the time when the slave node receives the second frame under the master node's master reference clock.
[0012] In some embodiments, the slave node performs time synchronization based on the reception reference time of the second frame, including: the slave node synchronizes the local time of the slave node to the reception reference time of the second frame.
[0013] In some embodiments, the reception reference time of the second frame is obtained based on the first delay, the transmission reference time of the first frame, and the transmission time interval, wherein the transmission time interval is the time interval between the second frame and the first frame.
[0014] In some embodiments, the transmission time interval is determined based on the number of frames between the first and second frames and the frame transmission period.
[0015] In some embodiments, the transmission reference time of the first frame is carried in the first frame or in any frame transmitted by the master node after the first frame and before the second frame.
[0016] In some embodiments, the first delay is determined based on the second delay, the third delay, and the fourth delay; the second delay is used to characterize the theoretical time from when the master node sends the first frame to the farthest slave node to when it receives the third frame sent by the farthest slave node in response to the first frame; the fourth delay is the processing delay of the slave node on the data frame; the third delay is used to ensure that the time when the third frame sent by the slave node reaches the master node is the same as the time when the third frame sent by the farthest slave node reaches the master node, and the third frame is used to respond to the first frame.
[0017] In some embodiments, after the slave node receives the first frame sent by the master node, the method further includes: the slave node sending a third frame to the master node; the slave node receiving a fourth frame sent by the master node; the fourth frame including any one of the following: a first delay, a third delay, and correction information for the third delay.
[0018] In some embodiments, the first frame includes the start delay corresponding to the slave node; the third frame is sent from the slave node to the master node after the start delay has elapsed when the first frame is received.
[0019] In some embodiments, the first frame may also include the start delay corresponding to other slave nodes in the network.
[0020] In some embodiments, the second delay and the fourth delay are pre-configured.
[0021] In some embodiments, the method further includes: the slave node receiving a fifth frame sent by the master node, the fifth frame being used to request the slave node to start the registration process; and the slave node sending a sixth frame to the master node, the sixth frame including registration information.
[0022] In some embodiments, the registration information includes the identity information of the slave node.
[0023] In some embodiments, receiving a fifth frame from a master node by a slave node includes: receiving a fifth frame from a master node when the slave node is in an initialized state.
[0024] In some embodiments, the slave node is in an initialization state when at least one of the following conditions is met: the vehicle to which the slave node is located is powered on for the first time, the vehicle to which the slave node is located has no abnormalities in its self-test after power-on, and the vehicle to which the slave node is located is waiting to execute the factory configuration process.
[0025] In some embodiments, the method further includes: the slave node sending a seventh frame to the master node, the seventh frame being used to request the master node to verify the registration information of the slave node, the seventh frame including the registration information of the slave node; the slave node receiving an eighth frame sent by the master node, the eighth frame being used to characterize whether the registration information sent by the slave node this time is consistent with the pre-stored registration information.
[0026] In some embodiments, the seventh frame is sent from the slave node to the master node after the slave node has successfully initialized and the vehicle to which the slave node is located has been powered on again.
[0027] In some embodiments, the method further includes: the slave node receiving a synchronization code and link parameter information sent by the master node; the slave node calibrating its local clock based on the synchronization code and synchronizing the link frequency based on the link parameter information; and the slave node sending a ninth frame to the master node, the ninth frame being used to instruct the slave node to reconnect to the network.
[0028] In some embodiments, before the slave node receives the synchronization code and link information sent by the master node, the method further includes at least one of the following: the slave node detects an abnormality in time synchronization performance; and the slave node switches from a sleep mode or a low-power mode to a normal operation mode.
[0029] In some embodiments, the method further includes pausing the time synchronization operation when the slave node is in a sleep mode or a low-power mode.
[0030] In some embodiments, synchronization codes and link parameter information are carried in any data frame sent by the master node.
[0031] In some embodiments, the method further includes: receiving a tenth frame sent by a master node from a slave node, the tenth frame being used to request correction of the master node's local time; and sending an eleventh frame to the master node from the slave node, the eleventh frame including a time offset, the time offset being the offset of the slave node's local time before and after updating based on satellite information.
[0032] In some embodiments, the slave node and the master node are nodes in a passive optical network.
[0033] In some embodiments, at least one of the first frame and the second frame is a data frame.
[0034] Secondly, a time synchronization method is provided, the method comprising: a master node sending a first frame to a slave node to determine a first delay, the first delay being the transmission delay from the master node to the slave node; the master node sending a second frame to the slave node, the first delay being used to perform time synchronization each time the slave node receives the second frame.
[0035] The time synchronization method provided in some embodiments of this disclosure addresses the issue of unavoidable transmission delays between different nodes in a network, leading to time discrepancies between the master and slave nodes. Therefore, in some embodiments of this disclosure, the master node sends a reference frame, enabling the slave node to determine the transmission time taken for the reference frame to travel from the master node to the slave node. Since the transmission time from the master node to the slave node is typically stable, when time synchronization is required, the slave node can directly determine the master node's time for each received second frame based on the transmission time taken from the master node to the slave node. This allows for continuous synchronization of the slave node's local time based on the master node's time, improving the synchronization accuracy.
[0036] In some embodiments, time synchronization is performed based on time synchronization parameters, which include a first delay and a transmission reference time for the first frame.
[0037] In some embodiments, time synchronization is performed based on the reception reference time of the second frame, which is obtained based on the time synchronization parameters.
[0038] In some embodiments, time synchronization is used to synchronize the local time of the slave node to the reception reference time of the second frame.
[0039] In some embodiments, the reception reference time of the second frame is obtained based on the first delay, the transmission reference time of the first frame, and the transmission time interval, wherein the transmission time interval is the time interval between the second frame and the first frame.
[0040] In some embodiments, the transmission time interval is determined based on the number of frames between the first and second frames and the frame transmission period.
[0041] In some embodiments, the transmission reference time of the first frame is carried in the first frame or in any frame transmitted by the master node after the first frame and before the second frame.
[0042] In some embodiments, the first delay is determined based on the second delay, the third delay, and the fourth delay; the second delay is used to characterize the theoretical time from when the master node sends the first frame to the farthest slave node to when the farthest slave node sends the third frame in response to the first frame; the fourth delay is the processing delay of the slave node on the data frame; the third delay is used to ensure that the time when the third frame sent by the slave node reaches the master node is the same as the time when the third frame sent by the farthest slave node reaches the master node, and the third frame is used to respond to the first frame.
[0043] In some embodiments, after the master node sends a first frame to the slave node, the method further includes: the master node sending a third frame to the slave node; the master node receiving a fourth frame sent by the slave node; the fourth frame including any one of the following: a first delay, a third delay, and correction information for the third delay.
[0044] In some embodiments, the first frame includes a start delay corresponding to the slave node; the third frame is sent from the slave node to the master node after the start delay has elapsed since the first frame was received.
[0045] In some embodiments, the first frame may also include the start delay corresponding to other slave nodes in the network.
[0046] In some embodiments, the second and fourth delays are pre-configured.
[0047] In some embodiments, the method further includes: the master node sending a fifth frame to the slave node, the fifth frame being used to request the slave node to start the registration process; and the master node receiving a sixth frame sent by the slave node, the sixth frame including registration information.
[0048] In some embodiments, the registration information includes the identity information of the slave node.
[0049] In some embodiments, the fifth frame is sent by the master node while the slave node is in the initialization state.
[0050] In some embodiments, the slave node is in an initialization state when at least one of the following conditions is met: the vehicle to which the slave node is located is powered on for the first time, the vehicle to which the slave node is located has no abnormalities in its self-test after power-on, and the vehicle to which the slave node is located is waiting to execute the factory configuration process.
[0051] In some embodiments, the method further includes: the master node receiving a seventh frame sent by the slave node, the seventh frame being used to request the master node to verify the registration information of the slave node, the seventh frame including the registration information of the slave node; the master node sending an eighth frame to the slave node, the eighth frame being used to characterize whether the registration information sent by the slave node this time is consistent with the pre-stored registration information.
[0052] In some embodiments, the seventh frame is sent from the slave node to the master node after the slave node has successfully initialized and the vehicle to which the slave node is located has been powered on again.
[0053] In some embodiments, the method further includes: the master node sending a synchronization code and link parameter information; the master node receiving a ninth frame sent by the slave node, the ninth frame being used to instruct the slave node to reconnect to the network.
[0054] In some embodiments, the ninth frame is sent when at least one of the following conditions is met: the slave node detects an anomaly in time synchronization performance; and after switching from sleep mode or low-power mode to normal operation mode.
[0055] In some embodiments, synchronization codes and link parameter information are carried in any data frame sent by the master node.
[0056] In some embodiments, the method further includes: the master node sending a tenth frame to the slave node, the tenth frame being used to request correction of the master node's local time; the master node receiving an eleventh frame sent by the slave node, the eleventh frame including a time offset, the time offset being the offset of the slave node's local time before and after updating according to satellite information.
[0057] In some embodiments, the tenth frame is sent by the master node in the event of a clock anomaly.
[0058] In some embodiments, the slave node and the master node are nodes in a passive optical network.
[0059] In some embodiments, at least one of the first frame and the second frame is a data frame.
[0060] A communication device is provided, comprising: a functional component for performing the time synchronization method described above; the actions performed by the functional component are implemented by hardware or by hardware executing corresponding software.
[0061] A time synchronization system is provided, including a master node, at least one optical splitter, and multiple slave nodes. The master node is connected to the multiple slave nodes through the at least one optical splitter. The slave nodes are used to execute the time synchronization method described in the slave node section above, and the master node is used to execute the time synchronization method described in the master node section above.
[0062] An electronic and electrical system is provided, including the time synchronization system described above.
[0063] A vehicle is provided, including the electronic and electrical system described above.
[0064] A computer-readable storage medium is provided, which stores instructions that, when executed on a terminal, cause the terminal to perform the time synchronization method described above.
[0065] A computer program product containing instructions is provided, which, when executed by a computer, cause the computer to perform the time synchronization method described in the first and second aspects above.
[0066] A chip is provided, comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run computer programs or instructions to implement the time synchronization method described above.
[0067] The chip provided in some embodiments of this disclosure also includes a memory for storing computer programs or instructions. Attached Figure Description
[0068] To more clearly illustrate the technical solutions of some embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0069] Figure 1 is a schematic diagram of a PON network topology according to some embodiments;
[0070] Figure 2 is an architecture diagram of a time synchronization system according to some embodiments;
[0071] Figure 3 is a schematic diagram of time synchronization logic in a time synchronization system according to some embodiments;
[0072] Figure 4 is a flowchart of a time synchronization method according to some embodiments;
[0073] Figure 5 is a flowchart of another time synchronization method according to some embodiments;
[0074] Figure 6 is a flowchart of yet another time synchronization method according to some embodiments;
[0075] Figure 7 is a block diagram of a communication device according to some embodiments;
[0076] Figure 8 is a block diagram of an electronic and electrical system according to some embodiments;
[0077] Figure 9 is a block diagram of a vehicle according to some embodiments. Detailed Implementation
[0078] The technical solutions of some embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0079] In the description of this disclosure, it should be understood that the terms "upper," "lower," "left," "right," "front," "rear," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or relative positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this disclosure and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this disclosure. Unless otherwise specified, the above-mentioned orientational descriptions can be flexibly set in practical applications, provided that the relative positional relationships shown in the accompanying drawings are satisfied.
[0080] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0081] In the description of this disclosure, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "communication" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection. They can refer to a direct connection or an indirect connection through an intermediate medium, or a connection within two components. Those skilled in the art can understand the meaning of the above terms in this disclosure based on the actual situation.
[0082] In some embodiments, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, article, or apparatus that includes that element.
[0083] In some embodiments, words such as "exemplarily" or "for example" are used to indicate that something is an example, illustration, or illustration. Any embodiment or design that is described as "exemplarily" or "for example" in some embodiments of this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts by way of example.
[0084] In the description of this specification, exemplary features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0085] In related technologies, to improve the synchronization of vehicular networks, existing heterogeneous networks are typically improved to meet the ever-increasing bandwidth and complex control function requirements. However, as more and more devices are integrated into vehicles, this method of improving existing heterogeneous networks may lead to stagnation in the performance and efficiency of vehicular networks, while simultaneously causing a continuous increase in the cost of vehicular networks.
[0086] To address the issue of network complexity and performance bottlenecks resulting from continuous improvements to heterogeneous networks, two time synchronization methods have been proposed in related technologies.
[0087] 1) Applying Ethernet to in-vehicle networks. The time synchronization protocols disclosed under the Ethernet standard are the Precision Time Protocol (PTP) based on the Institute of Electrical and Electronics Engineers (IEEE) 1588v2 and the Generalized Precision Time Protocol (GPTP) based on IEEE 802.1AS, which define time measurement between end-to-end or point-to-point.
[0088] Therefore, synchronization in common master-slave point-to-multipoint connections in vehicle networks can be solved through a combination of multiple pairs and point-to-point methods. For example, using PTP, the master node manages the time synchronization process to each slave node individually in an end-to-end manner; or using GPTP, indirect synchronization is achieved through multiple hops with child nodes, and the number of hops for each synchronization pair may be variable.
[0089] However, this multi-pair, point-to-point combination mode may cause discrepancies in the synchronization accuracy between each slave node and increase the cost required for time synchronization.
[0090] 2) Time synchronization can be achieved between different devices or systems through soft synchronization. For example, middleware or software frameworks on the application processing side can be used to coordinate data between various devices in the network. Because soft synchronization relies more on software algorithms and protocols to achieve time synchronization, it is easily affected by factors such as network load and system load, resulting in lower time synchronization accuracy.
[0091] Against this backdrop, in order to address the problem of poor synchronization accuracy between different devices in a network in related technologies, this disclosure provides a time synchronization method, communication device, time synchronization system, and storage medium. The implementation methods of some embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0092] This disclosure applies a passive optical network (PON) to a vehicular homogeneous network, achieving logical hard synchronization of all slave nodes according to the same absolute time, and optimizing for the vehicular scenario to ensure consistent synchronization accuracy across all nodes. The PON network uses downlink broadcasting and uplink time-division multiplexing as its basic operating mechanism, providing high-speed and low-cost multi-device homogeneous network access for vehicular scenarios.
[0093] As shown in Figure 1, the PON network topology 100 may include a master node 110, a splitter 120, and multiple slave nodes (such as slave node 121, slave node 122, ..., slave node 129). The multiple slave nodes are connected to the master node 110 through the splitter 120.
[0094] Here, the master node 110 may include one or more ports, and multiple slave nodes under each port form a network group. The optical splitter 120 is a passive device, and communication between slave nodes can only be accomplished through the master node 110, and cannot be accomplished through the optical splitter 120.
[0095] In some embodiments, the PON network uses wavelength division multiplexing to make the uplink and downlink independent links. The uplink uses time division multiplexing and the downlink uses broadcasting. Each uplink or downlink message carries a synchronization code, which allows each node to calibrate or restore its clock when it receives a message.
[0096] The following description uses the above-mentioned PON network as an example of a vehicle-mounted PON network to illustrate the functions of each node in the PON network.
[0097] The master node 110 is used to perform vehicle network management and scheduling, and provides the vehicle reference master clock, that is, each port of the master node 110 can access the master reference clock of the master node.
[0098] Optical splitter 120 is used to split or aggregate optical power within the link. That is, the downlink optical signal transmitted by the master node 110 will be replicated to the link connecting the optical splitter 120 and the slave nodes 121, 122...129 at the cost of signal intensity reduction after passing through the optical splitter 120. Similarly, the uplink optical signals transmitted by the slave nodes 121, 122...129 will be aggregated to the link connecting the optical splitter 120 and the master node 110 at the cost of signal intensity reduction after passing through the optical splitter 120.
[0099] Slave nodes 121, 122, ..., 129 are used to connect their respective terminal device data to the vehicle-mounted PON network 100. Slave nodes 121, 122, ..., 129 are also used to synchronize their local time with their respective terminal devices.
[0100] In some embodiments, the master node can be an optical line terminal (OLT), the slave node can be an optical network unit (ONU), and the PON can include a gigabit-capable passive optical network (GPON) and an Ethernet passive optical network (EPON).
[0101] Thus, time synchronization based on this topology is easy to manage, can fully reuse relevant resources, and achieves high-precision time synchronization without increasing costs, ensuring consistency of time synchronization between different nodes.
[0102] As shown in Figure 2, this disclosure provides a time synchronization system 200, which may include a master node 210, at least one beam splitter (such as beam splitter 220, beam splitter 230), and at least one slave node (such as instrument display 221, camera 222, camera 223, vehicle tablet 224, controller area network (CAN) controller 225, smart antenna 231, camera 232, camera 233, lidar 234, CAN controller 235).
[0103] Here, the master node 210 may include a cockpit control system-on-chip (SOC) 211, a vehicle control SOC 212, an intelligent driving SOC 213, and a network control SOC 214. The cockpit control SOC 211 is connected to both the vehicle control SOC 212 and the intelligent driving SOC 213, and the network control SOC 214 is connected to both the vehicle control SOC 212 and the intelligent driving SOC 213.
[0104] In some embodiments, the cockpit control SOC211, vehicle control SOC212, intelligent driving SOC213, and network control SOC214 can communicate (clock synchronization) via on-board Ethernet.
[0105] In some embodiments, clock synchronization can be performed via an internal network using IEEE 802.1AS or other time synchronization standard protocols.
[0106] In some embodiments, the clock source with the highest precision among the cockpit control SOC 211, vehicle control SOC 212, intelligent driving SOC 213, and network control SOC 214 can be used as the main reference clock for the entire vehicle. The clocks of other SOCs can be used as backup reference clocks, which can be switched in time when the main reference clock fails, providing redundancy for each other.
[0107] In some embodiments, the network control SOC214 can also obtain reference time from an external clock source via 1pps+ToD, achieving low-cost and low-complexity clock reference source acquisition.
[0108] The network control SOC 214 is connected to multiple ports (port a, port b, ..., port n). The beam splitter 220 is connected to the network control SOC 214 through port n. The beam splitter 220 is connected to the instrument display 221, camera 222, camera 223, vehicle tablet 224, and CAN controller 225, respectively. The beam splitter 230 is connected to the network control SOC 214 through port a. The beam splitter 230 is connected to the smart antenna 231, camera 232, camera 233, lidar 234, and CAN controller 235, respectively.
[0109] In some embodiments, the network control SOC214 can send the local clock to the vehicle network via ports a to n, so that the clocks of all slave nodes are synchronized with the master reference clock of the master node.
[0110] In some embodiments, the slave node can synchronize its local time with the corresponding terminal device. Taking the LiDAR 234 as an example, the network control chip of the slave node can transmit time information to the control chip of the LiDAR 234 based on the synchronized clock, and control the LiDAR 234 to collect data at a specific time according to the command of the vehicle's intelligent driving domain controller.
[0111] In some embodiments, the slave and master nodes in the time synchronization system provided by some embodiments of this disclosure are nodes in a PON.
[0112] In this way, by controlling the corresponding terminal devices to perform precise data processing or precise data synchronization based on the clock that has been synchronized by the slave node, the control accuracy of multiple devices is improved.
[0113] As shown in Figure 3, in some embodiments, the time synchronization logic under the time synchronization system may include the following S301 to S315.
[0114] S301, in response to the vehicle power-on command, enters the first state and performs a self-test operation.
[0115] Here, the first state corresponds to the self-test operation of the time synchronization system. In the first state, the hardware and software status of the device can be checked to determine whether it is normal.
[0116] S302. Determine if the self-test result is normal. If yes, proceed to S303; otherwise, proceed to S317.
[0117] Here, a normal self-test result for the time synchronization system means that the hardware and software components of the time synchronization system are functioning normally.
[0118] S303. Determine whether the vehicle requires factory configuration. If not, proceed to S304; if yes, proceed to S306.
[0119] Here, the factory-configured scenarios include scenarios after vehicle repair or after vehicle system upgrades.
[0120] S304. Switch from the first state to the second state, and perform delay correction and registration verification operations.
[0121] Here, the second state corresponds to the delay correction operation and the registration verification operation.
[0122] S305. Determine whether the delay correction operation and registration verification operation were successful. If yes, proceed to S310; otherwise, proceed to S317.
[0123] S306. Switch from the first state to the fourth state and perform time synchronization initialization operation.
[0124] Here, the fourth state is the operation corresponding to the time synchronization initialization operation, which includes the registration operation and the delay measurement operation.
[0125] S307. Determine whether the time synchronization initialization operation was successful. If yes, proceed to S308; otherwise, proceed to S317.
[0126] S308, Switch from the fourth state to the second state, perform parallel delay correction operation and registration verification operation.
[0127] S309. Determine whether the delay correction operation and registration verification operation were successful. If yes, proceed to S310; otherwise, proceed to S317.
[0128] S310, Switch from the second state to the third state, and the master node and slave node synchronize their time.
[0129] Here, the third state corresponds to the state of time synchronization.
[0130] In some embodiments, slave nodes can perform periodic time synchronization with master nodes. Periodic time synchronization refers to the time synchronization system synchronizing the time of each node in the system at preset time intervals.
[0131] S311. In the third state, check if the time synchronization performance is abnormal. If yes, execute S312; otherwise, execute S310.
[0132] S312. Check if the abnormal level of the time synchronization performance exceeds the preset level. If yes, proceed to S317; otherwise, proceed to S313.
[0133] Here, the preset level can be determined based on the number of synchronization failures of slave nodes.
[0134] In some embodiments, taking a preset level corresponding to a number of slave node synchronization anomalies of 5 as an example. If a number of slave node synchronization anomalies is detected as 8, then S317 is executed; if a number of slave node synchronization anomalies is detected as 3, then S313 is executed.
[0135] S313. Switch from the third state to the fifth state and perform time synchronization recovery operation.
[0136] Here, the fifth state corresponds to the time synchronization recovery operation.
[0137] In some embodiments, the slave node may send a re-entry notification message to the master node, so that the master node knows that the slave node will perform time synchronization after receiving the re-entry notification message sent by the slave node.
[0138] S314. Determine whether the time synchronization recovery operation was successful. If yes, proceed to S310; otherwise, proceed to S315.
[0139] S315. Determine whether the recovery time exceeds the preset time. If yes, execute S317; otherwise, execute S313.
[0140] Here, the preset duration can be a manually set value, which can be flexibly adjusted according to the actual scenario. For example, the preset duration can be 1 millisecond.
[0141] S316. After updating the master reference time of the master node or updating the smart antenna reference clock of the slave node, execute S310.
[0142] In some embodiments, the local time of a slave node can be updated using satellite information based on the slave node's smart antenna.
[0143] S317, End time synchronization.
[0144] S318: Receives a vehicle power-off command and controls the vehicle to power off.
[0145] In this way, by applying the PON network to the vehicle network, the time of each device in the vehicle time synchronization system can be synchronized according to the main reference time of the network control SOC in the vehicle synchronization system, so as to ensure that each device can be accurately controlled and improve the control stability of the vehicle system.
[0146] The time synchronization methods provided by some embodiments of this disclosure are described below with reference to Figures 1 to 5.
[0147] It is understood that, in some embodiments of this disclosure, each node in the time synchronization system may execute some or all of the steps in some embodiments of this disclosure. These steps or operations are merely examples, and other operations or variations thereof may also be performed in some embodiments of this disclosure. Furthermore, the steps may be executed in different orders as presented in some embodiments of this disclosure, and it is not necessary to execute all the operations in some embodiments of this disclosure.
[0148] This disclosure provides a time synchronization method in some embodiments, as shown in FIG4. The method is illustrated using the interaction between a master node and a slave node as an example. Of course, the subject executing the master node action in this method can also be a device or module in the master node, such as an integrated circuit or a chip; the subject executing the slave node action in this method can also be a device or module in the slave node, such as an integrated circuit or a chip, and this disclosure does not limit this.
[0149] The above S308 is described below with reference to Figure 4.
[0150] In some embodiments, as shown in FIG4, the communication method provided by some embodiments of this disclosure may include S401 to S402.
[0151] S401, The master node sends the first frame to the slave node. Correspondingly, the slave node receives the first frame sent by the master node.
[0152] In some embodiments, the first frame can be any frame sent by the master node to the slave node.
[0153] Here, the first frame can also be called the reference frame. The first frame can be a management message embedded in the frame header of the selected data frame by the master node, serving as a reference frame.
[0154] In some embodiments, the first frame is used to determine a first delay, which is the transmission delay from the master node to the slave node. In other words, the first delay refers to the time from when the master node sends a downlink frame to when the slave node receives the downlink frame.
[0155] It is understandable that the transmission delay from the master node to a slave node is constant.
[0156] In some embodiments, the master node may send the first frame via broadcast.
[0157] In some embodiments, after sending the first frame, the master node may save the transmission reference time of the first frame. The transmission reference time of the first frame is the transmission time under the master node's master reference clock.
[0158] In some embodiments, when sending the first frame, if the master reference clock of the master node is 10:00, the sending time of the first frame is determined to be 10:00.
[0159] In some embodiments, after determining the transmission time of the first frame, the master node may also send the transmission reference time of the first frame to the slave node.
[0160] In some embodiments, the transmission reference time of the first frame may be carried in the first frame, or in any frame transmitted by the master node after the first frame and before the second frame.
[0161] In one possible implementation, the transmission reference time of the first frame can be carried in the first frame and transmitted.
[0162] In some embodiments, when the master node sends the first frame, it can directly embed the sending time of the first frame into the frame header of the first frame and send the first frame to the slave node.
[0163] In another possible implementation, the transmission reference time of the first frame can be carried in a frame after the first frame to send the transmission reference time of the first frame to the slave node.
[0164] In some embodiments, after receiving the first frame, the slave node can determine the reception reference time of the first frame.
[0165] Here, the reception reference time of the first frame refers to the time when the slave node receives the first frame under the master reference clock of the master node.
[0166] In some embodiments, the reception reference time for receiving the first frame from the slave node can be determined based on the transmission reference time of the first frame and the first delay.
[0167] In some embodiments, the first delay is determined based on the second delay, the third delay, and the fourth delay.
[0168] The second delay is used to characterize the theoretical time from when the master node sends the first frame to the farthest slave node to when it receives the third frame sent by the farthest slave node in response to the first frame.
[0169] In some embodiments, referring to Figure 1, taking the master node 110 as the main node and the farthest slave node 121 as an example, the second delay can be the transmission delay of the first frame after the master node 110 sends the first frame to the slave node 121, plus the processing delay of the first frame after the slave node 121 receives the first frame, plus the transmission delay of the third frame after the slave node 121 processes the first frame, generates the third frame, and sends the third frame to the master node 110.
[0170] The third delay is used to ensure that the third frame sent by the slave node reaches the master node at the same time as the third frame sent by the farthest slave node reaches the master node. The third frame is used to respond to the first frame.
[0171] In some embodiments, the third delay is used to characterize twice the time difference between the time when the first frame is received from the node and the time when the first frame is received from the farthest node.
[0172] Here, the third delay is the difference between the second delay and the fifth delay. The fifth delay includes the transmission delay of the master node sending the first frame to the slave node, the processing delay of the slave node on the first frame, and the transmission delay of the slave node sending the third frame to the master node in response to the first frame.
[0173] In some embodiments, referring to Figure 1, taking the master node 110 as the master node and the farthest slave node 129 as the slave node as an example, the fifth delay can be the transmission delay of the first frame after the master node 110 sends the first frame to the slave node 129, plus the processing delay of the first frame after the slave node 129 receives the first frame, plus the transmission delay of the third frame after the slave node 129 processes the first frame, generates the third frame, and sends the third frame to the master node 110.
[0174] The fourth latency is the processing latency of the data frame by the slave node, and the processing latency of the data frame is the same for different slave nodes.
[0175] In some embodiments, the second and fourth delays described above may be pre-configured.
[0176] In some embodiments, the second and third delays described above may be sent from the master node to the slave node.
[0177] In some embodiments, after receiving the first frame, the slave node can determine the reception time of the first frame based on the transmission time of the first frame, the second delay, the fourth delay, and the fifth delay.
[0178] In some embodiments, the reception time of the first frame received from the node can be calculated using formula (I). Formula (I) is as follows:
[0179] Where A is the reception time of the first frame received by the slave node, B is the transmission time of the first frame sent by the master node, C is the second delay, D is the fourth delay, and E is the fifth delay.
[0180] S402, The master node sends the second frame to the slave node. Correspondingly, the slave node receives the second frame sent by the master node.
[0181] In some embodiments, the second frame can be any frame sent by the master node to the slave node after the first frame.
[0182] As described in S401 above, in another possible implementation, the master node can carry the transmission reference time of the first frame in a frame after the first frame in order to send the indication information to the slave node.
[0183] In some embodiments, taking the first frame as frame 1 and the second frame as frame 5 as an example, the master node can embed the transmission reference time of the first frame into the frame header of any one of frames 2, 3, and 4 (such as frame 3), and send frame 3 to the slave node.
[0184] In some embodiments, the master node may send the second frame via broadcast.
[0185] In some embodiments, the first delay is used for time synchronization each time the node receives a second frame.
[0186] In some embodiments, slave nodes can perform time synchronization based on time synchronization parameters.
[0187] Here, the time synchronization parameters may include the first delay and the reference time for sending the first frame.
[0188] In some embodiments, the slave node determines the reception reference time of the second frame based on the time synchronization parameters, and then performs time synchronization based on the reception reference time of the second frame.
[0189] Here, the receiving reference time of the second frame refers to the time when the slave node receives the second frame under the master reference clock of the master node.
[0190] In some embodiments, the slave node can synchronize its local time to the reference time for receiving the second frame.
[0191] In some embodiments, the reception reference time of the second frame is obtained based on the first delay, the transmission reference time of the first frame, and the transmission time interval, wherein the transmission time interval is the time interval between the second frame and the first frame.
[0192] Here, the transmission time interval is determined based on the number of frames between the first and second frames and the frame transmission period.
[0193] In some embodiments, the receiving reference time of the slave node when it receives the second frame can be determined based on the number of frames between the second frame and the first frame, the receiving reference time when the slave node receives the first frame, and the first delay of the master node.
[0194] In some embodiments, combining formula (I) above, the reception reference time of the second frame received from the node can be calculated using formula (II). Formula (II) is as follows: F=A+(GH)×1 Formula (II)
[0195] Where F is the reception reference time when the slave node receives the second frame, A is the reception reference time when the slave node receives the first frame, G is the second frame, H is the first frame, and I is the transmission delay from the master node to the slave node (first delay).
[0196] In some embodiments, at least one of the first and second frames sent by the master node is a data frame.
[0197] In the time synchronization methods provided in some embodiments of this disclosure, due to the inevitable transmission delay between different nodes in the network, the time of the master node and the slave node becomes out of sync. Therefore, in some embodiments of this disclosure, the slave node determines the transmission time used to transmit data from the master node to the slave node by receiving a reference frame sent by the master node. In some embodiments, since the transmission time from the master node to the slave node is usually stable, after the slave node determines the transmission time used to transmit data from the master node to the slave node, subsequent slave nodes can directly determine the time of the master node for each second frame received, thereby continuously synchronizing the slave node's local time according to the master node's time, improving the synchronization accuracy of time synchronization.
[0198] As described in S304 and S306 above, the time synchronization system needs to be initialized, calibrated, and verified before performing periodic time synchronization. The following section, in conjunction with the embodiment shown in Figure 5, provides a solution for initializing, calibrating, and verifying the time synchronization system.
[0199] In some embodiments, as shown in FIG5, the time synchronization method provided by some embodiments of this disclosure includes the following steps S501 to S516.
[0200] S501, the master node sends a synchronization code and link parameter information to the slave node. Correspondingly, the slave node receives the synchronization code and link parameter information sent by the master node.
[0201] Here, the synchronization code can be the initialization synchronization code, and the link parameter information includes the frame format, frame length, and the maximum data transmission capacity of the network.
[0202] In some embodiments, the master node can send initialization synchronization codes and link parameter information a fixed number of times. Here, the fixed number of times can be a manually set value, which can be flexibly adjusted according to the actual scenario.
[0203] S502, The slave node calibrates its local clock based on the synchronization code and synchronizes the link frequency based on the link parameter information.
[0204] In some embodiments, after receiving a synchronization code, the slave node can correct its local clock according to the synchronization code to achieve frequency synchronization between the slave node's local clock and the master node's local clock. After frequency synchronization, each node processes data with the same efficiency, so that each slave node processes frames in the same time.
[0205] Thus, on the one hand, by receiving the synchronization code and link parameter information sent by the master node, the processing speed of each slave node is consistent with that of the master node, thereby ensuring that the processing latency of each slave node for frames is consistent; on the other hand, by receiving the delay correction message sent by the master node, the accuracy of its own balanced latency is ensured, so as to facilitate time synchronization between different nodes.
[0206] S503, the master node sends the fifth frame to the slave node. Correspondingly, the slave node receives the fifth frame sent by the master node.
[0207] Here, the fifth frame carries a registration start message, which is used to request the node to start the registration process.
[0208] In some embodiments, after executing S501, the master node performs a fixed delay before sending the registration start message. Here, the fixed delay can be a manually set value.
[0209] In some embodiments, after sending the registration start message, the master node may wait for a preset duration to allow the slave nodes to respond with registration information. Here, the preset duration can be a manually set value, used to ensure that the slave node furthest from the master node in the network can respond with registration information.
[0210] In some embodiments, the fifth frame is sent by the master node while the slave node is in the initialization state.
[0211] In some embodiments, the slave node is in an initialization state when at least one of the following conditions is met: the vehicle to which the slave node is located is powered on for the first time, the vehicle to which the slave node is located has no abnormalities in its self-test after power-on, and the vehicle to which the slave node is located is about to execute the factory configuration process.
[0212] S504. The slave node sends the sixth frame to the master node. Correspondingly, the master node receives the sixth frame sent by the slave node.
[0213] Here, the sixth frame carries registration information, which includes the identity and serial number of the slave node.
[0214] In some embodiments, after receiving the registration start message, the slave node may perform a random delay before sending the registration information to the master node.
[0215] In some embodiments, random delays are used to reduce the probability of conflicts in registration information reported by nodes. For example, random delays can be generated as integer multiples of a pre-agreed minimum time unit, where the minimum time unit should be greater than the duration of a message for which a single node uploads registration information.
[0216] In some embodiments, the master node may receive registration information from the slave node within the aforementioned preset waiting time, and then register the slave node in the network based on the registration information.
[0217] In some embodiments, the fields in the header of the registration information are used to enable the master node to identify and discard the registration information in the event of overlapping transmissions.
[0218] In this way, by having the slave nodes report their identity and sequence number to the master node, the master node can learn about each of its subordinate slave nodes, ensuring that time synchronization can be performed on multiple slave nodes in the future.
[0219] S505, the master node sends the first frame to the slave node. Correspondingly, the slave node receives the first frame sent by the master node.
[0220] Here, the first frame includes the start delay corresponding to the slave node. The first frame includes the start delay allocated to each slave node for sending the third frame. The start delay is the duration for which the slave node waits to start sending back the uplink frame after processing the downlink frame sent by the master node.
[0221] In some embodiments, the first frame can be a reference frame. The master node can send the reference frame to the slave node and record the sending reference time of the reference frame.
[0222] In some embodiments, the first frame may also include the start delay corresponding to other slave nodes in the network.
[0223] S506, The slave node sends the third frame to the master node. Correspondingly, the master node receives the third frame sent by the slave node.
[0224] Here, the third frame is sent from the slave node to the master node after the initial delay following the receipt of the first frame.
[0225] It is understandable that the start delay in S505 above can also be called the sixth delay.
[0226] In some embodiments, the slave node may respond to the first frame sent by the master node by sending a third frame if the time it takes to receive the first frame reaches the sixth delay. The master node records the time it receives the third frame.
[0227] Here, the third frame is the feedback frame sent by the slave node in response to the first frame.
[0228] S507. The master node determines the third delay of the slave node based on the third frame.
[0229] In some embodiments, after receiving the third frame, the master node can determine the third delay of the slave node based on the reception time of the third frame, the transmission time of the third frame, and the sixth delay.
[0230] In some embodiments, combining formula (I) above, the third delay of the slave node can be calculated using formula (III). Formula (III) is as follows: J = C - (KLM) Formula (III)
[0231] Where J is the third delay of the slave node, K is the fourth frame reception time, L is the third frame transmission time, and M is the sixth delay.
[0232] S508, the master node sends the fourth frame to the slave node. Correspondingly, the slave node receives the fourth frame sent by the master node.
[0233] In some embodiments, the master node may respond to the third frame by sending a fourth frame to the slave node, the fourth frame including any one of the following: a first delay, a third delay, and correction information for the third delay.
[0234] S509. The slave node sends the seventh frame to the master node. Correspondingly, the master node receives the seventh frame sent by the slave node.
[0235] Here, the seventh frame includes the registration information of the slave node, and the seventh frame is used to request the master node to verify the registration information of the slave node.
[0236] In some embodiments, the seventh frame is sent to the master node after the slave node has been successfully initialized and the vehicle to which the slave node is located has been powered on again.
[0237] S510, the master node sends the eighth frame to the slave node. Correspondingly, the slave node receives the eighth frame sent by the master node.
[0238] Here, the eighth frame carries registration verification information. The eighth frame is used to indicate whether the registration information sent by the slave node this time is consistent with the pre-stored registration information.
[0239] In some embodiments, the master node may send registration verification information to the slave node in response to the registration information.
[0240] Thus, this disclosure configures various parameters of the slave node by receiving registration verification information issued by the master node, ensuring that the slave node can work normally and communicate normally with the master node.
[0241] S511. The master node sends a synchronization code and link parameter information to the slave node. Correspondingly, the slave node receives the synchronization code and link parameter information sent by the master node.
[0242] In some embodiments, the master node can send synchronization codes and link parameter information a fixed number of times. The fixed number of times can be a manually set value that can be flexibly adjusted according to the actual scenario.
[0243] In some embodiments, synchronization codes and link parameter information are carried in any data frame sent by the master node.
[0244] In some embodiments, the slave node satisfies at least one of the following: the slave node needs to detect an anomaly in time synchronization performance; and, after the slave node switches from sleep mode or low-power mode to normal operation mode, it receives synchronization code and link information sent by the master node.
[0245] S512, The slave node calibrates its local clock based on the synchronization code and synchronizes the link frequency based on the link parameter information.
[0246] In some embodiments, after receiving the synchronization code, the slave node can recalibrate its local clock based on the synchronization code to achieve frequency synchronization between the slave node's local clock and the master node's local clock. After frequency synchronization, each node processes data with the same efficiency, ensuring that each slave node processes frames in the same time.
[0247] In some embodiments, the slave node can compare the received link parameter information with the local link parameter information, and update the received link parameter information to the local link parameter information under different circumstances.
[0248] S513. The master node sends a delay correction start message to the slave node. Correspondingly, the slave node receives the delay correction start message sent by the master node.
[0249] In some embodiments, after sending the delay correction initiation message, the master node may wait for a preset duration to receive an acknowledgment message from the slave node. This preset duration can be a manually set value, used to ensure that the slave node furthest from the master node in the network can send an acknowledgment message.
[0250] S514. The slave node sends a delay correction acknowledgment message to the master node. Correspondingly, the master node receives the delay correction acknowledgment message sent by the slave node.
[0251] In some embodiments, the slave node may send a delay correction acknowledgment message to the master node in response to the delay correction initiation message.
[0252] In some embodiments, after receiving the correction start message, the slave node may execute the third delay determined in S507 and then send an acknowledgment message to the master node.
[0253] In some embodiments, the third delay is used to avoid conflicts in the registration information reported by the slave node. The master node can receive the acknowledgment message from the slave node within the aforementioned preset waiting time.
[0254] S515. The master node adjusts the third delay of the slave node based on the delay correction confirmation message.
[0255] In some embodiments, after receiving the delay correction confirmation message, the master node can adjust the third delay of the slave node based on the actual time of receiving the delay correction confirmation message and the theoretical time of receiving the delay correction confirmation message.
[0256] In some embodiments, if the actual time of receiving the delay correction acknowledgment message is earlier than the theoretical time of receiving the delay correction acknowledgment message, a third delay is added; if the actual time of receiving the delay correction acknowledgment message is later than the theoretical time of receiving the delay correction acknowledgment message, the third delay is reduced.
[0257] S516. The master node sends a delay correction message to the slave node. Correspondingly, the slave node receives the delay correction message sent by the master node.
[0258] In some embodiments, the master node may send a delay correction message to the slave node in response to the delay correction acknowledgment message.
[0259] In one possible implementation, a delay correction message is used to confirm that the third delay of the slave node is accurate.
[0260] In another possible implementation, the delay correction message carries an updated third delay, which is used to update the third delay of the slave node.
[0261] It is understandable that S513 to S516 above are used to determine the correction information for the third delay included in the fourth frame in S508.
[0262] In some embodiments, as shown in FIG5, after the slave node receives the delay correction message sent by the master node, the master node and the slave node can execute the above-described S401 and S402, which will not be repeated here.
[0263] In some embodiments, time synchronization operations are paused when the slave node is in sleep mode or low-power mode.
[0264] In some embodiments, the slave node can enter a sleep mode or a low-power mode, in which case it exits the third state, which is the state corresponding to time synchronization.
[0265] In some embodiments, when the slave node does not need to transmit data, it can exit time synchronization and stop receiving synchronization frames sent by the master node.
[0266] Thus, in some embodiments of this disclosure, the slave node can flexibly exit the time synchronization state when time synchronization is not required, saving power consumption.
[0267] In some embodiments, the slave node sends a ninth frame to the master node. Correspondingly, the master node receives the ninth frame sent by the slave node.
[0268] Here, the ninth frame is used to indicate that the slave node is reconnecting to the network.
[0269] In some embodiments, the ninth frame is sent in at least one of the following situations: when the slave node detects an anomaly in time synchronization performance, and after the slave node switches from sleep mode or low-power mode to normal operation mode.
[0270] In some embodiments, the slave node can also perform a time synchronization recovery operation when switching from a sleep mode or a low-power mode to a normal operation mode.
[0271] In some embodiments, when a slave node is woken up from a sleep or low-power mode, it can receive a synchronization code sent by the master node and synchronize its frequency with the master node's clock.
[0272] It should be noted that because the time synchronization system always retains the third delay of the slave node, the slave node can resynchronize the clock frequency without causing conflicts or data loss.
[0273] Thus, when a slave node in this disclosure needs to perform time synchronization, it can join the time synchronization process at any time, ensuring the consistency of the time of all slave nodes with the time of the master node in the time synchronization system.
[0274] In some embodiments, the master node can also update the master reference clock based on the smart antenna of the slave node.
[0275] In some embodiments, as shown in FIG6, the time synchronization method provided by some embodiments of this disclosure may further include the following steps S601 to S602.
[0276] S601, the master node sends the tenth frame to the slave node. Correspondingly, the slave node receives the tenth frame sent by the master node.
[0277] Here, the tenth frame carries a clock correction request message. The tenth frame is used to request the correction of the master node's local time. The clock correction request message can also be called the "master clock calibration" management message.
[0278] In some embodiments, the master node may send a data frame carrying a "master clock calibration" management message.
[0279] In some embodiments, the slave node may update its local time based on satellite information in response to a clock correction request message, and determine the time offset of the local time before and after the update.
[0280] In some embodiments, slave nodes can update their local time via satellite clock and record time offsets based on the "Master Clock Calibration" management message.
[0281] In some embodiments, the tenth frame is sent by the master node in the event of a clock anomaly.
[0282] S602, The slave node sends the eleventh frame to the master node. Correspondingly, the master node receives the eleventh frame sent by the slave node.
[0283] Here, the eleventh frame carries a clock correction response message. The eleventh frame includes a time offset, which is the offset before and after updating the node's local time based on satellite information.
[0284] Here, the clock correction response message includes a time offset, which can be a numerical value. Satellite clocks can be updated using the Global Navigation Satellite System (GNSS) protocol or other time-updating methods.
[0285] In some embodiments, in the event of a satellite clock malfunction, the time offset in the upper limit message sent from the slave node to the master node can be 0.
[0286] In some embodiments, the slave node may send an uplink message (such as a clock correction response message) carrying a clock offset to the master node.
[0287] In some embodiments, the master node can update the local time based on the time offset.
[0288] Thus, in the event of an anomaly in the local time of the master node, this disclosure can update the local time of the master node based on the time offset obtained after the slave node updates its local time according to satellite information, thereby ensuring the accuracy of the master node's clock source.
[0289] The foregoing mainly describes the solutions provided by some embodiments of this disclosure from the perspective of network element interaction. Correspondingly, some embodiments of this disclosure also provide a communication device for implementing the various methods described above. This communication device can be a terminal device in the above method embodiments, or a device including the aforementioned terminal device, or a component usable in a terminal device; or, the communication device can be a network device in the above method embodiments, or a device including the aforementioned network device, or a component usable in a network device. It is understood that, in order to achieve the above functions, the communication device includes at least one of the hardware structures and software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0290] Some embodiments of this disclosure can divide the communication device into functional modules according to the above method embodiments. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware or as software functional modules. It should be understood that the module division in some embodiments of this disclosure is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0291] For example, as shown in Figure 7, the communication device 700 includes a transceiver 710. In some embodiments, the communication device 700 also includes a processor 720. The transceiver 710, also known as a transceiver unit, is used to implement transceiver functions. For example, it can be a transceiver circuit, a transceiver, a transceiver, or a communication interface.
[0292] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0293] Transceiver 710 is configured to receive a first frame sent by the master node. Transceiver 710 is also configured to receive a second frame sent by the master node. The first frame is used to determine a first delay, which is the transmission delay from the master node to the slave node. This first delay is used for time synchronization by the slave node each time it receives the second frame.
[0294] Taking the communication device 700 as the master node in the above method embodiment as an example, one possible implementation is as follows:
[0295] Transceiver 710 is configured to send a first frame to the slave node. Transceiver 710 is also configured to send a second frame to the slave node. The first frame is used to determine a first delay, which is the transmission delay from the master node to the slave node. This first delay is used for time synchronization by the slave node each time it receives the second frame.
[0296] In some embodiments of the time synchronization apparatus provided in this disclosure, due to the inevitable transmission delay between different nodes in the network, the time of the master node and the slave node becomes out of sync. Therefore, in this disclosure, the slave node determines the transmission time used to transmit data from the master node to the slave node by receiving a reference frame sent by the master node. In some embodiments, since the transmission time from the master node to the slave node is usually stable, after the slave node determines the transmission time used to transmit data from the master node to the slave node, subsequent slave nodes can directly determine the time of the master node for each second frame received, based on the transmission time used to transmit data from the master node to the slave node. This allows for continuous synchronization of the slave node's local time based on the master node's time, improving the synchronization accuracy of the time synchronization.
[0297] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0298] Processor 720 is configured to perform time synchronization based on time synchronization parameters. These parameters include a first delay and a reference time for the transmission of the first frame.
[0299] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0300] The processor 720 is configured to determine the reception reference time of the second frame based on the time synchronization parameters, and to perform time synchronization based on the reception reference time of the second frame.
[0301] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0302] Processor 720 is configured to synchronize the slave node’s local time with the receive reference time of the second frame.
[0303] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0304] Transceiver 710 is configured to send a third frame to the master node and receive a fourth frame sent by the master node; here, the fourth frame includes any one of the following: a first delay, a third delay, and correction information for the third delay.
[0305] Taking the communication device 700 as the master node in the above method embodiment as an example, one possible implementation is as follows:
[0306] Transceiver 710 is configured to receive a third frame sent by a slave node; and send a fourth frame to the slave node; wherein the fourth frame includes any one of the following: a first delay, a third delay, and correction information for the third delay.
[0307] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0308] Transceiver 710 is configured to receive the fifth frame sent by the master node, which is used to request the slave node to start the registration process; and to send the sixth frame to the master node, which includes registration information.
[0309] Taking the communication device 700 as the master node in the above method embodiment as an example, one possible implementation is as follows:
[0310] Transceiver 710 is configured to send a fifth frame to the slave node, the fifth frame being used to request the slave node to begin the registration process; and to receive a sixth frame sent by the slave node, the sixth frame including registration information.
[0311] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0312] Transceiver 710 is configured to receive the fifth frame sent by the master node when the slave node is in the initialization state.
[0313] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0314] Transceiver 710 is configured to send a seventh frame to the master node, which is used to request the master node to verify the registration information of the slave node. The seventh frame includes the registration information of the slave node. It also receives an eighth frame sent by the master node, which is used to indicate whether the registration information sent by the slave node this time is consistent with the pre-stored registration information.
[0315] Taking the communication device 700 as the master node in the above method embodiment as an example, one possible implementation is as follows:
[0316] Transceiver 710 is configured to: receive a seventh frame sent by a slave node, the seventh frame being used to request the master node to verify the slave node's registration information, the seventh frame including the slave node's registration information; and send an eighth frame to the slave node, the eighth frame being used to indicate whether the registration information sent by the slave node this time is consistent with the pre-stored registration information.
[0317] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0318] Transceiver 710 is configured to receive synchronization codes and link parameter information sent by the master node. Processor 720 is configured to calibrate the local clock of the slave node based on the synchronization code and to synchronize the link frequency based on the link parameter information. Transceiver 710 is also configured to send a ninth frame to the master node, the ninth frame being used to instruct the slave node to reconnect to the network.
[0319] Taking the communication device 700 as the master node in the above method embodiment as an example, one possible implementation is as follows:
[0320] Transceiver 710 is configured to: send synchronization code and link parameter information to the slave node; and receive the ninth frame sent by the slave node, which is used to indicate that the slave node reconnects to the network.
[0321] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0322] The processor 720 is configured to perform at least one of the following: detect an anomaly in time synchronization performance; and switch from a sleep mode or a low-power mode to a normal operation mode.
[0323] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0324] Processor 720 is configured to suspend time synchronization operations when in sleep or low-power mode.
[0325] Taking the communication device 700 as an example of the slave node described in the above method embodiment, one possible implementation is as follows:
[0326] Transceiver 710 is configured to: receive the tenth frame sent by the master node, which is used to request correction of the master node's local time; and send the eleventh frame to the master node, which includes a time offset, which is the offset of the slave node's local time before and after updating based on satellite information.
[0327] Taking the communication device 700 as the master node in the above method embodiment as an example, one possible implementation is as follows:
[0328] Transceiver 710 is configured to: send a tenth frame to a slave node, the tenth frame being used to request correction of the master node's local time; and receive an eleventh frame sent by the slave node, the eleventh frame including a time offset, the time offset being the offset of the slave node's local time before and after updating based on satellite information.
[0329] Here, all relevant content of each step involved in the above method embodiments can be referred to in the functional description of the corresponding functional module, and will not be repeated here. In some embodiments, the communication device 700 may further include a storage component, which can be used to store at least one of instructions and data, and the processor 720 can read at least one of the instructions and data in the storage module.
[0330] As shown in Figure 8, some embodiments of this disclosure also provide an electronic and electrical system 1000, including the time synchronization system 200 described in the above embodiments.
[0331] As shown in Figure 9, some embodiments of this disclosure also provide a vehicle 2000, including the above-described electronic and electrical system 1000.
[0332] Some embodiments of this disclosure also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the time synchronization method in the method flow shown in the above method embodiments.
[0333] Here, a computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof, or any other form of computer-readable storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an application-specific integrated circuit (ASIC). In some embodiments, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in connection with an instruction execution system, apparatus, or device.
[0334] Embodiments of this disclosure provide a computer program product containing instructions that, when executed on a computer, cause the computer to perform the time synchronization method described in Figures 4 to 6.
[0335] Since the computer-readable storage medium and computer program product in the embodiments of this disclosure can be applied to the above methods, the technical effects that can be obtained can also be referred to the above method embodiments, and this disclosure will not repeat them here.
[0336] In the embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0337] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0338] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0339] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A time synchronization method, comprising: The slave node (121) receives a first frame sent by the master node (110), the first frame being used to determine a first delay, the first delay being the transmission delay from the master node (110) to the slave node (121); The slave node (121) receives the second frame sent by the master node (110), and the first delay is used to perform time synchronization each time the slave node receives the second frame.
2. The method according to claim 1, further comprising: The slave node (121) performs time synchronization according to time synchronization parameters, which include the first delay and the transmission reference time of the first frame.
3. The method according to claim 2, wherein, The slave node (121) performs time synchronization according to the time synchronization parameters, including: The slave node (121) determines the reference time for receiving the second frame based on the time synchronization parameters; The slave node (121) performs time synchronization based on the reception reference time of the second frame.
4. The method according to claim 3, wherein, The slave node (121) performs time synchronization based on the reception reference time of the second frame, including: The slave node (121) synchronizes its local time to the reception reference time of the second frame.
5. The method according to claim 3 or 4, wherein, The reception reference time of the second frame is obtained based on the first delay, the transmission reference time of the first frame, and the transmission time interval, wherein the transmission time interval is the time interval between the second frame and the first frame.
6. The method according to claim 5, wherein, The transmission time interval is determined based on the number of frames between the first frame and the second frame and the frame transmission period.
7. The method according to any one of claims 2 to 6, wherein, The transmission reference time of the first frame is carried in the first frame, or in any frame transmitted by the master node (110) after the first frame and before the second frame.
8. The method according to any one of claims 1 to 7, wherein, The first delay is determined based on the second delay, the third delay, and the fourth delay; The second delay is used to characterize the theoretical time from when the master node (110) sends the first frame to the farthest slave node (121) among the slave nodes (121) to when it receives the third frame sent by the farthest slave node (121) in response to the first frame. The fourth delay is the processing delay of the data frame by the slave node (121); The third delay is used to ensure that the time when the third frame sent by the slave node (121) reaches the master node (110) is the same as the time when the third frame sent by the farthest slave node (121) reaches the master node (110), and the third frame is used to respond to the first frame.
9. The method according to claim 8, wherein, After the slave node (121) receives the first frame sent by the master node (110), the method further includes: The slave node (121) sends the third frame to the master node (110); The slave node (121) receives the fourth frame sent by the master node (110); wherein the fourth frame includes any one of the following: the first delay, the third delay, and the correction information of the third delay.
10. The method according to claim 9, wherein, The first frame includes the start delay corresponding to the slave node (121); the third frame is sent by the slave node (121) to the master node (110) after the start delay when it receives the first frame.
11. The method according to claim 10, wherein, The first frame also includes the start delay corresponding to other slave nodes (121) in the network.
12. The method according to any one of claims 8 to 11, wherein, The second delay and the fourth delay are pre-configured.
13. The method according to any one of claims 1 to 12, further comprising: The slave node (121) receives the fifth frame sent by the master node (110), the fifth frame being used to request the slave node (121) to start the registration process; The slave node (121) sends a sixth frame to the master node (110), the sixth frame including registration information.
14. The method according to claim 13, wherein, The registration information includes the identity information of the slave node (121).
15. The method according to claim 13 or 14, wherein, The slave node (121) receiving the fifth frame sent by the master node (110) includes: When the slave node (121) is in the initialization state, the slave node (121) receives the fifth frame sent by the master node (110).
16. The method according to claim 15, wherein, The slave node (121) is in the initialization state if at least one of the following conditions is met: The vehicle located at node (121) is powered on for the first time; The vehicle located at node (121) showed no abnormalities during self-testing after power-on; and, The vehicle located at node (121) is scheduled to undergo the factory configuration process.
17. The method according to any one of claims 1 to 16, further comprising: The slave node (121) sends a seventh frame to the master node (110). The seventh frame is used to request the master node (110) to verify the registration information of the slave node (121). The seventh frame includes the registration information of the slave node (121). The slave node (121) receives the eighth frame sent by the master node (110). The eighth frame is used to characterize whether the registration information sent by the slave node (121) this time is consistent with the pre-stored registration information.
18. The method according to claim 17, wherein, The seventh frame is sent by the slave node (121) to the master node (110) after the slave node (121) is successfully initialized and the vehicle where the slave node (121) is located is powered on again.
19. The method according to any one of claims 1 to 18, further comprising: The slave node (121) receives the synchronization code and link parameter information sent by the master node (110); The slave node (121) calibrates its local clock based on the synchronization code and synchronizes the link frequency based on the link parameter information; The slave node (121) sends a ninth frame to the master node (110), the ninth frame being used to instruct the slave node (121) to reconnect to the network.
20. The method according to claim 19, wherein, Before the slave node (121) receives the synchronization code and link information sent by the master node (110), the method further includes at least one of the following: The slave node (121) detected an anomaly in time synchronization performance; and, The slave node (121) switches from sleep mode or low power mode to normal operation mode.
21. The method of claim 20, further comprising: The slave node (121) suspends the time synchronization operation when it is in the sleep mode or the low power mode.
22. The method according to any one of claims 19 to 21, wherein, The synchronization code and the link parameter information are carried in any data frame sent by the master node (110).
23. The method according to any one of claims 1 to 22, further comprising: The slave node (121) receives the tenth frame sent by the master node (110), the tenth frame being used to request the correction of the local time of the master node (110); The slave node (121) sends an eleventh frame to the master node (110). The eleventh frame includes a time offset, which is the offset of the slave node (121)'s local time before and after updating according to satellite information.
24. The method according to any one of claims 1 to 23, wherein, The slave node (121) and the master node (110) are nodes in a passive optical network.
25. The method according to any one of claims 1 to 24, wherein, At least one of the first frame and the second frame is a data frame.
26. A time synchronization method, comprising: The master node (110) sends a first frame to the slave node (121). The first frame is used to determine a first delay, which is the transmission delay from the master node (110) to the slave node (121). The master node (110) sends a second frame to the slave node (121), and the first delay is used to perform time synchronization each time the slave node (121) receives the second frame.
27. The method according to claim 26, wherein, The time synchronization is based on time synchronization parameters, which include the first delay and the transmission reference time of the first frame.
28. The method according to claim 27, wherein, The time synchronization is based on the reception reference time of the second frame, which is obtained based on the time synchronization parameters.
29. The method according to claim 28, wherein, The time synchronization is used to synchronize the local time of the slave node (121) with the reception reference time of the second frame.
30. The method according to claim 28, wherein, The reception reference time of the second frame is obtained based on the first delay, the transmission reference time of the first frame, and the transmission time interval, wherein the transmission time interval is the time interval between the second frame and the first frame.
31. The method according to claim 30, wherein, The transmission time interval is determined based on the number of frames between the first frame and the second frame and the frame transmission period.
32. The method according to any one of claims 27 to 31, wherein, The transmission reference time of the first frame is carried in the first frame or in any frame transmitted by the master node (110) after the first frame and before the second frame.
33. The method according to any one of claims 26 to 32, wherein, The first delay is determined based on the second delay, the third delay, and the fourth delay; The second delay is used to characterize the theoretical time from when the master node (110) sends the first frame to the farthest slave node (121) among the slave nodes (121) to when it receives the third frame sent by the farthest slave node (121) in response to the first frame. The fourth delay is the processing delay of the data frame by the slave node (121); The third delay is used to ensure that the time when the third frame sent by the slave node (121) reaches the master node (110) is the same as the time when the third frame sent by the farthest slave node (121) reaches the master node (110), and the third frame is used to respond to the first frame.
34. The method according to claim 33, wherein, After the master node (110) sends the first frame to the slave node (121), the method further includes: The master node (110) sends the third frame to the slave node (121); The master node (110) receives a fourth frame sent by the slave node (121); wherein the fourth frame includes any one of the following: the first delay, the third delay, and the correction information of the third delay.
35. The method according to claim 34, wherein, The first frame includes the start delay corresponding to the slave node (121); the third frame is sent by the slave node (121) to the master node (110) after the start delay when it receives the first frame.
36. The method according to claim 35, wherein, The first frame also includes the start delay corresponding to other slave nodes (121) in the network.
37. The method according to any one of claims 33 to 36, wherein, The second delay and the fourth delay are pre-configured.
38. The method according to any one of claims 26 to 37, further comprising: The master node (110) sends a fifth frame to the slave node (121), the fifth frame being used to request the slave node (121) to start the registration process; The master node (110) receives the sixth frame sent by the slave node (121), the sixth frame including registration information.
39. The method according to claim 38, wherein, The registration information includes the identity information of the slave node (121).
40. The method according to claim 38 or 39, wherein, The fifth frame is sent by the master node (110) while the slave node (121) is in the initialization state.
41. The method according to claim 40, wherein, The slave node (121) is in the initialization state if at least one of the following conditions is met: The vehicle located at node (121) is powered on for the first time; The vehicle located at node (121) showed no abnormalities during self-testing after power-on; and, The vehicle located at node (121) is scheduled to undergo the factory configuration process.
42. The method according to any one of claims 26 to 41, further comprising: The master node (110) receives the seventh frame sent by the slave node (121). The seventh frame is used to request the master node (110) to verify the registration information of the slave node (121). The seventh frame includes the registration information of the slave node (121). The master node (110) sends an eighth frame to the slave node (121), the eighth frame being used to characterize whether the registration information sent by the slave node (121) this time is consistent with the pre-stored registration information.
43. The method according to claim 42, wherein, The seventh frame is sent by the slave node (121) to the master node (110) after the slave node (121) is successfully initialized and the vehicle where the slave node (121) is located is powered on again.
44. The method according to any one of claims 26 to 43, further comprising: The master node (110) sends a synchronization code and link parameter information to the slave node (121); The master node (110) receives the ninth frame sent by the slave node (121), the ninth frame being used to instruct the slave node (121) to reconnect to the network.
45. The method according to claim 44, wherein, The ninth frame is sent if at least one of the following conditions is met: The slave node (121) detects an anomaly in time synchronization performance; and, After switching from hibernation mode or low power mode to normal operation mode.
46. The method according to claim 44 or 45, wherein, The synchronization code and the link parameter information are carried in any data frame sent by the master node (110).
47. The method according to any one of claims 26 to 46, further comprising: The master node (110) sends a tenth frame to the slave node (121), the tenth frame being used to request the correction of the local time of the master node (110); The master node (110) receives the eleventh frame sent by the slave node (121). The eleventh frame includes a time offset, which is the offset of the slave node (121)'s local time before and after updating according to satellite information.
48. The method according to claim 47, wherein, The tenth frame is sent by the master node (110) in the event of a clock anomaly.
49. The method according to any one of claims 26 to 48, wherein, The slave node (121) and the master node (110) are nodes in a passive optical network.
50. The method according to any one of claims 26 to 49, wherein, At least one of the first frame and the second frame is a data frame.
51. A communication device (700), comprising: A functional component for performing the method according to any one of claims 1-25, or a functional component for performing the method according to any one of claims 26-50; wherein the action performed by the functional component is implemented by hardware or by hardware executing corresponding software.
52. A time synchronization system (200) comprising a master node (110), at least one optical splitter (120), and a plurality of slave nodes (121), wherein the master node (110) is connected to the plurality of slave nodes (121) through the at least one optical splitter (120); the slave nodes (121) are configured to perform the method according to any one of claims 1-25, and the master node (110) is configured to perform the method according to any one of claims 26-50.
53. An electronic and electrical system (1000) comprising the time synchronization system (200) according to claim 52.
54. A vehicle (2000) comprising the electronic and electrical system (1000) according to claim 53.
55. A computer-readable storage medium storing instructions, wherein, When the computer executes the instruction, the computer performs the method according to any one of claims 1 to 50.
56. A computer program product comprising instructions, wherein, when the instructions are executed on a computer, the computer performs the method according to any one of claims 1 to 50.
Citation Information
Patent Citations
Clock synchronization method, device and equipment and storage medium
CN112636861A
Wireless network node synchronization method, system and device and readable storage medium
CN116017670A
Clock synchronization method, clock system, storage medium and electronic equipment
CN118473572A
Clock synchronization method based on HDC broadband carrier, electronic equipment and network
CN118590177A
Node synchronization method, network transmission system, and node device
WO2013121568A1