Synchronization method and system based on topology network, slave node device and storage medium

By configuring a synchronization reference information base and transmitting effective synchronization reference information in a preset order in the topology network, the problem of asynchronous node state switching is solved, ensuring the robustness and functional synchronization of the topology network.

CN120915410APending Publication Date: 2025-11-073PEAK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511117806.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In topological networks, existing technologies cannot effectively guarantee that all nodes switch states at the same time, resulting in insufficient network robustness, especially in the problem of desynchronization during state transitions.

Method used

By configuring a synchronization reference information database, the master node and slave nodes obtain consistent synchronization reference information. Valid synchronization reference information is transmitted through a preset number of downlink frames. The target slave node judges the correctness of the information, enters the state of successful synchronization information change tracking, and then updates the synchronization reference information to ensure that all nodes are in a synchronized transition state.

Benefits of technology

It achieves strict synchronization of all nodes in the topology network, avoids the risks caused by asynchrony, and ensures the robustness of the network and the coordinated operation of its functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120915410A_ABST
    Figure CN120915410A_ABST
Patent Text Reader

Abstract

The invention discloses a topology network-based synchronization method, slave node equipment, a system and a storage medium. The method comprises the following steps: configuring a synchronization reference information base; sending a downlink frame containing the effective synchronization reference information through the main node; if the slave node receives the downlink frame containing the correct effective synchronization reference information, updating the effective synchronization reference information; and if a downlink frame containing correct and effective synchronization reference information is not received, updating is not carried out, or updating of the effective synchronization reference information is carried out based on the synchronization reference information base, and after synchronization of the nodes, uplink frames are uploaded by the slave nodes and state transition of the current slave nodes is carried out. According to the synchronization method based on the topology network, the slave node equipment, the system and the storage medium, dual guarantee is carried out by adopting a mode of adding the same synchronization reference information base to all nodes and transmitting the synchronization reference information, and all the nodes in the topology network can be ensured to strictly and synchronously transfer the working state.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of topology network, and particularly relates to a synchronization method based on a topology network, a slave node device, a system and a storage medium. BACKGROUND

[0002] In the topology network shown in Figure 1 The main node communication device is called a master node, and the ordinary node communication device is called a slave node. The slave node farthest from the master node is called a terminal node, and the remaining slave nodes are called intermediate nodes. Each node is connected through a twisted pair or other wire that can transmit data, which is called a bus. The master node is externally connected to an MCU or DSP device through SPI or I2C, etc. The working state or control configuration of the slave node is changed by initiating bus communication to take effect or invalidation.

[0003] The communication is initiated by the master node at a fixed time interval. The data transmission direction from the master node to the terminal node is the downlink direction, and the data transmission direction from the terminal node to the master node is the uplink direction. The data transmitted by the node in the downlink direction is contained in the downlink frame, and the data transmitted by the node in the uplink direction is contained in the uplink frame. Since each node is connected through only one bus, the downlink frame and the uplink frame are separated in absolute time. A complete data transmission is called a superframe, which starts with the downlink frame from the master node and ends with the uplink frame from the terminal node back to the master node. The topology network communication is shown in Figure 2 .

[0004] The topology network has multiple working states including configuration state and normal working state in operation. Different working states also have various functions and corresponding register configurations in the node. Some functions such as clock spread spectrum function and resource management function require high cooperation of different nodes in the topology network. The start and stop of these functions require high coordination of each node in the topology network, otherwise it will lead to the topology network entering an error state. Therefore, the states of each node in the topology network must be synchronized to ensure normal function.

[0005] In the existing scheme, the state transition is realized by rewriting the register of the slave node. However, the state transition configuration cannot be synchronized in each node due to the identification error of the downlink frame containing the state transition register configuration information caused by some unexpected situations.

[0006] For the system requirement that multiple or multiple groups of registers need to be effective at the same time in normal working state, the current method is also controlled by a unified enable register. The registers that have been configured are only effective after the unified enable register is configured. The disadvantages of this scheme are: first, the synchronization of the unified enable register configuration needs to be ensured not to have problems; second, an additional register operation needs to be added.

[0007] The information disclosed in this Background section is only for the purpose of enhancing the understanding of the general background of the application, and should not be taken as acknowledging or implying that this information forms the prior art that is already known to those of ordinary skill in the art. SUMMARY

[0008] The purpose of the present application is to provide a synchronization method based on a topology network, a slave node device, a system and a storage medium, which can ensure that each node in the topology network can strictly switch states at the same time, avoid the risk of asynchronization, and guarantee the robustness of the network.

[0009] In order to achieve the above-mentioned purpose, the technical scheme provided by an embodiment of the present application is as follows: a synchronization method based on a topology network, the topology network comprising a master node and a slave node connected in sequence, the synchronization method comprising:

[0010] configuring a synchronization reference information library to enable the master node and the slave node to obtain consistent synchronization reference information library, wherein the synchronization reference information library contains a plurality of valid synchronization reference information arranged in a preset order;

[0011] sending a downstream frame containing valid synchronization reference information to downstream slave nodes by the master node for a preset number of times, the sending order of each valid synchronization reference information being consistent with at least part of the sequence of valid synchronization reference information in the synchronization reference information library;

[0012] receiving the downstream frame sent by the upstream node by the target slave node, judging whether the received downstream frame contains correct valid synchronization reference information, and if the valid synchronization reference information received this time and the valid synchronization reference information received last time constitute a sequence in order and are contained in the synchronization reference information library, considering that the valid synchronization reference information received this time is correct;

[0013] if the target slave node continuously and correctly receives the target number of valid synchronization reference information, entering a synchronization information change tracking success state, and in the synchronization information change tracking success state, updating the current synchronization reference information of the target slave node according to the sequence of valid synchronization reference information of the synchronization reference information library;

[0014] if all slave nodes enter the synchronization information change tracking success state, the synchronization is completed.

[0015] In one or more embodiments of the present application, when each node is updated to the target valid reference information according to the synchronization reference information base, each slave node uploads an uplink frame, and after the slave node completes transmission of its own uplink frame, the current slave node performs state transition, or when each node is updated to the target valid reference information according to the synchronization reference information base, the slave node performs state transition.

[0016] In one or more embodiments of the present application, if the target slave node is not in the synchronization information change tracking success state, it is determined whether the target slave node currently receives valid synchronization reference information, if not, it waits to receive a downlink frame issued by an upstream node, and if yes, it is determined whether the target slave node has received valid synchronization reference information before currently receiving valid synchronization reference information.

[0017] If the target slave node has received valid synchronization reference information before currently receiving valid synchronization reference information, it is determined whether the currently received valid synchronization reference information is correct, if yes, a counter is counted, and if no, the counter is cleared; if the target slave node has not received valid synchronization reference information before currently receiving valid synchronization reference information, the counter is counted.

[0018] In one or more embodiments of the present application, after the counter is cleared, the target slave node updates the current synchronization reference information of the target slave node to the synchronization reference information obtained from the downlink frame, or the target slave node does not update the current synchronization reference information of the target slave node.

[0019] In one or more embodiments of the present application, a target value of the counter is set, if the counter counting result is greater than or equal to the target value, the target slave node enters the synchronization information change tracking success state, and if the counter counting result is less than the target value, the target slave node updates the current synchronization reference information of the target slave node to the synchronization reference information obtained from the downlink frame.

[0020] In one or more embodiments of the present application, a timing mechanism is set, if the target slave node is in the synchronization information change tracking success state, when the target slave node receives a downlink frame, the current synchronization reference information of the target slave node is updated according to the valid synchronization reference information sequence of the synchronization reference information base under the timing mechanism.

[0021] In one or more embodiments of the present application, the synchronization method further comprises synchronizing and activating the register configuration of each node at the same time of state transition of each node.

[0022] In one or more embodiments of the present application, if the synchronization reference information locally stored in the target slave node is invalid synchronization reference information when the target slave node currently receives valid synchronization reference information, the target slave node updates the current synchronization reference information of the target slave node to the currently received valid synchronization reference information.

[0023] In one or more embodiments of the present application, if the order of the currently received valid synchronization reference information and the invalid synchronization reference information constitutes a sequence and is contained in the synchronization reference information library, it is considered that the currently received valid synchronization reference information is correct.

[0024] In one or more embodiments of the present application, if the target slave node does not continuously and correctly receive a preset number of valid synchronization reference information after the target node enters the synchronization information change tracking success state, the target slave node exits the synchronization information change tracking success state.

[0025] In one or more embodiments of the present application, after the target node enters the synchronization information change tracking success state, it is determined whether the currently received information of the target slave node is correct valid synchronization reference information, if not, the counter counts, and if the counter count result is greater than or equal to the target value, the target slave node exits the synchronization information change tracking success state.

[0026] The present application also discloses a slave node device in a topology network, the topology network comprising a master node and a slave node connected in sequence, and the slave node acquires a synchronization reference information library, wherein the synchronization reference information library contains a plurality of valid synchronization reference information arranged in a preset order.

[0027] The slave node receives a downlink frame sent by an upstream node, determines whether the received downlink frame contains correct valid synchronization reference information, and if the order of the currently received valid synchronization reference information and the last received valid synchronization reference information constitutes a sequence and is contained in the synchronization reference information library, it is considered that the currently received valid synchronization reference information is correct.

[0028] If a target number of valid synchronization reference information is continuously and correctly received, the slave node enters a synchronization information change tracking success state, and in the synchronization information change tracking success state, the current synchronization reference information of the slave node is updated according to the valid synchronization reference information sequence of the synchronization reference information library.

[0029] In one or more embodiments of the present application, when the slave node updates to the target valid reference information according to the synchronization reference information library, the slave node uploads an uplink frame, and after the slave node completes the transmission of the uplink frame, the slave node performs state transition, or when the slave node updates to the target valid reference information according to the synchronization reference information library, the slave node performs state transition.

[0030] In one or more embodiments of the present application, if the slave node is not in the synchronization information change tracking success state, a judgment is made as to whether valid synchronization reference information is currently received, and if not, the slave node waits to receive a downstream frame issued by an upstream node, and if yes, a judgment is made as to whether valid synchronization reference information has been received before the current valid synchronization reference information is received;

[0031] If the slave node has received valid synchronization reference information before the current valid synchronization reference information is received, a judgment is made as to whether the current received valid synchronization reference information is correct, and if yes, counting is performed, and if no, the counting is cleared; if the slave node has not received valid synchronization reference information before the current valid synchronization reference information is received, counting is performed.

[0032] In one or more embodiments of the present application, after the counting is cleared, the slave node updates the current synchronization reference information of the slave node to the synchronization reference information obtained from the downstream frame, or the slave node does not update the current synchronization reference information of the slave node.

[0033] In one or more embodiments of the present application, a target value of the counting is set, and if the counting result is greater than or equal to the target value, the slave node enters the synchronization information change tracking success state, and if the counting result is less than the target value, the slave node updates the current synchronization reference information of the slave node to the synchronization reference information obtained from the downstream frame.

[0034] In one or more embodiments of the present application, a timing mechanism is set, and if the slave node is in the synchronization information change tracking success state, the slave node updates according to the valid synchronization reference information sequence of the synchronization reference information library under the timing mechanism when the slave node receives a downstream frame.

[0035] In one or more embodiments of the present application, the register synchronization configuration of the slave node is validated at the same time as the state transition of the slave node.

[0036] In one or more embodiments of the present application, if the synchronization reference information of the slave node is invalid synchronization reference information when the slave node currently receives valid synchronization reference information, the slave node updates the current synchronization reference information of the slave node to the currently received valid synchronization reference information.

[0037] In one or more embodiments of the present application, if the current received valid synchronization reference information and invalid synchronization reference information constitute a sequence in the order, and are contained in the synchronization reference information library, it is considered that the current received valid synchronization reference information is correct.

[0038] In one or more embodiments of the present application, after the slave node enters the synchronization information change tracking success state, if the slave node does not continuously correctly receive a preset number of valid synchronization reference information, the slave node exits the synchronization information change tracking success state.

[0039] In one or more embodiments of the present application, after the slave node enters the synchronization information change tracking success state, whether the currently received information is correct valid synchronization reference information is judged, if not, counting is performed, and if the counting result is greater than or equal to a target value, the slave node exits the synchronization information change tracking success state.

[0040] The present application also discloses a communication system comprising a topology network and / or the slave node device which can perform the synchronization method.

[0041] The present application also discloses a readable storage medium which stores executable instructions, when the instructions are executed, the slave node device of the topology network, the topology network or the communication system comprising the topology network perform the synchronization method.

[0042] Compared with the prior art, the synchronization method based on the topology network, the slave node device, the system and the storage medium of the present application, in the topology network, through adopting the same synchronization reference information library and the effective synchronization reference information transmission in all nodes, double protection is realized, and it is ensured that all nodes in the topology network can strictly synchronize the working state.

[0043] Based on the topology network working state synchronization transfer mechanism, the effective or invalid time nodes of the register configuration realizing various functions in the topology network are associated with the switching time nodes of the topology network working state, and it is ensured that the special functions requiring strict cooperation of all nodes in the topology network can be synchronously opened or closed, the risk caused by asynchronization is avoided, and the robustness of the topology network is ensured. BRIEF DESCRIPTION OF DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0045] Figure 1 It is a structural schematic diagram of the topology network in the prior art.

[0046] Figure 2 It is a frame transmission schematic diagram of a superframe of the topology network in the prior art.

[0047] Figure 3 Structure diagram of the synchronization reference information base in an embodiment of the present application.

[0048] Figure 4 First flow chart of the topology network-based synchronization method in an embodiment of the present application.

[0049] Figure 5 Second flow chart of the topology network-based synchronization method in an embodiment of the present application.

[0050] Figure 6 Frame transmission error diagram of the topology network in an embodiment of the present application.

[0051] Figure 7 Another frame transmission error diagram of the topology network in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to enable persons skilled in the art to better understand the technical solutions in the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by persons skilled in the art without creative labor should fall within the protection scope of the present disclosure.

[0053] In the specification, “coupling” or “connection” or “connection” includes both direct connection and indirect connection. Indirect connection is a connection through an intermediate medium, such as a connection through an electrically conductive medium, which can have a parasitic inductance or a parasitic capacitance; indirect connection can also include a connection through other active devices or passive devices on the basis of achieving the same or similar functional purposes, such as a connection through a circuit or component such as a switch, a follower circuit, etc. In addition, in the invention, words such as “first”, “second”, etc. are mainly used to distinguish one technical feature from another technical feature, and do not necessarily require or imply a certain actual relationship, quantity or order between the technical features.

[0054] In the detailed description of the specification, reference is made to the drawings forming a part thereof, in which the same reference numerals refer to the same components throughout, and in which the exemplary embodiments can be shown by way of example. It should be understood that other embodiments can be utilized and structural or logical changes can be made without departing from the scope of the present disclosure. Therefore, the following detailed description should not be regarded as limiting.

[0055] The various operations of methods described in this specification can be performed in the order shown or in any other order. Additionally, one or more operations illustrated can be omitted or combined, and additional operations can be performed, in some embodiments. Additionally, operations can be performed at different times during the life cycle of the machine, e.g., during manufacturing, during setup, during operation, during maintenance, etc.

[0056] For purposes of this disclosure, the phrase "A and / or B" means (A), (B), or (A and B). For purposes of this disclosure, the phrase "A, B, and / or C" means (A), (B), (C), (A and B), (A and C), (B and C), or (A, B and C).

[0057] Various components, devices, etc. can be referred to herein in singular form, but this is not intended to exclude plural arrangements. For example, a single processor can be used in place of a plurality of processors, and vice versa.

[0058] The specification describes using the phrase "in one embodiment" or "in other embodiments" or "in some embodiments" which can each refer to the same or different embodiments. Furthermore, the terms "comprising", "including", "containing", etc. used herein are synonymous and are used inclusively.

[0059] The topology network includes master nodes and slave nodes connected in turn through a bus, after the topology network starts to work, in a configuration stage, the master node contains configuration information of the slave node register in a downlink frame issued through the bus, the configuration information is used to configure and change the register of the slave node, some registers correspond to special functions, for example, spread spectrum clock function, resource management function, etc., the time point of starting or closing of the register of the special function has strict requirements, if the information frame containing the configuration of the related register is identified incorrectly due to transmission error, transmission interference, local receiving failure, etc., thereby causing the special configuration starting or closing to be unsynchronized, the working state of the topology network will appear to be incorrect.

[0060] The embodiment of the application is a synchronization method based on a topology network, including:

[0061] The synchronization reference information base is configured, in an embodiment, the same synchronization reference information base is configured in the master node and the slave node, so that all the master nodes and the slave nodes obtain the consistent synchronization reference information base, for example, Figure 3As shown, each synchronization reference information library contains invalid synchronization reference information and multiple valid synchronization reference information arranged in a preset order. That is, the valid synchronization reference information is the synchronization reference information contained within the synchronization reference information library. For example, the synchronization reference information library includes invalid synchronization reference information, synchronization reference information one as the first valid synchronization reference information, synchronization reference information two as the second valid synchronization reference information, synchronization reference information three as the third valid synchronization reference information, and so on, including synchronization reference information eight as the eighth valid synchronization reference information, synchronization reference information nine as the ninth valid synchronization reference information, synchronization reference information ten as the tenth valid synchronization reference information, etc. In the synchronization reference information library, the first valid synchronization reference information serves as the synchronization start sequence, and the last valid synchronization reference information serves as the synchronization end sequence. Each valid synchronization reference information can be a count value of a counter, such as valid synchronization reference information one having a count value of 2, valid synchronization reference information two having a count value of 1, valid synchronization reference information three having a count value of 0, etc. In other embodiments, other identifiers or forms such as ASCII codes or numbers can also be used as valid synchronization reference information.

[0062] like Figure 4 As shown, when an external device sends configuration information to the master node to configure the master node to initiate a transition of the network topology from "state 1" to "state 2", the master node will perform a local update based on the synchronization reference information library, updating invalid synchronization reference information to valid synchronization reference information (such as valid synchronization reference information one located in sequence one), and simultaneously adding this valid synchronization reference information to the downlink frame and sending it to the downstream slave nodes. In one embodiment, the invalid synchronization reference information is the initial information locally on the master node, and the initial information locally on each slave node is also invalid synchronization reference information. In other embodiments, the initial information locally on the master node and each slave node can be other valid synchronization reference information.

[0063] In other embodiments, the external device may also choose to send configuration information to a slave node to configure the slave node to initiate a topology transition from "state 1" to "state 2". In one embodiment, the state transition can also be triggered by the master node or slave node itself. For example, the master node or slave node may need to initiate a topology transition state when it detects a need or state change of itself or other nodes. It should be noted that regardless of the reason for triggering the state transition, as long as the synchronization method claimed in this application is used, it should fall within the protection scope of this application.

[0064] According to the need, the master node can send downstream slave nodes with preset number of downlink frames containing valid synchronization reference information, and the sending order of each valid synchronization reference information is the same as the sequence of valid synchronization reference information in the synchronization reference information library. For example, the master node sends valid synchronization reference information one for the first time and valid synchronization reference information two for the second time. The sending order of valid synchronization reference information one and valid synchronization reference information two is continuous, and the order of valid synchronization reference information one and valid synchronization reference information two in the synchronization reference information library is also continuous. It is considered that the sending order of valid synchronization reference information is the same as the sequence of valid synchronization reference information in the synchronization reference information library, that is, the master node sends all correct valid synchronization reference information to the downstream slave nodes.

[0065] The target slave node receives the downlink frame sent by the upstream node. When the target slave node receives the downlink frame under certain conditions, it is considered that the target slave node enters the synchronization information change tracking success state.

[0066] As shown in Figure 4 When the target slave node receives the downlink frame sent by the upstream node, it is judged whether the downlink frame containing correct valid synchronization reference information is received. If the valid synchronization reference information received this time and the valid synchronization reference information received last time constitute a sequence order and are contained in the synchronization reference information library, it is considered that the valid synchronization reference information received this time is correct. For example, the valid synchronization reference information received by the target slave node this time is valid synchronization reference information two, the valid synchronization reference information received by the target slave node last time is valid synchronization reference information one, valid synchronization reference information two and valid synchronization reference information one constitute a continuous sequence, and there are valid synchronization reference information two and valid synchronization reference information one in the synchronization reference information library which constitute a continuous sequence. It is considered that the valid synchronization reference information two received by the target slave node this time is correct. Similarly, the subsequent synchronization reference information three, four, five and the like received by the target slave node in turn are correct. If the valid synchronization reference information received by the target slave node this time is valid synchronization reference information three, the valid synchronization reference information received by the target slave node last time is valid synchronization reference information one, and valid synchronization reference information three and valid synchronization reference information one do not constitute a continuous sequence in the synchronization reference information library, it is considered that the valid synchronization reference information three received by the target slave node this time is incorrect. Of course, it is not necessarily valid synchronization reference information three. As long as it is not valid synchronization reference information two, it is considered that the information received by the target slave node this time is incorrect.

[0067] If the target slave node receives the target number of consecutive valid synchronization reference messages correctly, it enters the state of successful synchronization information change tracking. In this state, regardless of whether the target slave node receives correct or incorrect synchronization reference messages, it will update its current synchronization reference information according to the sequence of valid synchronization reference messages in the synchronization reference information database. For example, if the target slave node receives correct valid synchronization reference message five in the state of successful synchronization information change tracking, it will update its current synchronization reference information according to valid synchronization reference message five in the database. If the target slave node receives incorrect synchronization reference message in the state of successful synchronization information change tracking, and its local synchronization reference message is valid synchronization reference message four, then according to the database, the next valid synchronization reference message after four is valid synchronization reference message five, so the target slave node will update its valid synchronization reference message four to valid synchronization reference message five.

[0068] In one embodiment, a timing mechanism can be set. If the target slave node is in a state of successful synchronization information change tracking, when the target slave node receives a downlink frame, the target slave node updates its current synchronization reference information according to the valid synchronization reference information sequence in the synchronization reference information database under the timing mechanism. For example, after counting down a few seconds or a few numbers, the target slave node updates its current synchronization reference information according to the valid synchronization reference information sequence in the synchronization reference information database.

[0069] In addition, such as Figure 5 As shown, in one embodiment, even after the target node enters the synchronization information change tracking success state, the current synchronization reference information of the target slave node has been updated according to the valid synchronization reference information sequence in the synchronization reference information database. However, if the target slave node fails to receive valid synchronization reference information correctly a preset number of times consecutively, it may exit the synchronization information change tracking success state. In other embodiments, the judgment and operation for exiting the synchronization information change tracking success state may not be set.

[0070] Specifically, after the target node enters the state of successful synchronization information change tracking, it still checks whether the information currently received by the target slave node is correct and valid synchronization reference information. If not, a counter is incremented, and the counter is incremented by 1 for each consecutive instance of not receiving correct and valid synchronization reference information. If the counter count is greater than or equal to the target value, the target slave node exits the state of successful synchronization information change tracking, the counter count is reset to zero, and the loop restarts. If the information currently received by the target slave node is correct and valid synchronization reference information, the target slave node remains in the state of successful synchronization information change tracking, and subsequent operations can continue.

[0071] The preceding sections introduced some conditions for a target slave node to enter the successful synchronization information change tracking state, the operation mode of the target slave node when receiving downlink frames after entering the successful synchronization information change tracking state, and some conditions under which the target slave node may exit the successful synchronization information change tracking state. The following sections introduce some operation modes when the target slave node has not entered the successful synchronization information change tracking state.

[0072] like Figure 4 As shown, if the target slave node is not in the state of successful synchronization information change tracking, it is determined whether the target slave node has received valid synchronization reference information, that is, whether it has received valid synchronization reference information in the synchronization reference information database. If not, it waits to receive downlink frames sent by the upstream node. Since the source is the master node (the correctness of downlink frames sent by each slave node cannot be guaranteed, only the correctness of downlink frames sent by the master node can be guaranteed), it can also be considered as waiting for downlink frames sent by the master node. If yes, it is determined whether the target slave node has received valid synchronization reference information before receiving valid synchronization reference information.

[0073] If the target slave node has received valid synchronization reference information before receiving the current valid synchronization reference information, it will determine whether the currently received valid synchronization reference information is correct. If it is, it will start counting with a counter. If the target slave node has not received valid synchronization reference information before receiving the current valid synchronization reference information, it will also start counting with a counter.

[0074] In one embodiment, a target value for the counter can be set. If the counter count is greater than or equal to the target value, the target slave node is considered to have entered a state of successful synchronization information change tracking. If the counter count is less than the target value, the target slave node is considered not to have entered a state of successful synchronization information change tracking, and the target slave node updates its local synchronization reference information to the received valid synchronization reference information. In another embodiment, when the target slave node is first determined to have entered a state of successful synchronization information change tracking, it can still update the received valid synchronization reference information. When it receives the next downlink frame, it updates its current synchronization reference information based on the sequence of valid synchronization reference information in the synchronization reference information database.

[0075] If the determination of whether the currently received valid synchronization reference information is correct is negative, the counter is reset to zero. After the counter is reset, based on the network configuration, there are two possible operation methods:

[0076] 1. The target slave node updates the received error information and issues the received downstream frame, and then waits for the downstream frame issued by the upstream node. If the target slave node receives valid synchronization reference information next time, the counter restarts counting because the target slave node updates the error information, i.e. the target slave node does not receive valid synchronization reference information last time. If the target slave node receives invalid synchronization reference information next time, the target slave node continues to wait for the downstream frame issued by the upstream node.

[0077] 2. The target slave node does not update and issues the received downstream frame, and then waits for the downstream frame issued by the upstream node. If the target slave node receives valid synchronization reference information next time, the counter restarts counting because the target slave node retains valid synchronization reference information, i.e. the target slave node receives valid synchronization reference information before receiving the valid synchronization reference information. Next, it is necessary to determine whether the order of the two valid synchronization reference information is correct. If yes, the counter restarts counting. If no, the counter continues to clear. If the target slave node does not receive valid synchronization reference information next time, the target slave node continues to wait for the downstream frame issued by the upstream node.

[0078] The two modes have advantages and disadvantages. Mode 1 is more efficient, and mode 2 makes the local less chaotic and improves the accuracy.

[0079] In an embodiment, each node can use a check mode to determine whether the information in the received downstream frame is valid synchronization reference information in the synchronization reference information library. For example, the downstream frame contains check information. The slave node receiving the downstream frame calculates the check information. If the calculation result is consistent with the received result, it is considered that the received synchronization reference information is valid synchronization reference information in the synchronization reference information library.

[0080] In an embodiment, after the target slave node receives the downstream frame, whether it updates or does not update, it will continue to issue the received downstream frame to the downstream node.

[0081] In an embodiment, if the target slave node receives valid synchronization reference information at present, the synchronization reference information in the target slave node is invalid synchronization reference information. Then, the target slave node updates the received valid synchronization reference information. For example, due to error transmission, the target slave node does not receive valid synchronization reference information, so that the synchronization reference information in the target slave node is invalid synchronization reference information. At this time, when the target slave node suddenly receives valid synchronization reference information, the target slave node updates the received valid synchronization reference information.

[0082] If the target slave node currently receives a sequence of valid and invalid synchronization reference information in the order contained in the synchronization reference information library, the valid synchronization reference information received this time is considered correct. That is, when the master node sends the first valid synchronization reference information, the target slave node receives correct valid synchronization reference information. If the target value counted by the counter is set to 1, the target slave node enters the synchronization information change tracking success state, which is equivalent to synchronizing the target slave node once. This is an extreme case.

[0083] In an embodiment, if all slave nodes enter the synchronization information change tracking success state, the synchronization is completed. In other embodiments, the synchronization can be considered completed when all nodes are updated to the last valid synchronization reference information in the synchronization reference information library, or the synchronization can be considered completed when all nodes are updated to a certain valid synchronization reference information in the synchronization reference information library.

[0084] After the nodes are synchronized, the uplink frame is uploaded by each slave node and the state transition of the current slave node is performed. In other embodiments, the state transition can be performed when all nodes are updated to the target valid reference information.

[0085] Further, while the master node initiates the next downlink frame at a fixed time interval, the valid synchronization reference information of the master node is updated from "synchronization reference information N" to "synchronization reference information N+1", and the downlink frame containing "synchronization reference information N+1" is sent down. After that, the target slave node distinguishes three cases according to whether the downlink frame is correctly received:

[0086] 1) When the target slave node correctly receives "synchronization reference information N" before, and also correctly receives the downlink frame containing "synchronization reference information N+1", it updates its valid synchronization reference information from "synchronization reference information N" to "synchronization reference information N+1", and simultaneously sends the downlink frame to the downstream slave node. All slave nodes receiving the downlink frame will repeat the above operation to update their "synchronization reference information N" to "synchronization reference information N+1".

[0087] 2) The target slave node correctly receives "synchronization reference information N" before, but does not correctly receive the downlink frame containing "synchronization reference information N+1", and is also not in the "synchronization information change tracking success state". 1) The target slave node updates the received synchronization reference information (which may be incorrect), and sends the received downlink frame, 2) The target slave node does not update locally and maintains the previous "synchronization reference information N", and sends the received downlink frame.

[0088] 3) The target slave node does not correctly receive the downlink frame containing "synchronization reference information N+1", but is already in the "synchronization information change tracking success state", then the target slave node will update the "synchronization reference information N" of the target slave node to "synchronization reference information N+1" according to the same synchronization reference information base, the same order of valid synchronization reference information in the synchronization reference information base, and the local timing mechanism, when the timeout mechanism of the timing mechanism triggers, to synchronize with the valid synchronization reference information of the master node.

[0089] The above operations are repeated, and all nodes in the topology network rely on the transmission of valid synchronization reference information, the same synchronization reference information base, and the local timing mechanism for multiple safeguards to ensure that the valid synchronization reference information of each slave node is the same as that of the master node, so that the valid synchronization reference information of all nodes changes to a certain determined information in the synchronization reference information base within the same superframe, and the "state 1" to "state 2" jump operation is completed after each node returns the end of the uplink frame or when each node updates to the target valid synchronization reference information (the target valid synchronization reference information can be pre-set). The master node will complete the "state 1" to "state 2" jump operation after receiving the uplink frame, and ensure that all nodes in the topology network are in "state 2" before the master node initiates the next superframe.

[0090] Figure 6 An error state is shown, which is a topology network containing 4 nodes. When synchronization reference information 1 is correctly transmitted to all slave nodes, the order of synchronization reference information 1 and the invalid synchronization reference information of the slave node locally is consistent with the sequence in the synchronization reference information base, so synchronization reference information 1 is the correct valid reference information, and all slave nodes update the invalid synchronization reference information to synchronization reference information 1. At this time, as a case, all slave nodes are in the synchronization information change tracking success state. Then, after the master node issues synchronization reference information 2, even if slave node 1 receives synchronization reference information 2 incorrectly, it successfully updates its local synchronization reference information 1 to the next sequence in the synchronization reference information base: synchronization reference information 2, according to the local timing mechanism, thereby synchronizing with other nodes in the topology network.

[0091] Figure 7Another error state is shown, the master node issues correct synchronization reference information one, but the reception of the slave node 3 is wrong, and the synchronization reference information one is not received, the slave node 3 selects not to update and issues the received downlink frame, the slave node 2 and the slave node 1 also select not to update, so that the slave node 3, the slave node 2 and the slave node 1 all stay in the invalid synchronization reference information state. When the master node issues correct synchronization reference information two, the slave node 3 also receives the synchronization reference information two, even if no valid synchronization reference information has been received before, the counter result is +1; if the target value is set to 1, the slave node 3 enters the synchronization information change tracking success state, the slave node 3 updates the received synchronization reference information two, after the slave node 3 enters the synchronization information change tracking success state, whether the slave node 3 subsequently receives correct synchronization reference information or not, the slave node 3 updates according to the synchronization reference information sequence of the synchronization reference information library; if the target value is set to a number greater than 1, the slave node 3 has not entered the synchronization information change tracking success state, the slave node 3 still updates the received synchronization reference information two; similarly, the slave node 2 and 1 also update, at this time, all the slave nodes are synchronized to the synchronization reference information two.

[0092] In an embodiment, the register synchronization configuration of each node is enabled at the same time as the state transition of each node.

[0093] When the register synchronization configuration of the target slave node is enabled, the configuration of the special function register has been completed when the topology network is in the "state 1", if according to the traditional method, the function corresponding to the register is started when the configuration of the specific node in the topology network is completed, it is possible that the specific node causes the configuration to be invalid due to data transmission error, so that the special function of part of the nodes in the topology network has been started, and part of the nodes have not been started, so that the topology network enters an error intermediate state.

[0094] In an embodiment, the register synchronization configuration is associated with the topology network synchronization state transition time, based on the topology network state synchronization transition realized in the previous part, the special function of the specific node corresponding to the special function register is enabled at the same time as the completion of the state transition of the node from "state 1" to "state 2", so as to realize the synchronous start or stop of the special function of the topology network, and avoid that the topology network enters an error intermediate state due to the configuration information receiving error of the specific node.

[0095] The application also discloses a communication system comprising the topology network which can execute the synchronization method.

[0096] The application also discloses a slave node device in a topology network, the topology network comprising a master node and slave nodes connected in sequence, and the slave node acquires a synchronization reference information library, wherein the synchronization reference information library comprises a plurality of valid synchronization reference information arranged in a preset order.

[0097] The slave node receives a downstream frame issued by an upstream node, judges whether the received downstream frame contains correct valid synchronization reference information, and if the valid synchronization reference information received this time and the valid synchronization reference information received last time form a sequence in order and are contained in the synchronization reference information library, the valid synchronization reference information received this time is considered correct.

[0098] If the target number of valid synchronization reference information is continuously received correctly, the slave node enters a synchronization information change tracking success state, and in the synchronization information change tracking success state, the current synchronization reference information of the slave node is updated according to the valid synchronization reference information sequence of the synchronization reference information library.

[0099] When the slave node updates to the target valid reference information according to the synchronization reference information library, the slave node uploads an upstream frame, and after the slave node completes transmission of the upstream frame, the slave node performs state transition, or when the slave node updates to the target valid reference information according to the synchronization reference information library, the slave node performs state transition.

[0100] If the slave node is not in the synchronization information change tracking success state, it is judged whether valid synchronization reference information is currently received, if not, it waits to receive a downstream frame issued by an upstream node, if yes, it is judged whether valid synchronization reference information has been received before the current valid synchronization reference information is received.

[0101] If the slave node has received valid synchronization reference information before the current valid synchronization reference information is received, it is judged whether the current received valid synchronization reference information is correct, if yes, it is counted, if not, the count is cleared, after the count is cleared, the current synchronization reference information of the slave node is updated to the synchronization reference information obtained from the downstream frame, or the current synchronization reference information of the slave node is not updated; if the slave node has not received valid synchronization reference information before the current valid synchronization reference information is received, it is counted. The target value of the count is set, if the count result is greater than or equal to the target value, the slave node enters the synchronization information change tracking success state, if the count result is less than the target value, the current synchronization reference information of the slave node is updated to the synchronization reference information obtained from the downstream frame.

[0102] In an embodiment, a timing mechanism is provided, if the slave node is in the synchronization information change tracking success state, when the slave node receives a downstream frame, the valid synchronization reference information is updated according to the valid synchronization reference information sequence of the synchronization reference information library under the timing mechanism.

[0103] In an embodiment, if the synchronization reference information locally stored in the slave node is invalid synchronization reference information when the slave node currently receives valid synchronization reference information, the slave node updates the synchronization reference information currently stored in the slave node as the locally updated currently received valid synchronization reference information. If the slave node currently receives valid synchronization reference information and invalid synchronization reference information in the order of a sequence, and the valid synchronization reference information is included in the synchronization reference information library, it is considered that the currently received valid synchronization reference information is correct.

[0104] In addition, after the slave node enters the synchronization information change tracking success state, if the slave node does not continuously correctly receive a preset number of valid synchronization reference information, the slave node exits the synchronization information change tracking success state.

[0105] After the slave node enters the synchronization information change tracking success state, whether the currently received information is correct valid synchronization reference information is judged, if not, counting is performed, and if the counting result is greater than or equal to a target value, the slave node exits the synchronization information change tracking success state, and after exiting, the loop operation is performed again.

[0106] At the same time of the state transition of the slave node, the register synchronization configuration of the slave node is enabled.

[0107] Details of other synchronization operations of the slave node can refer to the synchronization method based on the topology network.

[0108] The application further discloses a communication system comprising the slave node device.

[0109] The application further discloses a readable storage medium, the readable storage medium stores executable instructions, when the instructions are executed, the slave node device of the topology network, the topology network or the communication system comprising the topology network perform the synchronization method.

[0110] It is obvious for those skilled in the art that the disclosure is not limited to the details of the above-mentioned exemplary embodiments, and the disclosure can be implemented in other specific forms without departing from the spirit or essential characteristics of the disclosure. Therefore, the embodiments should be regarded as exemplary and non-limiting, the scope of the disclosure is defined by the appended claims rather than the above description, and all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the disclosure. Any reference signs in the claims should not be regarded as limiting the claims involved.

[0111] In addition, it should be understood that although the present specification is described in terms of embodiments, not every embodiment contains only one independent technical solution, and the description of the specification is only for the sake of clarity, those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can be combined appropriately to form other embodiments that those skilled in the art can understand.

Claims

1. A method of synchronizing based on a topological network, characterized by, The topology network comprises master nodes and slave nodes connected in sequence, and the synchronization method comprises: configuring a synchronization reference information library to make the master nodes and slave nodes obtain consistent synchronization reference information library, wherein the synchronization reference information library comprises a plurality of valid synchronization reference information arranged in a preset order; sending, by the master node, a downstream frame comprising valid synchronization reference information to downstream slave nodes for a preset number of times, the sending order of each valid synchronization reference information being consistent with at least part of the sequence of valid synchronization reference information in the synchronization reference information library; receiving, by the target slave node, the downstream frame sent by the upstream node, judging whether the received downstream frame comprises correct valid synchronization reference information, and considering the received valid synchronization reference information correct if the sequence of the valid synchronization reference information and the valid synchronization reference information received last time is consistent with the sequence of the valid synchronization reference information in the synchronization reference information library; if the target slave node continuously and correctly receives target number of valid synchronization reference information, entering a synchronization information change tracking success state, and updating the current synchronization reference information of the target slave node according to the sequence of valid synchronization reference information in the synchronization reference information library; if all slave nodes enter the synchronization information change tracking success state, the synchronization is completed.

2. The topology network-based synchronization method of claim 1, wherein, when all nodes are updated to target valid reference information according to the synchronization reference information library, each slave node uploads an upstream frame, and after the slave node completes the transmission of the upstream frame, the current slave node performs state transition, or when all nodes are updated to target valid reference information according to the synchronization reference information library, the slave node performs state transition.

3. The topology network-based synchronization method of claim 1, wherein, if the target slave node is not in the synchronization information change tracking success state, judging whether the target slave node currently receives valid synchronization reference information, if not, waiting for receiving the downstream frame sent by the upstream node, and if yes, judging whether the target slave node has received valid synchronization reference information before the current received valid synchronization reference information; if the target slave node has received valid synchronization reference information before the current received valid synchronization reference information, judging whether the current received valid synchronization reference information is correct, if yes, counting the target value of the counter, and if not, resetting the counter; if the target slave node has not received valid synchronization reference information before the current received valid synchronization reference information, counting the target value of the counter.

4. The method of claim 3, wherein, after the counter is reset, updating the current synchronization reference information of the target slave node to the synchronization reference information obtained from the downstream frame, or not updating the current synchronization reference information of the target slave node.

5. The method of claim 3, wherein, setting the target value of the counter, if the counting result of the counter is greater than or equal to the target value, the target slave node enters the synchronization information change tracking success state, and if the counting result of the counter is less than the target value, updating the current synchronization reference information of the target slave node to the synchronization reference information obtained from the downstream frame.

6. The method of claim 1, wherein, A timing mechanism is set, if the target slave node is in the synchronization information change tracking success state, when the target slave node receives the downstream frame, then the current synchronization reference information of the target slave node is updated according to the valid synchronization reference information sequence of the synchronization reference information library under the timing mechanism.

7. The method of claim 2, wherein, The synchronization method further comprises synchronously configuring the registers of the nodes when the states of the nodes are transferred.

8. The topology network-based synchronization method of claim 1, wherein, If the local synchronization reference information of the target slave node is invalid synchronization reference information when the target slave node currently receives the valid synchronization reference information, the target slave node updates the current synchronization reference information of the target slave node to the currently received valid synchronization reference information.

9. The method of claim 8, wherein, If the order of the valid synchronization reference information and the invalid synchronization reference information currently received by the target slave node constitutes a sequence and is contained in the synchronization reference information library, it is considered that the valid synchronization reference information received this time is correct.

10. The method of claim 1, wherein, After the target node enters the synchronization information change tracking success state, if the target slave node does not continuously and correctly receive a preset number of valid synchronization reference information, the target slave node exits the synchronization information change tracking success state.

11. The method of claim 10, wherein, After the target node enters the synchronization information change tracking success state, whether the information currently received by the target slave node is correct valid synchronization reference information is judged, if not, the counter counts, if the counter counting result is greater than or equal to the target value, the target slave node exits the synchronization information change tracking success state.

12. A slave node device in a topology network, the topology network comprising a master node and a slave node connected in sequence, characterized in that, the slave node acquires a synchronization reference information library, wherein the synchronization reference information library contains a plurality of valid synchronization reference information arranged in a preset order; the slave node receives the downstream frame sent by the upstream node, judges whether the downstream frame containing correct valid synchronization reference information is received, if the valid synchronization reference information received this time and the valid synchronization reference information received last time constitute a sequence in order and are contained in the synchronization reference information library, it is considered that the valid synchronization reference information received this time is correct; if a target number of valid synchronization reference information is continuously and correctly received, the slave node enters the synchronization information change tracking success state, and in the synchronization information change tracking success state, the current synchronization reference information of the slave node is updated according to the valid synchronization reference information sequence of the synchronization reference information library.

13. The slave node device of claim 12, wherein, when the slave node updates to the target valid reference information according to the synchronization reference information library, the slave node uploads the upstream frame, and after the slave node completes the transmission of the upstream frame, the slave node performs state transfer, or when the slave node updates to the target valid reference information according to the synchronization reference information library, the slave node performs state transfer.

14. The slave node device of claim 12, wherein, if the slave node is not in the synchronization information change tracking success state, whether the valid synchronization reference information is currently received is judged, if not, the slave node waits to receive the downstream frame issued by the upstream node, if yes, whether the valid synchronization reference information has been received before the current valid synchronization reference information is received is judged. If the slave node has received valid synchronization reference information before the current reception of valid synchronization reference information, it is determined whether the current received valid synchronization reference information is correct, if yes, counting is performed, if no, the counting is cleared. If the slave node has not received valid synchronization reference information before the current reception of valid synchronization reference information, counting is performed.

15. The slave node device of claim 14, wherein, After the counting is cleared, the slave node updates the slave node's current synchronization reference information to the synchronization reference information obtained from the downlink frame, or the slave node does not update the slave node's current synchronization reference information.

16. The slave node device of claim 14, wherein, The target value of the counting is set, if the counting result is greater than or equal to the target value, the slave node enters the synchronization information change tracking success state, if the counting result is less than the target value, the slave node updates the slave node's current synchronization reference information to the synchronization reference information obtained from the downlink frame.

17. The slave node device of claim 12, wherein, The timing mechanism is set, if the slave node is in the synchronization information change tracking success state, when the slave node receives the downlink frame, the valid synchronization reference information is updated according to the valid synchronization reference information sequence of the synchronization reference information library under the timing mechanism.

18. The slave node device of claim 13, wherein, The register synchronization configuration of the slave node is enabled at the same time of the state transition of the slave node.

19. The slave node device of claim 12, wherein, If the slave node's local synchronization reference information is invalid synchronization reference information when the slave node currently receives valid synchronization reference information, the slave node updates the slave node's current synchronization reference information to the currently received valid synchronization reference information.

20. The slave node device of claim 19, wherein, If the sequence of the valid synchronization reference information and the invalid synchronization reference information currently received by the slave node is contained in the synchronization reference information library, it is considered that the currently received valid synchronization reference information is correct.

21. The slave node device of claim 12, wherein, After the slave node enters the synchronization information change tracking success state, if the slave node does not continuously correctly receive a preset number of valid synchronization reference information, it exits the synchronization information change tracking success state.

22. The slave node device of claim 21, wherein, After the slave node enters the synchronization information change tracking success state, it is determined whether the currently received information is correct valid synchronization reference information, if no, counting is performed, if the counting result is greater than or equal to the target value, the synchronization information change tracking success state is exited.

23. A communication system, characterized by The topology network and / or the slave node device as claimed in any one of claims 1-22.

24. A readable storage medium, characterized by, The readable storage medium stores executable instructions, when the instructions are executed, the slave node device of the topology network, the topology network or the communication system containing the topology network performs the synchronization method as claimed in any one of claims 1-11. The readable storage medium stores executable instructions, when the instructions are executed, the slave node device of the topology network, the topology network or the communication system containing the topology network performs the synchronization method as claimed in any one of claims 1-11.