A data flow conversion-based power monitoring data traceability method

CN122198997APending Publication Date: 2026-06-12INFORMATION & COMMNUNICATION BRANCH STATE GRID JIANGXI ELECTRIC POWER CO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INFORMATION & COMMNUNICATION BRANCH STATE GRID JIANGXI ELECTRIC POWER CO
Filing Date
2026-03-10
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing power monitoring systems, data tracing methods cannot effectively verify the continuity and authenticity of data flow paths. In particular, it is difficult to identify path deviations and tampering in complex networks, resulting in insufficient credibility of tracing results.

Method used

By generating traceability tags containing node identifiers, timestamps, and preceding verification values ​​at each node in the data flow process, and constructing a data flow graph, a continuous traceability chain is formed. The graph is then used for path matching and backtracking to ensure the integrity and reliability of the data flow.

Benefits of technology

It enables high-confidence proof of data flow history, automatically identifies path deviations and abnormal links, and enhances the intelligence and reliability of source tracing analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122198997A_ABST
    Figure CN122198997A_ABST
Patent Text Reader

Abstract

The application discloses a power monitoring data tracing method based on data flow conversion, relates to the technical field of power monitoring data tracing, and comprises identifying and constructing a full-link flow conversion graph of data from collection, transmission, storage to analysis. A tracing label is generated at each node, which not only contains the node identifier and the time stamp, but also forcibly embeds the password school verification value of the previous node, so that an internally associated and tamper-proof continuous tracing chain is formed. When tracing is performed, the system extracts the complete label sequence from the target data, and performs automatic path matching and backtracking verification in the pre-constructed data flow conversion graph according to the node identifier and the verification value information in the label. The method can effectively find the abnormality and deviation of the data flow conversion path, and realize credible and accurate tracing positioning of the whole process of the life cycle of the power monitoring data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power monitoring data traceability technology, specifically a traceability method for power monitoring data based on data flow. Background Technology

[0002] In power monitoring systems, data flows from acquisition terminals through transmission networks and storage servers to analysis platforms. Its integrity and reliability are crucial for power grid security. Existing technologies typically use log recording or adding discrete tags to the data for traceability. These methods record the time and node information of data reaching a certain stage, but there is a lack of close, verifiable correlation between the various record points. The resulting records or tags are easily tampered with or forged individually, making it difficult to ensure the continuity and authenticity of the entire flow chain. When data anomalies occur, only isolated node records can be provided, failing to effectively verify whether the data has undergone a complete and compliant flow path.

[0003] Faced with complex power monitoring networks, data may be transmitted and processed through multiple paths and nodes. Existing source tracing queries mostly simply list the extracted node identifiers in chronological order, presenting them as a linear list. This approach cannot compare with the actual, potentially branching and merging, topology of the system. When unexpected jumps, lost intermediate links, or bypasses occur in the flow path, the simple list cannot automatically and effectively identify these path deviations, resulting in insufficient reliability and in-depth analysis capabilities of the source tracing results. A technical solution is needed that can generate tamper-proof continuous source tracing records and intelligently verify and backtrack the actual path based on the system's flow topology. Summary of the Invention

[0004] This invention aims to solve at least one of the technical problems existing in the prior art;

[0005] Therefore, this invention proposes a method for tracing the source of power monitoring data based on data flow, including:

[0006] Identify the entire flow path of power monitoring data in the acquisition, transmission, storage and analysis stages, and determine multiple flow stage nodes;

[0007] Each of the multiple flow link nodes is configured with a unique node identifier, and a data flow graph is constructed based on the data flow relationship between the multiple flow link nodes, with the multiple flow link nodes as graph nodes and the data flow relationship as graph edges.

[0008] At each of the multiple transfer nodes, when power monitoring data is transferred to the current transfer node, a traceability tag is generated that includes the node identifier of the current transfer node, the current timestamp, and the verification value of the previous transfer node.

[0009] The traceability tag is embedded in the power monitoring data flowing to the current flow node to form a continuous traceability chain;

[0010] When a source tracing query instruction is received, a set of source tracing tags is extracted from the target power monitoring data specified in the source tracing query instruction.

[0011] Based on the node identifiers and verification values ​​in the traceability tag set, path matching and backtracking are performed in the data flow graph to locate one or more target flow link nodes in the data flow process.

[0012] Preferably, based on the data flow relationships between the multiple flow link nodes, a data flow graph is constructed, with the multiple flow link nodes as graph nodes and the data flow relationships as graph edges, including:

[0013] Enumerate the multiple circulation link nodes to obtain multiple circulation link node enumeration pairs;

[0014] For each pair of flow link nodes, determine whether there is power monitoring data flowing from the previous flow link node to the next flow link node. If so, determine that there is a data flow relationship between the pair of flow link nodes, and construct a directed graph edge with the previous flow link node as the starting node and the next flow link node as the ending node.

[0015] All constructed graph edges are gathered, and the multiple flow link nodes are used as graph nodes to form the data flow graph that represents the complete flow path of power monitoring data.

[0016] Preferably, at each of the plurality of transfer node nodes, when power monitoring data flows to the current transfer node, a traceability tag is generated containing the node identifier of the current transfer node, the current timestamp, and the verification value of the previous transfer node, including:

[0017] When power monitoring data flows to the current flow link node, obtain the node identifier of the current flow link node;

[0018] Get the system's current time as the current timestamp;

[0019] Hash operations are performed on the power monitoring data transferred to the current transfer node and the preceding traceability tags carried by the power monitoring data transferred to the current transfer node to calculate the verification value of the preceding transfer node.

[0020] The node identifier, the current timestamp, and the verification value of the preceding circulation node are combined and encoded to generate the traceability tag corresponding to the current circulation node.

[0021] Preferably, the traceability tag is embedded in the power monitoring data flowing to the current flow node to form a continuous traceability chain, including:

[0022] The generated traceability tag is used as an additional data header and appended to the data body of the power monitoring data that flows to the current flow node;

[0023] The power monitoring data with the traceability tag attached is sent to the next link in the process flow;

[0024] When power monitoring data flows to the next node in the process, the next node will generate its own traceability tag based on the power monitoring data it receives and all the traceability tags attached to it, so that the traceability tags generated by all nodes in the process are linked in the order of flow.

[0025] Preferably, when a source tracing query instruction is received, a set of source tracing tags is extracted from the target power monitoring data specified in the source tracing query instruction, including:

[0026] Parse the source tracing query command to determine the target power monitoring data identifier to be queried;

[0027] Based on the target power monitoring data identifier, retrieve and obtain the target power monitoring data from the power monitoring data repository;

[0028] From the additional data portion of the acquired target power monitoring data, all embedded traceability tags are sequentially extracted to form the traceability tag set.

[0029] Preferably, based on the node identifiers and verification values ​​in the traceability tag set, path matching and backtracking are performed in the data flow graph to locate one or more target flow stage nodes in the data flow process, including:

[0030] The traceability tag set is arranged in timestamp order to obtain a sorted traceability tag sequence;

[0031] Using the last traceability tag in the sorted traceability tag sequence as the starting traceability point, find the graph node in the data flow graph that corresponds to the node identifier of the last traceability tag in the sorted traceability tag sequence;

[0032] Using the verification value of the preceding flow link node contained in the traceability tag of the starting traceability point, the graph node whose node identifier matches the preceding verification value is searched in reverse along the graph edge in the data flow graph.

[0033] Repeat the reverse search process until the first tracing tag in the sorted tracing tag sequence corresponds to the graph node, or the check value fails to match.

[0034] All graph nodes that are successfully matched on the search path are identified as the target flow link nodes.

[0035] Preferably, using the verification value of the preceding flow stage node contained in the traceability tag of the starting traceability point, the graph node whose node identifier matches the preceding verification value is searched backward along the graph edge in the data flow graph, including:

[0036] Obtain the verification value of the preceding circulation node in the traceability tag of the starting traceability point;

[0037] Obtain all upstream graph nodes that have incoming graph edges connected to the graph node of the starting tracing point;

[0038] Calculate the expected verification value for each upstream graph node, wherein the expected verification value is a simulated calculation value of the verification value that should be generated for the upstream graph node according to a preset rule;

[0039] The verification value of the preceding flow node is compared with the expected verification value corresponding to all upstream graph nodes;

[0040] The upstream graph node whose expected verification value matches the verification value of the preceding flow node is identified as the graph node whose node identifier matches the preceding verification value.

[0041] Preferably, the expected verification value corresponding to each upstream graph node is calculated, including:

[0042] For each upstream graph node, obtain the node identifier of the upstream graph node in the data flow graph;

[0043] The process of generating traceability tags by the upstream graph node is simulated. According to the rules for generating traceability tags, the node identifier of the upstream graph node, the simulated timestamp of its generated tag, and the simulated verification value of the previous circulation links of the upstream graph node are combined.

[0044] A hash operation is performed on the combination to obtain the expected verification value corresponding to the upstream graph node.

[0045] Preferably, after constructing the data flow map, the method further includes:

[0046] Monitor the operating status of the power monitoring system. When a new data transfer node is detected or the data transfer relationship between existing data transfer nodes changes, a graph update event is triggered.

[0047] Based on the graph update event, the data flow graph is dynamically updated, including adding new graph nodes and graph edges, or deleting invalid graph nodes and graph edges.

[0048] Preferably, after dynamically updating the data flow map, the method further includes:

[0049] Obtain historical power monitoring data corresponding to the affected nodes in the dynamically updated data flow map;

[0050] Based on the updated data flow graph structure, the consistency of the verification values ​​of the traceability tags embedded in the historical power monitoring data is verified.

[0051] If inconsistencies are found during verification, the relevant traceability tags are recalculated and remarked to maintain the continuity and consistency of the traceability chain before and after the data flow map is updated.

[0052] Compared with the prior art, the beneficial effects of the present invention are:

[0053] When generating a tag at each stage of the data flow, the cryptographic verification value of the preceding node is forcibly embedded. This ensures that each newly generated tag not only contains its own node information in content but is also cryptographically bound to the previous tag, forming a tightly linked verification chain. Any unauthorized alteration of the data or its traceability tag during the flow process will cause the verification values ​​of all tags after that point to fail, thus immediately exposing the tampering. This mechanism transforms previously isolated and easily tampered records into a continuous chain of evidence with inherent anti-counterfeiting capabilities, guaranteeing the integrity and non-repudiation of the traceability information itself, and achieving a high degree of confidence in proving the authenticity of the data flow history.

[0054] A pre-constructed data flow graph, reflecting the compliant data flow relationships in system design or actual operation and maintenance, serves as a verification benchmark. During source tracing queries, the system does not simply output a sequence of labels; instead, it performs path matching and backtracking analysis on the extracted node identifiers and checksum sequences within the data flow graph's topology. This process automatically determines whether the actual data flow path conforms to the expected relationships defined in the graph, identifying violations. This method elevates source tracing from passively observing "where it passed" to actively verifying "whether the path is correct," accurately locating path deviations or anomalies that occur during complex network flow, thus enhancing the intelligence and reliability of source tracing analysis. Attached Figure Description

[0055] Figure 1 This is a flowchart illustrating the steps of the power monitoring data tracing method based on data flow described in this invention.

[0056] Figure 2 A flowchart for generating traceability labels;

[0057] Figure 3 A flowchart for extracting the source tag set;

[0058] Figure 4 A dual-bar chart showing the dynamic update trend of the data flow graph;

[0059] Figure 5 A two-bar chart showing the long-term expansion trend of the data flow map. Detailed Implementation

[0060] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. 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.

[0061] See Figure 1This method for tracing the source of power monitoring data based on data flow identifies the entire flow path of power monitoring data in the acquisition, transmission, storage, and analysis stages, determines multiple flow stage nodes, assigns unique node identifiers to each node, and constructs a data flow graph with nodes as graph nodes and data flow relationships as graph edges based on the data flow relationships between nodes. At each flow stage node, when power monitoring data flows to the current node, a traceability tag is generated containing the node identifier of the current node, the current timestamp, and the verification value of the previous flow stage node. The traceability tag is embedded in the power monitoring data flowing to the current node, forming a continuous traceability chain. When a traceability query command is received, a set of traceability tags is extracted from the target power monitoring data specified in the command. Based on the node identifiers and verification values ​​in the set, path matching and backtracking are performed in the data flow graph to locate one or more target flow stage nodes in the data flow process.

[0062] In one embodiment of the present invention, multiple flow link nodes are enumerated to obtain multiple flow link node enumeration pairs. For each flow link node enumeration pair, it is determined whether there is power monitoring data flowing from the previous flow link node to the next flow link node. If so, it is determined that there is a data flow relationship between the enumeration pairs. The previous flow link node is used as the starting node and the next flow link node is used as the ending node to construct a directed graph edge. All constructed graph edges are collected, and multiple flow link nodes are used as graph nodes to form a data flow graph representing the complete flow path of power monitoring data.

[0063] In practical implementation, based on the data flow relationships between multiple flow link nodes, a data flow graph is constructed, with multiple flow link nodes as graph nodes and data flow relationships as graph edges. The specific process is as follows: All identified flow link nodes are enumerated, such as the acquisition unit, transmission gateway, storage server, and analysis platform in the power monitoring system, to obtain multiple flow link node enumeration pairs. Each flow link node enumeration pair contains two different flow link nodes; the acquisition unit and transmission gateway constitute one flow link node enumeration pair, and the acquisition unit and storage server constitute another flow link node enumeration pair. For each flow link node enumeration pair, the system needs to determine whether power monitoring data flows from the previous flow link node to the next flow link node. The determination logic depends on parsing the system data flow configuration or monitoring historical data logs. In some embodiments, the system confirms the data flow relationship between flow link node enumeration pairs by reading predefined data pipeline configuration files; in other embodiments, the system infers the data flow relationship between flow link node enumeration pairs by analyzing the source and destination nodes of data in log records over a period of time. When it is confirmed that power monitoring data flows from the previous flow link node to the next flow link node in the flow link node enumeration pair, it is determined that there is a data flow relationship between this flow link node enumeration pair.

[0064] In practical implementation, once a data flow relationship is determined between enumerated pairs of flow link nodes, a directed graph edge is constructed in the data flow graph, using the previous flow link node in the enumerated pair as the starting node and the next flow link node as the ending node. Optionally, the graph edge can be constructed by inserting a record into the data table storing the graph structure. This record contains unique identifiers for the starting and ending nodes. All graph edges constructed based on the enumerated pairs of flow link nodes are collected, and all participating flow link nodes are treated as graph nodes, collectively forming a data flow graph representing the complete flow path of power monitoring data. Logically, the data flow graph is a directed graph, where nodes represent flow link nodes and edges represent data flow directions.

[0065] It's understandable that if the transmission gateway in the system architecture sends data to both the storage server and the backup server simultaneously, the enumeration process will generate node enumeration pairs involving the transmission gateway, storage server, and transmission gateway / backup server. After determining that both have data flow relationships, two directed graph edges will be constructed in the data flow graph, pointing from the transmission gateway to the storage server and backup server respectively. Optionally, the physical storage form of the data flow graph can be a network in a graph database or multiple relational tables in a relational database. Its core is to faithfully record the relationships between nodes and edges defined by the actual flow behavior of power monitoring data.

[0066] In one embodiment of the present invention, see [reference] Figure 2 When power monitoring data flows to the current flow stage node, the node identifier of the current flow stage node is obtained, and the current system time is obtained as the current timestamp. A hash operation is performed on the power monitoring data flowing to the current flow stage node and the preceding traceability tags carried by the power monitoring data flowing to the current flow stage node to calculate the verification value of the preceding flow stage node. The node identifier, the current timestamp, and the verification value of the preceding flow stage node are combined and encoded to generate the traceability tag corresponding to the current flow stage node. The generated traceability tag is used as an additional data header and is concatenated before the data body of the power monitoring data flowing to the current flow stage node. The power monitoring data with the traceability tag is sent to the next flow stage node. When the power monitoring data flows to the next flow stage node, the next flow stage node will generate its own traceability tag based on the power monitoring data it receives and all the attached traceability tags, and attach it, so that the traceability tags generated by all flow stage nodes are linked in the flow order.

[0067] In practical implementation, at each of the multiple transfer nodes, when power monitoring data flows to the current transfer node, a traceability tag needs to be generated, containing the node identifier of the current transfer node, the current timestamp, and the verification value of the preceding transfer node. When power monitoring data flows to the current transfer node, for example, when data arrives at the transmission gateway from the acquisition unit, the transmission gateway, as the current transfer node, first obtains the unique node identifier pre-configured for the current transfer node. The node identifier can be a string encoding or a numeric ID; in some embodiments, the node identifier is defined in the format of "transfer type_device number_location code"; in some embodiments, the node identifier is dynamically obtained by calling a centralized registration service interface. The system then obtains the current system time as the current timestamp, which is used to record the precise time when the power monitoring data arrives at the current transfer node.

[0068] In practical implementation, to calculate the verification value of the preceding circulation node, the system needs to perform a hash operation on the power monitoring data flowing to the current circulation node and the preceding traceability tag carried by the power monitoring data flowing to the current circulation node. It can be understood that the power monitoring data here refers to the data body itself, while the preceding traceability tag is the tag data attached in previous stages. The hash operation process ensures that any modification to the data will result in a significant change in the verification value. The calculated verification value of the preceding circulation node is essentially a cryptographic digest of the output state of the preceding stage. Subsequently, the system combines and encodes the three fields—node identifier, current timestamp, and verification value of the preceding circulation node—according to a predefined order and separator to generate the traceability tag corresponding to the current circulation node; optionally, the encoding method can be Base64 encoding or direct byte concatenation.

[0069] In practice, after generating the traceability tag, it needs to be embedded into the power monitoring data flowing to the current circulation node, forming a continuous traceability chain. Specifically, the generated traceability tag is appended as an additional data header before the data body of the power monitoring data flowing to the current circulation node. When a complete data packet is sent from the current circulation node, its structure becomes "current traceability tag" + "all previous traceability tags (if any)" + "original power monitoring data body". The power monitoring data with the appended traceability tag is then sent to the next circulation node. When power monitoring data flows to the next node in the chain, such as from the transmission gateway to the storage server, the storage server, as the next node, receives the complete data packet from the transmission gateway. The next node then generates its own traceability tag based on the received power monitoring data and all attached traceability tags, and attaches it. In some embodiments, the input for the hash operation when generating the traceability tag includes the sequence of all traceability tags from the previous node and the original data body, thus linking the traceability tags generated by all nodes in the chain in the order of flow, forming an unbreakable chain structure. It can be understood that the generation and embedding process of the traceability tag follows a general formula: Let the identifier of the current node be ID. c The current timestamp is T. c The received power monitoring data body is D, and the received preceding traceability tag sequence is Tag. pre Then the current node's source tag (Tag) c The calculation method is as follows:

[0070] Tag c =Encode(ID c ,T c ,H(D,Tag pre ))

[0071] Where: function H represents a predefined cryptographic hash function, and function Encode represents a combination and encoding function.

[0072] In one embodiment of the present invention, see [reference] Figure 3 When a source tracing query command is received, a set of source tracing tags is extracted from the target power monitoring data specified in the command. The source tracing query command is typically a structured data object containing query conditions. The system parses the source tracing query command to determine the target power monitoring data identifier to be queried. The target power monitoring data identifier is a key-value pair that uniquely points to a specific power monitoring data set. In some embodiments, the source tracing query command is passed in the form of an HTTP request, the request body of which contains a JSON object. The JSON object has a field named "dataId," the value of which is the target power monitoring data identifier. In some embodiments, the source tracing query command is transmitted through an internal message queue, the message content of which contains the target power monitoring data identifier field. The parsing process involves reading specific fields of the command or decoding the binary content of the command according to a predetermined protocol to obtain the target power monitoring data identifier string. The parsing process can be formally described as follows: Let the source tracing query command be Q, and the predefined identifier extraction rule function be Φ, then the target power monitoring data identifier I... target =Φ(Q). The implementation of function Φ depends on the specific format and protocol of the instructions.

[0073] In practical implementation, after successfully acquiring the target power monitoring data identifier I target Subsequently, the system retrieves and obtains the target power monitoring data from the power monitoring data repository based on the target power monitoring data identifier. The power monitoring data repository is a system component that persistently stores all completed power monitoring data and its additional information. In some embodiments, the power monitoring data repository is a relational database, where the target power monitoring data identifier corresponds to the primary key in the database table, and the retrieval operation is completed by executing an SQL query statement with that identifier as the condition. In other embodiments, the power monitoring data repository is a distributed file system or object storage, where the target power monitoring data identifier corresponds to a unique file path or object key, and the retrieval operation is completed by calling the storage service's read interface. The retrieved result is a complete target power monitoring data package containing potentially embedded traceability tags and the original data body.

[0074] In practical implementation, the system then sequentially extracts all embedded traceability tags from the supplementary data portion of the acquired target power monitoring data, forming a traceability tag set. Since the traceability tags are concatenated one by one as data headers before the data body in the order of data flow, the extraction process needs to start from the beginning of the data packet and parse and segment according to the fixed format and length of the traceability tags. Optionally, each traceability tag may contain a length prefix or separator mark to facilitate programmatic identification of each tag's boundaries. Sequential extraction means that the first extracted traceability tag corresponds to the earliest flow stage, and the last extracted traceability tag corresponds to the last flow stage. All extracted traceability tags are placed into a list or array structure, which is the traceability tag set. It can be understood that even if the target power monitoring data has undergone multiple flow stages, its data packet may contain multiple traceability tags. The extraction logic needs to traverse the entire supplementary data portion up to the beginning of the original data body to ensure that all historical traceability tags are completely collected.

[0075] In one embodiment of the present invention, the traceability tag set is arranged in timestamp order to obtain a sorted traceability tag sequence. The last traceability tag in the sorted sequence is used as the starting traceability point. A graph node corresponding to the node identifier of the last traceability tag is searched in the data flow graph. Using the verification values ​​of the preceding flow stage nodes contained in the traceability tag at the starting traceability point, a graph node whose node identifier matches the preceding verification value is searched backwards along the graph edge in the data flow graph. The verification values ​​of the preceding flow stage nodes in the traceability tag at the starting traceability point are obtained. All upstream graph nodes connected to the graph node at the starting traceability point by an incoming graph edge are obtained. The expected verification value corresponding to each upstream graph node is calculated. The expected verification value is a simulated calculation value of the verification value that should be generated by the upstream graph node according to a preset rule. The verification values ​​of the preceding flow stage nodes are then used to calculate the verification values ​​of the preceding flow stage nodes. The value is compared with the expected verification value corresponding to all upstream graph nodes. The upstream graph node whose expected verification value matches the verification value of the previous flow link node is determined as the graph node whose node identifier matches the previous verification value. For each upstream graph node, the node identifier of the upstream graph node in the data flow graph is obtained. The process of the upstream graph node generating traceability tags is simulated. According to the rules for generating traceability tags, the node identifier of the upstream graph node, the simulated timestamp of its generated tag, and the simulated verification value of the previous flow link of the upstream graph node are combined. The combination is hashed to obtain the expected verification value corresponding to the upstream graph node. The reverse search process is repeated until the graph node corresponding to the first traceability tag in the sorted traceability tag sequence is traced back to, or the verification value fails to match. All graph nodes that match successfully on the search path are determined as the target flow link node.

[0076] In practical implementation, based on the node identifiers and verification values ​​in the traceability tag set, path matching and backtracking are performed in the data flow graph to locate one or more target flow stage nodes in the data flow process. The specific process is as follows: The system arranges the traceability tag set according to timestamp order, resulting in a sorted traceability tag sequence. The timestamp order is usually ascending from earliest to latest, ensuring that the order of the traceability tag sequence is consistent with the historical order of data flow. The last traceability tag in the sorted traceability tag sequence is used as the starting tracing point. The last traceability tag represents the flow stage node where the power monitoring data is finally queried. The graph node corresponding to the node identifier of the last traceability tag is searched in the data flow graph; this is a direct node matching query operation.

[0077] In its implementation, the system utilizes the verification values ​​of preceding flow stage nodes contained in the traceability label of the starting traceability point to search backwards along the edges of the data flow graph for graph nodes whose node identifiers match the preceding verification values. The system retrieves the verification values ​​of the preceding flow stage nodes from the traceability label of the starting traceability point; these verification values ​​are either strings or hash values. It then retrieves all upstream graph nodes connected to the graph node of the starting traceability point by incoming graph edges, achieved by querying all edges in the data flow graph that terminate at the starting traceability point graph node. Finally, it calculates the expected verification value for each upstream graph node, which is a simulated calculation of the verification values ​​that should be generated for the upstream graph node according to preset rules. The system compares the verification values ​​of the preceding flow stage nodes with the expected verification values ​​of all upstream graph nodes, identifying the upstream graph nodes whose expected verification values ​​match the preceding flow stage nodes as those whose node identifiers match the preceding verification values. It is understandable that the core of the matching process lies in verifying whether the preceding check value matches the expected value calculated from a possible upstream node according to predetermined rules. Its logic can be formally expressed as: Let the preceding check value in the traceability tag at the starting traceability point be C. pre Let U be an upstream candidate node, and let Γ(U) be the function for calculating the expected verification value of candidate node U, if and only if C pre When Γ(U) = Γ(U), the candidate node U is determined as the predecessor node of the match. See Table 1.

[0078] Table 1: Collection of Traceability Tags

[0079]

[0080] In specific implementation, the process of calculating the expected verification value corresponding to each upstream graph node is as follows: For each upstream graph node, obtain the node identifier of the upstream graph node in the data flow graph. Simulate the process of the upstream graph node generating a traceability tag. According to the rules for generating traceability tags, combine the node identifier of the upstream graph node, the simulated timestamp of its generated tag, and the simulated verification value of the previous flow links of the upstream graph node. Perform a hash operation on the combination to obtain the expected verification value corresponding to the upstream graph node. In some embodiments, the simulated timestamp can be obtained from the timestamp field of the corresponding traceability tag extracted from the currently traced power monitoring data packet. In some embodiments, the simulated verification value of the previous flow links of the upstream graph node needs to be obtained by recursively simulating calculations to earlier upstream nodes until the initial node. The reverse search process is repeated, using the latest successfully matched graph node as the new starting point. The preceding checksum in its traceability tag is used to continue searching for earlier upstream nodes until the graph node corresponding to the first traceability tag in the sorted traceability tag sequence is reached, or the checksum match fails. A failed match may indicate that the data flow path is undefined in the data flow graph or that the traceability chain has been broken. All successfully matched graph nodes on the search path are identified as target flow stage nodes. These nodes, in ascending order, constitute the complete data flow path from source to destination.

[0081] See Figure 4 This is a two-bar chart showing the dynamic update trend of the data flow graph. The increase in the number of edges is greater than that of the number of nodes, reflecting the increasing complexity of the power monitoring data flow link. Clearly defining the graph's expansion pace allows for resource allocation for subsequent node / edge management; increased link complexity may increase the computational load for tracing, enabling early optimization of the tracing algorithm's efficiency; it demonstrates that the data flow graph can dynamically adapt to the expansion needs of the power monitoring system, ensuring the continuity of tracing capabilities. The higher increase in the number of edges compared to the number of nodes reflects the increased complexity of the data flow link, allowing for early prediction of changes in the tracing computation load, providing an early warning signal for optimizing the tracing algorithm and improving response efficiency.

[0082] In one embodiment of the present invention, after constructing the data flow graph, the method further includes dynamic maintenance and consistency processing of the data flow graph. Monitoring the operating status of the power monitoring system is the foundation of this process. Operating status monitoring includes continuous scanning and analysis of node registry, data flow configuration, and system logs. When a new flow link node is detected or the data flow relationship between existing flow link nodes changes, a graph update event is triggered. In some embodiments, the system uses a listening service to capture notification messages from the system configuration management platform. When an administrator adds a new data relay server or modifies data routing rules in the platform, the configuration management platform sends a message, which is then parsed as a graph update event. In some embodiments, the system automatically discovers data source-destination node pairs that have never appeared before by periodically auditing data flow logs, thereby inferring new data flow relationships and generating graph update events. Based on the graph update event, the system dynamically updates the data flow graph. The update operation includes adding new graph nodes and graph edges, or deleting invalid graph nodes and graph edges. The addition operation occurs when a new node or a new flow relationship is detected, and the deletion operation occurs when it is confirmed that a node has gone offline or a data flow has been permanently terminated.

[0083] In practical implementation, after dynamically updating the data flow map, the method also includes adaptive adjustments to historical traceability data, obtaining historical power monitoring data corresponding to affected nodes in the dynamically updated data flow map. Affected nodes typically refer to the physical nodes represented by map nodes that were added, deleted, or whose connection relationships changed during the update process. In some embodiments, if the update event involves adding a "data cleaning server" between the "transmission gateway" and the "storage server," then the "data cleaning server" is the newly added affected node, while the "transmission gateway" and "storage server" also become affected nodes due to their changed connection relationships. Based on the updated data flow map structure, the system performs consistency verification on the traceability tags embedded in the historical power monitoring data. The core of the consistency verification is to determine whether the flow path recorded in the historical data matches the path logic allowed by the updated map. It can be understood that the verification process requires re-simulating the historical data flow, calculating the expected sequence of verification values ​​based on the new map structure, and comparing it with the verification values ​​in the actually stored traceability tags.

[0084] In practice, if inconsistencies are found during verification, the relevant traceability tags are recalculated and relabeled to maintain the continuity and consistency of the traceability chain before and after the data flow graph update. Recalculation and relabeling primarily target traceability tags for specific stages where the expected verification value differs from the actual stored value due to changes in the graph structure. In some embodiments, the addition of a new node causes the verification value generated by the upstream node, which should have pointed to the old downstream node, to become invalid. This is because, according to the new graph, data must first pass through the new node. In this case, a traceability tag representing the new stage needs to be recalculated for the historical data flowing through the new node, and the verification values ​​of subsequent stages need to be recalculated. Optionally, relabeling can be achieved by creating a versioned or timestamped correction record. This record associates the new verification chain, conforming to the updated graph, with the original historical data, rather than directly overwriting the original data. Understandably, the purpose of this process is to ensure that no matter when the data flow graph evolves, a tracing query initiated based on any version of the graph can deduce a complete flow path that logically matches the valid graph structure at that time by correcting the records according to the corresponding tags, thereby maintaining the accuracy and authority of the tracing conclusions.

[0085] See Figure 5 This is a two-bar chart showing the long-term expansion trend of a data flow graph. The growth rate of the number of edges is much higher than that of the number of nodes, reflecting the continuous increase in the complexity of the data flow links as the system expands. Clearly defining the expansion rhythm of the graph provides a long-term basis for subsequent storage and computing resource allocation; the rapid increase in link complexity suggests the need to upgrade the tracing algorithm in advance (e.g., by introducing caching and parallel computing) to ensure response efficiency; the stable growth ratio of nodes to edges proves the logical rationality of data flow during system expansion, with no abnormal accumulation of redundant nodes / edges. The fact that the growth rate of the number of edges far exceeds that of the number of nodes indicates a rapid increase in the complexity of the data flow links, necessitating an upgrade of the tracing algorithm from "single-link backtracking" to "distributed parallel backtracking" to avoid a decline in tracing efficiency later.

[0086] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A method for tracing the source of power monitoring data based on data flow, characterized in that, The method includes: Identify the entire flow path of power monitoring data in the acquisition, transmission, storage and analysis stages, and determine multiple flow stage nodes; Each of the multiple flow link nodes is configured with a unique node identifier, and a data flow graph is constructed based on the data flow relationship between the multiple flow link nodes, with the multiple flow link nodes as graph nodes and the data flow relationship as graph edges. At each of the multiple transfer nodes, when power monitoring data is transferred to the current transfer node, a traceability tag is generated that includes the node identifier of the current transfer node, the current timestamp, and the verification value of the previous transfer node. The traceability tag is embedded in the power monitoring data flowing to the current flow node to form a continuous traceability chain; When a source tracing query instruction is received, a set of source tracing tags is extracted from the target power monitoring data specified in the source tracing query instruction. Based on the node identifiers and verification values ​​in the traceability tag set, path matching and backtracking are performed in the data flow graph to locate one or more target flow link nodes in the data flow process.

2. The method for tracing the source of power monitoring data based on data flow as described in claim 1, characterized in that, Based on the data flow relationships between the multiple flow link nodes, a data flow graph is constructed, with the multiple flow link nodes as graph nodes and the data flow relationships as graph edges, including: Enumerate the multiple circulation link nodes to obtain multiple circulation link node enumeration pairs; For each pair of flow link nodes, determine whether there is power monitoring data flowing from the previous flow link node to the next flow link node. If so, determine that there is a data flow relationship between the pair of flow link nodes, and construct a directed graph edge with the previous flow link node as the starting node and the next flow link node as the ending node. All constructed graph edges are gathered, and the multiple flow link nodes are used as graph nodes to form the data flow graph that represents the complete flow path of power monitoring data.

3. The method for tracing the source of power monitoring data based on data flow as described in claim 1, characterized in that, At each of the multiple transfer node stages, when power monitoring data flows to the current transfer node, a traceability tag is generated containing the node identifier of the current transfer node, the current timestamp, and the verification value of the previous transfer node, including: When power monitoring data flows to the current flow link node, obtain the node identifier of the current flow link node; Get the system's current time as the current timestamp; Hash operations are performed on the power monitoring data transferred to the current transfer node and the preceding traceability tags carried by the power monitoring data transferred to the current transfer node to calculate the verification value of the preceding transfer node. The node identifier, the current timestamp, and the verification value of the preceding circulation node are combined and encoded to generate the traceability tag corresponding to the current circulation node.

4. The method for tracing power monitoring data based on data flow as described in claim 3, characterized in that, The traceability tag is embedded in the power monitoring data flowing to the current flow node to form a continuous traceability chain, including: The generated traceability tag is used as an additional data header and appended to the data body of the power monitoring data that flows to the current flow node; The power monitoring data with the traceability tag attached is sent to the next link in the process flow; When power monitoring data flows to the next node in the process, the next node will generate its own traceability tag based on the power monitoring data it receives and all the traceability tags attached to it, so that the traceability tags generated by all nodes in the process are linked in the order of flow.

5. The method for tracing the source of power monitoring data based on data flow as described in claim 1, characterized in that, When a source tracing query command is received, a set of source tracing tags is extracted from the target power monitoring data specified in the source tracing query command, including: Parse the source tracing query command to determine the identifier of the target power monitoring data to be queried; Based on the target power monitoring data identifier, retrieve and obtain the target power monitoring data from the power monitoring data repository; From the additional data portion of the acquired target power monitoring data, all embedded traceability tags are sequentially extracted to form the traceability tag set.

6. The method for tracing the source of power monitoring data based on data flow as described in claim 1, characterized in that, Based on the node identifiers and verification values ​​in the traceability tag set, path matching and backtracking are performed in the data flow graph to locate one or more target flow stage nodes in the data flow process, including: The traceability tag set is arranged in timestamp order to obtain a sorted traceability tag sequence; Using the last traceability tag in the sorted traceability tag sequence as the starting traceability point, find the graph node in the data flow graph that corresponds to the node identifier of the last traceability tag in the sorted traceability tag sequence; Using the verification value of the preceding flow link node contained in the traceability tag of the starting traceability point, the graph node whose node identifier matches the preceding verification value is searched in reverse along the graph edge in the data flow graph. Repeat the reverse search process until the first tracing tag in the sorted tracing tag sequence corresponds to the graph node, or the check value fails to match. All graph nodes that are successfully matched on the search path are identified as the target flow link nodes.

7. The method for tracing power monitoring data based on data flow as described in claim 6, characterized in that, Using the verification values ​​of the preceding flow nodes contained in the traceability tag of the starting traceability point, the graph node whose node identifier matches the preceding verification value is searched backwards along the graph edge in the data flow graph, including: Obtain the verification value of the preceding circulation node in the traceability tag of the starting traceability point; Obtain all upstream graph nodes that have incoming graph edges connected to the graph node of the starting tracing point; Calculate the expected verification value for each upstream graph node, wherein the expected verification value is a simulated calculation value of the verification value that should be generated for the upstream graph node according to a preset rule; The verification value of the preceding flow node is compared with the expected verification value corresponding to all upstream graph nodes; The upstream graph node whose expected verification value matches the verification value of the preceding flow node is identified as the graph node whose node identifier matches the preceding verification value.

8. The method for tracing the source of power monitoring data based on data flow as described in claim 7, characterized in that, Calculate the expected check value for each upstream graph node, including: For each upstream graph node, obtain the node identifier of the upstream graph node in the data flow graph; The process of generating traceability tags by the upstream graph node is simulated. According to the rules for generating traceability tags, the node identifier of the upstream graph node, the simulated timestamp of its generated tag, and the simulated verification value of the previous circulation links of the upstream graph node are combined. A hash operation is performed on the combination to obtain the expected verification value corresponding to the upstream graph node.

9. The method for tracing the source of power monitoring data based on data flow as described in claim 1, characterized in that, After constructing the data flow graph, the method further includes: Monitor the operating status of the power monitoring system. When a new data transfer node is detected or the data transfer relationship between existing data transfer nodes changes, a graph update event is triggered. Based on the graph update event, the data flow graph is dynamically updated, including adding new graph nodes and graph edges, or deleting invalid graph nodes and graph edges.

10. The method for tracing the source of power monitoring data based on data flow as described in claim 9, characterized in that, After dynamically updating the data flow map, the method further includes: Obtain historical power monitoring data corresponding to the affected nodes in the dynamically updated data flow map; Based on the updated data flow graph structure, the consistency of the verification values ​​of the traceability tags embedded in the historical power monitoring data is verified. If inconsistencies are found during verification, the relevant traceability tags are recalculated and remarked to maintain the continuity and consistency of the traceability chain before and after the data flow map is updated.