Multi-domain division and switching method and device for time-sensitive network, and medium
By constructing a weighted network graph and dynamically dividing gPTP domain in a time-sensitive network, combining the trust score and dynamic domain selection of multi-domain nodes, the problem of excessive load on the main clock node in the traditional time synchronization method is solved, and efficient and reliable time synchronization of the network is achieved.
Patent Information
- Application Number
- CN202510086855.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-20
AI Technical Summary
When facing large-scale networks, the load of the main clock node increases, resulting in network communication delays and jitters, and even data packet loss and network crashes.
By building a weighted network graph, dynamically divide multiple gPTP domains, and monitor the main clock status in multi-domain nodes, perform trust scores and dynamic domain selection, and prefer clock domains with high trust and low load.
It effectively avoids overloading of the main clock node, improves the scalability of the network and the stability of time synchronization, and ensures the reliability of time synchronization of each node.
Smart Images

Figure CN119995765A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of time-sensitive networks, and in particular to a method, device and medium for multi-domain division and switching of time-sensitive networks. Background Art
[0002] As a new generation of network communication technology, Time Sensitive Network (TSN) is widely used in many fields such as industrial automation, intelligent transportation, and data centers. Accurate time synchronization has become the core to ensure its efficient and stable operation. However, as the scale of the network continues to expand, the problem of time synchronization has become increasingly complex and severe. Traditional time synchronization methods have gradually exposed their limitations when dealing with networks, especially in the load management of the master clock node and the selection of clock multi-domains.
[0003] As the network scale expands, the master clock node needs to synchronize time with more devices at the same time, causing its load to increase rapidly. The frame preemption mechanism may cause the master clock to occupy a large amount of network bandwidth. Over time, this imbalanced resource allocation can lead to communication delays and even starvation in other parts of the network. Frequent frame preemption not only increases the computing burden of the system, but may also disrupt the transmission of other data streams, especially in scenarios that are highly sensitive to delays and jitter, such as industrial automation control and transportation systems. Over time, problems such as data packet loss and transmission congestion may accumulate, causing more serious system instability and even leading to the collapse of the entire network.
[0004] Although the IEEE 802.1AS standard provides a basic framework for time synchronization for TSN, it faces many challenges in network applications. First, the clock synchronization required by the protocol can easily lead to unbalanced load on the master clock node in the network, which in turn affects the efficiency and stability of time synchronization. When the master clock node is overloaded, it may not be able to update the time information in time, resulting in synchronization errors in the network, affecting the overall time consistency of the system. Secondly, in practical applications, the network topology is complex and changeable, the nodes are unevenly distributed, and there are many types of network devices. The existing gPTP domain division method is difficult to cope with complex situations in the network. In addition, the existing technical standards are mainly designed for general-scale network scenarios, and the special needs of the network are not fully considered, especially in the division of gPTP domains. Fixed gPTP domains are usually used, and there is a lack of specific designs for complex network structures. Summary of the invention
[0005] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the present invention aims to provide a method, device and medium for multi-domain division and switching of a time-sensitive network.
[0006] The first technical solution adopted by the present invention is:
[0007] A method for multi-domain division and switching of a time-sensitive network, comprising the following steps:
[0008] Calculate the node comprehensive performance score of the nodes in the TSN network and the edge weight of the connection strength between nodes to construct a weighted network graph;
[0009] Determine the number of gPTP domains, and divide the constructed weighted network graph into multiple gPTP domains;
[0010] Identifying a multi-domain node; wherein the multi-domain node is located in multiple domains and participates in multiple gPTP domains simultaneously;
[0011] The multi-domain node monitors the master clock status of each domain and performs a trust score. It then performs dynamic domain selection based on the trust score of the clock source, giving priority to clock domains with high trust and low load.
[0012] The clock status of the current domain is re-evaluated regularly. When it is detected that the clock performance of a domain is degraded or the load is too high, it is switched to a clock domain with higher trust.
[0013] Furthermore, the calculation formula of the node comprehensive performance score Sn is:
[0014]
[0015] Where Ln is the current load of node n, Cn is the computing power of node n, and Bn is the bandwidth of node n; Lmax, Cmax, and Bmax are the maximum load, maximum computing power, and maximum bandwidth of nodes in the network, respectively; a1, a2, and a3 are all weight coefficients, which are 0.5, 0.2, and 0.3, respectively, among which the load factor has a greater impact.
[0016] Furthermore, the calculation formula of the edge weight Wij of the connection strength between the nodes is:
[0017]
[0018] Where Bij, Dij, and Rij are the link bandwidth, delay, and reliability between nodes i and j, respectively; Si and Sj are the performance scores of two adjacent nodes; β1, β2, and β3 are weight coefficients. The formula is as follows:
[0019] β1 reflects the impact of bandwidth on connection strength. The larger the bandwidth, the greater the impact.
[0020] β2 reflects the impact of inter-node delay on connection strength, and uses an exponential decay function to consider the volatility of delay. As the delay increases, the value of the exponential term decreases rapidly.
[0021] β3 uses a square function to strengthen the impact on reliability and combines the historical failure rate. Where N is the number of connections and F is the number of failures.
[0022] Furthermore, the method of determining the number of gPTP domains and dividing the constructed weighted network graph into a plurality of gPTP domains includes:
[0023] Determine the number of gPTP domains Wij is the edge weight of the connection strength between node i and node j, and c reflects the complexity of the network;
[0024] According to the number k, the weighted network graph is divided into gPTP domains using a graph partitioning algorithm to obtain multiple gPTP synchronization domains.
[0025] Furthermore, the method of dividing the weighted network graph into gPTP domains using a graph segmentation algorithm includes:
[0026] Calculate the degree matrix D, where the degree matrix D is a diagonal matrix;
[0027] Calculate the Laplace matrix L representing the structural characteristics of the network graph based on the degree matrix D;
[0028] Calculate the normalized Laplace matrix Lnorm;
[0029] Perform eigenvalue decomposition, calculate the first k smallest eigenvalues of the normalized Laplace matrix Lnorm and their corresponding eigenvectors to form the matrix U; then perform eigenvector normalization, normalize each row of the matrix U, and obtain the matrix T;
[0030] Take each row of the matrix T as a k-dimensional vector, use the clustering method to cluster it, select k initial cluster centers, set the initial cluster centers C1, C2..., Ck, each Cj is a k-dimensional vector in the matrix T;
[0031] Calculate the distance of each node and assign clusters. For each node i, calculate its distance to each cluster center Cj;
[0032] Calculate the new cluster center of each cluster, which is the average value of all nodes in the current cluster; finally, each node i is assigned to a cluster Sj, and each cluster corresponds to a gPTP domain.
[0033] Further, the identifying the multi-domain nodes includes:
[0034] Identify multi-domain nodes and record status information between domains. When a multi-domain node detects that the load of a domain is too high or the clock accuracy is reduced, it performs dynamic domain selection based on the trust detection algorithm and synchronizes the node to other domains with lighter loads to ensure the stability of the synchronization domain.
[0035] Furthermore, the best master clock is selected in each domain using BMCA, and each domain of the multi-domain node is synchronized with the current domain respectively, but the time of the master clock in the best domain is used.
[0036] Furthermore, the calculation formula of the trust degree is:
[0037] TS=α*pre+β*(1-jitter)+γ*(1-load)
[0038] In the formula, pre is the accuracy index, is the precision weight, k1 is a constant used for scaling, prem is the minimum precision; jitter is the jitter index, is the jitter weight, k2 is a constant used for scaling, T i -t i It represents the clock error at time i. It takes the average value within the time range T to reflect the jitter of the period. Load is the load indicator. is the load weight, k3 is a constant used for scaling, and Ln is the current node load.
[0039] The second technical solution adopted by the present invention is:
[0040] An electronic device comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a method for multi-domain division and switching of a time-sensitive network as described above.
[0041] The third technical solution adopted by the present invention is:
[0042] A computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, wherein the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for multi-domain division and switching of a time-sensitive network as described above.
[0043] The fourth technical solution adopted by the present invention is:
[0044] A computer program product or a computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above method.
[0045] The beneficial effects of the present invention are as follows: the present invention constructs a weighted network graph for the TSN network and divides the gPTP domain to avoid overload of the master clock node and improve the scalability of the network; calculates the trust of the current domain master clock by identifying multi-domain nodes and performs dynamic clock domain selection, selects the best domain clock source for the multi-domain nodes, and ensures the time synchronization reliability of each node. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 It is a flowchart of the steps of a method for multi-domain division and switching of a time-sensitive network in an embodiment of the present invention;
[0048] Figure 2 is a schematic diagram of multi-domain division in an embodiment of the present invention;
[0049] Figure 3 It is a schematic diagram of the process of gPTP domain division in an embodiment of the present invention;
[0050] Figure 4 is a schematic diagram of dynamic domain selection in an embodiment of the present invention;
[0051] Figure 5 It is a schematic diagram of the clock dynamic domain selection process in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0053] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0054] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0055] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0056] Terminology explanation:
[0057] BMCA: BMCA algorithm is the best master clock selection algorithm. There are multiple nodes in a network, and each node has the potential to be a master clock. Each node periodically sends Announce messages to adjacent nodes. The Announce messages contain the node's clock parameters. After receiving the Announce messages from adjacent nodes, each node compares the clock performance parameters (priority, overall clock quality level, clock accuracy, etc.) carried by the adjacent nodes with its own, adjusts its own parameters to the optimal and continues to pass the optimal clock parameters to the next adjacent node. By sending messages, all nodes in the network receive the optimal clock parameters, and the node with the optimal clock parameters is selected as the master clock.
[0058] In view of the existing technical problems, the present invention starts from the two aspects of multi-gPTP domain division and clock dynamic domain selection, and designs a multi-domain division and dynamic domain selection algorithm, aiming to improve the time synchronization stability and reliability of time-sensitive networks. When constructing a TSN network, the prior art usually adopts a fixed gPTP domain set artificially, and the scope of the domain cannot be determined according to the actual network requirements. When there is too much synchronization information of the domain master clock, it may cause the nodes between domains to be unable to accurately synchronize time. Therefore, the present invention designs a graph segmentation algorithm to construct a weighted network graph for the TSN network and divide the gPTP domain to avoid overloading the master clock node, and the graph segmentation algorithm can make the processing tasks easier to parallelize on the network, improving the scalability of the network. In addition, the boundary nodes of the domain may be in multiple domains and use a redundant master clock as a new synchronization source, facing the problem of unreliable single redundant master clock. Therefore, the present invention calculates the trust of the current domain master clock through the identified multi-domain nodes and performs clock dynamic domain selection, selects the best domain clock source for the multi-domain nodes, and ensures the time synchronization reliability of each node. The present invention can improve the time synchronization stability and reliability of time-sensitive networks through the method of multi-gPTP domain division and dynamic switching of clock domains by multi-domain nodes, and provide accurate and reliable time information for upper-layer services.
[0059] Example 1
[0060] like Figure 1 As shown, this embodiment provides a method for multi-domain division and switching of a time-sensitive network, including the following steps:
[0061] S1. Calculate the node comprehensive performance score of the nodes in the TSN network and the edge weights of the connection strength between nodes, and construct a weighted network graph.
[0062] Exemplarily, weights are calculated for each node and link for subsequent domain division and synchronization coordination. A weighted adjacency matrix is constructed, using the weights of the nodes and links to construct a weighted adjacency matrix of the network.
[0063] S2. Determine the number of gPTP domains and divide the constructed weighted network graph into multiple gPTP domains.
[0064] In some embodiments, based on the network topology, the number of nodes and the synchronization requirements, the number of gPTP domains that need to be divided is determined, and a graph partitioning algorithm is applied to divide the weighted network graph into gPTP domains.
[0065] S3. Identify a multi-domain node; wherein the multi-domain node is located in multiple domains and participates in multiple gPTP domains at the same time.
[0066] Specifically, the multi-domain nodes that may exist between adjacent domains are identified, and during the domain partitioning process, some nodes are allowed to be assigned to multiple domains at the same time.
[0067] S4. The multi-domain node monitors the master clock status of each domain and performs a trust score. It performs dynamic domain selection based on the trust score of the clock source, giving priority to clock domains with high trust and low load.
[0068] Specifically, the multi-domain node monitors the master clock status of each synchronization domain, including parameters such as accuracy and load, and analyzes the operating status of each clock source. It performs dynamic domain selection based on the trust score of the clock source, giving priority to clock domains with high trust and low load.
[0069] S5. Regularly re-evaluate the clock status of the current domain. When it is detected that the clock performance of a domain is degraded or the load is too high, switch to a clock domain with higher trust.
[0070] Regularly re-evaluate the clock status of the current domain and switch to a clock domain with higher trust when the clock performance of a domain degrades or the load is too high.
[0071] The above method is explained in detail below with reference to the accompanying drawings and specific embodiments.
[0072] This embodiment provides a method for multi-domain division and switching of a time-sensitive network, including the following steps:
[0073] Step 1: Build a multi-gPTP domain partitioning system to divide the gPTP domains of the TSN network.
[0074] See also Figure 2 , build a time synchronization system for time-sensitive networks. All nodes are connected to the network and the master clock in the network is set. Static settings are used to evenly select some nodes in the network to set as master clocks. This example only implements gPTP domain division, and the clock synchronization algorithm is not implemented in this example. All nodes are allowed to be in multiple domains according to the IEEE 802.1AS protocol requirements.
[0075] The division of multiple gPTP domains, calculates the weights for each node and link in the network, constructs the weighted adjacency matrix of the network, and divides the weighted network graph into gPTP domains.
[0076] Step 2: Implement the optimal domain selection for multi-domain nodes through the clock dynamic domain selection method.
[0077] See also Figure 4 Based on the division of multiple gPTP domains, multi-domain nodes between adjacent domains are identified. Such nodes monitor the status of multi-domain master clocks and select the domain with the highest trust and lower load for synchronization based on the trust score of the master clock. When the clock accuracy of a domain decreases or the load increases, the status of the domain will be re-evaluated regularly, and dynamically switched to other better clock sources based on the latest score.
[0078] 1. Algorithm Principle
[0079] The multi-domain division and switching system of the embodiment of the present invention is designed for time-sensitive networks. The core algorithm consists of two parts: multi-gPTP domain division and clock dynamic domain selection. The algorithm can improve network stability by constructing a weighted network graph, dynamically selecting the best clock source and load balancing mechanism. The specific principles are as follows:
[0080] (1) Multi-gPTP Domain Partition Algorithm
[0081] The goal of the multi-gPTP domain partitioning algorithm is to divide the entire TSN network into several synchronization domains according to the network topology, node load and synchronization requirements, and ensure load balancing and synchronization efficiency. Specifically, the algorithm analyzes the bandwidth and latency requirements of each node in the TSN network, calculates the node comprehensive performance score and the edge weight of the connection strength between nodes, delineates the domain boundaries, and finely divides different synchronization areas in the network, and assigns nodes to suitable gPTP domains according to their specific requirements (such as the priority of time-sensitive traffic and clock accuracy requirements).
[0082] 1.1) Weighted network graph construction:
[0083] Each node and link in the network is assigned a weight that reflects factors such as the network's bandwidth, latency, and node load. The relationship between nodes and links is described by a weighted adjacency matrix, which provides a data basis for subsequent domain division.
[0084] 1.2) Graph segmentation algorithm:
[0085] The weighted network graph is divided into multiple gPTP synchronization domains using a graph partitioning algorithm. The graph partitioning algorithm combines the idea of spectral clustering and clusters nodes with similar loads and synchronization requirements into the same synchronization domain based on the weight differences between nodes, thus reducing the overhead of cross-domain synchronization.
[0086] (2) Clock Dynamic Domain Selection Algorithm
[0087] Identify multi-domain nodes and record the shared load, clock accuracy, jitter and other status information between domains. When a multi-domain node detects that the load of a domain is too high or the clock accuracy is reduced, it performs dynamic domain selection based on the trust detection algorithm and synchronizes the node to other domains with lighter loads to ensure the stability of the synchronization domain. BMCA can be used to select the best master clock in each domain.
[0088] 2.1) Multi-domain node identification:
[0089] After the gPTP domain is divided, if a node spans multiple domains, the node is marked as a multi-domain node. The algorithm identifies multi-domain nodes across domains during the division process. Multi-domain nodes are located at the boundaries of multiple domains and participate in multiple synchronization domains at the same time. Each domain of these multi-domain nodes synchronizes with the current domain separately, but uses the time of the master clock in the best domain. Through this strategy, synchronization coordination and information sharing between domains are ensured, and the efficiency of clock synchronization is improved.
[0090] 2.2) Dynamic domain selection mechanism:
[0091] The system monitors the status of the master clock in each synchronization domain in real time, including information such as clock accuracy, jitter, network delay and load, and performs a trust score. The trust score is used to determine which clock source the node selects for synchronization. Each node dynamically selects a synchronization domain based on the trust score. The node will give priority to clock sources with high trust and low load for synchronization. When the performance of a clock source degrades or the load in the domain exceeds the threshold, the node will automatically switch to a clock source with a higher trust. By regularly re-evaluating the status of the clock source, the algorithm ensures that the node is always synchronized to the best clock source and maintains synchronization accuracy.
[0092] 2. Algorithm Implementation
[0093] See also Figure 2 and Figure 4 ,The algorithm implementation for multi-domain partitioning and switching of time-sensitive networks is as follows:
[0094] S101: Multiple gPTP domain division.
[0095] (1) Construct a weighted network graph:
[0096] Calculate the weight for each node and link for subsequent domain division and synchronization coordination. First, calculate the node weight, and calculate the comprehensive performance score Sn for each node:
[0097]
[0098] Where Ln is the current load of node n, Cn is the computing power of node n, and Bn is the bandwidth of node n; Lmax, Cmax, and Bmax are the maximum load, maximum computing power, and maximum bandwidth of nodes in the network, respectively; a1, a2, and a3 are all weight coefficients that satisfy a1+a2+a3=1, reflecting the impact of load, computing power, and bandwidth on domain partitioning.
[0099] Then the edge weight is calculated, and the weight Wij is calculated for each link to measure the connection strength between two nodes:
[0100]
[0101] In the formula, Bij, Dij, and Rij are the link bandwidth, delay, and reliability between nodes i and j, respectively; Si and Sj are the performance scores of two adjacent nodes. β1, β2, and β3 are weight coefficients, and the formula is as follows:
[0102] β1 reflects the impact of bandwidth on connection strength. The larger the bandwidth, the greater the impact.
[0103] β2 reflects the impact of inter-node delay on connection strength, and uses an exponential decay function to consider the volatility of delay. As the delay increases, the value of the exponential term decreases rapidly.
[0104] β3 uses a square function to strengthen the impact on reliability and combines the historical failure rate. Where N is the number of connections and F is the number of failures.
[0105] (2) Dividing the gPTP domain:
[0106] See also Figure 3 ,After constructing the weighted graph, the graph partitioning algorithm is applied to ,partition the network into gPTP domains;
[0107] First, determine the number of gPTP domains. Based on the network topology, number of nodes, and synchronization requirements, determine the number of gPTP domains k that need to be divided. This can be determined in the following way: c reflects the complexity of the network.
[0108] Then, the graph partitioning algorithm is applied to partition the weighted network graph into gPTP domains;
[0109] First calculate the degree matrix D, which is a diagonal matrix, where Dii = ∑ j Wij represents the total connection strength of node i;
[0110] Calculate the Laplace matrix L that can represent the structural characteristics of the network graph, L = DW,
[0111] Calculate the normalized Laplace matrix Lnorm = D -1 / 2 LD -1 / 2
[0112] Perform eigenvalue decomposition, calculate the first k smallest eigenvalues of the normalized Laplace matrix Lnorm and their corresponding eigenvectors, and form the matrix U. Then perform eigenvector normalization, normalize each row of the matrix U, and obtain the matrix T:
[0113]
[0114] Then, each row of the matrix T is regarded as a k-dimensional vector, and clustering is performed on it using a clustering method. K initial cluster centers are selected and set as C1, C2..., Ck. Each Cj is a k-dimensional vector in the matrix T.
[0115] Then calculate the distance of each node and assign clusters. For each node i, calculate its distance to each cluster center Cj. The formula is as follows.
[0116]
[0117] Then calculate the new cluster center of each cluster, which is the average value of all nodes in the current cluster. Sj is the set of all nodes in cluster j, |Sj| is the number of nodes in cluster j. Finally, each node i is assigned to a cluster Sj, that is, each node belongs to a gPTP domain, which means that k clusters are obtained, and each cluster corresponds to a gPTP domain.
[0118] As an optional implementation, after the gPTP domains are divided, BMCA is used in each gPTP domain to select the best master clock.
[0119] S102: Clock dynamic domain selection.
[0120] (1) Identify multi-domain nodes:
[0121] See also Figure 5 ,After the gPTP domain is divided, if a node spans multiple ,domains, the node is marked as a multi-domain node, and each domain of these multi-domain nodes ,synchronizes with the current domain respectively.
[0122] (2) Dynamic domain selection:
[0123] Each multi-domain node periodically collects the status of the current domain master clock, including accuracy (pre), jitter (jitter), and load (load) indicators, and calculates the trust TS of the current domain master clock:
[0124] TS=α*pre+β*(1-jitter)+γ*(1-load)
[0125] In the formula, pre is the accuracy index, is the precision weight, k1 is a constant used for scaling, and prem is the minimum precision.
[0126] Jitter is a jitter indicator. is the jitter weight, k2 is a constant used for scaling, Ti-ti represents the clock error at time i, and the jitter of the period is reflected by taking the average value within the time range T.
[0127] load is the load indicator; is the load weight, k3 is a constant used for scaling, and Ln is the current node load.
[0128] k1, k2, k3 can be designed according to specific scenarios.
[0129] Based on the calculated trust, the multi-domain node selects the clock source of the domain with the highest trust for synchronization. The clock status of the current domain is re-evaluated regularly. When the clock performance of a domain is detected to be degraded or the load is too high, the multi-domain node will dynamically switch to a clock source with a higher trust. For example, when the trust TS of the master clock of the current domain is detected to be less than 0.75, it is judged to be abnormal, and the trust of each domain is recalculated to obtain the clock domain with high trust and low load, and the node is synchronized with the clock source of the domain with the highest trust.
[0130] In summary, the method of multi-domain division and switching for time-sensitive networks achieves the stability of time synchronization in time-sensitive networks through the comprehensive application of multi-gPTP domain division and clock dynamic domain selection algorithm. It effectively copes with the system instability problem caused by the gradual increase in time synchronization tasks of the master clock node when the network scale expands, thereby ensuring the stable operation of the time-sensitive network.
[0131] Example 2
[0132] An embodiment of the present invention further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the following Figure 1 A method for multi-domain division and switching in a time-sensitive network is shown.
[0133] It is understood that the memory may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the server, etc.
[0134] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented separately through a chip.
[0135] Since the electronic device is an electronic device corresponding to a method for multi-domain division and switching of a time-sensitive network in an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0136] Example 3
[0137] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the following Figure 1 A method for multi-domain division and switching in a time-sensitive network is shown.
[0138] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0139] Since the storage medium is a storage medium corresponding to a method for multi-domain division and switching of a time-sensitive network in an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0140] Example 4
[0141] In some possible implementations, various aspects of the method of the embodiment of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of a method for multi-domain division and switching of a time-sensitive network according to various exemplary embodiments of the present application described above in this specification. Among them, the executable computer program code or "code" for executing each embodiment can be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0142] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0143] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0144] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for multi-domain division and switching of time-sensitive networks, characterized in that: The following steps are involved: Calculate the node comprehensive performance score of the nodes in the TSN network and the edge weight of the connection strength between nodes to construct a weighted network graph; Determine the number of gPTP domains, and divide the constructed weighted network graph into multiple gPTP domains; Identify multi-domain nodes; wherein the multi-domain node is located in multiple domains and participates in multiple gPTP domains simultaneously; The multi-domain node monitors the master clock status of each domain and performs a trust score. It then performs dynamic domain selection based on the trust score of the clock source, giving priority to clock domains with high trust and low load. The clock status of the current domain is re-evaluated regularly. When it is detected that the clock performance of a domain is degraded or the load is too high, it is switched to a clock domain with higher trust.
2. The method for multi-domain division and switching of a time-sensitive network according to claim 1, characterized in that: The calculation formula of the node comprehensive performance score Sn is: Where Ln is the current load of node n, Cn is the computing power of node n, and Bn is the bandwidth of node n; Lmax, Cmax, and Bmax are the maximum load, maximum computing power, and maximum bandwidth of nodes in the network, respectively; a1, a2, and a3 are all weight coefficients.
3. The method for multi-domain division and switching of a time-sensitive network according to claim 1, characterized in that: The calculation formula of the edge weight Wij of the connection strength between the nodes is: Where Bij, Dij, and Rij are the link bandwidth, delay, and reliability between nodes i and j, respectively; Si and Sj are the performance scores of two adjacent nodes; and β1, β2, and β3 are weight coefficients.
4. The method for multi-domain division and switching of a time-sensitive network according to claim 1, characterized in that: The step of determining the number of gPTP domains and dividing the constructed weighted network graph into a plurality of gPTP domains includes: Determine the number of gPTP domains Wij is the edge weight of the connection strength between node i and node j, and c reflects the complexity of the network; According to the number k, the weighted network graph is divided into gPTP domains using a graph partitioning algorithm to obtain multiple gPTP synchronization domains.
5. The method for multi-domain division and switching of a time-sensitive network according to claim 4, characterized in that: The method of dividing the weighted network graph into gPTP domains by using a graph segmentation algorithm includes: Calculate the degree matrix D, where the degree matrix D is a diagonal matrix; Calculate the Laplace matrix L representing the structural characteristics of the network graph based on the degree matrix D; Calculate the normalized Laplace matrix Lnorm; Perform eigenvalue decomposition, calculate the first k smallest eigenvalues of the normalized Laplace matrix Lnorm and their corresponding eigenvectors to form the matrix U; then perform eigenvector normalization, normalize each row of the matrix U, and obtain the matrix T; Take each row of the matrix T as a k-dimensional vector, use the clustering method to cluster it, select k initial cluster centers, set the initial cluster centers C1, C2..., Ck, each Cj is a k-dimensional vector in the matrix T; Calculate the distance of each node and assign clusters. For each node i, calculate its distance to each cluster center Cj; Calculate the new cluster center of each cluster, which is the average value of all nodes in the current cluster; finally, each node i is assigned to a cluster Sj, and each cluster corresponds to a gPTP domain.
6. The method for multi-domain division and switching of a time-sensitive network according to claim 1, characterized in that: The identifying of the multi-domain nodes comprises: Identify multi-domain nodes and record status information between domains. When a multi-domain node detects that the load of a domain is too high or the clock accuracy is reduced, it performs dynamic domain selection based on the trust detection algorithm and synchronizes the node to other domains with lighter loads to ensure the stability of the synchronization domain.
7. The method for multi-domain division and switching of a time-sensitive network according to claim 6, characterized in that: The best master clock is selected in each domain using BMCA. Each domain of the multi-domain node is synchronized with the current domain separately, but the time of the master clock in the best domain is used.
8. The method for multi-domain division and switching of a time-sensitive network according to claim 1, characterized in that: The calculation formula of the trust degree is: TS=α*pre+β*(1-jitter)+γ*(1-load) In the formula, pre is the accuracy index, is the precision weight, k1 is a constant used for scaling, and prem is the minimum precision; Jitter is a jitter indicator. is the jitter weight, k2 is a constant used for scaling, T i -t i It represents the clock error at time i. It takes the average value within the time range T to reflect the jitter of the period. Load is the load indicator. is the load weight, k3 is a constant used for scaling, and Ln is the current node load.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Time-sensitive network-oriented time synchronization architecture, security method and device
CN116170110A
Clock redundancy system based on multiple clock domains and implementation method of clock redundancy
CN116865898A
Clock synchronization method, network equipment and computer readable storage medium
CN118338401A
Method and system for merging clocks from multiple precision time protocol (PTP) clock domains
US20200280383A1