Implementation method for maintaining stability of inter-node synchronization header, and communication system

WO2026219019A1PCT designated stage Publication Date: 2026-10-22THREE PEAK SEMICON (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/088788
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-04-14
Filing Date
2026-04-03
Publication Date
2026-10-22

Smart Images

  • Figure CN2026088788_22102026_PF_FP_ABST
    Figure CN2026088788_22102026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention provides an implementation method for maintaining stability of an inter-node synchronization header, and a communication system. The communication system comprises a master node and a plurality of slave nodes, wherein the master node sends a downlink frame to a downstream node according to a fixed clock frequency, and any slave node, upon receiving the downlink frame sent by an upstream node, determines a phase in which said slave node is operating. If operating in a learning phase, the slave node uses the received downlink frame as a learning frame, obtains an arrival time of the learning frame, configures a dummy synchronization header on the basis of the arrival time of the learning frame, and then ends the learning phase. If operating in a downlink forwarding phase, the slave node uses the received downlink frame as a data frame, and sends the data frame to a downstream node according to the dummy synchronization header configured in the learning phase. This allows each slave node to transmit a data frame by using a stable dummy synchronization header, thereby preventing stage-by-stage accumulation of non-deterministic delays across slave nodes, and overcoming the defect where timing jitter on slave nodes exceeds an allowable value and consequently affects slave node local clock recovery.
Need to check novelty before this filing date? Find Prior Art

Description

Implementation methods and communication systems for maintaining stable synchronization headers between nodes

[0001] This invention claims priority to Chinese Patent Application No. 202510462229.5, filed with the Chinese Patent Office on April 14, 2025, entitled "Method and Communication System for Maintaining Stability of Synchronization Headers Between Nodes", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This invention relates to the field of communication technology, and more specifically, to a method and communication system for maintaining the stability of synchronization headers between nodes. Background Technology

[0003] In serial communication systems, such as vehicular high-speed wired media transmission systems (100 Mbps time-division duplex systems) and daisy-chain networking systems, there is a master node and multiple slave nodes that communicate serially. The master node is controlled by a host computer and sends downlink frames to the downstream slave nodes at a fixed clock frequency. To perform clock recovery, the transmitting end adds a special character as a synchronization header to the beginning of the downlink frame. When the receiving end receives the downlink frame, it identifies the synchronization header and uses its position to recover the clock and generate a local clock.

[0004] Downlink frames are sequentially transmitted among multiple slave nodes according to their connection order. During the process of receiving a downlink frame and performing synchronization header identification, each slave node experiences delays due to factors such as synchronization header detection and recovery, clock synchronization, or interface circuitry. Furthermore, these delays may not be consistent across different slave nodes. This inherent and inconsistent delay across slave nodes can lead to a cumulative effect of delays across them, resulting in significant jitter between the synchronization headers of adjacent downlink frames received by subsequent slave nodes. If the jitter exceeds the maximum permissible value for synchronization header jitter by the slave node, it will severely affect the slave node's recovery of its local clock, causing the slave node to malfunction. Summary of the Invention

[0005] The purpose of this invention is to provide a method and communication system for maintaining stable synchronization headers between nodes, so as to avoid the problem of uncertain delays accumulating between slave nodes, thereby affecting the recovery of the slave node's local clock.

[0006] In a first aspect, the present invention provides a method for maintaining stable synchronization headers between nodes, applied to a communication system including a master node and multiple slave nodes, wherein the master node and the multiple slave nodes communicate using a serial communication method, and the master node sends downlink frames to downstream nodes at a fixed clock frequency, the method comprising:

[0007] Each of the slave nodes determines its current stage upon receiving a downlink frame from the upstream node;

[0008] When the slave node is in the learning phase, the slave node takes the received downlink frame as the learning frame, obtains the arrival time of the learning frame, configures the pseudo synchronization header based on the arrival time of the learning frame, and ends the learning phase.

[0009] When the slave node is in the downlink forwarding phase, the slave node treats the received downlink frame as a data frame and sends the data frame to the downstream node according to the pseudo synchronization header configured in the learning phase.

[0010] In an optional implementation, the method further includes:

[0011] When the slave node is in the downlink forwarding phase, the slave node will also treat the received downlink frame as a real frame, identify the real synchronization header in the real frame, and send the real frame to the downstream node based on the real synchronization header in the real frame.

[0012] In an optional implementation, the method further includes:

[0013] When the slave node is in the downlink forwarding phase, after receiving the real frame, the slave node compares the real frame with the data frame containing the pseudo synchronization header to obtain a comparison result;

[0014] Based on the comparison results, determine whether the current pseudo-synchronization header has an error;

[0015] If the current pseudo-synchronization header is determined to have an error, the learning phase is re-entered to obtain an updated pseudo-synchronization header.

[0016] In an optional implementation, the step of comparing the real frame with the data frame containing the pseudo-synchronization header to obtain a comparison result includes:

[0017] Obtain a set number of real frames;

[0018] For each real frame in the set number of real frames, the time of the real synchronization header in the real frame is compared with the time of the pseudo synchronization header in the data frame to obtain the time difference between the pseudo synchronization header and the real synchronization header.

[0019] In an optional implementation, the step of determining whether the current pseudo-synchronization header has an error based on the comparison result includes:

[0020] If the time difference between the real synchronization header of each real frame in the set number of real frames and the pseudo synchronization header in the data frame is greater than a preset threshold, then it is determined that the current pseudo synchronization header has an error.

[0021] In an optional implementation, the learning frame includes a preamble, frame content, and an end symbol;

[0022] The step of obtaining the arrival time of the learning frame includes:

[0023] The learning frame is parsed, and if a preamble is detected in the learning frame, the arrival time of the learning frame is determined based on the time information of the local counter. After the arrival time of the learning frame is determined, the local counter is cleared and counting is restarted.

[0024] In an optional implementation, the step of configuring the pseudo-synchronization header based on the arrival time of the learning frame includes:

[0025] Obtain the arrival times of a preset number of consecutive learning frames;

[0026] Based on the arrival time of a preset number of consecutive learning frames, a pseudo-synchronization header is configured according to preset rules.

[0027] In an optional implementation, the method further includes:

[0028] After each power-on of the communication system, the master node sends discovery frames to each slave node in the order of their connection. After receiving confirmation messages from a preset number of slave nodes, the master node determines that the preset number of slave nodes have been discovered and triggers the configuration process of the preset number of slave nodes.

[0029] After completing the configuration process of the preset number of slave nodes, the discovery and configuration process of the next preset number of slave nodes is executed, until the discovery and configuration process of all slave nodes in the communication system is completed.

[0030] In an optional implementation, the preset number is greater than or equal to 1.

[0031] In a second aspect, the present invention provides a communication system for implementing the method for maintaining the stability of the synchronization header between nodes as described in any of the foregoing embodiments, wherein the communication system includes a master node and multiple slave nodes, and the master node and multiple slave nodes communicate using a serial communication method;

[0032] The master node is configured to send downlink frames to downstream nodes at a fixed clock frequency.

[0033] Each of the aforementioned slave nodes is configured to determine its current stage upon receiving a downlink frame sent by an upstream node;

[0034] When the slave node is in the learning phase, the slave node takes the received downlink frame as the learning frame, obtains the arrival time of the learning frame, configures the pseudo synchronization header based on the arrival time of the learning frame, and ends the learning phase.

[0035] When the slave node is in the downlink forwarding phase, the slave node treats the received downlink frame as a data frame and sends the data frame to the downstream node according to the pseudo synchronization header configured in the learning phase.

[0036] This invention provides a method and communication system for maintaining stable synchronization headers between nodes. The communication system includes a master node and multiple slave nodes. The master node sends downlink frames to downstream nodes at a fixed clock frequency. When a slave node receives a downlink frame from an upstream node, it determines its current stage. In the learning stage, the received downlink frame is used as a learning frame, its arrival time is obtained, a pseudo-synchronization header is configured based on the arrival time, and the learning stage ends. In the downlink forwarding stage, the received downlink frame is used as a data frame, and the data frame is sent to the downstream node according to the pseudo-synchronization header configured in the learning stage. In this way, each slave node sends data frames with a stable pseudo-synchronization header, avoiding the accumulation of uncertain delays between slave nodes and preventing time jitter on slave nodes from exceeding allowable values, thus affecting the recovery of the slave node's local clock. Attached Figure Description

[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 is a schematic diagram of communication frame transmission in an existing time-division duplex system;

[0039] Figure 2 is a schematic diagram of the architecture of the communication system provided in an embodiment of the present invention;

[0040] Figure 3 is a flowchart of the method for maintaining the stability of the synchronization header between nodes provided in an embodiment of the present invention;

[0041] Figure 4 is a schematic diagram of communication frame transmission in the communication system according to an embodiment of the present invention;

[0042] Figure 5 is a schematic diagram of the frame structure of the learning frame in an embodiment of the present invention. Detailed Implementation

[0043] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0044] Please refer to Figure 1, which is a schematic diagram of communication frame transmission in a typical existing vehicular wired high-speed media transmission 100 Mbps time-division duplex system. This system includes a master node and multiple slave nodes (slave node 1 to slave node n are schematically shown in the figure), wherein the master node and the multiple slave nodes are sequentially connected for communication.

[0045] The master node is controlled by a host computer and sends downlink frames containing synchronization headers and other information to downstream slave nodes at a fixed clock frequency. Upon receiving a downlink frame, a slave node restores the synchronization header position to achieve local clock synchronization. After receiving a downlink frame from an upstream node, the slave node processes it for a certain time delay (T_node_delay) before sending a downlink frame to the downstream node, and so on, until the last slave node is reached.

[0046] The delay T_node_delay is generally composed of a fixed delay T_node_certain_delay and an uncertain delay T_node_uncertain_delay: T_node_delay = T_node_certain_delay + T_node_uncertain_delay.

[0047] Fixed delays are generally related to synchronization head recovery detection, while indefinite delays are generally related to clock synchronization or interface circuit uncertainties.

[0048] Therefore, the fixed delay is relatively fixed for each slave node, while the uncertain delay may differ between different nodes.

[0049] Taking T_start in Figure 1 as the starting point of time (T_start is the time when the slave node 1 receives the first data of the downlink frame), assuming that the value of T_node_certain_delay is td and the value of T_node_uncertain_delay is tΔ, then slave node 1 will detect the synchronization header within the time range of [td, td+tΔ] and send the downlink frame to slave node 2 at this time.

[0050] Node 2 will detect the synchronization header within the time range of [2*td, 2*td+2*tΔ], and so on, with node n detecting the synchronization header within the time range of [N*td, N*td+N*tΔ]. Therefore, the jitter between two adjacent synchronization headers received by node n will be between 0 and N*tΔ.

[0051] The master node relies on the host computer to maintain its own clock stability, while each slave node relies on the synchronization header recovered from the downlink frame to ensure its own clock stability. Therefore, the synchronization header frequency received by the slave node needs to remain stable. Assuming the slave node's tolerance range for synchronization header jitter is TΔ, based on the above analysis, the maximum possible synchronization header jitter received by slave node n is N*tΔ. If N*tΔ is greater than TΔ, this will severely affect slave node n's recovery of its local clock, thus causing slave node n to malfunction.

[0052] To address the problems existing in the prior art, this invention provides a solution for maintaining the stability of synchronization headers between nodes, thereby solving the problem that the synchronization headers sent downwards are offset due to the uncertainty of node delays, resulting in the jitter of the synchronization headers received by downstream nodes accumulating step by step, which affects the recovery of the local clock by downstream nodes.

[0053] Please refer to Figure 2, which is a schematic diagram of the architecture of the communication system provided in an embodiment of the present invention. The communication system includes a master node and multiple slave nodes. The number of slave nodes that can be linked in the system is theoretically unlimited. Figure 2 schematically shows three slave nodes, including slave node 1, slave node 2 and slave node 3.

[0054] In a communication network, the master node is typically responsible for its operation, including scheduling data transmission, managing network resources, and maintaining network status. Additionally, the master node provides a clock signal to ensure synchronized operation of all nodes in the network. Each slave node sends and receives data under the control of the master node, and each slave node needs to synchronize its clock with the master node to ensure accurate data transmission.

[0055] Please refer to Figure 3, which is a flowchart of a method for maintaining stable synchronization headers between nodes according to an embodiment of the present invention. This method is applied to the communication system shown in Figure 2 and includes the following steps:

[0056] S11, when any slave node receives a downlink frame sent by the upstream node, it determines its current stage.

[0057] S12, when the slave node is in the learning phase, the slave node takes the received downlink frame as the learning frame, obtains the arrival time of the learning frame, configures the pseudo synchronization header based on the arrival time of the learning frame, and ends the learning phase.

[0058] S13, when the slave node is in the downlink forwarding phase, the slave node will treat the received downlink frame as a data frame and send the data frame to the downstream node according to the pseudo synchronization header configured in the learning phase.

[0059] In this embodiment, the master node sends downlink frames to downstream nodes at a fixed clock frequency. Taking Figure 2 as an example, the downlink frames are transmitted sequentially from slave node 1 to slave node 2, and then from slave node 2 to slave node 3. If there is no uncertain delay, the interval between receiving two adjacent synchronization headers by each slave node is stable because the fixed delay of each slave node is the same, i.e., there is no time jitter. However, in reality, due to the difference in uncertain delays among different slave nodes, time jitter exists when each slave node receives two adjacent synchronization headers.

[0060] In order to eliminate the timing jitter on the slave nodes, in this embodiment, each slave node first configures a stable pseudo-synchronization header through learning, and then sends downlink frames based on the stable pseudo-synchronization header.

[0061] Specifically, each slave node has a learning phase and a non-learning phase. During the learning phase, each slave node completes the learning process to obtain a pseudo-synchronization header. During the non-learning phase, it transmits downlink frames based on the pseudo-synchronization header. The non-learning phase mainly includes the downlink forwarding phase and the configuration phase. The pseudo-synchronization header learned during the learning phase is mainly used for transmitting downlink frames during the downlink forwarding phase.

[0062] For any slave node, upon receiving a downlink frame from an upstream node, it first determines its current stage. For example, a slave node can switch between a learning state and a non-learning state. After triggering the learning process, it marks itself as being in the learning state; after completing the learning process and obtaining the pseudo-synchronization header, it marks itself as being in the non-learning state.

[0063] If a slave node is in the learning phase when it receives a downlink frame, it generally will not forward the received downlink frame to its downstream nodes, but will instead learn based on the received downlink frame.

[0064] For ease of distinction, in this embodiment, the downlink frames received by the downstream node for learning are named learning frames, while the downlink frames received after learning is completed and need to be sent to downstream nodes are named data frames.

[0065] The slave node configures a pseudo-synchronization header based on the arrival time of the acquired learning frame, wherein the arrival time of the learning frame is determined by identifying the synchronization header of the learning frame.

[0066] Once the pseudo-synchronization header is configured and obtained during the learning phase, the learning phase is complete, and the system is marked as being in the non-learning phase.

[0067] Therefore, if a slave node receives a downlink frame from an upstream node during the downlink forwarding phase (out of the learning phase), this downlink frame needs to be forwarded as a data frame to the downstream node. In existing technology, if the slave node recovers the synchronization header of the data frame in the conventional way before forwarding, it introduces uncertain delays. Furthermore, the uncertain delays introduced by each slave node accumulate progressively.

[0068] To avoid the gradual accumulation of uncertain delays, in this embodiment, for the data frames that need to be sent, the slave node will send them according to the pseudo-synchronization header configured during the learning phase.

[0069] Since each slave node transmits data frames according to its own learned stable pseudo-synchronization header during the downlink forwarding phase, the synchronization headers between any two adjacent data frames sent by its upstream node are stable for each slave node. Upon reaching itself, due to the uncertain delay introduced by the slave node, the jitter between these two adjacent data frame synchronization headers is 0 to tΔ. However, since the slave node also transmits data frames according to its configured pseudo-synchronization header, the synchronization headers between any two adjacent data frames received by the downstream node are stable. At the downstream node, only the uncertain delay introduced by the downstream node is present, meaning the jitter at the downstream node is also 0 to tΔ. Following this pattern, the jitter between adjacent synchronization headers at each slave node is 0 to tΔ, avoiding the problem of uncertain delays accumulating at each level in existing technologies.

[0070] In the method for maintaining stable synchronization headers between nodes provided in this embodiment, each slave node configures a pseudo-synchronization header through learning and sends data frames to downstream nodes according to the pseudo-synchronization header. Thus, between every two slave nodes, the upstream node sends data frames with a stable pseudo-synchronization header, only introducing its own uncertain delay to the downstream node. This avoids the accumulation of uncertain delays between slave nodes and prevents time jitter on the slave nodes from exceeding the allowable value, thereby affecting the recovery of the slave node's local clock.

[0071] In this embodiment, the learning phase can occur at any time after the network system is powered on. That is, when a slave node determines that it needs to enter the learning phase, it can enter the learning phase to learn the pseudo-synchronization header.

[0072] When the network system powers on, the master node is unaware of the currently connected slave nodes. Therefore, after each power-on, slave node discovery and configuration are required first. Based on this, the implementation method provided in this embodiment may further include the following steps:

[0073] After each power-on of the communication system, the master node sends discovery frames to each slave node in the order of their connection. After receiving confirmation messages from a preset number of slave nodes, the master node determines that a preset number of slave nodes have been discovered and triggers the configuration process of the preset number of slave nodes.

[0074] After completing the configuration process of a preset number of slave nodes, the discovery and configuration process of the next preset number of slave nodes is executed, until the discovery and configuration process of all slave nodes in the communication system is completed.

[0075] Taking Figure 4 as an example, the master node and multiple slave nodes communicate via a bus, which has uplink and downlink transmission channels. After power-on, the master node will send a discovery frame (downlink frame) to the nearest slave node, such as slave node 1. After receiving the discovery frame, slave node 1 will return an acknowledgment message (uplink frame) to the master node, indicating that slave node 1 has been discovered.

[0076] After the nearest slave node is discovered, the master node sends a discovery frame to the next nearest node, such as slave node 2. The already discovered slave node, i.e., slave node 1, forwards the discovery frame to slave node 2. Upon receiving the discovery frame, slave node 2 returns an acknowledgment message to the master node. This acknowledgment message is then forwarded from slave node 1 to the master node, indicating that slave node 2 has been discovered.

[0077] In this way, the master node can discover each slave node in the network system in turn.

[0078] For the configuration phase of each slave node, the master node can either execute the configuration process of a slave node immediately after discovering it, or it can perform the configuration of multiple slave nodes at the same time after discovering multiple slave nodes.

[0079] That is, in this embodiment, the preset number can be greater than or equal to 1.

[0080] For example, configuration can be performed on a single slave node after it is discovered, or it can be performed on two slave nodes after they are discovered. This embodiment does not impose any specific restrictions.

[0081] The configuration process for each slave node may include, for example, synchronizing the slave node's clock to the master node's clock, setting the slave node's data transmission rate, allocating specific transmission channels or time slots to the slave node, and configuring the communication protocol used by the slave node.

[0082] It should be noted that, as mentioned above, the learning phase of a slave node can occur at any time after power-on. Therefore, the learning phase may also occur during the slave node's configuration process. Since the slave node's configuration process typically takes a long time, the slave node's failure to send downlink frames to downstream nodes during the learning phase will not affect network data transmission.

[0083] When a slave node is in the learning phase, it configures a pseudo-synchronization header by obtaining the arrival time of the learning frame. Referring to Figure 5, the learning frame includes a preamble, frame content, and an end-of-frame marker. The preamble is the synchronization header, and the frame content includes the sequence number, frame mode, and payload bytes. Different frame types may have different frame contents, but each frame needs to determine its start position based on its preamble.

[0084] A preamble is a specific sequence of bits used to indicate the start of a frame and to help the receiver synchronize to correctly receive and interpret subsequent data. The choice of preamble depends on the specific communication protocol and network environment, and also needs to consider the characteristics of the signal on the transmission medium, such as signal attenuation, noise level, transmission rate, and transmission distance.

[0085] Common forms of preambles include fixed bit patterns, specific bit sequences, protocol-specific sequences, and bit padding.

[0086] In the same communication system, the preamble of each frame structure is relatively fixed and has a certain length. Therefore, it takes a certain amount of time to detect and recover the preamble in the learning frame. This time is the fixed delay introduced by parsing the preamble. Therefore, the fixed delay introduced by each slave node when processing downlink frames is fixed and always exists.

[0087] In this embodiment, the slave node can obtain the arrival time of the learning frame in the following way:

[0088] The learning frame is parsed, and if a preamble is detected in the learning frame, the arrival time of the learning frame is determined based on the time information of the local counter. After the arrival time of the learning frame is determined, the local counter is cleared and counting is restarted.

[0089] In this embodiment, each slave node maintains a local counter. After determining the arrival time of each learning frame, the local counter is cleared to zero and then the counting is restarted to wait for the arrival of the next learning frame.

[0090] After receiving a learning frame, the slave node identifies the preamble within it. Once the preamble is identified, the start position of the learning frame can be determined. During this process, a local counter continuously counts, and after determining the start position, the arrival time of the learning frame can be determined based on the time information recorded by the local counter.

[0091] By resetting the local counter to zero and restarting it after each learning frame arrival time is determined, the counting deviation of the local counter can be avoided, ensuring accurate determination of the arrival time of each learning frame.

[0092] The above describes how a node determines the arrival time of a learning frame for a single learning frame. Based on this, the steps for configuring the pseudo-synchronization header based on the arrival time of the learning frame can be implemented in the following way:

[0093] Obtain the arrival time of a preset number of consecutive learning frames; based on the arrival time of the preset number of consecutive learning frames, configure the pseudo-synchronization header according to preset rules.

[0094] The node obtains the arrival times of a preset number of consecutive learning frames using the method described above. The preset number can be 4, 5, or 6, etc. Based on the arrival times of the preset number of learning frames, a pseudo-synchronization header is configured according to preset rules. These preset rules could be, for example, taking the average, maximum, minimum, or median of the arrival times of the preset number of learning frames as the learning value, and configuring the pseudo-synchronization header according to the learning value.

[0095] Each slave node learns the pseudo-synchronization header sequentially as described above, completing the learning phase. Based on this, for each data frame received from the upstream node, the data frame is forwarded according to its own configured pseudo-synchronization header. Thus, the forwarded data frame includes the pseudo-synchronization header. This can be understood as the synchronization header of the forwarded data frame being modified compared to the original forward frame when it is used as a data frame.

[0096] To ensure the availability of standard reference information, the implementation method provided in this embodiment may further include the following steps:

[0097] When a slave node is in the downlink forwarding phase, it will also treat the received downlink frame as a real frame, identify the real synchronization header in the real frame, and send the real frame to the downstream node based on the real synchronization header in the real frame.

[0098] In this embodiment, each slave node, in addition to transmitting the received downlink frames with a pseudo synchronization header, also transmits the original downlink frames with the original synchronization header in a normal mode. For easy distinction, the downlink frames transmitted in the normal mode are named real frames. The so-called normal mode is the mode of transmitting according to the original synchronization header in the downlink frame.

[0099] It should be noted that the learning frames, data frames, discovery frames, and real frames mentioned above are all downlink frames. They are named differently based on their function or the way they are processed.

[0100] Starting with the master node, each slave node forwards the downlink frames sent by the master node in sequence. For the downlink frames that are considered real frames, the slave nodes identify the real synchronization header in the real frame and then send the real frame based on the real synchronization header.

[0101] Thus, in certain situations, such as fluctuations in the master node frequency or changes in some system settings that cause significant changes in the position or frequency of downlink frames on the master node, automatic error correction can be performed based on the real frames maintained on the slave nodes.

[0102] Based on this, the method for maintaining the stability of the synchronization header between nodes provided in this embodiment may further include the following steps:

[0103] When the slave node is in the downlink forwarding phase, after receiving the real frame, the slave node compares the real frame with the data frame containing the pseudo synchronization header to obtain the comparison result; based on the comparison result, it determines whether there is an error in the current pseudo synchronization header; if it is determined that there is an error in the current pseudo synchronization header, it re-enters the learning phase to obtain the updated pseudo synchronization header.

[0104] The real frames are sent by each slave node in the normal mode according to the downlink frames received from the master node, while maintaining the downlink clock frequency information of the master node.

[0105] If an anomaly occurs, such as fluctuations in the master node's clock frequency or changes in system settings, and the slave node still sends data frames using the pseudo-synchronization header learned before the anomaly, there may be a significant difference between the data frame containing the pseudo-synchronization header and the real frame with the true synchronization header under that anomaly. Therefore, by comparing the data frame with the real frame, the error in the current pseudo-synchronization header can be determined based on the comparison result.

[0106] If the current pseudo-synchronization header has an error, it needs to re-enter the learning phase to learn an updated pseudo-synchronization header in order to adapt to the clock changes caused by the above-mentioned abnormal situation.

[0107] In this embodiment, the comparison result obtained by comparing the real frame and the data frame can be achieved in the following way:

[0108] Obtain a set number of real frames; for each real frame in the set number of real frames, compare the time of the real synchronization header in the real frame with the time of the pseudo synchronization header in the data frame to obtain the time difference between the pseudo synchronization header and the real synchronization header.

[0109] The comparison between data frames and real frames mainly involves comparing the pseudo-synchronization header in the data frame with the real synchronization header in the real frame. This comparison reveals the temporal differences between the two.

[0110] Based on this, if the time difference between the real synchronization header of each real frame in a set number of real frames and the pseudo synchronization header in the data frame is greater than a preset threshold, then it is determined that the current pseudo synchronization header has an error.

[0111] In other words, for each slave node, if the difference between the real synchronization header of a set number of consecutive real frames and the pseudo synchronization header in the data frame is greater than a preset threshold, it indicates that the above-mentioned abnormal situation may have occurred, and it is determined that the pseudo synchronization header currently maintained by the slave node has an error and needs to be relearned.

[0112] Since each downlink frame is transmitted sequentially between the slave nodes, after the upstream node re-enters the learning phase to relearn the pseudo-synchronization header, the time information of its subsequent data frames will change. Therefore, the downstream node also needs to re-enter the learning phase to learn.

[0113] For example, as shown in Figure 4, if node 2 detects an error in the current pseudo-synchronization header, it will re-enter the learning phase to learn and obtain an updated pseudo-synchronization header. After node 2 completes its learning, node 3 also re-enters the learning phase to learn and obtain an updated pseudo-synchronization header, until the last node completes its relearning.

[0114] Since the downlink frames received by node 1 are sent by the master node, and if node 1 does not detect any error in the current pseudo-synchronization header, it indicates that the anomaly is likely caused by changes in some system settings, rather than by fluctuations in the master node's frequency. Therefore, node 1 does not need to re-enter the learning phase for relearning.

[0115] It is evident that the learning phase for each slave node is not a single event, but rather a process that relearns whenever a significant error is detected in the pseudo-synchronization header, based on the actual situation. After each learning phase, each slave node uses the latest pseudo-synchronization header learned in that phase to send subsequent data frames.

[0116] The method for maintaining stable synchronization headers between nodes provided in this embodiment involves each slave node learning and configuring a pseudo-synchronization header based on multiple downlink frames sent by the upstream node during the learning phase. Once the pseudo-synchronization header is configured, each slave node sends downlink frames according to the pseudo-synchronization header upon receiving them from the upstream node. Thus, because each slave node sends downlink frames with a stable pseudo-synchronization header, the uncertain delay introduced by its own parsing of downlink frames is eliminated when sending downlink frames. Therefore, each slave node only introduces its own uncertain delay, which does not accumulate between slave nodes, ensuring the stability of the synchronization headers between nodes. This solves the problem in the prior art where uncertain delays accumulate step-by-step when slave nodes send downlink frames, potentially leading to excessive jitter in the synchronization headers between downlink frames and affecting local clock recovery.

[0117] Furthermore, each slave node synchronously transmits the real frame containing the true synchronization header sent by the master node. During the frame sending process of the data frame containing the pseudo-synchronization header, each slave node compares the differences between the real frame and the data frame to determine if there is an error in the pseudo-synchronization header. If an error exists in the pseudo-synchronization header, the learning phase is restarted to re-determine the timing start point of the pseudo-synchronization header, thereby maintaining synchronization with the upstream node.

[0118] In this way, while ensuring clock synchronization with upstream nodes, the stability of the synchronization header frequency sent to downstream nodes is greatly guaranteed.

[0119] As shown in Figure 2, this embodiment of the invention also provides a communication system, which includes a master node and multiple slave nodes, and the master node and multiple slave nodes communicate using a serial communication method.

[0120] In this communication system, the master node is configured to send downlink frames to downstream nodes at a fixed clock frequency;

[0121] Each slave node is configured to determine its current stage upon receiving a downlink frame from an upstream node;

[0122] When a slave node is in the learning phase, it takes the received downlink frame as a learning frame, obtains the arrival time of the learning frame, configures the pseudo synchronization header based on the arrival time of the learning frame, and ends the learning phase.

[0123] When the slave node is in the downlink forwarding phase, the slave node treats the received downlink frame as a data frame and sends the data frame to the downstream node according to the pseudo synchronization header configured in the learning phase.

[0124] In one possible implementation, the slave node is also configured to treat the received downlink frame as a real frame when it is in the downlink forwarding phase, identify the real synchronization header in the real frame, and send the real frame to the downstream node based on the real synchronization header in the real frame.

[0125] In one possible implementation, when the slave node is in the downlink forwarding phase, after receiving the real frame, the slave node compares the real frame with the data frame containing the pseudo synchronization header to obtain the comparison result; based on the comparison result, it determines whether there is an error in the current pseudo synchronization header; if it is determined that there is an error in the current pseudo synchronization header, it re-enters the learning phase to obtain an updated pseudo synchronization header.

[0126] In one possible implementation, the slave node is configured to compare the data frame with the real frame to obtain the comparison result in the following way:

[0127] Obtain a set number of real frames;

[0128] For each real frame in a set number of real frames, the time of the real synchronization header in the real frame is compared with the time of the pseudo synchronization header in the data frame to obtain the time difference between the pseudo synchronization header and the real synchronization header.

[0129] In one possible implementation, the slave node is configured to determine whether there is an error in the current pseudo-synchronization header based on the comparison result in the following way:

[0130] If the time difference between the real synchronization header of each real frame in a set number of real frames and the pseudo synchronization header in the data frame is greater than a preset threshold, then it is determined that the current pseudo synchronization header has an error.

[0131] In one possible implementation, the learning frame includes a preamble, frame content, and an end-of-frame marker, and the node is configured to obtain the arrival time of the learning frame in the following way:

[0132] The learning frame is parsed, and if a preamble is detected in the learning frame, the arrival time of the learning frame is determined based on the time information of the local counter. After the arrival time of the learning frame is determined, the local counter is cleared and counting is restarted.

[0133] In one possible implementation, the steps of configuring the slave node to configure the pseudo-synchronization header based on the arrival time of the learned frame include:

[0134] Obtain the arrival times of a preset number of consecutive learning frames;

[0135] Based on the arrival time of a preset number of consecutive learning frames, a pseudo-synchronization header is configured according to preset rules.

[0136] In one possible implementation, the master node is also configured to perform the following steps:

[0137] After each power-on of the communication system, the master node sends discovery frames to each slave node in the order of connection of the slave nodes. After receiving confirmation messages from a preset number of slave nodes, the master node determines that a preset number of slave nodes have been discovered and triggers the configuration process of the preset number of slave nodes.

[0138] After completing the configuration process of a preset number of slave nodes, the discovery and configuration process of the next preset number of slave nodes is executed, until the discovery and configuration process of all slave nodes in the communication system is completed.

[0139] In one possible implementation, the preset number is greater than or equal to 1.

[0140] The communication system provided in this embodiment can execute the implementation method of maintaining the stability of the synchronization header between nodes under any of the above implementation methods. It has the same features and beneficial effects as the above implementation methods. For details, please refer to the relevant description of the implementation method in the above embodiments. This embodiment will not repeat it here.

[0141] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0142] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0145] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for maintaining the stability of synchronization headers between nodes, characterized in that, A method applicable to a communication system comprising a master node and multiple slave nodes, wherein the master node and multiple slave nodes communicate using a serial communication method, and the master node sends downlink frames to downstream nodes at a fixed clock frequency, the method comprising: Each of the slave nodes determines its current stage upon receiving a downlink frame from the upstream node; When the slave node is in the learning phase, the slave node takes the received downlink frame as the learning frame, obtains the arrival time of the learning frame, configures the pseudo synchronization header based on the arrival time of the learning frame, and ends the learning phase. When the slave node is in the downlink forwarding phase, the slave node treats the received downlink frame as a data frame and sends the data frame to the downstream node according to the pseudo synchronization header configured in the learning phase.

2. The method for maintaining the stability of synchronization headers between nodes according to claim 1, characterized in that, The method further includes: When the slave node is in the downlink forwarding phase, the slave node will also treat the received downlink frame as a real frame, identify the real synchronization header in the real frame, and send the real frame to the downstream node based on the real synchronization header in the real frame.

3. The method for maintaining the stability of synchronization headers between nodes according to claim 2, characterized in that, The method further includes: When the slave node is in the downlink forwarding phase, after receiving the real frame, the slave node compares the real frame with the data frame containing the pseudo synchronization header to obtain a comparison result; Based on the comparison results, determine whether the current pseudo-synchronization header has an error; If the current pseudo-synchronization header is determined to have an error, the learning phase is re-entered to obtain an updated pseudo-synchronization header.

4. The method for maintaining the stability of synchronization headers between nodes according to claim 3, characterized in that, The step of comparing the real frame with the data frame containing the pseudo-synchronization header to obtain the comparison result includes: Obtain a set number of real frames; For each real frame in the set number of real frames, the time of the real synchronization header in the real frame is compared with the time of the pseudo synchronization header in the data frame to obtain the time difference between the pseudo synchronization header and the real synchronization header.

5. The method for maintaining the stability of synchronization headers between nodes according to claim 4, characterized in that, The step of determining whether the current pseudo-synchronization header has an error based on the comparison result includes: If the time difference between the real synchronization header of each real frame in the set number of real frames and the pseudo synchronization header in the data frame is greater than a preset threshold, then it is determined that the current pseudo synchronization header has an error.

6. The method for maintaining the stability of synchronization headers between nodes according to claim 1, characterized in that, The learning frame includes a preamble, frame content, and an end-of-frame symbol; The step of obtaining the arrival time of the learning frame includes: The learning frame is parsed, and if a preamble is detected in the learning frame, the arrival time of the learning frame is determined based on the time information of the local counter. After the arrival time of the learning frame is determined, the local counter is cleared and counting is restarted.

7. The method for maintaining the stability of synchronization headers between nodes according to claim 1, characterized in that, The step of configuring the pseudo-synchronization header based on the arrival time of the learned frame includes: Obtain the arrival times of a preset number of consecutive learning frames; Based on the arrival time of a preset number of consecutive learning frames, a pseudo-synchronization header is configured according to preset rules.

8. The method for maintaining the stability of synchronization headers between nodes according to any one of claims 1-7, characterized in that, The method further includes: After each power-on of the communication system, the master node sends discovery frames to each slave node in the order of their connection. After receiving confirmation messages from a preset number of slave nodes, the master node determines that the preset number of slave nodes have been discovered and triggers the configuration process of the preset number of slave nodes. After completing the configuration process of the preset number of slave nodes, the discovery and configuration process of the next preset number of slave nodes is executed, until the discovery and configuration process of all slave nodes in the communication system is completed.

9. The method for maintaining the stability of synchronization headers between nodes according to claim 8, characterized in that, The preset number is greater than or equal to 1.

10. A communication system, characterized in that, The communication system is used to implement the method for maintaining the stability of the synchronization header between nodes as described in any one of claims 1-9, wherein the communication system includes a master node and multiple slave nodes, and the master node and multiple slave nodes communicate using a serial communication method; The master node is configured to send downlink frames to downstream nodes at a fixed clock frequency. Each of the slave nodes is configured to determine its current stage upon receiving a downlink frame from an upstream node; When the slave node is in the learning phase, the slave node takes the received downlink frame as the learning frame, obtains the arrival time of the learning frame, configures the pseudo synchronization header based on the arrival time of the learning frame, and ends the learning phase. When the slave node is in the downlink forwarding phase, the slave node treats the received downlink frame as a data frame and sends the data frame to the downstream node according to the pseudo synchronization header configured in the learning phase.