Power grid unified time synchronization method based on multi-source time service
By constructing a multi-source time synchronization feature coding network and a topology sensing model, the problem of insufficient utilization of multi-source information in power grid time synchronization is solved, high-precision time synchronization of cross-regional power grids is achieved, and the stability and security of the system are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID LOCATION BASED SERVICE CO LTD
- Filing Date
- 2026-01-20
- Publication Date
- 2026-04-21
AI Technical Summary
Existing power grid time synchronization technologies are unable to fully utilize multi-source time information in complex scenarios, and cannot effectively cope with time deviations and topology structures of cross-regional power grids, resulting in asynchronous measurement data, distorted fault criteria, and even safety risks.
A unified time synchronization method for power grids based on multi-source time synchronization is adopted. By constructing a feature-encoded subnetwork, calculating confidence weights, building a time synchronization topology graph and a topology-aware model, and combining short-term and long-term memory encoding, accurate prediction and correction of time deviations can be achieved.
It improves the accuracy and robustness of time deviation estimation, ensures the consistency of time synchronization across regional power grids, and reduces the impact of abnormal time sources or link jitter on the synchronization system.
Smart Images

Figure CN121907385A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a unified time synchronization method for power grids based on multi-source time synchronization, belonging to the field of power system automation and time synchronization technology. Background Technology
[0002] With the continuous advancement of distributed power generation, large-scale new energy sources, and inter-regional grid interconnection projects, power grid operation increasingly relies on a unified, high-precision time reference. Key operations such as wide-area measurement and control (WAMS), synchronous phasor measurement (PMU), traveling wave fault location, flexible DC control, and protection setting all require monitoring, control, and protection devices in different regional power grids to work collaboratively under a unified time reference. If the time deviation between regions is too large, it can easily lead to asynchronous measurement data, distorted fault criteria, and even safety risks such as false tripping or failure to trip.
[0003] Existing power grid time synchronization technologies mainly rely on a single time source or a simple multi-source redundancy mechanism. For example, some systems primarily use BeiDou or GPS satellite time synchronization, supplemented by terrestrial fiber optic E1 links or IEEE 1588 / PTP protocols as backups, switching to the backup link when the primary time source fails. Such solutions typically select the time source through "primary / backup priority" or "fixed weighting," making it difficult to fully utilize the quality characteristics of different time sources, such as signal-to-noise ratio, number of visible satellites, packet loss rate during time synchronization, link round-trip time, and latency jitter. They also fail to adequately consider operating environment factors such as equipment ambient temperature and power grid frequency deviations of adjacent nodes, resulting in insensitivity to changes in time source quality under complex scenarios.
[0004] On the other hand, most existing time synchronization methods estimate time deviations centered on a single node, paying insufficient attention to the time transmission topology across regional power grids. For complex time synchronization links between regions with multi-hop forwarding, different link types (satellite, fiber optic, PTP Ethernet, etc.), and different link delays and jitter, traditional algorithms often use simple "fixed path" or "equivalent delay" modeling, without explicitly constructing a topology structure that reflects link weights, and lacking in-depth mining of multi-order adjacency relationships. This makes it difficult to characterize the indirect impact of remote nodes on local time deviations, resulting in insufficient utilization of overall spatiotemporal correlation.
[0005] In terms of time evolution modeling, existing time synchronization algorithms mostly employ linear or weakly nonlinear time filtering methods such as moving average, Kalman filtering, and phase-locked loop (PLL), primarily focusing on short-term noise suppression. They are insufficient in modeling the long-term stability of the time synchronization source, its slow drift trend, and its recovery capability under abrupt changes. With the superposition of multi-source time synchronization, complex topology, and non-stationary noise, traditional filtering alone is insufficient to effectively separate short-term random disturbances from long-term systematic deviations, making it difficult to ensure both fast tracking and steady-state accuracy and robustness.
[0006] Meanwhile, most existing time synchronization results only provide a single time deviation estimate, rarely quantifying the uncertainty of the estimate, and lack a mechanism to constrain the "overall consistency" of deviations among nodes within the entire time synchronization topology. Once some nodes are affected by abnormal time synchronization sources or abnormal links, "local time islands" can easily form in the network, making it impossible to automatically correct deviations through global constraints, which is not conducive to building a unified time platform across regions and disciplines. Summary of the Invention
[0007] To address the problems existing in the prior art, this invention proposes a unified time synchronization method for power grids based on multi-source time synchronization.
[0008] The technical solution of the present invention is as follows: On the one hand, the present invention provides a unified time synchronization method for power grids based on multi-source time synchronization, comprising the following steps: Multi-source time synchronization information and local clock information are collected at the time synchronization nodes of each regional power grid and constructed as the original features of each node; Construct feature coding subnetworks for time synchronization information from various sources, input the original features of each node into the feature coding subnetworks for time synchronization information from various sources, and obtain the source-level coding features of each node; Calculate the confidence weight of each source-level coding feature of each node, and perform a weighted summation of each source-level coding feature of the current node to obtain the fused coding feature of each node. Construct a time synchronization topology graph based on the time synchronization link relationship, and construct an edge weight adjacency matrix after calculating the weight of each edge in the time synchronization topology graph; Construct a topology-aware model, input the fused encoding features of each node and the edge weight adjacency matrix into the topology-aware model to obtain the spatial features of each node; The spatial features of each node are encoded using short-term temporal encoding and long-term memory encoding. Based on the short-term convolutional temporal encoding and long-term memory encoding of each node, the aggregated temporal features of each node are constructed. The aggregated time characteristics of each node are decoded to obtain the predicted time deviation of each node relative to the standard time. Based on the predicted time deviation of each node relative to the standard time, the local clock information of each node is corrected.
[0009] Preferably, the multi-source timing information includes BeiDou satellite timing source, GPS satellite timing source, upper-level timing source obtained from terrestrial fiber optic E1 link, and timing source obtained through IEEE 1588 / PTP protocol; The original characteristics of each node include the time deviation between the time information from each source and the local clock information, as well as the quality characteristics of the time information from each source. The quality characteristics of the timing information from each source include the signal-to-noise ratio of the timing signal from each source, the number of visible satellites for each satellite timing signal under the corresponding satellite system, the packet loss rate of the timing messages from each source, the round-trip time delay of the timing signal from each source, the time delay jitter of the timing signal from each source, the ambient temperature of each node device, and the power grid frequency deviation of each node's adjacent nodes.
[0010] Preferably, the original features of each node are input into the feature coding subnetwork of each source timing information to obtain the source-level coding features of each node, as shown in the following formula:
[0011] in: express Time of the first The node of the first Individual source-level feature encoding; Indicates the first A feature coding subnetwork for timing information from multiple sources; express Time of the first The node of the first Time deviation between source time information and local clock information; express Time of the first The node of the first Quality characteristics of timing information from various sources.
[0012] Preferably, the confidence weights of each source-level coding feature at each node are calculated as follows: Normalize the source-level coding features; The feature changes of each source-level encoded feature at each node are calculated as follows:
[0013] in: express Time of the first The node of the first The amount of feature variation encoded at the source level; Represents the normalized result Time of the first The node of the first Individual source-level feature encoding; The base confidence score is calculated using the following formula:
[0014] in: express Time of the first The node of the first The basic confidence score of each source-level feature encoding; Indicates the first A linear weighted vector of timing information from each source; Indicates the transpose operation; Indicates the first A symmetric weight matrix for timing information from multiple sources; Indicates the first The bias of timing information from each source; The stability penalty coefficient is calculated based on the feature changes of each source-level encoded feature of the node, as shown in the following formula:
[0015] in: express Time of the first The node of the first Stability penalty coefficient for each source-level feature encoding; Indicates the first A stability weight vector of timing information from each source; The confidence of each source-level encoded feature of each node is calculated based on the basic confidence score and the stability penalty coefficient, as shown in the following formula:
[0016] in: express Time of the first The node of the first Confidence of each source-level feature encoding; Indicates the first A global bias term for timing information from a single source; , This represents the weighting coefficient in the confidence score calculation formula; The confidence weight of each source-level coding feature of each node is calculated based on the confidence of each source-level coding feature, as shown in the following formula:
[0017] in: express Time of the first The node of the first Confidence weights for each source-level feature encoding; This represents the set of time synchronization information sources; express Time of the first The node of the first Confidence of each source-level feature encoding; The source-level coding features of the current node are then weighted and summed to obtain the fused coding features of each node, as shown in the following formula:
[0018] in: express Time of the first The fusion coding features of each node.
[0019] Preferably, a time synchronization topology graph is constructed based on the time synchronization link relationship, and an edge weight adjacency matrix is constructed after calculating the weight of each edge in the time synchronization topology graph, specifically as follows: Each node in the time synchronization topology represents a time synchronization node of a regional power grid, and each edge represents a link between nodes that has an actual time synchronization relationship or time transmission path. The weight of each edge is calculated based on link latency, latency jitter, hop count, and link type. An edge weight adjacency matrix is constructed based on the edge weights between each node and then normalized.
[0020] Preferably, a topology-aware model is constructed, and the fused encoded features of each node and the edge weight adjacency matrix are input into the topology-aware model to obtain the spatial features of each node, specifically: For any given node, the following steps are performed: A maximum order is preset, and the edge weight adjacency matrix is decomposed into a multi-order edge weight adjacency matrix based on the maximum order. The topology-aware model includes multiple graph convolutional layers and a multi-level fusion layer. The graph convolutional layers are connected sequentially, and a multi-level fusion layer is set between every two convolutional layers. For any edge weight adjacency matrix, it is simultaneously input into a multi-layer graph convolutional layer along with the fused encoded features at each time step. After passing through multiple graph convolutional layers, the last graph convolutional layer outputs the final output feature matrices for each time step and each order, as shown in the following equation:
[0021] in: Indicates the first The output of the layer graph convolutional layer time The output feature matrix of order 1; express Order-weighted adjacency matrix; Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer The multi-level fusion feature matrix at each time step, if the current graph's convolutional layer is the first layer, is replaced with... Timing-based fusion coding features; Indicates the first Layer Graph Convolutional Layer The adjacency convolution weight matrix; Represents a nonlinear activation function; The multi-level fusion layer is specifically shown in the following formula:
[0022] in: Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer Time-series multi-level fusion feature matrix; Indicates the maximum order; Indicates the first The first layer of the multi-level fusion layer connected by the layer graph convolutional layer 1st order feature fusion coefficient; Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer Time-series multi-level fusion feature matrix; The spatial feature matrices of the current node at each time step are obtained by superimposing the output feature matrices of each order of the convolutional layer at the same time step.
[0023] Preferably, the spatial features of each node are encoded using short-term temporal encoding and long-term memory encoding. The aggregated temporal features of each node are obtained by concatenating the short-term convolutional temporal encoding and long-term memory encoding, specifically as follows: The short-term convolution time encoding is specifically as follows:
[0024] in: Represents a node At any moment Short-term convolutional time encoding; Represents a node The spatial characteristic matrix; Indicates the short-term convolution window length; This represents a one-dimensional convolution operation; The long-term memory encoding is specifically as follows:
[0025] in: Represents a node At any moment Long-term memory encoding; Represents a node At any moment Long-term memory encoding; This represents the update function of the gated loop unit.
[0026] Preferably, the aggregated time features of each node are decoded to obtain the predicted time deviation of each node relative to the standard time, specifically as follows: The output layer is configured to receive the aggregated time characteristics of each node and output the predicted time deviation and the estimated uncertainty, as shown in the following formula:
[0027] in: express Time Node Predicted time deviation; express Time Node The aggregation time characteristics; This represents the output layer weight matrix; This represents the output layer bias vector; Simultaneously, a consistency constraint loss is set, as shown in the following formula:
[0028] in: This represents the loss due to consistency constraints. A set of nodes representing the time synchronization topology graph; express Nodes in the time synchronization topology graph Predicted time deviation; When the consistency constraint loss reaches a preset threshold, the trained output layer is obtained.
[0029] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the present invention.
[0030] In another aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the present invention.
[0031] The present invention has the following beneficial effects: 1. This invention, through this source-specific modeling method, can perform specialized feature extraction for the statistical and noise characteristics of different time synchronization sources. Compared with the traditional simple weighting or threshold judgment, multi-source information is characterized more meticulously and comprehensively, which greatly improves the ability of subsequent fusion stages to distinguish time synchronization sources.
[0032] 2. This invention constructs a basic confidence score and a stability penalty coefficient, and combines the two to obtain the confidence of each source-level feature encoding. Compared with the traditional multi-source fusion method based on fixed priority or static weight, this invention achieves "time-adaptive" confidence modeling, which can maintain the continuity and robustness of time deviation estimation results even when the time source is abnormal, the link jitter is high, or the environment changes drastically.
[0033] 3. This invention employs multi-level adjacency modeling, allowing nodes to consider the indirect effects of multiple adjacent nodes. This explicitly characterizes the combined impact of latency accumulation, topological bottlenecks, and different link types on time transmission quality in complex timing links. Compared to existing technologies that model only within a single node or local neighborhood, this invention improves the accuracy and consistency of time deviation prediction from a global perspective. Attached Figure Description
[0034] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.
[0037] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0038] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0039] The term “and / or” refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes these combinations.
[0040] See Figure 1 In some embodiments, a unified time synchronization method for power grids based on multi-source time synchronization is proposed, including the following steps: Multi-source time synchronization information and local clock information are collected at the time synchronization nodes of each regional power grid and constructed as the original features of each node; Construct feature coding subnetworks for time synchronization information from various sources, input the original features of each node into the feature coding subnetworks for time synchronization information from various sources, and obtain the source-level coding features of each node; Calculate the confidence weight of each source-level coding feature of each node, and perform a weighted summation of each source-level coding feature of the current node to obtain the fused coding feature of each node. Construct a time synchronization topology graph based on the time synchronization link relationship, and construct an edge weight adjacency matrix after calculating the weight of each edge in the time synchronization topology graph; Construct a topology-aware model, input the fused encoding features of each node and the edge weight adjacency matrix into the topology-aware model to obtain the spatial features of each node; The spatial features of each node are encoded using short-term temporal encoding and long-term memory encoding. Based on the short-term convolutional temporal encoding and long-term memory encoding of each node, the aggregated temporal features of each node are constructed. The aggregated time characteristics of each node are decoded to obtain the predicted time deviation of each node relative to the standard time. Based on the predicted time deviation of each node relative to the standard time, the local clock information of each node is corrected.
[0041] In some embodiments, the multi-source timing information includes BeiDou satellite timing source, GPS satellite timing source, upper-level timing source obtained from terrestrial fiber optic E1 link, and timing source obtained through IEEE 1588 / PTP protocol. The original characteristics of each node include the time deviation between the time information from each source and the local clock information, as well as the quality characteristics of the time information from each source. The quality characteristics of the timing information from each source include the signal-to-noise ratio of the timing signal from each source, the number of visible satellites for each satellite timing signal under the corresponding satellite system, the packet loss rate of the timing messages from each source, the round-trip time delay of the timing signal from each source, the time delay jitter of the timing signal from each source, the ambient temperature of each node device, and the power grid frequency deviation of each node's adjacent nodes.
[0042] In some embodiments, the original features of each node are input into the feature coding subnetwork of each source timing information to obtain the source-level coding features of each node, as shown in the following formula:
[0043] in: express Time of the first The node of the first Individual source-level feature encoding; Indicates the first A feature coding subnetwork for timing information from multiple sources; express Time of the first The node of the first Time deviation between source time information and local clock information; express Time of the first The node of the first Quality characteristics of timing information from various sources.
[0044] In one specific embodiment, a one-dimensional convolutional neural network is used for the feature coding subnetwork of GPS timing information and BeiDou timing information. The convolutional features of the BeiDou timing deviation sequence and its quality feature sequence are extracted through several convolutional layers and pooling layers. One or two fully connected layers are then connected after the convolutional layers to obtain GPS / BeiDou source-level coding features.
[0045] In one specific embodiment, the timing source is obtained for the terrestrial fiber optic E1 link and the IEEE 1588 / PTP protocol. The feature coding subnetwork of the acquired upper-level time synchronization source is used to model time series features such as link delay, delay jitter, and packet loss rate using the existing GRU structure, so as to obtain source-level coding features of E1 / IEEE1588 / PTP protocol that can reflect the dynamic characteristics of the link.
[0046] In some embodiments, the confidence weight of each source-level coding feature of each node is calculated, specifically as follows: The source-level encoded features are normalized as shown in the following formula:
[0047] in: Represents the normalized result Time of the first The node of the first Individual source-level feature encoding; Indicates that for the first Normalization operator for source-level feature encoding; In one specific embodiment, the normalization operator includes batch normalization and layer normalization.
[0048] The feature changes of each source-level encoded feature at each node are calculated as follows:
[0049] in: express Time of the first The node of the first The amount of feature variation encoded at the source level; Represents the normalized result Time of the first The node of the first Individual source-level feature encoding; The base confidence score is calculated using the following formula:
[0050] in: express Time of the first The node of the first The basic confidence score of each source-level feature encoding; Indicates the first A linear weighted vector of timing information from each source; Indicates the transpose operation; Indicates the first A symmetric weight matrix for timing information from multiple sources; Indicates the first The bias of timing information from each source; The stability penalty coefficient is calculated based on the feature changes of each source-level encoded feature of the node, as shown in the following formula:
[0051] in: express Time of the first The node of the first Stability penalty coefficient for each source-level feature encoding; Indicates the first A stability weight vector of timing information from each source; The confidence of each source-level encoded feature of each node is calculated based on the basic confidence score and the stability penalty coefficient, as shown in the following formula:
[0052] in: express Time of the first The node of the first Confidence of each source-level feature encoding; Indicates the first A global bias term for timing information from a single source; , This represents the weighting coefficient in the confidence score calculation formula; The confidence weight of each source-level coding feature of each node is calculated based on the confidence of each source-level coding feature, as shown in the following formula:
[0053] in: express Time of the first The node of the first Confidence weights for each source-level feature encoding; This represents the set of time synchronization information sources; express Time of the first The node of the first Confidence of each source-level feature encoding; The source-level coding features of the current node are then weighted and summed to obtain the fused coding features of each node, as shown in the following formula:
[0054] in: express Time of the first The fusion coding features of each node.
[0055] In some embodiments, a time synchronization topology graph is constructed based on the timing link relationship, and an edge weight adjacency matrix is constructed after calculating the weight of each edge in the time synchronization topology graph, specifically as follows: Each node in the time synchronization topology represents a time synchronization node of a regional power grid, and each edge represents a link between nodes that has an actual time synchronization relationship or time transmission path. The weight of each edge is calculated based on link latency, latency jitter, hop count, and link type, as shown in the following formula:
[0056] in: Represents a node With nodes Edge weights between them; Represents a node With nodes Link latency between; Represents a node With nodes Link latency jitter between them; Represents a node With nodes Number of jumps between; Represents a node With nodes Link types between them; Represents the edge weight mapping function; In a specific embodiment, the edge weight mapping function is obtained by weighting and summing the deviations of the link delay, delay jitter, and hop count between nodes from their corresponding baseline values, and then adding the sum to a preset weight coefficient for the link type.
[0057] An edge weight adjacency matrix is constructed based on the edge weights between nodes and then normalized, as shown in the following formula:
[0058] in: This represents the normalized edge weight adjacency matrix; This represents the degree matrix corresponding to the edge weight adjacency matrix; This represents the edge weight adjacency matrix.
[0059] In some embodiments, a topology-aware model is constructed, and the fused encoded features of each node and the edge weight adjacency matrix are input into the topology-aware model to obtain the spatial features of each node, specifically: For any given node, the following steps are performed: A maximum order is preset, and the edge weight adjacency matrix is decomposed into a multi-order edge weight adjacency matrix based on the maximum order. The topology-aware model includes multiple graph convolutional layers and a multi-level fusion layer. The graph convolutional layers are connected sequentially, and a multi-level fusion layer is set between every two convolutional layers. For any edge weight adjacency matrix, it is simultaneously input into a multi-layer graph convolutional layer along with the fused encoded features at each time step. After passing through multiple graph convolutional layers, the last graph convolutional layer outputs the final output feature matrices for each time step and each order, as shown in the following equation:
[0060] in: Indicates the first The output of the layer graph convolutional layer time The output feature matrix of order 1; express Order-weighted adjacency matrix; Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer The multi-level fusion feature matrix at each time step, if the current graph's convolutional layer is the first layer, is replaced with... Timing-based fusion coding features; Indicates the first Layer Graph Convolutional Layer The adjacency convolution weight matrix; Represents a nonlinear activation function; The multi-level fusion layer is specifically shown in the following formula:
[0061] in: Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer Time-series multi-level fusion feature matrix; Indicates the maximum order; Indicates the first The first layer of the multi-level fusion layer connected by the layer graph convolutional layer 1st order feature fusion coefficient; Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer Time-series multi-level fusion feature matrix; The spatial feature matrices of the current node at each time step are obtained by superimposing the output feature matrices of each order of the convolutional layer at the same time step.
[0062] In some embodiments, the spatial features of each node are encoded using short-term temporal encoding and long-term memory encoding. The aggregated temporal features of each node are obtained by concatenating the short-term convolutional temporal encoding and long-term memory encoding of each node. Specifically: The short-term convolution time encoding is specifically as follows:
[0063] in: Represents a node At any moment Short-term convolutional time encoding; Represents a node The spatial characteristic matrix; Indicates the short-term convolution window length; This represents a one-dimensional convolution operation; The long-term memory encoding is specifically as follows:
[0064] in: Represents a node At any moment Long-term memory encoding; Represents a node At any moment Long-term memory encoding; This represents the update function of the gated loop unit.
[0065] In some embodiments, the aggregated time characteristics of each node are decoded to obtain the predicted time deviation value of each node relative to the standard time, specifically: The output layer is configured to receive the aggregated time characteristics of each node and output the predicted time deviation and the estimated uncertainty, as shown in the following formula:
[0066] in: express Time Node Predicted time deviation; express Time Node The aggregation time characteristics; This represents the output layer weight matrix; This represents the output layer bias vector; Simultaneously, a consistency constraint loss is set, as shown in the following formula:
[0067] in: This represents the loss due to consistency constraints. A set of nodes representing the time synchronization topology graph; express Nodes in the time synchronization topology graph Predicted time deviation; When the consistency constraint loss reaches a preset threshold, the trained output layer is obtained.
[0068] Example 2: This module is used to implement the function of step S100 in Embodiment 1, and will not be described in detail here; Example 3: This embodiment proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method described in any embodiment of the present invention.
[0069] Example 4: This embodiment proposes a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention.
[0070] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.
[0071] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0072] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0073] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0074] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A unified time synchronization method for power grids based on multi-source time synchronization, characterized in that, Includes the following steps: Multi-source time synchronization information and local clock information are collected at the time synchronization nodes of each regional power grid and constructed as the original features of each node; Construct feature coding subnetworks for time synchronization information from various sources, input the original features of each node into the feature coding subnetworks for time synchronization information from various sources, and obtain the source-level coding features of each node; Calculate the confidence weight of each source-level coding feature of each node, and perform a weighted summation of each source-level coding feature of the current node to obtain the fused coding feature of each node. Construct a time synchronization topology graph based on the time synchronization link relationship, and construct an edge weight adjacency matrix after calculating the weight of each edge in the time synchronization topology graph; Construct a topology-aware model, input the fused encoding features of each node and the edge weight adjacency matrix into the topology-aware model to obtain the spatial features of each node; The spatial features of each node are encoded using short-term temporal encoding and long-term memory encoding. Based on the short-term convolutional temporal encoding and long-term memory encoding of each node, the aggregated temporal features of each node are constructed. The aggregated time characteristics of each node are decoded to obtain the predicted time deviation of each node relative to the standard time. Based on the predicted time deviation of each node relative to the standard time, the local clock information of each node is corrected.
2. The power grid unified time synchronization method based on multi-source time synchronization according to claim 1, characterized in that, The multi-source timing information includes BeiDou satellite timing source, GPS satellite timing source, upper-level timing source obtained from the terrestrial fiber optic E1 link, and timing source obtained through the IEEE 1588 / PTP protocol; The original characteristics of each node include the time deviation between the time information from each source and the local clock information, as well as the quality characteristics of the time information from each source. The quality characteristics of the timing information from each source include the signal-to-noise ratio of the timing signal from each source, the number of visible satellites for each satellite timing signal under the corresponding satellite system, the packet loss rate of the timing messages from each source, the round-trip time delay of the timing signal from each source, the time delay jitter of the timing signal from each source, the ambient temperature of each node device, and the power grid frequency deviation of each node's adjacent nodes.
3. The power grid unified time synchronization method based on multi-source time synchronization according to claim 2, characterized in that, The original features of each node are input into the feature encoding subnetwork of each source timing information to obtain the source-level encoded features of each node, as shown in the following formula: in: express Time of the first The node of the first Individual source-level feature encoding; Indicates the first A feature coding subnetwork for timing information from one source; express Time of the first The node of the first Time deviation between source time information and local clock information; express Time of the first The node of the first Quality characteristics of timing information from various sources.
4. The power grid unified time synchronization method based on multi-source time synchronization according to claim 3, characterized in that, Calculate the confidence weights of each source-level encoded feature at each node, specifically as follows: Normalize the source-level coding features; The feature changes of each source-level encoded feature at each node are calculated as follows: in: express Time of the first The node of the first The amount of feature variation encoded at the source level; Represents the normalized result Time of the first The node of the first Individual source-level feature encoding; The base confidence score is calculated using the following formula: in: express Time of the first The node of the first The basic confidence score of each source-level feature encoding; Indicates the first A linear weighted vector of timing information from each source; Indicates the transpose operation; Indicates the first A symmetric weight matrix for timing information from multiple sources; Indicates the first The bias of timing information from each source; The stability penalty coefficient is calculated based on the feature changes of each source-level encoded feature of the node, as shown in the following formula: in: express Time of the first The node of the first Stability penalty coefficient for each source-level feature encoding; Indicates the first A stability weight vector of timing information from each source; The confidence of each source-level encoded feature of each node is calculated based on the basic confidence score and the stability penalty coefficient, as shown in the following formula: in: express Time of the first The node of the first Confidence of each source-level feature encoding; Indicates the first A global bias term for timing information from a single source; , This represents the weighting coefficient in the confidence score calculation formula; The confidence weight of each source-level coding feature of each node is calculated based on the confidence of each source-level coding feature, as shown in the following formula: in: express Time of the first The node of the first Confidence weights for each source-level feature encoding; This represents the set of time synchronization information sources; express Time of the first The node of the first Confidence of each source-level feature encoding; The source-level coding features of the current node are then weighted and summed to obtain the fused coding features of each node, as shown in the following formula: in: express Time of the first The fusion coding features of each node.
5. A unified time synchronization method for power grids based on multi-source time synchronization according to claim 4, characterized in that, A time synchronization topology graph is constructed based on the timing link relationships, and the weight of each edge in the time synchronization topology graph is calculated to construct an edge weight adjacency matrix, specifically: Each node in the time synchronization topology represents a time synchronization node of a regional power grid, and each edge represents a link between nodes that has an actual time synchronization relationship or time transmission path. The weight of each edge is calculated based on link latency, latency jitter, hop count, and link type. An edge weight adjacency matrix is constructed based on the edge weights between each node and then normalized.
6. The power grid unified time synchronization method based on multi-source time synchronization according to claim 5, characterized in that, A topology-aware model is constructed by inputting the fused encoded features of each node and the edge weight adjacency matrix into the topology-aware model to obtain the spatial features of each node, specifically: For any given node, the following steps are performed: A maximum order is preset, and the edge weight adjacency matrix is decomposed into a multi-order edge weight adjacency matrix based on the maximum order. The topology-aware model includes multiple graph convolutional layers and a multi-level fusion layer. The graph convolutional layers are connected sequentially, and a multi-level fusion layer is set between every two convolutional layers. For any edge weight adjacency matrix, it is simultaneously input into a multi-layer graph convolutional layer along with the fused encoded features at each time step. After passing through multiple graph convolutional layers, the last graph convolutional layer outputs the final output feature matrices for each time step and each order, as shown in the following equation: in: Indicates the first The output of the layer graph convolutional layer time The output feature matrix of order 1; express The order-weighted adjacency matrix; Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer The multi-level fusion feature matrix at each time step, if the current graph's convolutional layer is the first layer, is replaced with... Timing-based fusion coding features; Indicates the first Layer Graph Convolutional Layer The adjacency convolution weight matrix; Represents a nonlinear activation function; The multi-level fusion layer is specifically shown in the following formula: in: Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer Time-series multi-level fusion feature matrix; Indicates the maximum order; Indicates the first The first layer of the multi-level fusion layer connected by the layer graph convolutional layer 1st order feature fusion coefficient; Indicates the first The output of the multi-level fusion layer connected to the layer graph convolutional layer Time-series multi-level fusion feature matrix; The spatial feature matrices of the current node at each time step are obtained by superimposing the output feature matrices of each order of the convolutional layer at the same time step.
7. A unified time synchronization method for power grids based on multi-source time synchronization according to claim 6, characterized in that, The spatial features of each node are encoded using short-term temporal encoding and long-term memory encoding. The aggregated temporal features of each node are obtained by concatenating the short-term convolutional temporal encoding and the long-term memory encoding. Specifically: The short-term convolution time encoding is specifically as follows: in: Represents a node At any moment Short-term convolutional time encoding; Represents a node The spatial characteristic matrix; Indicates the short-term convolution window length; This represents a one-dimensional convolution operation; The long-term memory encoding is specifically as follows: in: Represents a node At any moment Long-term memory encoding; Represents a node At any moment Long-term memory encoding; This represents the update function of the gated loop unit.
8. A unified time synchronization method for power grids based on multi-source time synchronization according to claim 7, characterized in that, The aggregated time features of each node are decoded to obtain the predicted time deviation of each node relative to the standard time, specifically: The output layer is configured to receive the aggregated time characteristics of each node and output the predicted time deviation and the estimated uncertainty, as shown in the following formula: in: express Time Node Predicted time deviation; express Time Node The aggregation time characteristics; This represents the output layer weight matrix; This represents the output layer bias vector; Simultaneously, a consistency constraint loss is set, as shown in the following formula: in: This represents the loss due to consistency constraints. A set of nodes representing the time synchronization topology graph; express Nodes in the time synchronization topology graph Predicted time deviation; When the consistency constraint loss reaches a preset threshold, the trained output layer is obtained.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.