Method, device and medium for time-sensitive network multi-domain partitioning and switching
By constructing a weighted network graph and a dynamic domain selection algorithm, the problems of unbalanced load on the master clock node and the complexity of gPTP domain partitioning were solved, achieving stable and reliable time synchronization of the time-sensitive network.
Patent Information
- Application Number
- CN202510086855.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-01-20
AI Technical Summary
Traditional time synchronization methods lead to uneven load on the master clock node in large-scale networks, affecting time synchronization efficiency and stability. Furthermore, existing gPTP domain partitioning methods are difficult to cope with complex network structures, resulting in communication delays and data packet loss.
By constructing a weighted network graph, identifying multi-domain nodes and calculating trust levels, dynamically selecting clock domains with lower load and higher trust levels, and using a graph partitioning algorithm to divide the gPTP domain, the reliability of load balancing and time synchronization of the master clock node is ensured.
It improves the stability and reliability of time synchronization in time-sensitive networks, avoids overload of the master clock node, and enhances the scalability and synchronization efficiency of the network.
Smart Images

Figure CN119995765B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of time sensitive network, and particularly relates to a method, device and medium for time sensitive network multi-domain division and switching. BACKGROUND
[0002] As a new generation of network communication technology, time sensitive network (TSN) is widely used in industrial automation, intelligent transportation, data center and other fields. Precise time synchronization is the core to ensure its efficient and stable operation. However, as the network scale continues to expand, the problem of time synchronization becomes increasingly complex and severe. The traditional time synchronization method gradually exposes its limitations in dealing with the network, especially in the load management of the master clock node and the selection of the clock multi-domain.
[0003] When the network scale expands, the master clock node needs to synchronize time with more devices at the same time, resulting in rapid increase of its load. Frame preemption mechanism may make the master clock occupy a large amount of network bandwidth. Over time, this uneven allocation of resources will cause communication delay or even starvation in other parts of the network. Frequent occurrence of frame preemption not only increases the computational burden of the system, but also may disrupt the transmission of other data streams, especially in those scenarios that are highly sensitive to delay and jitter, such as industrial automation control and transportation systems. Over time, problems such as data packet loss and transmission congestion may accumulate, leading to more serious system instability, and even causing the overall network to collapse.
[0004] Although the IEEE 802.1AS standard provides a basic framework for time synchronization of TSN, it faces various challenges in network applications. First, the clock synchronization required by the protocol is likely to cause uneven load of the master clock node in the network, thereby affecting the efficiency and stability of time synchronization. When the load of the master clock node is too heavy, it may not be able to update the time information in time, resulting in synchronization errors in the network and affecting the overall time consistency of the system. Second, in actual applications, the topology of the network is complex and variable, the nodes are unevenly distributed, and there are many types of network devices. The existing gPTP domain division method is difficult to cope with the complex situation in the network. In addition, the existing technical standards are mainly designed for general scale network scenarios, and do not fully consider the special needs of the network, especially in the division of gPTP domain. Usually, a fixed gPTP domain is used, and there is a lack of specific design for complex network structures. SUMMARY
[0005] To at least partially solve one of the technical problems existing in the prior art, the purpose of the present application is to provide a method, device and medium for time sensitive network multi-domain division and switching.
[0006] The first technical solution adopted by the present application is:
[0007] A method for time-sensitive network multi-domain division and switching, 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 the nodes, and construct a weighted network graph;
[0009] Determine the number of gPTP domains, and divide the constructed weighted network graph into multiple gPTP domains;
[0010] Identify multi-domain nodes; wherein the multi-domain nodes are located in multiple domains and participate in multiple gPTP domains;
[0011] The multi-domain nodes monitor the master clock state of each domain and perform trust score, and dynamically select the clock domain according to the trust score of the clock source, and preferentially select the clock domain with high trust score and low load;
[0012] Periodically reevaluate the clock state of the current domain, and when detecting that the clock performance of a domain is decreased or the load is too high, switch to a clock domain with higher trust.
[0013] Further, the calculation formula of the node comprehensive performance score Sn is:
[0014]
[0015] In the formula, Ln is the current load of node n, Cn is the computing capacity of node n, and Bn is the bandwidth of node n; Lmax, Cmax, and Bmax are the maximum load, maximum computing capacity, and maximum bandwidth of the nodes in the network, respectively; a1, a2, and a3 are weight coefficients, each taking 0.5, 0.2, and 0.3, respectively, wherein the load factor is larger.
[0016] Further, the calculation formula of the edge weight Wij of the connection strength between the nodes is:
[0017]
[0018] In the formula, Bij, Dij, and Rij are the link bandwidth, delay, and reliability between node i and node j; Si and Sj are the performance scores of the two adjacent nodes; β1, β2, and β3 are weight coefficients, and the formula is as follows:
[0019] β1 reflects the influence of bandwidth on connection strength, and the greater the bandwidth, the greater the influence,
[0020] β2 reflects the influence of the delay between nodes on the connection strength, and uses an exponential decay function to consider the volatility of the delay, As the delay increases, the value of the exponential term rapidly decreases.
[0021] The square function is used to strengthen the influence on reliability, and historical failure rate is combined, Wherein N is the connection times, F is the number of failures.
[0022] Further, the number of gPTP domains is determined, and the constructed weighted network graph is divided into multiple gPTP domains, comprising:
[0023] Determine the number of gPTP domains Wij is the edge weight of the connection strength between node i and node j, and c is the complexity of the network;
[0024] According to the number k, the weighted network graph is divided into gPTP domains by using a graph partitioning algorithm, and multiple gPTP synchronization domains are obtained.
[0025] Further, the weighted network graph is divided into gPTP domains by using a graph partitioning algorithm, comprising:
[0026] Calculate the degree matrix D, wherein the degree matrix D is a diagonal matrix;
[0027] According to the degree matrix D, calculate the Laplacian matrix L representing the structure characteristics of the network graph;
[0028] Calculate the normalized Laplacian matrix Lnorm;
[0029] Perform eigenvalue decomposition to calculate the first k smallest eigenvalues of the normalized Laplacian matrix Lnorm and the corresponding eigenvectors, and form a matrix U; then perform eigenvector normalization, normalize each row of the matrix U to obtain a matrix T;
[0030] Each row of the matrix T is used as a k-dimensional vector, and a clustering method is used for clustering processing, k initial cluster centers are selected, and initial cluster centers C1, C2,..., Ck are set. Each Cj is a k-dimensional vector in the matrix T;
[0031] Calculate the distance of each node and assign a cluster, for each node i, calculate the distance from it to each cluster center Cj;
[0032] Calculate the new cluster center of each cluster, and the new cluster center 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 multi-domain node is identified, comprising:
[0034] The multi-domain node is identified and the state information between the domains is recorded, when the multi-domain node detects that the load of a certain domain is too high or the clock accuracy is reduced, dynamic domain selection is performed according to the trust degree detection algorithm, the node is synchronized to other domains with lighter load, and the stability of the synchronization domain is ensured.
[0035] Further, the best master clock is selected in each domain by BMCA, and each domain of the multi-domain node is synchronized with the current domain, but the time of the master clock in the best domain is adopted.
[0036] Further, the calculation formula of the trust degree is:
[0037] TS=alpha*pre+beta*(1-jitter)+gamma*(1-load)
[0038] In the formula, pre is the precision index, k1 is a constant for scaling, and prem is the minimum precision; jitter is the jitter index, k2 is a constant for scaling, and T i -t i represents the error of the clock at time i, and by taking the average value in the T time range, the jitter of the period is reflected; load is the load index. k3 is a constant for scaling, and Ln is the current node load.
[0039] The second technical solution adopted by the application is:
[0040] An electronic device, the electronic device includes a processor and a memory, the memory has at least one instruction, at least one program, a code set or instruction set stored therein, the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor, to realize a kind of multi-domain division and switching for time sensitive network as described above Method.
[0041] The third technical solution adopted by the application is:
[0042] A computer readable storage medium, the storage medium has at least one instruction, at least one program, a code set or instruction set stored therein, the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by processor to realize a kind of multi-domain division and switching for time sensitive network as described above Method.
[0043] The fourth technical solution adopted by the application is:
[0044] A computer program product or computer program, the computer program product or computer program includes computer instructions, which are stored in a computer readable storage medium. The processor of the computer equipment can read the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer equipment executes the above-mentioned method.
[0045] The beneficial effects of the present application are: the present application constructs a weighted network graph for a TSN network and divides a gPTP domain, avoids overloading of a master clock node, and improves the scalability of the network; the trust degree of the current domain master clock is calculated for a multi-domain node, and dynamic domain selection of the clock is performed, the optimal domain clock source is selected for the multi-domain node, and the time synchronization reliability of each node is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following introduces the drawings of the related technical solutions in the embodiments of the present application or the prior art. It should be understood that the drawings in the following introduction are only for the convenience of clearly describing part of the embodiments of the technical solutions of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the premise.
[0047] Figure 1 is a step flow chart of a method for time-sensitive network multi-domain division and switching in the embodiments of the present application;
[0048] Figure 2 is a multi-domain division schematic diagram in the embodiments of the present application;
[0049] Figure 3 is a flowchart of gPTP domain division in the embodiments of the present application;
[0050] Figure 4 is a dynamic domain selection schematic diagram in the embodiments of the present application;
[0051] Figure 5 is a clock dynamic domain selection flowchart in the embodiments of the present application. DETAILED DESCRIPTION
[0052] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are only used to explain the present application, and cannot be understood as a limitation of the present application. For the step numbers in the following embodiments, they are only set for the convenience of explanation and description, and the order between the steps is not limited in any way, and the execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0053] In the description of the present application, it should be understood that the orientation description, such as the orientation or position relationship indicated by the upper, lower, front, rear, left, right and the like, is based on the orientation or position relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.
[0054] In the description of the present application, the meaning of one or more is one or more, the meaning of multiple is two or more, greater than, less than, more than and the like are understood as not including the number, above, below, within and the like are understood as including the number. If the first, second is described, it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of technical features indicated.
[0055] In the description of the present application, unless otherwise explicitly limited, the words such as setting, installing, connecting and the like should be broadly understood, and the person skilled in the art can reasonably determine the specific meaning of the above words in the present application in combination with the specific content of the technical solution.
[0056] Term explanation:
[0057] BMCA: BMCA algorithm is the best master clock selection algorithm, there are multiple nodes in a network, each node has the potential to be the master clock, each node periodically sends Announce packet to adjacent nodes, the Announce packet contains the clock parameters of the node, after each node accepts the Announce packet of adjacent node, it compares the clock performance parameters (priority, clock overall quality level, clock accuracy, etc.) carried by the Announce packet with itself, adjusts the parameters of itself to the optimal and continues to pass the optimal clock parameters to the next adjacent node, through the sending of the packet, 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 application designs a multi-domain division and dynamic domain selection algorithm from two aspects of multi-gPTP domain division and clock dynamic domain selection, aiming to improve the time synchronization stability and reliability of the time sensitive network. In the prior art, when constructing a TSN network, a fixed gPTP domain set by a person is usually adopted, and the range of the domain cannot be determined according to the actual network demand, and when the synchronization information of the domain master clock is too much, the nodes between the domains may not be accurately time synchronized, therefore, the present application designs a graph partitioning algorithm to construct a weighted network graph for the TSN network and divide the gPTP domain, so as to avoid the overload of the master clock node, and the graph partitioning algorithm can make the processing task more parallelized on the network, and improve the scalability of the network. In addition, the boundary nodes of the domain may be in multiple domains, and a redundant master clock is used as a new synchronization source, and the single redundant master clock is unreliable, therefore, the present application calculates the trust degree of the current domain master clock through the identified multi-domain node and performs clock dynamic domain selection, so as to select the best domain clock source for the multi-domain node, and ensure the time synchronization reliability of each node. Through the method of multi-gPTP domain division and multi-domain node dynamic switching clock domain, the present application can improve the time synchronization stability and reliability of the time sensitive network, and provide accurate and reliable time information for the upper layer service.
[0059] Embodiment 1
[0060] As shown in the figure, the present embodiment provides a method for multi-domain division and switching of a time sensitive network, comprising the following steps: Figure 1 S1, calculate the node comprehensive performance score of the nodes in the TSN network and the edge weight of the connection strength between the nodes, and construct a weighted network graph.
[0061] Exemplarily, the weight of each node and link is calculated, which is used for subsequent domain division and synchronization coordination. A weighted adjacency matrix is constructed, and the weighted adjacency matrix of the network is constructed using the weight of the nodes and links.
[0062] S2, determine the number of gPTP domains, and divide the constructed weighted network graph into multiple gPTP domains.
[0063] In some embodiments, based on the network topology, the number of nodes and the synchronization demand, the number of gPTP domains to be divided is determined, and a graph partitioning algorithm is applied to divide the gPTP domains of the weighted network graph.
[0064] S3, identify a multi-domain node; wherein the multi-domain node is located in multiple domains and participates in multiple gPTP domains simultaneously.
[0065] Specifically, the multi-domain nodes possibly existing between adjacent domains are identified, and in the domain division process, some nodes are allowed to be allocated to multiple domains at the same time.
[0066]
[0067] S4, the multi-domain node monitors the master clock state of each domain and performs trust score, and performs dynamic domain selection according to the trust score of the clock source, and preferentially selects the clock domain with high trust score and low load.
[0068] Specifically, the multi-domain node monitors the master clock state of each synchronization domain, including parameters such as precision and load, and analyzes the running status of each clock source, and performs dynamic domain selection according to the trust score of the clock source, and preferentially selects the clock domain with high trust score and low load.
[0069] S5, periodically re-evaluate the clock state of the current domain, and switch to the clock domain with higher trust score when detecting that the clock performance of a domain is decreased or the load is too high.
[0070] Periodically re-evaluate the clock state of the current domain, and switch to the clock domain with higher trust score when the clock performance of a domain is decreased or the load is too high.
[0071] The above method is explained in detail in combination with the drawings and specific embodiment modes.
[0072] The embodiment provides a method for time-sensitive network multi-domain division and switching, comprising the following steps:
[0073] Step 1: Construct a multi-gPTP domain division system for dividing gPTP domains of a TSN network.
[0074] Referring to Figure 2 , a time synchronization system of a time-sensitive network is constructed, all nodes are connected to the network, and a master clock in the network is set, a static setting is adopted, and part of the nodes in the network are uniformly selected and set as master clocks, this example only implements gPTP domain division, and a clock synchronization algorithm is not implemented in this example, and all nodes are allowed to be in multiple domains according to the requirements of IEEE 802.1AS protocol.
[0075] The multi-gPTP domain division is performed, the weight of each node and link in the network is calculated, the weighted adjacency matrix of the network is constructed, and the gPTP domain division is performed on the weighted network graph.
[0076] Step 2: The best domain selection of the multi-domain node is realized through a clock dynamic domain selection method.
[0077] Referring to Figure 4 , on the basis of the multi-gPTP domain division, the multi-domain nodes between adjacent domains are identified, the multi-domain master clock state monitoring is performed on the nodes, and the domain with the highest trust score and the lowest load is selected for synchronization according to the trust score of the master clock. When the clock precision of a domain is decreased or the load is increased, the state of the domain is periodically re-evaluated, and the other clock source with higher performance is dynamically switched according to the latest score.
[0078] I. Algorithm principle
[0079] The multi-domain division and switching system of the embodiment of the application is designed for a time-sensitive network, and a core algorithm thereof consists of two parts, i.e., multi-gPTP domain division and dynamic clock domain selection. The algorithm can improve network stability by constructing a weighted network graph, dynamically selecting the best clock source and load balancing mechanism, and the specific principle is as follows:
[0080] (1) Multi-gPTP domain division algorithm
[0081] The goal of the multi-gPTP domain division algorithm is to divide the entire TSN network into several synchronization domains according to network topology, node load and synchronization requirements, and to ensure load balancing and synchronization efficiency. Specifically, the algorithm calculates the node comprehensive performance score and the edge weight of the connection strength between nodes by analyzing the bandwidth and delay requirements of each node in the TSN network, draws the domain boundary, and finely divides different synchronization areas in the network, and allocates nodes to suitable gPTP domains according to the specific requirements of the nodes (such as the priority of time-sensitive traffic and the clock accuracy requirement).
[0082] 1.1) Construction of weighted network graph:
[0083] Each node and link in the network is assigned a weight, which reflects the bandwidth, delay, node load and other factors of the network, and 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 partitioning algorithm:
[0085] The graph partitioning algorithm is used to divide the weighted network graph into multiple gPTP synchronization domains. The graph partitioning algorithm combines the idea of spectral clustering and is based on the weight difference between nodes to gather nodes with similar load and synchronization requirements in the same synchronization domain, reducing the overhead of cross-domain synchronization.
[0086] (2) Clock dynamic domain selection algorithm
[0087] Identify multi-domain nodes and record state information such as shared load, clock accuracy and jitter between domains. When a multi-domain node detects that the load of a domain is too high or the clock accuracy is reduced, dynamic domain selection is performed according to the trustworthiness detection algorithm to synchronize the node to other domains with lighter load, ensuring the stability of the synchronization domain. Among them, the best master clock can be selected in each domain by BMCA.
[0088] 2.1) Multi-domain node identification:
[0089] After dividing the gPTP domains, if a node spans multiple domains, the node is marked as a multi-domain node. The algorithm identifies multi-domain nodes that span multiple domains during the division process. Multi-domain nodes are located at the boundaries of multiple domains and participate in multiple synchronization domains. Each domain of these multi-domain nodes is synchronized 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 clock accuracy, jitter, network delay, and load information, and performs trust score evaluation. 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. Nodes will preferentially select a clock source with high trust and low load for synchronization. When the performance of a certain clock source decreases or the load in the domain exceeds the threshold, the node will automatically switch to a clock source with higher trust. By periodically re-evaluating the status of the clock source, the algorithm ensures that the node is always synchronized to the best clock source, maintaining synchronization accuracy.
[0092] II. Algorithm implementation
[0093] Referring to Figure 2 and Figure 4 , the algorithm implementation for time-sensitive network multi-domain division and switching is as follows:
[0094] S101: Multi-gPTP domain division.
[0095] (1) Construct a weighted network graph:
[0096] Calculate the weight of each node and link for subsequent domain division and synchronization coordination. First, calculate the node weight. Each node calculates a comprehensive performance score Sn:
[0097]
[0098] In the formula, Ln is the current load of node n, Cn is the computing capacity of node n, and Bn is the bandwidth of node n; Lmax, Cmax, and Bmax are the maximum load, maximum computing capacity, and maximum bandwidth of nodes in the network, respectively; a1, a2, and a3 are weight coefficients that satisfy a1+a2+a3=1, reflecting the influence of load, computing capacity, and bandwidth on domain division.
[0099] Then calculate the edge weight. Calculate the weight Wij of each link to measure the connection strength between two nodes:
[0100]
[0101] In the formula, Bij, Dij, Rij are the bandwidth, delay and reliability between node i and node j; Si and Sj are the performance scores of the two adjacent nodes. β1, β2, β3 are weight coefficients, and the formula is as follows:
[0102] β1 reflects the influence of bandwidth on connection strength, and the greater the bandwidth, the greater the influence,
[0103] β2 reflects the influence of the delay between nodes on connection strength, and an exponential decay function is used to consider the volatility of the delay, With the increase of the delay, the value of the exponential term decreases rapidly.
[0104] β3 uses a square function to strengthen the influence on reliability, and combines the historical failure rate, Where N is the number of connections, and F is the number of failures.
[0105] (2) Divide the gPTP domain:
[0106] Referring to Figure 3 After constructing the weighted graph, a graph partitioning algorithm is applied to divide the network into gPTP domains;
[0107] First, determine the number of gPTP domains, based on network topology, node quantity and synchronization demand, determine the number of gPTP domains k to be divided, which is determined by the following way: c is a reflection of the complexity of the network.
[0108] Then apply the graph partitioning algorithm to divide 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 Laplacian matrix L, which can represent the structure characteristics of the network graph, L=D-W,
[0111] Calculate the normalized Laplacian matrix Lnorm=D -1 / 2 LD -1 / 2
[0112] Perform eigenvalue decomposition to calculate the first k smallest eigenvalues of the normalized Laplacian matrix Lnorm and the corresponding eigenvectors to form a matrix U. Then normalize the eigenvectors, normalize each row of the matrix U to obtain the matrix T:
[0113]
[0114] Then, each row of the matrix T is taken as a k-dimensional vector, and a clustering method is used to cluster the k-dimensional vectors, and k initial cluster centers are selected, and initial cluster centers C1, C2,..., Ck are set, and each Cj is a k-dimensional vector in the matrix T.
[0115] The distance of each node is then calculated and assigned to a cluster, and for each node i, the distance from the node i to each cluster center Cj is calculated, and the formula is as follows.
[0116]
[0117] The new cluster center of each cluster is then calculated, and the new cluster center is the average 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, and finally, each node i is assigned to a cluster Sj, that is, each node belongs to a gPTP domain, and k clusters are obtained, and each cluster corresponds to a gPTP domain.
[0118] As an optional implementation, after the gPTP domains are divided, the best master clock is selected in each gPTP domain by using BMCA.
[0119] S102: Dynamic domain selection.
[0120] (1) Identify multi-domain nodes:
[0121] Referring to Figure 5 , after the gPTP domains are divided, if a node spans multiple domains, the node is marked as a multi-domain node, and each domain of the multi-domain node synchronizes with the current domain.
[0122] (2) Dynamic domain selection:
[0123] Each multi-domain node periodically collects the state of the master clock of the current domain, including the precision (pre), jitter (jitter), and load (load) indicators, and calculates the trust degree TS of the master clock of the current domain:
[0124] TS = a * pre + β * (1 - jitter) + γ * (1 - load)
[0125] In the formula, pre is the precision indicator, a is the precision weight, k1 is a constant for scaling, and prem is the minimum precision.
[0126] jitter is the jitter indicator, β is the jitter weight, k2 is a constant for scaling, and Ti-ti represents the error of the clock at time i, which is reflected by taking the average value in the T time range.
[0127] load is the load indicator; is the load weight, k3 is a constant for scaling, Ln is the current node load.
[0128] k1, k2, k3 can be designed according to specific scenarios.
[0129] According to the calculated trust degree, the multi-domain node selects the clock source of the domain with the highest trust degree for synchronization. The clock state of the current domain is re-evaluated regularly, and when it is detected that the clock performance of a domain is declining or the load is too high, the multi-domain node will dynamically switch to a clock source with a higher trust degree. For example, when it is detected that the trust degree TS of the master clock of the current domain is less than 0.75, it is determined to be abnormal, and the trust degree of each domain is recalculated to obtain a clock domain with a high trust degree and a low load, and the node is synchronized with the clock source of the domain with the highest trust degree.
[0130] In summary, the method for multi-domain division and switching of a time-sensitive network realizes the stability of time synchronization in a time-sensitive network through the comprehensive application of multi-gPTP domain division and a clock dynamic domain selection algorithm, effectively deals with the problem of system instability caused by the gradual increase in the time synchronization task of the master clock node when the network scale expands, and thus ensures the stable operation of the time-sensitive network.
[0131] Embodiment 2
[0132] The embodiment of the application also provides an electronic device, which comprises a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set. Figure 1 The method for multi-domain division and switching of a time-sensitive network.
[0133] It can be understood that the memory can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory can include a program storage area and a data storage area, wherein the program storage area can store instructions for implementing an operating system, instructions for at least one function, instructions for implementing each of the above methods, etc.; and the data storage area can store data created according to the use of the server, etc.
[0134] The processor can include one or more processing cores. The processor connects various parts within the entire server by various interfaces and lines, 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. Alternatively, the processor can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor can be integrated with one or several combinations of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes operating systems and application programs; the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor, but be realized by a single chip.
[0135] Since the electronic device is an electronic device corresponding to the method for time-sensitive network multi-domain division and switching according to the embodiments of the application, and the principle of solving the problem of the electronic device is similar to that of the method, the implementation of the electronic device can be referred to the implementation process of the above-mentioned method embodiments, and the repeated parts will not be described again.
[0136] Embodiment 3
[0137] The embodiments of the application also provide a computer readable storage medium, wherein at least one instruction, at least one program, a code set or an instruction set are stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by a processor to realize a method for time-sensitive network multi-domain division and switching as shown in Figure 1
[0138] Those skilled in the art can understand that all or part of the steps of various methods in the above embodiments can be instructed by programs to relevant hardware, and the programs can be stored in a computer readable storage medium, including Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-only Memory (PROM), Erasable Programmable Read Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage, magnetic tape storage, or any other medium that can be used to carry or store data which can be read by a computer.
[0139] Since the storage medium is a storage medium corresponding to the method for time-sensitive network multi-domain division and switching of the embodiments of the present application, and the principle of solving the problem is similar to the method, the implementation of the storage medium can refer to the implementation process of the above method embodiments, and the repeated parts will not be described again.
[0140] Embodiment 4
[0141] In some possible implementation manners, various aspects of the method of the embodiments of the present application can also be implemented in the form of a program product, which includes program codes for causing a computer device to execute the steps of the method for time-sensitive network multi-domain division and switching according to various exemplary embodiments of the present application described above in the specification when the program product is run on the computer device. Wherein, the executable computer program codes or "codes" for executing various embodiments can be written in high-level programming languages such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (for example, Transact-SQL), Perl, or in various other programming languages.
[0142] It should be understood that various aspects of the application can be implemented in hardware, software, firmware or a combination of them. In the above embodiments, various steps or methods can be implemented in software or firmware which is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and in another embodiment, any of the following technologies, known in the art, or their combination, can be used: discrete logic circuitry having logic gates for implementing logic functions upon an application of data signals, application-specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field-programmable gate arrays (FPGA), and so forth.
[0143] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples, without contradiction.
[0144] The above embodiments are only for the purpose of illustrating the technical concept and characteristics of the present application, and the purpose is to enable those skilled in the art to understand the content of the present application and to implement it, and cannot limit the protection scope of the present application. Any equivalent changes or modifications made according to the essence of the present application should be covered within the protection scope of the present application.
Claims
1. A method for time sensitive network multi-domain partitioning and switching, characterized in that, The method comprises the following steps: calculating the node comprehensive performance score of the nodes in the TSN network and the edge weight of the connection strength between the nodes, and constructing a weighted network graph; determining the number of gPTP domains, and dividing the constructed weighted network graph into multiple gPTP domains; identifying a multi-domain node; The multi-domain node is located in multiple domains and participates in multiple gPTP domains; The multi-domain node monitors the master clock state of each domain and performs trust score calculation, and performs dynamic domain selection according to the trust score of the clock source, and preferentially selects a clock domain with high trust score and low load; The clock state of the current domain is re-evaluated regularly, and when it is detected that the clock performance of a domain decreases or the load is too high, the clock domain with higher trust score is switched to; The determination of the number of gPTP domains and the division of the constructed weighted network graph into multiple gPTP domains comprises: determining the number of gptp domains , an edge weight for a connection strength between a node and a node , reflecting a complexity of the network; According to the number The gPTP domains are divided by using a graph partition algorithm on the weighted network graph to obtain a plurality of gPTP synchronization domains.
2. The method for time-sensitive network multi-domain partitioning and switching according to claim 1, characterized in that, The node comprehensive performance score The calculation formula is: wherein is the current load of node n, is the computing power of node n, is the bandwidth of node n; , , are the maximum load, the maximum computing power and the maximum bandwidth of the nodes in the network, respectively; , , are weight coefficients.
3. The method for time-sensitive network multi-domain partitioning and switching according to claim 1, characterized in that, The edge weight of the inter-node connection strength The calculation formula is: In the formula, , , are the bandwidth, latency and reliability of the link between node and node ; and are the performance scores of the two adjacent nodes; is the weight coefficient.
4. The method for time-sensitive network multi-domain partitioning and switching according to claim 1, characterized in that, The division of the weighted network graph into gPTP domains by using a graph partitioning algorithm comprises: Computing the degree matrix where the degree matrix is a diagonal matrix; According to the degree matrix computing a Laplacian matrix L representing a structure property of the network graph; calculating a normalized Laplacian matrix Lnorm; performing eigenvalue decomposition to calculate the first k minimum eigenvalues of the normalized Laplacian matrix Lnorm and the corresponding eigenvectors to form a matrix U, and then performing eigenvector normalization to normalize each row of the matrix U to obtain a matrix T; Each row of the matrix T is used as a k-dimensional vector, and a clustering method is used for clustering processing, k initial cluster centers are selected, and initial cluster centers C1, C2,..., Ck are set, each Cj being a k-dimensional vector in the matrix T; Compute the distance of each node and assign cluster, for each node , compute its distance to each cluster center Cj; The new cluster center of each cluster is calculated, which is the average of all nodes in the current cluster. Finally, each node is assigned to a cluster Sj, and each cluster corresponds to a gPTP domain. The new cluster center of each cluster is calculated, which is the average of all nodes in the current cluster. Finally, each node is assigned to a cluster Sj, and each cluster corresponds to a gPTP domain.
5. The method for time-sensitive network multi-domain partitioning and switching according to claim 1, characterized in that, The identification of the multi-domain node comprises: The multi-domain node is identified and the state information between the domains is recorded, when the multi-domain node detects that the load of a domain is too high or the clock accuracy decreases, dynamic domain selection is performed according to the trust detection algorithm, the node is synchronized to other domains with lighter load, and the stability of the synchronization domain is ensured.
6. The method for time-sensitive network multi-domain partitioning and switching according to claim 5, characterized in that, Each domain uses BMCA to select the best master clock, and each domain of the multi-domain node is synchronized with the current domain, but uses the time of the master clock in the best domain.
7. The method for time-sensitive network multi-domain partitioning and switching according to claim 1, characterized in that, The calculation formula of the trust score is: In the formula, is a precision index, is a precision weight, k1 is a constant for scaling, prem is a minimum precision; is a jitter index, is a jitter weight, k2 is a constant for scaling, represents the error of the clock at time i, and the average value in the T time range is taken to reflect the jitter of the period; is a load index; is a load weight, k3 is a constant for scaling, is the current node load.
8. An electronic device, comprising: The electronic device comprises a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to implement the method of any one of claims 1 to 7.
9. 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, which are loaded and executed by the processor to implement the method of any one of claims 1 to 7.
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