A wireless network time synchronization method and system based on a distributed rigid graph

CN122803024APending Publication Date: 2026-09-22GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610990662.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0005]本发明为克服上述现有技术在无线网络时间同步下,节点间的通信负载不均衡、节点度分布不均、时钟同步精度低、刚性图的谱特性和鲁棒性低的缺陷,提供一种基于分布式刚性图的无线网络时间同步方法与系统,利用均衡优化技术,构建强谱特性和强鲁棒性的分布式刚性图,实现高精度的无线网络时间同步

Benefits of technology

通过在所有网络节点中选择若干个聚类中心,继而划分出若干个簇来构建分布式刚性图,解决了单中心刚性图中单点故障失效的问题,从而提高无线网络的鲁棒性;在划分簇时引入均衡化的聚类分簇策略,可以平衡各簇的簇内网络节点数,实现网络均衡负载;构建分布式刚性图时通过拓扑优化,提高刚性图的谱特性和鲁棒性,实现高精度的无线网络时间同步。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122803024A_ABST
    Figure CN122803024A_ABST
Patent Text Reader

Abstract

The application discloses a wireless network time synchronization method and system based on a distributed rigid graph, relates to the field of wireless communication time synchronization, and comprises the following steps: deploying a plurality of network nodes; preprocessing the network nodes to obtain a plurality of initial clustering centers; obtaining a plurality of balanced clusters based on the plurality of initial clustering centers; constructing an initial adjacency matrix and initializing the node degrees of all the network nodes; constructing a node distributed rigid graph based on the initial adjacency matrix and the node degrees of all the network nodes; obtaining clock parameters of each network node based on the node distributed rigid graph; and realizing wireless network time synchronization under the distributed rigid graph topology. The wireless network time synchronization method and system based on the distributed rigid graph can improve the spectral characteristics and robustness of the rigid graph and realize high-precision wireless network time synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication time synchronization, and in particular to a wireless network time synchronization method and system based on a distributed rigid graph. Background Technology

[0002] In wireless sensor networks, distributed sensing systems, and IoT applications, high-precision time synchronization among network nodes is fundamental to achieving key functions such as collaborative data acquisition, event sequencing, beamforming, and precise positioning. Since initial deviations and frequency differences inevitably exist between the clocks of each node, local time gradually loses synchronization with the reference time. Therefore, estimating and compensating for these clock parameters through information exchange between nodes is the core issue in maintaining network-wide time consistency.

[0003] Existing technologies disclose traditional network time protocols. Traditional network time protocols adopt a hierarchical master-slave synchronization architecture. Although the structure is clear, the synchronization accuracy accumulates errors at each level as the network topology extends, resulting in a significant decrease in the time accuracy of edge nodes. In addition, it is highly dependent on the reliability and accessibility of a few root nodes, and has an inherent risk of single point of failure. Once the master clock fails or the master-slave link is interrupted, the synchronization of downstream nodes will deteriorate rapidly, which may lead to the loss of the time base of the entire network. It is difficult to meet the requirements of high reliability and high robustness of distributed sensor networks.

[0004] Although rigid graph theory establishes an intrinsic link between clock rigidity and orientation rigidity, in practical applications, the uneven communication load between nodes leads to uneven distribution of node degrees in topology construction, with high-degree nodes coexisting with low-degree nodes. At the same time, it does not improve the algebraic properties of the rigid matrix through topology optimization, which restricts the accuracy of clock synchronization and the convergence speed of the network, thus reducing the spectral properties and robustness of rigid graphs. Summary of the Invention

[0005] To overcome the shortcomings of existing technologies in wireless network time synchronization, such as uneven communication load between nodes, uneven node degree distribution, low clock synchronization accuracy, and low spectral characteristics and robustness of rigid graphs, this invention provides a wireless network time synchronization method and system based on distributed rigid graphs. By utilizing equalization optimization techniques, a distributed rigid graph with strong spectral characteristics and strong robustness is constructed to achieve high-precision wireless network time synchronization.

[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: This invention provides a time synchronization method for wireless networks based on distributed rigid graphs, comprising: S1: Deploy several network nodes within the target monitoring area, set an independent local crystal clock for each network node, and record the node coordinates of all network nodes; S2: Preprocess the node coordinates of all network nodes to obtain several initial cluster centers; S3: Based on the aforementioned initial cluster centers, perform balanced clustering of all network nodes to obtain several balanced clusters; S4: Based on the aforementioned balanced clusters, construct an initial adjacency matrix and initialize the node degree of all network nodes; S5: Based on the initial adjacency matrix and the node degree of all network nodes, construct a node-distributed rigid graph; S6: Based on the node distributed rigid graph, obtain the clock skew parameter and clock offset parameter of each network node; S7: Based on the clock skew parameters and clock offset parameters of each network node, update the local crystal oscillator clock of each network node to achieve time synchronization of the wireless network under the distributed rigid graph topology.

[0007] Preferably, in step S2, the node coordinates of all network nodes are preprocessed to obtain several initial cluster centers, including: The node coordinates of each network node are standardized to obtain the standard node coordinates of each network node. Based on the standard node coordinates of each network node, calculate the ranking value of each network node in each coordinate dimension; The sorting values ​​of each coordinate dimension of each network node are summed to obtain the comprehensive sorting value of the network nodes. The network nodes are sorted in ascending order according to their comprehensive ranking values ​​to obtain a node ranking sequence. ,in, This represents the network node with the lowest overall ranking value. This indicates the network node with the second lowest overall ranking value. This represents the network node with the highest sort value. Indicates the total number of network nodes; Based on the dimension of the standard node coordinates, the number of initial cluster centers is determined as follows: One, of which The dimension number representing the standard node coordinates; Select a starting network node from the node sorting sequence, and then select consecutively from the starting network node to obtain... Initial cluster centers: ; in, Represents the set of initial cluster centers. This represents the initial cluster center corresponding to the starting network node. This represents the initial cluster center of the node following the starting network node. This represents the last initial cluster center. This indicates the sequence number of the starting network node in the node sorting sequence.

[0008] Preferably, step S22, which involves calculating the ranking value of each network node in each coordinate dimension based on the standard node coordinates of each network node, includes the following steps: S221: Set the current fixed dimension based on the dimension number of the standard node coordinates; S222: Based on the element values ​​in the current fixed dimension, rank all network nodes in ascending order and use the ranking value as the sorting value of each network node in the current fixed dimension. S223: Traverse all dimensions of the standard node coordinates and repeat S221 to S222 to obtain the sorting values ​​of all network nodes in all dimensions; S224: Sum the ranking values ​​of each network node across all dimensions to obtain the comprehensive ranking value of each network node.

[0009] Preferably, in step S3, based on the aforementioned initial cluster centers, all network nodes are subjected to balanced clustering to obtain several balanced clusters, including: S31: Calculate the relative distance between each network node and set the initial cluster center as the current cluster center point; S32: Based on the relative distances between the network nodes, and with the objective of minimizing the sum of the relative distances from all network nodes within each cluster to the current cluster center, the K-medoids clustering method is used to partition all network nodes to obtain the current initial cluster allocation matrix. The current initial cluster allocation matrix includes... An initial cluster; S33: Based on the current initial cluster allocation matrix, perform cluster balancing reallocation on all network nodes to obtain the current balanced cluster allocation matrix; S34: Based on the current balanced cluster allocation matrix, with the goal of minimizing the sum of the relative distances from all network nodes in each current balanced cluster to the cluster center point of the current balanced cluster, reselect the cluster center point of each current balanced cluster to obtain the updated cluster center point of the current balanced cluster, and update the current balanced cluster allocation matrix. S35: Calculate the sum of the relative distances from all network nodes in each current balanced cluster to the updated cluster center of the current balanced cluster, and denot it as the sum of the relative distances of the current balanced cluster allocation result; S36: Compare the sum of relative distances of the current balanced cluster allocation results with the preset relative distance comprehensive threshold. If the sum of relative distances of the current balanced cluster allocation results is less than the preset relative distance comprehensive threshold, obtain several balanced clusters based on the current balanced cluster allocation matrix; otherwise, proceed to step S37: S37: Determine whether the current cluster allocation iteration count is less than the preset cluster allocation iteration count threshold. If it is less, update the current cluster center point based on the updated cluster center point of the current balanced cluster and return to S32; otherwise, select the smallest relative distance sum of the current balanced cluster allocation results among all current balanced cluster allocation results, and obtain several balanced clusters based on the corresponding current balanced cluster allocation matrix.

[0010] Preferably, in step S33, a cluster balancing redistribution strategy is performed based on the current initial cluster allocation matrix to re-divide all network nodes. A balanced cluster includes the following steps: S331: Calculate the number of network nodes within the target cluster based on the total number of network nodes and the total number of the balanced cluster. : ; S332: Based on the number of network nodes within the target cluster Based on the current initial cluster allocation matrix, determine the cluster size of each current initial cluster to identify whether there are underloaded or overloaded initial clusters. An overloaded initial cluster is an initial cluster with more network nodes than the target cluster, and an underloaded initial cluster is an initial cluster with fewer network nodes than the target cluster. If both underloaded and overloaded initial clusters exist, proceed to step S333. If no underloaded initial clusters exist and only overloaded initial clusters exist, proceed to step S334. If neither underloaded nor overloaded initial clusters exist, proceed to step S336. S333: Select any overloaded initial cluster, determine the network node farthest from the cluster center point of the overloaded initial cluster as the intra-cluster edge network node, calculate the relative distance from the intra-cluster edge network node to the cluster center point of each underloaded initial cluster, select the underloaded initial cluster with the closest relative distance, reallocate the intra-cluster edge network node to the underloaded initial cluster, update the current initial cluster allocation matrix, and return to step S332; S334: Calculate the difference between the number of network nodes in each overloaded initial cluster and the number of network nodes in the target cluster, and determine whether there is an overloaded initial cluster with a difference greater than 1; if so, proceed to step S335; otherwise, proceed to step S336. S335: Select any overloaded initial cluster with the most nodes. Within the overloaded initial cluster, determine the network node farthest from the cluster center as the intra-cluster edge network node. Calculate the relative distance from the intra-cluster edge network node to the cluster center of each normal initial cluster. Select the normal initial cluster with the closest relative distance. Reassign the intra-cluster edge network node to the normal initial cluster. Update the current initial cluster allocation matrix and return to step S332. The normal initial cluster is an initial cluster whose intra-cluster network node count is equal to the target intra-cluster network node count. S336: Output the current balanced cluster allocation matrix as the current balanced cluster allocation matrix.

[0011] Preferably, step S4 involves constructing an initial adjacency matrix based on the aforementioned balanced clusters and initializing the node degree of all network nodes, including: For every two balanced clusters, select one key node between the two clusters to establish a key node pair, and establish a key edge between the key node pairs. Based on all key edges, form a key edge set. The relative distance between the key node pairs is the longest relative distance among all network nodes in the two balanced clusters; Based on all network nodes and the set of key edges Construct the initial adjacency matrix : ; in, Represents the initial adjacency matrix It is a symmetric matrix. and Both represent network nodes. Represents network nodes and network nodes Edge relations; Based on the initial adjacency matrix Calculate the degree of each network node, where the network node... The node degree is represented as : .

[0012] Preferably, in step S5, based on the initial adjacency matrix and the node degree of all network nodes, a node-distributed rigid graph is constructed, including: S51: Use the degree of each network node as the current degree of each network node, and select the network node with the smallest current degree. S52: Establish cross-cluster candidate edges between the balanced cluster that has not established an edge connection with the network node with the smallest current node degree and the network node with the smallest current node degree, and form a cross-cluster candidate edge set from all cross-cluster candidate edges; S53: Based on the initial adjacency matrix and the cross-cluster candidate edge set, retain the cross-cluster candidate edge with the longest relative distance to obtain the updated adjacency matrix and the updated node degree of all network nodes; S54: Determine whether the number of edges in the updated initial adjacency matrix is ​​less than the minimum number of edges in the preset minimum rigid graph; if it is less, update the current node degree of the network node based on the updated node degree of all network nodes, update the initial adjacency matrix based on the updated adjacency matrix, and return to step S51; otherwise, obtain the node distributed rigid graph based on the current updated adjacency matrix.

[0013] Preferably, step S6, based on the node distributed rigid graph, obtains the clock skew parameter and clock offset parameter of each network node, including the following steps: Bidirectional timestamp exchange is performed on all network nodes according to the node distributed rigid graph to obtain the corresponding clock parameter measurement data at all network nodes. Based on the corresponding clock parameter measurement data at all network nodes, the least squares estimation method GLS is used to jointly estimate the local clock parameters to obtain the clock skew parameters and clock offset parameters of each network node.

[0014] Preferably, in S7, based on the clock skew parameter and clock offset parameter of each network node, the local crystal clock of each network node is updated, and a time-synchronized node network is output, including: For network nodes The corresponding local crystal oscillator clock is corrected to obtain the network node. Virtual clock : ; in, This represents the clock skew parameter. Indicates the clock offset parameter. Represents network nodes Local crystal clock; Traverse all network nodes, perform local crystal clock correction, and obtain the virtual clock of all network nodes; Based on the virtual clocks of all network nodes and the distributed rigid graph of the nodes, time synchronization of the wireless network under the distributed rigid graph topology is achieved.

[0015] This invention also provides a wireless network time synchronization system based on a distributed rigid graph, used to implement the above-mentioned wireless network time synchronization method, comprising: Node initialization module: Deploy several network nodes within the target monitoring area, set an independent local crystal clock for each network node, and record the node coordinates of all network nodes; Clustering center module: The node coordinates of all network nodes are preprocessed to obtain several initial clustering centers; Equalization clustering module: Based on the aforementioned initial cluster centers, equalization clustering is performed on all network nodes to obtain several equal clusters; Node degree construction module: Based on the aforementioned balanced clusters, construct an initial adjacency matrix and initialize the node degree of all network nodes; Distributed rigid graph module: Based on the initial adjacency matrix and the node degree of all network nodes, construct a distributed rigid graph of nodes; Clock parameter interaction module: Based on the node distributed rigid graph, obtain the clock skew parameter and clock offset parameter of each network node; Time synchronization module: Based on the clock skew parameters and clock offset parameters of each network node, update the local crystal oscillator clock of each network node to achieve time synchronization of the wireless network under the distributed rigid graph topology.

[0016] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: By selecting several cluster centers from all network nodes and then dividing them into several clusters to construct a distributed rigid graph, the problem of single-point failure in a single-center rigid graph is solved, thereby improving the robustness of the wireless network. When dividing the clusters, a balanced clustering strategy is introduced to balance the number of network nodes within each cluster, achieving balanced network load. When constructing the distributed rigid graph, topology optimization is used to improve the spectral characteristics and robustness of the rigid graph, achieving high-precision wireless network time synchronization. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a wireless network time synchronization method based on a distributed rigid graph in Example 1. Figure 2 This is a schematic diagram of some steps in the wireless network time synchronization method in Example 2; Figure 3 This is a schematic diagram of a wireless network time synchronization system based on a distributed rigid graph in Example 3. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.

[0020] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0021] Example 1 This embodiment provides a wireless network time synchronization method based on a distributed rigid graph, such as... Figure 1 As shown, it includes: S1: Deploy several network nodes within the target monitoring area, set an independent local crystal clock for each network node, and record the node coordinates of all network nodes; S2: Preprocess the node coordinates of all network nodes to obtain several initial cluster centers; S3: Based on the aforementioned initial cluster centers, perform balanced clustering of all network nodes to obtain several balanced clusters; S4: Based on the aforementioned balanced clusters, construct an initial adjacency matrix and initialize the node degree of all network nodes; S5: Based on the initial adjacency matrix and the node degree of all network nodes, construct a node-distributed rigid graph; S6: Based on the node distributed rigid graph, obtain the clock skew parameter and clock offset parameter of each network node; S7: Based on the clock skew parameters and clock offset parameters of each network node, update the local crystal oscillator clock of each network node to achieve time synchronization of the wireless network under the distributed rigid graph topology.

[0022] In the specific implementation process, several network nodes are first deployed within the target monitoring area, and each network node is equipped with an independent local crystal oscillator clock. All network nodes are preprocessed to obtain several initial cluster centers. Based on these initial cluster centers, all network nodes are subjected to balanced clustering, and an initial adjacency matrix is ​​constructed, and the node degree of all network nodes is initialized. Based on the initial adjacency matrix and the node degree of all network nodes, a node distributed rigid graph is constructed. Based on the node distributed rigid graph, the clock skew parameters and clock offset parameters of each network node are obtained. Based on the clock skew parameters and clock offset parameters of each network node, the local crystal oscillator clock of each network node is updated, realizing wireless network time synchronization under the distributed rigid graph topology. This embodiment combines balanced clustering, adjacency matrix, and node degree to construct a distributed rigid graph with strong spectral characteristics and strong robustness, achieving high-precision wireless network time synchronization.

[0023] Example 2 This embodiment provides a wireless network time synchronization method based on a distributed rigid graph, including: S1: Deploy several network nodes within the target monitoring area, set an independent local crystal oscillator clock for each network node, and record the node coordinates of all network nodes, such as... Figure 2 As shown in Figure (a), each circle represents a network node; S2: Preprocess the node coordinates of all network nodes to obtain several initial cluster centers; Specifically, the node coordinates of each network node are standardized to obtain the standard node coordinates of each network node; Based on the standard node coordinates of each network node, calculate the ranking value of each network node in each coordinate dimension; The sorting values ​​of each coordinate dimension of each network node are summed to obtain the comprehensive sorting value of the network nodes. The network nodes are sorted in ascending order according to their comprehensive ranking values ​​to obtain a node ranking sequence. ,in, This represents the network node with the lowest overall ranking value. This indicates the network node with the second lowest overall ranking value. This represents the network node with the highest sort value. Indicates the total number of network nodes; Based on the dimension of the standard node coordinates, the number of initial cluster centers is determined as follows: One, of which The dimension number representing the standard node coordinates; Select a starting network node from the node sorting sequence, and then select consecutively from the starting network node to obtain... Initial cluster centers: ; in, Represents the set of initial cluster centers. This represents the initial cluster center corresponding to the starting network node. This represents the initial cluster center of the node following the starting network node. This represents the last initial cluster center. This indicates the sequence number of the starting network node in the node sorting sequence.

[0024] Specifically, the coordinates of each network node are standardized to obtain standard node coordinates for each network node, including: The node coordinates of each network node are transformed to their original coordinate values ​​in each coordinate dimension using the following standard coordinate transformations to obtain the standard coordinate values ​​in each coordinate dimension: ; in, These are the standard coordinate values ​​in any coordinate dimension. It is the original coordinate value in any coordinate dimension. It is the upper bound of the interval of standard coordinate values. It is the lower bound of the interval of standard coordinate values; Based on the standard coordinate values ​​of each network node in each coordinate dimension, the standard node coordinates of each network node are obtained.

[0025] Specifically, calculating the ranking value of each network node in each coordinate dimension based on the standard node coordinates of each network node includes: Based on the number of dimensions of the standard node coordinates, a current fixed dimension is set. Based on the element values ​​in the current fixed dimension, all network nodes are ranked in ascending order. The ranking value is used as the sort value of each network node in the current fixed dimension. By traversing all dimensions of the standard node coordinates, the sort values ​​of all network nodes in all dimensions are obtained. The calculation method for the ranking value of a certain network node in a certain dimension is as follows:

[0026] In the formula, Represents a network node exist Rank value in dimensions Represents any network node In dimensions The element value on, Represents network nodes In dimensions The element value on, Represents network nodes and network nodes In dimensions The result of comparing the element values ​​on; The ranking values ​​of each network node across all dimensions are summed to obtain the overall ranking value of each network node.

[0027] S3: Based on the aforementioned initial cluster centers, perform balanced clustering of all network nodes to obtain several balanced clusters, such as... Figure 2 As shown in Figure (b), the green circle represents the first equilibrium cluster, the red circle represents the second equilibrium cluster, and the yellow circle represents the third equilibrium cluster. Specifically, it includes the following steps: S31: Calculate the relative distance between each network node and set the initial cluster center as the current cluster center point; S32: Based on the relative distances between the network nodes, and with the objective of minimizing the sum of the relative distances from all network nodes within each cluster to the current cluster center, the K-medoids clustering method is used to partition all network nodes to obtain the current initial cluster allocation matrix. The current initial cluster allocation matrix includes... An initial cluster; S33: Based on the current initial cluster allocation matrix, perform cluster balancing reallocation on all network nodes to obtain the current balanced cluster allocation matrix; S34: Based on the current balanced cluster allocation matrix, with the goal of minimizing the sum of the relative distances from all network nodes in each current balanced cluster to the cluster center point of the current balanced cluster, reselect the cluster center point of each current balanced cluster to obtain the updated cluster center point of the current balanced cluster, and update the current balanced cluster allocation matrix. S35: Calculate the sum of the relative distances from all network nodes in each current balanced cluster to the updated cluster center of the current balanced cluster, and denot it as the sum of the relative distances of the current balanced cluster allocation result; S36: Compare the sum of relative distances of the current balanced cluster allocation results with the preset relative distance comprehensive threshold. If the sum of relative distances of the current balanced cluster allocation results is less than the preset relative distance comprehensive threshold, obtain several balanced clusters based on the current balanced cluster allocation matrix; otherwise, proceed to step S37: S37: Determine whether the current cluster allocation iteration count is less than the preset cluster allocation iteration count threshold. If it is less, update the current cluster center point based on the updated cluster center point of the current balanced cluster and return to S32; otherwise, select the smallest relative distance sum of the current balanced cluster allocation results among all current balanced cluster allocation results, and obtain several balanced clusters based on the corresponding current balanced cluster allocation matrix.

[0028] In practice, by minimizing the sum of the relative distances from all network nodes in each balanced cluster to the cluster center point, the cluster center point can be reselected, which can shorten the convergence time of time synchronization and optimize the network topology.

[0029] Specifically, step S33 describes a cluster balancing redistribution strategy based on the current initial cluster allocation matrix, which re-divides all network nodes. A balanced cluster includes the following steps: S331: Calculate the number of network nodes within the target cluster based on the total number of network nodes and the total number of the balanced cluster. : ; S332: Based on the number of network nodes within the target cluster Based on the current initial cluster allocation matrix, determine the cluster size of each current initial cluster to identify whether there are underloaded or overloaded initial clusters. An overloaded initial cluster is an initial cluster with more network nodes than the target cluster, and an underloaded initial cluster is an initial cluster with fewer network nodes than the target cluster. If both underloaded and overloaded initial clusters exist, proceed to step S333. If no underloaded initial clusters exist and only overloaded initial clusters exist, proceed to step S334. If neither underloaded nor overloaded initial clusters exist, proceed to step S336. S333: Select any overloaded initial cluster, determine the network node farthest from the cluster center point of the overloaded initial cluster as the intra-cluster edge network node, calculate the relative distance from the intra-cluster edge network node to the cluster center point of each underloaded initial cluster, select the underloaded initial cluster with the closest relative distance, reallocate the intra-cluster edge network node to the underloaded initial cluster, update the current initial cluster allocation matrix, and return to step S332; S334: Calculate the difference between the number of network nodes in each overloaded initial cluster and the number of network nodes in the target cluster, and determine whether there is an overloaded initial cluster with a difference greater than 1; if so, proceed to step S335; otherwise, proceed to step S336. S335: Select any overloaded initial cluster with the most nodes. Within the overloaded initial cluster, determine the network node farthest from the cluster center as the intra-cluster edge network node. Calculate the relative distance from the intra-cluster edge network node to the cluster center of each normal initial cluster. Select the normal initial cluster with the closest relative distance. Reassign the intra-cluster edge network node to the normal initial cluster. Update the current initial cluster allocation matrix and return to step S332. The normal initial cluster is an initial cluster whose intra-cluster network node count is equal to the target intra-cluster network node count. S336: Output the current balanced cluster allocation matrix as the current balanced cluster allocation matrix.

[0030] In practice, balanced clustering can reduce the number of overloaded and underloaded clusters, thereby balancing the distribution of network nodes and achieving load balancing in the network.

[0031] Meanwhile, the combination of balanced clustering and cluster center reselection can prevent nodes from being too large or too small, providing a balanced cluster allocation result for subsequent edge connections and rigid graph construction.

[0032] S4: Based on the aforementioned balanced clusters, construct an initial adjacency matrix and initialize the node degree of all network nodes; Specifically, for every two balanced clusters, a key node is selected between the two clusters to establish a key node pair, and a key edge is established between the key node pairs. A key edge set is then formed based on all the key edges. The relative distance between the key node pairs is the longest relative distance among all network nodes in the two balanced clusters, such as... Figure 2 As shown in Figure (c), the blue edges are the key edges; Based on all network nodes and the set of key edges Construct the initial adjacency matrix : ; ; in, and Both represent network nodes. Indicates the first Clusters, Indicates the first Clusters, Represents network nodes and network nodes The relative distance, Represents the initial adjacency matrix It is a symmetric matrix. Represents network nodes and network nodes Edge relations; Based on the initial adjacency matrix Calculate the degree of each network node, where the network node... The node degree is represented as : .

[0033] S5: Based on the initial adjacency matrix and the node degree of all network nodes, construct a node-distributed rigid graph, such as... Figure 2 As shown in Figure (d); Specifically, it includes the following steps: S51: Use the degree of each network node as the current degree of each network node, and select the network node with the smallest current degree. S52: Establish cross-cluster candidate edges between the balanced cluster that has no edge connection with the network node with the current minimum node degree and the network node with the current minimum node degree, and form a cross-cluster candidate edge set from all cross-cluster candidate edges. : ; ; in, This represents the network node with the smallest degree at present. Represents the balanced cluster allocation matrix. Represents network nodes and network nodes They are not in the same balanced cluster.

[0034] S53: Based on the initial adjacency matrix and the cross-cluster candidate edge set, retain the cross-cluster candidate edge with the longest relative distance to obtain the updated adjacency matrix and the updated node degree of all network nodes: ; ; in, Indicates connection to network nodes The network node at the other end of the cross-cluster candidate edge with the longest relative distance. Represents network nodes The node degree is incremented by 1. Represents network nodes The node degree is incremented by 1; S54: Determine whether the number of edges in the updated initial adjacency matrix is ​​less than the minimum number of edges in the preset minimum rigid graph; if it is less, update the current node degree of the network node based on the updated node degree of all network nodes, update the initial adjacency matrix based on the updated adjacency matrix, and return to step S51; otherwise, obtain the node distributed rigid graph based on the current updated adjacency matrix.

[0035] In practical implementation, strategies such as node degree updating and long-side preference retention can improve the spectral characteristics and robustness of distributed rigid graphs, reduce the topology stability risk caused by single-point failures, and improve the accuracy of wireless network time synchronization.

[0036] S6: Based on the node distributed rigid graph, obtain the clock skew parameter and clock offset parameter of each network node; Specifically, bidirectional timestamp exchange is performed on all network nodes according to the node distributed rigid graph to obtain the corresponding clock parameter measurement data at all network nodes; Based on the corresponding clock parameter measurement data at all network nodes, the least squares estimation method GLS is used to jointly estimate the local clock parameters to obtain the clock skew parameters and clock offset parameters of each network node.

[0037] S7: Based on the clock skew parameters and clock offset parameters of each network node, update the local crystal clock of each network node and output a time-synchronized node network. Specifically, for network nodes The corresponding local crystal oscillator clock is corrected to obtain the network node. Virtual clock : ; in, This represents the clock skew parameter. Indicates the clock offset parameter. Represents network nodes Local crystal clock; Traverse all network nodes, perform local crystal clock correction, and obtain the virtual clock of all network nodes; Based on the virtual clocks of all network nodes and the distributed rigid graph of the nodes, time synchronization of the wireless network under the distributed rigid graph topology is achieved.

[0038] Example 3 This embodiment also provides a wireless network time synchronization system based on a distributed rigid graph, used to implement the wireless network time synchronization method described in Embodiment 1 or 2, such as... Figure 3 As shown, it includes: Node initialization module: Deploy several network nodes within the target monitoring area, set an independent local crystal clock for each network node, and record the node coordinates of all network nodes; Clustering center module: The node coordinates of all network nodes are preprocessed to obtain several initial clustering centers; Equalization clustering module: Based on the aforementioned initial cluster centers, equalization clustering is performed on all network nodes to obtain several equal clusters; Node degree construction module: Based on the aforementioned balanced clusters, construct an initial adjacency matrix and initialize the node degree of all network nodes; Distributed rigid graph module: Based on the initial adjacency matrix and the node degree of all network nodes, construct a distributed rigid graph of nodes; Clock parameter interaction module: Based on the node distributed rigid graph, obtain the clock skew parameter and clock offset parameter of each network node; Time synchronization module: Based on the clock skew parameters and clock offset parameters of each network node, update the local crystal oscillator clock of each network node to achieve time synchronization of the wireless network under the distributed rigid graph topology.

[0039] The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.

[0040] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A time synchronization method for wireless networks based on distributed rigid graphs, characterized in that, Includes the following steps: S1: Deploy several network nodes within the target monitoring area, set an independent local crystal clock for each network node, and record the node coordinates of all network nodes; S2: Preprocess the node coordinates of all network nodes to obtain several initial cluster centers; S3: Based on the aforementioned initial cluster centers, perform balanced clustering of all network nodes to obtain several balanced clusters; S4: Based on the aforementioned balanced clusters, construct an initial adjacency matrix and initialize the node degree of all network nodes; S5: Based on the initial adjacency matrix and the node degree of all network nodes, construct a node-distributed rigid graph; S6: Based on the node distributed rigid graph, obtain the clock skew parameter and clock offset parameter of each network node; S7: Based on the clock skew parameters and clock offset parameters of each network node, update the local crystal oscillator clock of each network node to achieve time synchronization of the wireless network under the distributed rigid graph topology.

2. The wireless network time synchronization method according to claim 1, characterized in that, In step S2, the node coordinates of all network nodes are preprocessed to obtain several initial cluster centers, including: S21: Standardize the node coordinates of each network node to obtain the standard node coordinates of each network node; S22: Based on the standard node coordinates of each network node, calculate the ranking value of each network node in each coordinate dimension; S23: Sum the sorting values ​​of each coordinate dimension of each network node to obtain the comprehensive sorting value of the network nodes; S24: Sort the network nodes according to their comprehensive ranking values ​​from smallest to largest to obtain a node ranking sequence. ,in, This represents the network node with the lowest overall ranking value. This indicates the network node with the second lowest overall ranking value. This represents the network node with the highest sort value. Indicates the total number of network nodes; S25: Determine the initial number of cluster centers based on the dimension of the standard node coordinates. One, of which The dimension number representing the standard node coordinates; S26: Select a starting network node from the node sorting sequence, and continuously select from the starting network node to obtain... Initial cluster centers: ; in, Represents the set of initial cluster centers. This represents the initial cluster center corresponding to the starting network node. This represents the initial cluster center of the node following the starting network node. This represents the last initial cluster center. This indicates the sequence number of the starting network node in the node sorting sequence.

3. The wireless network time synchronization method according to claim 2, characterized in that, Step S22, which involves calculating the ranking value of each network node in each coordinate dimension based on the standard node coordinates of each network node, includes the following steps: S221: Set the current fixed dimension based on the dimension number of the standard node coordinates; S222: Based on the element values ​​in the current fixed dimension, rank all network nodes in ascending order and use the ranking value as the sorting value of each network node in the current fixed dimension. S223: Traverse all dimensions of the standard node coordinates and repeat S221 to S222 to obtain the sorting values ​​of all network nodes in all dimensions; S224: Sum the ranking values ​​of each network node across all dimensions to obtain the comprehensive ranking value of each network node.

4. The wireless network time synchronization method according to claim 2, characterized in that, In step S3, based on the aforementioned initial cluster centers, all network nodes are subjected to balanced clustering to obtain several balanced clusters, including: S31: Calculate the relative distance between each network node and set the initial cluster center as the current cluster center point; S32: Based on the relative distances between the network nodes, and with the objective of minimizing the sum of the relative distances from all network nodes within each cluster to the current cluster center, the K-medoids clustering method is used to partition all network nodes to obtain the current initial cluster allocation matrix. The current initial cluster allocation matrix includes... An initial cluster; S33: Based on the current initial cluster allocation matrix, perform cluster balancing reallocation on all network nodes to obtain the current balanced cluster allocation matrix; S34: Based on the current balanced cluster allocation matrix, with the goal of minimizing the sum of the relative distances from all network nodes in each current balanced cluster to the cluster center point of the current balanced cluster, reselect the cluster center point of each current balanced cluster to obtain the updated cluster center point of the current balanced cluster, and update the current balanced cluster allocation matrix. S35: Calculate the sum of the relative distances from all network nodes in each current balanced cluster to the updated cluster center of the current balanced cluster, and denot it as the sum of the relative distances of the current balanced cluster allocation result; S36: Compare the sum of relative distances of the current balanced cluster allocation results with the preset relative distance comprehensive threshold. If the sum of relative distances of the current balanced cluster allocation results is less than the preset relative distance comprehensive threshold, obtain several balanced clusters based on the current balanced cluster allocation matrix; otherwise, proceed to step S37: S37: Determine whether the current cluster allocation iteration count is less than the preset cluster allocation iteration count threshold. If it is less, update the current cluster center point based on the updated cluster center point of the current balanced cluster and return to S32; otherwise, select the smallest relative distance sum of the current balanced cluster allocation results among all current balanced cluster allocation results, and obtain several balanced clusters based on the corresponding current balanced cluster allocation matrix.

5. The wireless network time synchronization method according to claim 4, characterized in that, Step S33 describes a cluster balancing redistribution strategy based on the current initial cluster allocation matrix, which re-divides all network nodes. A balanced cluster includes the following steps: S331: Calculate the number of network nodes within the target cluster based on the total number of network nodes and the total number of the balanced cluster. : ; S332: Based on the number of network nodes within the target cluster Based on the current initial cluster allocation matrix, determine the cluster size of each current initial cluster to identify whether there are underloaded or overloaded initial clusters. An overloaded initial cluster is an initial cluster with more network nodes than the target cluster, and an underloaded initial cluster is an initial cluster with fewer network nodes than the target cluster. If both underloaded and overloaded initial clusters exist, proceed to step S333. If no underloaded initial clusters exist and only overloaded initial clusters exist, proceed to step S334. If neither underloaded nor overloaded initial clusters exist, proceed to step S336. S333: Select any overloaded initial cluster, determine the network node farthest from the cluster center point of the overloaded initial cluster as the intra-cluster edge network node, calculate the relative distance from the intra-cluster edge network node to the cluster center point of each underloaded initial cluster, select the underloaded initial cluster with the closest relative distance, reallocate the intra-cluster edge network node to the underloaded initial cluster, update the current initial cluster allocation matrix, and return to step S332; S334: Calculate the difference between the number of network nodes in each overloaded initial cluster and the number of network nodes in the target cluster, and determine whether there is an overloaded initial cluster with a difference greater than 1; if so, proceed to step S335; otherwise, proceed to step S336. S335: Select any overloaded initial cluster with the most nodes. Within the overloaded initial cluster, determine the network node farthest from the cluster center as the intra-cluster edge network node. Calculate the relative distance from the intra-cluster edge network node to the cluster center of each normal initial cluster. Select the normal initial cluster with the closest relative distance. Reassign the intra-cluster edge network node to the normal initial cluster. Update the current initial cluster allocation matrix and return to step S332. The normal initial cluster is an initial cluster whose intra-cluster network node count is equal to the target intra-cluster network node count. S336: Output the current balanced cluster allocation matrix as the current balanced cluster allocation matrix.

6. The wireless network time synchronization method according to claim 4, characterized in that, Step S4 involves constructing an initial adjacency matrix based on the aforementioned balanced clusters and initializing the node degree of all network nodes, including: S41: For every two balanced clusters, select a key node between the two balanced clusters to establish a key node pair, establish a key edge between the key node pairs, and form a key edge set based on all key edges. The relative distance between the key node pairs is the longest relative distance among all network nodes in the two balanced clusters; S42: Based on all network nodes and the set of key edges Construct the initial adjacency matrix : ; in, Represents the initial adjacency matrix It is a symmetric matrix. and Both represent network nodes. Represents network nodes and network nodes Edge relations; S43: Based on the initial adjacency matrix Calculate the degree of each network node, where the network node... The node degree is represented as : 。 7. The wireless network time synchronization method according to claim 6, characterized in that, Step S5 involves constructing a node-distributed rigid graph based on the initial adjacency matrix and the node degrees of all network nodes, including: S51: Use the degree of each network node as the current degree of each network node, and select the network node with the smallest current degree. S52: Establish cross-cluster candidate edges between the balanced cluster that has not established an edge connection with the network node with the smallest current node degree and the network node with the smallest current node degree, and form a cross-cluster candidate edge set from all cross-cluster candidate edges; S53: Based on the initial adjacency matrix and the cross-cluster candidate edge set, retain the cross-cluster candidate edge with the longest relative distance to obtain the updated adjacency matrix and the updated node degree of all network nodes; S54: Determine whether the number of edges in the updated initial adjacency matrix is ​​less than the minimum number of edges in the preset minimum rigid graph; if it is less, update the current node degree of the network node based on the updated node degree of all network nodes, update the initial adjacency matrix based on the updated adjacency matrix, and return to step S51; otherwise, obtain the node distributed rigid graph based on the current updated adjacency matrix.

8. The wireless network time synchronization method according to claim 7, characterized in that, Step S6, based on the node distributed rigid graph, obtains the clock skew parameters and clock offset parameters of each network node, including the following steps: S61: Perform bidirectional timestamp exchange on all network nodes according to the node distributed rigid graph to obtain the corresponding clock parameter measurement data at all network nodes; S62: Based on the corresponding clock parameter measurement data at all network nodes, the least squares estimation method GLS is used to jointly estimate the local clock parameters to obtain the clock skew parameters and clock offset parameters of each network node.

9. The wireless network time synchronization method according to claim 8, characterized in that, Step S7 updates the local crystal clock of each network node based on the clock skew parameter and clock offset parameter of each network node, and outputs a time-synchronized node network, including: For network nodes The corresponding local crystal oscillator clock is corrected to obtain the network node. Virtual clock : ; in, This represents the clock skew parameter. Indicates the clock offset parameter. Represents network nodes Local crystal clock; Traverse all network nodes, perform local crystal clock correction, and obtain the virtual clock of all network nodes; Based on the virtual clocks of all network nodes and the distributed rigid graph of the nodes, time synchronization of the wireless network under the distributed rigid graph topology is achieved.

10. A wireless network time synchronization system based on a distributed rigid graph, characterized in that, include: Node initialization module: Deploy several network nodes within the target monitoring area, set an independent local crystal clock for each network node, and record the node coordinates of all network nodes; Clustering center module: The node coordinates of all network nodes are preprocessed to obtain several initial clustering centers; Equalization clustering module: Based on the aforementioned initial cluster centers, equalization clustering is performed on all network nodes to obtain several equal clusters; Node degree construction module: Based on the aforementioned balanced clusters, construct an initial adjacency matrix and initialize the node degree of all network nodes; Distributed rigid graph module: Based on the initial adjacency matrix and the node degree of all network nodes, construct a distributed rigid graph of nodes; Clock parameter interaction module: Based on the node distributed rigid graph, obtain the clock skew parameter and clock offset parameter of each network node; Time synchronization module: Based on the clock skew parameters and clock offset parameters of each network node, update the local crystal oscillator clock of each network node to achieve time synchronization of the wireless network under the distributed rigid graph topology.