Construction method and device of graph model, computer device and storage medium

CN122594550APending Publication Date: 2026-08-18SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611009402.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,这种分散式的数据管理方式在实际应用中存在明显局限:由于不同类型数据之间缺乏统一的关联索引,当系统出现异常时,运维人员需要花费大量时间在多份数据中手动查找、拼凑线索,难以快速定位异常相关的数据范围,也无法高效地追溯异常的产生路径,导致故障排查效率低下,且容易遗漏关键信息

Benefits of technology

[0058] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the method for constructing a graph model as described in any of the embodiments of this disclosure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594550A_ABST
    Figure CN122594550A_ABST
Patent Text Reader

Abstract

The application relates to a graph model construction method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: acquiring power data, metadata structure corresponding to the power data and environment information of the power data; determining the modal type of the power data according to the power data and the metadata structure; mapping the power data and the corresponding metadata structure into corresponding node vectors according to the modal type; determining an initial correlation according to the semantic similarity between the node vectors; determining a target correlation between the node vectors according to the initial correlation and the environment information; and connecting the node vectors according to the target correlation to obtain a target graph model. The method can determine the node corresponding to abnormal data and the node path, and locate the abnormal source through the node path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power data processing technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for constructing a graph model. Background Technology

[0002] With the development of digital technology in power systems, power data is characterized by being multi-source, heterogeneous, and massive. Traditionally, power data is typically stored and managed separately according to data type, such as storing telemetry data, equipment status records, and environmental parameters independently. When analyzing abnormal events or tracing the source of a fault, manual querying and correlation analysis between different data tables is often required. However, this decentralized data management approach has significant limitations in practical applications: due to the lack of a unified index linking different data types, when system anomalies occur, maintenance personnel need to spend a significant amount of time manually searching and piecing together clues from multiple datasets, making it difficult to quickly locate the data range related to the anomaly or efficiently trace its path. This results in low troubleshooting efficiency and a high risk of missing crucial information. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for constructing a graph model to address the aforementioned technical problems.

[0004] Firstly, this application provides a method for constructing a graph model. The method includes:

[0005] Acquire power data, the corresponding metadata structure of the power data, and the environmental information of the power data; and determine the modality type of the power data based on the power data and the metadata structure; the environmental information includes at least one of the following: acquisition time, geographic identifier, and device identifier;

[0006] Based on the modality type, the power data and the corresponding metadata structure are mapped to the corresponding node vector;

[0007] An initial association relationship is determined based on the semantic similarity between the node vectors; and a target association relationship is determined between the node vectors based on the initial association relationship and the environmental information.

[0008] Based on the target association relationship, the node vectors are connected to obtain the target graph model; wherein, the target graph model is used to determine the nodes and node paths corresponding to abnormal data; the node paths are used to determine the source of the anomaly.

[0009] In one embodiment, acquiring power data, the metadata structure corresponding to the power data, and the environmental information of the power data includes:

[0010] Collect multi-source power data and corresponding environmental data;

[0011] The multi-source power data is standardized and cleaned to obtain power data.

[0012] Based on the environmental data, determine the metadata structure of the power data.

[0013] In one embodiment, determining the modality type of the power data based on the power data and the metadata structure includes:

[0014] Extract the semantic features of the power data;

[0015] Extract the structural features of the power data, which include at least one of the following: data distribution, value range, and shape data;

[0016] Based on the semantic features and the structural features, the data type of the power data is determined by a modal classification model; wherein, the data type includes tabular data, text data, image data, and time-series signals.

[0017] In one embodiment, mapping the power data and the corresponding metadata structure to a corresponding node vector according to the modality type includes:

[0018] When the modal type of the power data is image modal type, a convolutional neural network is used to extract key frame features, and the extracted features are mapped to node vectors;

[0019] When the modal type of the power data is text, a word embedding model is used to convert the text content into a vector representation;

[0020] When the modal type of the power data is tabular data, numerical normalization and field concatenation are used to map it into a node vector;

[0021] When the mode type of the power data is a time-series signal mode, it is mapped into a vector using normalization and field concatenation.

[0022] In one embodiment, determining the initial association relationship based on the semantic similarity between the node vectors includes:

[0023] Calculate the cosine similarity between the node vectors as the first similarity measure;

[0024] Calculate the Euclidean distance between the node vectors as a second similarity metric;

[0025] The initial association relationship is determined by combining the first similarity metric and the second similarity metric.

[0026] In one embodiment, determining the target association relationship between the node vectors based on the initial association relationship and the environmental information includes:

[0027] The temporal correlation between the node vectors is determined based on the acquisition time of each power data.

[0028] Based on the geographical location and device identifier of each power data point, the spatial association between the node vectors is determined;

[0029] The target association is determined by combining the semantic similarity, temporal association, and spatial association in the initial association.

[0030] Secondly, this application also provides an apparatus for constructing a graph model. The apparatus includes:

[0031] The data acquisition module is used to acquire power data, the metadata structure corresponding to the power data, and the environmental information of the power data; and to determine the modality type of the power data based on the power data and the metadata structure; the environmental information includes at least one of the following: acquisition time, geographic identifier, and device identifier;

[0032] The vector mapping module is used to map the power data and the corresponding metadata structure into corresponding node vectors according to the modality type.

[0033] The association determination module is used to determine an initial association relationship based on the semantic similarity between the node vectors; and to determine a target association relationship between the node vectors based on the initial association relationship and the environmental information.

[0034] The model building module is used to connect the node vectors according to the target association relationship to obtain a target graph model; wherein, the target graph model is used to determine the nodes and node paths corresponding to abnormal data; the node paths are used to determine the source of the anomaly.

[0035] In one embodiment, the data acquisition module is further configured to:

[0036] Collect multi-source power data and corresponding environmental data;

[0037] The multi-source power data is standardized and cleaned to obtain power data.

[0038] Based on the environmental data, determine the metadata structure of the power data.

[0039] In one embodiment, the data acquisition module is further configured to:

[0040] Extract the semantic features of the power data;

[0041] Extract the structural features of the power data, which include at least one of the following: data distribution, value range, and shape data;

[0042] Based on the semantic features and the structural features, the data type of the power data is determined by a modal classification model; wherein, the data type includes tabular data, text data, image data, and time-series signals.

[0043] In one embodiment, the vector mapping module is further configured to:

[0044] When the modal type of the power data is image modal type, a convolutional neural network is used to extract key frame features, and the extracted features are mapped to node vectors;

[0045] When the modal type of the power data is text, a word embedding model is used to convert the text content into a vector representation;

[0046] When the modal type of the power data is tabular data, numerical normalization and field concatenation are used to map it into a node vector;

[0047] When the mode type of the power data is a time-series signal mode, it is mapped into a vector using normalization and field concatenation.

[0048] In one embodiment, the association determination module is further configured to:

[0049] Calculate the cosine similarity between the node vectors as the first similarity measure;

[0050] Calculate the Euclidean distance between the node vectors as a second similarity metric;

[0051] The initial association relationship is determined by combining the first similarity metric and the second similarity metric.

[0052] In one embodiment, the association determination module is further configured to:

[0053] The temporal correlation between the node vectors is determined based on the acquisition time of each power data.

[0054] Based on the geographical location and device identifier of each power data point, the spatial association between the node vectors is determined;

[0055] The target association is determined by combining the semantic similarity, temporal association, and spatial association in the initial association.

[0056] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the graph model construction method as described in any one of the embodiments of this disclosure.

[0057] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the method for constructing a graph model as described in any one of the embodiments of this disclosure.

[0058] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the method for constructing a graph model as described in any of the embodiments of this disclosure.

[0059] The aforementioned graph model construction method, apparatus, computer equipment, storage medium, and computer program product uniformly map multi-source power data of different modalities into node vectors, and determine the target association relationships between nodes by combining semantic association, temporal association, and spatial association, ultimately constructing a target graph model that can completely express the association relationships of power data. This unified graph structure modeling method eliminates the step of manual cross-table query association. When an anomaly occurs in the power system, the range of anomaly-related data can be quickly located directly through the node paths in the graph model, tracing the path of the anomaly, greatly improving the efficiency of fault diagnosis. It also avoids the problem of missing key information during manual diagnosis, solving the problem of low fault diagnosis efficiency caused by traditional distributed power data management methods. Attached Figure Description

[0060] Figure 1 This is an application environment diagram of a graph model construction method in one embodiment;

[0061] Figure 2 This is a flowchart illustrating a method for constructing a graph model in one embodiment;

[0062] Figure 3 This is a flowchart illustrating the implementation of a graph model construction method in one embodiment;

[0063] Figure 4 This is a structural block diagram of a device for constructing a graphical model in one embodiment;

[0064] Figure 5This is a structural block diagram of a graph model construction system in one embodiment;

[0065] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

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

[0067] The graph model construction method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. In this application environment, terminal 102 can collect or receive power data, corresponding metadata structures, and environmental information (such as collection time, geographic identifier, and device identifier) ​​from different data sources and upload them to server 104. Server 104 is configured to execute the method in this embodiment: determine the modal type based on the power data and its metadata structure; map the power data and metadata structure to corresponding node vectors; calculate the semantic similarity between node vectors to determine the initial association relationship; then combine the environmental information to determine the target association relationship; connect the node vectors according to the target association relationship to construct a target graph model. This model can be used for subsequent abnormal data node location and abnormal source path analysis. The processed model and analysis results can be stored in the data storage system or returned to terminal 102. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0068] In one embodiment, such as Figure 2 As shown, a method for constructing a graph model is provided, including the following steps:

[0069] Step S200: Obtain power data, the metadata structure corresponding to the power data, and the environmental information of the power data; and determine the modality type of the power data based on the power data and the metadata structure; the environmental information includes at least one of the following: collection time, geographic identifier, and device identifier.

[0070] Among them, power data can include various types of data generated during the operation of the power system, specifically including telemetry data, equipment status records, environmental monitoring data, fault event records, and other data from different sources and of different types; metadata structure can be used to describe the structured information of power data attributes, and can be used to clarify the source, meaning and applicable scenarios of the data.

[0071] The power data can be collected through different power monitoring terminals and management systems. The collected raw multi-source data can be standardized and cleaned to remove redundant, missing, and invalid data, and then uniformly organized into power data that conforms to the standard format. At the same time, the corresponding metadata structure is extracted and organized from the environmental data accompanying the collection.

[0072] In one exemplary embodiment, acquiring power data involves collecting multi-source raw power data and corresponding environmental data from different data sources within the power system. The collected raw data undergoes standardization and data cleaning to remove erroneous, duplicate, missing, or invalid data, resulting in standardized power data. The metadata structure corresponding to this power data is then compiled based on the collected environmental data. Determining the modality type involves extracting semantic and structural features corresponding to the power data. Structural features may include one or more of data distribution, value range, and shape data. These two types of features are then input into a pre-trained modality classification model to output the modality type corresponding to the power data, which can be specifically categorized into four types: tabular data, text data, image data, and time-series signals.

[0073] Step S202: Based on the modality type, map the power data and the corresponding metadata structure into the corresponding node vector.

[0074] For different modalities of power data, appropriate feature extraction and mapping methods can be used to obtain node vectors of a unified dimension, ensuring the consistency of subsequent correlation calculations: For image-modal power data, such as infrared inspection images of power equipment and on-site monitoring images, convolutional neural networks can be used to extract key features of the images and convert the extracted features into node vectors of a fixed dimension; For text-modal power data, such as unstructured text like fault repair records and dispatch logs, pre-trained word embedding models can be used to convert the text content into a vector representation of a fixed dimension; For tabular data-modal power data, such as structured data like equipment ledgers and operating parameter statistics tables, each numerical field can be normalized, and all normalized fields can be concatenated to obtain the corresponding node vector; For time-series signal-modal power data, such as current and voltage waveforms and load time-series curves, the signal can be normalized, and the corresponding node vector can be obtained by concatenating the fields.

[0075] Step S204: Determine the initial association relationship based on the semantic similarity between the node vectors; and determine the target association relationship between the node vectors based on the initial association relationship and the environmental information.

[0076] The semantic similarity between node vectors can be used to characterize the degree of association between different power data in terms of content meaning. During calculation, cosine similarity can be used as the first similarity metric to measure differences in vector direction, and Euclidean distance as the second similarity metric to measure differences in vector spatial location. Combining the results of these two metrics yields the initial semantic association between nodes. Additional association dimensions can be added by incorporating environmental information accompanying the power data: based on the acquisition time of each power data point, the temporal sequence and proximity between nodes are analyzed to obtain temporal associations; based on the geographical location information and equipment identifiers corresponding to each power data point, the spatial location affiliation and association with the same equipment between nodes are analyzed to obtain spatial associations; and the initial semantic associations are then fused with temporal and spatial associations to obtain the target associations that fully express the multi-dimensional associations between nodes.

[0077] Step S206: Based on the target association relationship, connect the node vectors to obtain a target graph model; wherein, the target graph model is used to determine the nodes and node paths corresponding to abnormal data; the node paths are used to determine the source of the anomaly.

[0078] Each node vector represents a piece of power data. The weights of the connecting edges between nodes are set according to the strength of their target correlation; the stronger the correlation, the higher the weight of the connecting edge. No connecting edges are set between nodes without effective correlation. Ultimately, the scattered multi-source power data can be integrated into a target graph model containing complete multi-dimensional correlation information. When an anomaly occurs in the power system, the system can directly start from the detected abnormal data node and traverse the associated nodes along the connecting edges with higher weights in the graph model. This allows for a quick identification of the complete node path from the anomaly's origin to its spread, helping maintenance personnel quickly trace the source of the anomaly, locate the fault's location and impact range, and eliminate the tedious steps of manually querying and sorting data correlations across systems.

[0079] In one exemplary embodiment, when a power system experiences an abnormal current exceeding the limit on a transmission line, maintenance personnel can directly locate the timing signal node corresponding to the current exceeding the limit from the target graph model. By traversing along the connection edges with higher weights in the graph, they can sequentially find the voltage data node of the corresponding substation, the load data node of the upstream transmission line, the meteorological monitoring data node of the corresponding area, and the historical fault record node of the corresponding equipment. This allows them to trace the complete correlation path and quickly pinpoint that the current exceeding the limit was caused by a sudden increase in load due to extreme high temperatures in the region and a decline in the insulation performance of aging equipment, significantly shortening the time for fault tracing.

[0080] The aforementioned graph model construction method maps multi-source power data of different modalities into node vectors and determines the target association relationships between nodes by combining semantic, temporal, and spatial associations. This ultimately constructs a target graph model that can fully express the association relationships of power data. This unified graph structure modeling method eliminates the need for manual cross-table queries. When an anomaly occurs in the power system, the relevant data range can be quickly located directly through the node paths in the graph model, tracing the path of the anomaly and significantly improving the efficiency of fault diagnosis. It also avoids the problem of missing key information during manual diagnosis, solving the problem of low fault diagnosis efficiency caused by traditional distributed power data management methods.

[0081] In one embodiment, acquiring power data, the metadata structure corresponding to the power data, and the environmental information of the power data includes:

[0082] Collect multi-source power data and corresponding environmental data.

[0083] The multi-source power data is standardized and cleaned to obtain power data.

[0084] Based on the environmental data, determine the metadata structure of the power data.

[0085] Multi-source power data can originate from dispersed storage data across different business systems and monitoring terminals within the power system. Standardization processing unifies the format and coding standards of data from different sources. Data cleaning removes duplicate, incorrectly formatted, and missing key information, preventing invalid data from interfering with subsequent modeling and ensuring stable and reliable data quality in the input modeling stage. The resulting metadata structure clearly labels the source, business meaning, and attribute information of each power data point, providing an accurate basis for subsequent modality type determination.

[0086] In one exemplary embodiment, the system can collect telemetry data from the system, maintenance records from the fault management system, and equipment images from the infrared inspection system. After standardization processing to unify the data storage format and encoding rules, and removing duplicate fault records and telemetry data with missing collection times, qualified multi-source power data is obtained. Then, the data source identifier, collection time, business attributes, and equipment code of each data point are extracted from the original collection environment data, and the corresponding metadata structure is generated.

[0087] In this embodiment, the original multi-source power data is standardized and cleaned to remove duplicate, missing, and incorrectly formatted invalid data, ensuring the quality of the data input into the modeling process. At the same time, the source, identifier, and other structured information in the environmental data are extracted and organized into metadata structure, providing accurate basic information for subsequent modality type determination and feature mapping.

[0088] In one embodiment, determining the modal type of the power data based on the power data and the metadata structure includes:

[0089] Extract the semantic features of the power data.

[0090] Extract the structural features of the power data, which include at least one of the following: data distribution, value range, and shape data.

[0091] Based on the semantic features and the structural features, the data type of the power data is determined by a modal classification model; wherein, the data type includes tabular data, text data, image data, and time-series signals.

[0092] Among them, the semantic and structural features of different types of power data can be significantly different. Semantic features can reflect the business semantic attributes of the data itself, while structural features can intuitively reflect the differences in storage format and numerical distribution of different modal data. The two types of features can be combined and input into the modality classification model to accurately identify the modality type corresponding to each power data, providing a basis for subsequent feature mapping adaptation. The modality classification model can be pre-trained using labeled multimodal power data samples and has stable classification accuracy.

[0093] In one exemplary embodiment, when extracting semantic features from power data from different sources, semantic vectors describing the data source type, business attributes, and data purpose can be extracted from the metadata structure, and combined with the content of the power data itself to extract the overall semantic features; structural features can be extracted according to the data storage format to extract the corresponding data distribution statistics, numerical value range, and overall storage shape parameters. After concatenating the two types of features, they are input into the trained modality classification model, which can output the modality classification result corresponding to the power data.

[0094] In this embodiment, by extracting information from two dimensions—semantic features and structural features—and combining them with a modality classification model, the modality classification of different types of power data is automatically completed. This can adapt to the classification needs of multi-source heterogeneous data in the power system, eliminating the need for manual labeling of data types one by one. This improves the automation and accuracy of modality judgment and provides an accurate basis for subsequent differentiated feature mapping of different modal data.

[0095] In one embodiment, mapping the power data and the corresponding metadata structure to a corresponding node vector according to the modality type includes:

[0096] When the modal type of the power data is image modal type, a convolutional neural network is used to extract key frame features, and the extracted features are mapped to node vectors.

[0097] When the modal type of the power data is text, a word embedding model is used to convert the text content into a vector representation.

[0098] When the modal type of the power data is tabular data, it is mapped to a node vector using numerical normalization and field concatenation.

[0099] When the mode type of the power data is a time-series signal mode, it is mapped into a vector using normalization and field concatenation.

[0100] Among them, data from different modalities can be extracted using appropriate feature extraction methods, which can fully extract the effective information contained in each data, and finally generate node vectors of the same dimension. This not only ensures the effectiveness of feature extraction, but also provides a uniform input for subsequent calculation of node association relationships, avoiding calculation errors caused by inconsistent feature dimensions of data from different modalities.

[0101] In one exemplary embodiment, the substation equipment ledger data in the tabular modality can include multiple numerical and categorical fields such as equipment model, years of operation, rated capacity, and current health score. Numerical fields can be normalized and scaled to a uniform value range, while categorical fields can be converted using one-hot encoding. Concatenating all processed fields yields a fixed-dimensional node vector. For the weekly load curve data in the time-series modality, the sampled values ​​at different times can be uniformly normalized, and all time-series points can be directly concatenated to obtain the corresponding dimensional node vector. Ultimately, all different modalities of power data can obtain a vector representation with consistent dimensions. For infrared inspection images of power equipment in the image modality, key features such as equipment texture and temperature distribution can be extracted layer by layer using a convolutional neural network. The final output feature map is stretched and converted into a fixed-length one-dimensional node vector. For fault maintenance records in the text modality, a pre-trained BERT word embedding model can be used to encode the entire maintenance text into a fixed-dimensional vector representation, ensuring that all output node vectors have completely consistent dimensions.

[0102] In this embodiment, by matching appropriate feature extraction and mapping methods for different modalities of power data, the advantages of different feature extraction methods can be fully utilized. While retaining the core information of power data of different modalities, heterogeneous data is uniformly mapped into node vectors of the same dimension, providing a unified data foundation for subsequent correlation calculations and avoiding interference caused by differences in heterogeneous data formats to correlation analysis.

[0103] In one embodiment, determining the initial association relationship based on the semantic similarity between the node vectors includes:

[0104] Calculate the cosine similarity between the node vectors as the first similarity metric.

[0105] Calculate the Euclidean distance between the node vectors as a second similarity metric.

[0106] The initial association relationship is determined by combining the first similarity metric and the second similarity metric.

[0107] Cosine similarity measures the similarity between two vectors in a direction, which is more in line with the semantic level of proximity judgment, while Euclidean distance reflects the actual distance difference between two vectors in space. By weighting and fusing the two measurement results according to preset weights, a comprehensive similarity that takes into account both semantic direction and spatial position can be obtained. Finally, node pairs with a comprehensive similarity higher than a preset threshold are identified as having an initial association, thus obtaining a complete initial association relationship. Compared with a single measurement method, this can more accurately reflect the true semantic association between nodes and improve the accuracy of the initial association relationship.

[0108] In one exemplary embodiment, weight parameters can be set in advance based on historically labeled associated data. The cosine similarity is normalized and multiplied by a first weight, and the normalized Euclidean distance is converted into a similarity form and multiplied by a second weight. The two results are added together to obtain a comprehensive similarity. Node pairs with a comprehensive similarity exceeding a threshold are retained as node pairs with initial semantic association, thereby determining the initial association relationship between all nodes.

[0109] In this embodiment, the semantic association between nodes is judged by combining the measurement results of two dimensions: cosine similarity and Euclidean distance. This takes into account both the differences in the meaning of the content along the vector direction and the differences in the distance in the vector space. Compared with a single measurement method, it can more accurately reflect the actual semantic association between nodes, improve the accuracy of the initial association judgment, and provide a more reliable foundation for the subsequent fusion of multi-dimensional associations to obtain the final target association.

[0110] In one embodiment, determining the target association relationship between the node vectors based on the initial association relationship and the environmental information includes:

[0111] The temporal correlation between the node vectors is determined based on the acquisition time of each power data.

[0112] Based on the geographical location and device identifier of each power data point, the spatial association between the node vectors is determined;

[0113] The target association is determined by combining the semantic similarity, temporal association, and spatial association in the initial association.

[0114] Semantic association can characterize the association at the content level of power data, while the time synchronization and spatial equipment affiliation of the power data itself are key association dimensions. By weighting and fusing the weights of these three types of associations according to a preset ratio, the final association degree between nodes can be obtained by comprehensively considering multi-dimensional information. Node pairs with a final association degree higher than a preset target threshold are identified as having a target association, thus obtaining the target association relationship between all node vectors. This multi-dimensional fusion association determination method can compensate for the shortcomings of single semantic association, better align with the data association logic in actual power system operations, and improve the accuracy and completeness of the final association relationship.

[0115] In one exemplary embodiment, the semantic similarity, temporal correlation, and spatial correlation can be normalized first, and then multiplied by preset semantic weights, temporal weights, and spatial weights respectively. The results are then summed to obtain a comprehensive correlation score. Node pairs with scores higher than a preset threshold are retained as having target correlations, and finally, the target correlation relationships between all nodes are obtained.

[0116] In this embodiment, by sorting out the temporal correlation from the dimension of collection time and the spatial correlation from the dimensions of geographical location and equipment affiliation, the multi-dimensional correlation information is integrated, which makes up for the shortcomings of relying solely on semantic similarity to judge the correlation relationship due to the single dimension. It can more completely cover the various correlations that actually exist between power data, and the final target correlation relationship is more in line with the actual correlation logic of power system data, providing a more comprehensive correlation basis for the subsequent construction of an accurate target graph model.

[0117] In one exemplary embodiment, the method for constructing the graph model can be as follows: Figure 3 The implementation shown may specifically include:

[0118] Step S300: Obtain multi-source power data, perform standardized cleaning processing on the multi-source power data, and obtain raw cleaned data.

[0119] The standardized and clear processing may include: unifying the time of multi-source power data; calculating a unified time based on local time, combined with time zone time and synchronization error; specifically: T 统一 =T 本地 +t 时区 +t 同步误差 ID uniqueness processing; based on the device ID, a timestamp is added and the digest is processed for core refinement; specifically: ID 唯一 =ID 设备 +T 时间戳 +Z 摘要 Format standardization processing; converting the same data types in multi-source power data into the same format.

[0120] Step S302: Based on the original cleaned data, obtain the metadata structure of each original cleaned data to obtain the modality classification function.

[0121] The metadata structure type includes data source, file type, encoding method, timestamp, sampling frequency, etc.; that is, Mi=[m i,1 m i,2 m i,3 ,…,m i,j ], where m i , where j is the metadata structure type. Specifically: map Φ(Di, Mi) to dataset U; Where r is the modality determination under modality classification function validation; at this point, after obtaining the modality classification function, the modality type classification determination for a data point is r. i .

[0122] Step S304: Based on the multi-modal data of multi-source power data, namely the original cleaned data, metadata structure and modal data, the multi-modal data is subjected to embedded processing to obtain the embedded modal function, namely the node vector.

[0123] Here, the node vector refers to the semantics of multi-source power data mapped to specific multimodal data; that is, after cleaning and modality recognition, the data is essentially a node. Specifically: v i =EE ri (D i M i It needs to be explained that EE ri (·) is based on each modality type r i Specific representation methods; embedded processing methods include: data normalization processing, field concatenation processing; feature processing; CNN feature extraction; keyframe extraction processing.

[0124] Step S306: Based on node vectors, obtain spatiotemporal information of multi-source power data, including collection time, geographical location and equipment identification, and construct data quadruples; obtain the associated nodes in the data that meet the correlation threshold, and then construct a graph structure based on node and edge types.

[0125] Specifically, the process involves obtaining associated nodes j that meet the relevance threshold from the data, and then constructing a graph structure ω, ω={vi|(i,j|relevance meets the threshold)} based on node and edge types. The relevance calculation for associated nodes j is as follows: AA: Obtain the vector nodes vj and vi of node j; perform vector similarity calculation to obtain the vector similarity S(i,j). AB: Calculate the temporal correlation degree G(i,j), that is, the closer the timestamps of nodes i and j are, the higher the correlation degree; specifically, ; t0 is a time-sensitive factor, such as 30s; AC: Calculate the spatial correlation degree K(i,j). If the geographical location and / or device identifier are adjacent, the spatial correlation degree is 1, otherwise it is 0; AD: Calculate the correlation X(i,j) by X(i,j)=η1×S(i,j)+η2×G(i,j)+η3×K(i,j); If the correlation X(i,j) is greater than the correlation threshold, then node j is an associated node.

[0126] Step S308: Based on the abnormal data nodes, the data nodes are incorporated into the graph structure, and then the original cleaned data, metadata structure and modal data of the abnormal data nodes are obtained; further, abnormal multi-source power data are obtained.

[0127] In this process, the source tracing object is not just the node itself, but the data modal elements behind it. When an anomaly occurs in a node, the source is traced upwards to achieve semantic type tracing, feature space tracing, and behavioral semantic chain tracing. That is, what modality did this data originally belong to, at what step did the vector become distorted, and which anomaly handling was performed? For example, if an abnormally high voltage alarm value is found in a certain abnormal node, and it is "not physically explainable", then the source is traced upwards and the following is found: the modality type "image frame + edge estimation" is abnormal from the image measurement results; the edge image to numerical conversion module (convolution + regression mapping) is abnormal; the acquisition frame is abnormal (high blur, uneven illumination). Then, the modality node vector deviation is calculated. If it deviates significantly from the standard illumination image distribution, it is located that: the source image acquisition module took abnormal pictures in the edge device, which caused the downstream estimation deviation and caused the voltage alarm false alarm. By unifying the access of data such as video images, text, and time-series data, aligning timestamps with UID numbers, and extracting metadata, the barriers between different systems and data types are completely broken down. This lays the foundation for standard interfaces for subsequent data fusion and analysis, solves the problem of heterogeneous data formats, achieves multi-system alignment, and improves data preprocessing efficiency. Through modal classification functions combined with three dimensions—semantics, structure, and acquisition method—data modality classification is achieved. A modal embedding model is constructed to map all data to a unified vector space, enabling the fusion and comparison of cross-modal data in the same representation space. This allows data from completely different dimensions, such as videos, voltage curves, and operation logs, to participate in the same graph structure modeling and analysis. A directed graph structure is constructed, where each node represents a piece of data or a processing behavior, and edges represent the logical change relationships between data. By leveraging graph algorithms to trace the source and detect tampering of abnormal nodes, it can quickly locate the entire path from "abnormal result" to "origin of cause." It can not only identify abnormal data, but also abnormal behavior, unauthorized operations, and forged nodes. It supports comparison with standard path templates to improve identification accuracy and reliability, making it easier for operation and maintenance personnel and schedulers to intuitively understand the source and propagation path of problematic data. It introduces graph isomorphism and path matching methods to support automated anomaly perception and alarms. It improves the transparency and response speed of the system and reduces human intervention and misjudgment.

[0128] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0129] Based on the same inventive concept, this application also provides a graph model construction apparatus for implementing the graph model construction method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations of one or more graph model construction apparatus embodiments provided below can be found in the limitations of the graph model construction method described above, and will not be repeated here.

[0130] In one embodiment, such as Figure 4 As shown, a graph model construction apparatus 400 is provided, including: a data acquisition module 401, a vector mapping module 403, an association determination module 405, and a model construction module 407, wherein:

[0131] The data acquisition module is used to acquire power data, the metadata structure corresponding to the power data, and the environmental information of the power data; and to determine the modality type of the power data based on the power data and the metadata structure; the environmental information includes at least one of the following: acquisition time, geographic identifier, and device identifier;

[0132] The vector mapping module is used to map the power data and the corresponding metadata structure into corresponding node vectors according to the modality type.

[0133] The association determination module is used to determine an initial association relationship based on the semantic similarity between the node vectors; and to determine a target association relationship between the node vectors based on the initial association relationship and the environmental information.

[0134] The model building module is used to connect the node vectors according to the target association relationship to obtain a target graph model; wherein, the target graph model is used to determine the nodes and node paths corresponding to abnormal data; the node paths are used to determine the source of the anomaly.

[0135] In one embodiment, the data acquisition module is further configured to:

[0136] Collect multi-source power data and corresponding environmental data;

[0137] The multi-source power data is standardized and cleaned to obtain power data.

[0138] Based on the environmental data, determine the metadata structure of the power data.

[0139] In one embodiment, the data acquisition module is further configured to:

[0140] Extract the semantic features of the power data;

[0141] Extract the structural features of the power data, which include at least one of the following: data distribution, value range, and shape data;

[0142] Based on the semantic features and the structural features, the data type of the power data is determined by a modal classification model; wherein, the data type includes tabular data, text data, image data, and time-series signals.

[0143] In one embodiment, the vector mapping module is further configured to:

[0144] When the modal type of the power data is image modal type, a convolutional neural network is used to extract key frame features, and the extracted features are mapped to node vectors;

[0145] When the modal type of the power data is text, a word embedding model is used to convert the text content into a vector representation;

[0146] When the modal type of the power data is tabular data, numerical normalization and field concatenation are used to map it into a node vector;

[0147] When the mode type of the power data is a time-series signal mode, it is mapped into a vector using normalization and field concatenation.

[0148] In one embodiment, the association determination module is further configured to:

[0149] Calculate the cosine similarity between the node vectors as the first similarity measure;

[0150] Calculate the Euclidean distance between the node vectors as a second similarity metric;

[0151] The initial association relationship is determined by combining the first similarity metric and the second similarity metric.

[0152] In one embodiment, the association determination module is further configured to:

[0153] The temporal correlation between the node vectors is determined based on the acquisition time of each power data.

[0154] Based on the geographical location and device identifier of each power data point, the spatial association between the node vectors is determined;

[0155] The target association is determined by combining the semantic similarity, temporal association, and spatial association in the initial association.

[0156] In one embodiment, such as Figure 5 As shown, a graph model construction system 500 is provided, including: a data acquisition module 501, a data cleaning module 503, a data embedding module 505, a graph structure construction module 507, and a tracing module 509, wherein:

[0157] The data acquisition module is used to acquire multi-source power data, perform standardized cleaning processing on the multi-source power data, and obtain raw cleaned data.

[0158] The data cleaning module is used to obtain the metadata structure of each piece of raw cleaned data and obtain the modality classification function.

[0159] The data embedding module is used for multimodal data based on multi-source power data, namely raw cleaned data, metadata structure and modal data; it performs embedded processing on the multimodal data to obtain embedded modal functions, namely node vectors.

[0160] The graph structure construction module is used to acquire spatiotemporal information of multi-source power data based on node vectors, including acquisition time, geographical location and equipment identification, and construct data quadruples; it also acquires associated nodes in the data that meet the correlation threshold, and then constructs a graph structure based on node and edge types.

[0161] The source tracing module is used to fit data nodes into a graph structure based on abnormal data nodes, and then obtain the original cleaned data, metadata structure and modal data of abnormal data nodes; further, it obtains abnormal multi-source power data.

[0162] Each module in the aforementioned graphical model construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0163] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for constructing a graphical model. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0164] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0165] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0166] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0167] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0168] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for constructing a graph model, characterized in that, The method includes: Acquire power data, the corresponding metadata structure of the power data, and the environmental information of the power data; and determine the modality type of the power data based on the power data and the metadata structure; the environmental information includes at least one of the following: acquisition time, geographic identifier, and device identifier; Based on the modality type, the power data and the corresponding metadata structure are mapped to the corresponding node vector; An initial association relationship is determined based on the semantic similarity between the node vectors; and a target association relationship is determined between the node vectors based on the initial association relationship and the environmental information. Based on the target association relationship, the node vectors are connected to obtain the target graph model; wherein, the target graph model is used to determine the nodes and node paths corresponding to abnormal data; the node paths are used to determine the source of the anomaly.

2. The method according to claim 1, characterized in that, The acquisition of power data, the metadata structure corresponding to the power data, and the environmental information of the power data include: Collect multi-source power data and corresponding environmental data; The multi-source power data is standardized and cleaned to obtain power data. Based on the environmental data, determine the metadata structure of the power data.

3. The method according to claim 1, characterized in that, The step of determining the modal type of the power data based on the power data and metadata structure includes: Extract the semantic features of the power data; Extract the structural features of the power data, which include at least one of the following: data distribution, value range, and shape data; Based on the semantic features and the structural features, the data type of the power data is determined by a modal classification model; wherein, the data type includes tabular data, text data, image data, and time-series signals.

4. The method according to claim 1, characterized in that, The step of mapping the power data and the corresponding metadata structure to a corresponding node vector according to the modality type includes: When the modal type of the power data is image modal type, a convolutional neural network is used to extract key frame features, and the extracted features are mapped to node vectors; When the modal type of the power data is text, a word embedding model is used to convert the text content into a vector representation; When the modal type of the power data is tabular data, numerical normalization and field concatenation are used to map it into a node vector; When the mode type of the power data is a time-series signal mode, it is mapped into a vector using normalization and field concatenation.

5. The method according to claim 1, characterized in that, Determining the initial association relationship based on the semantic similarity between the node vectors includes: Calculate the cosine similarity between the node vectors as the first similarity measure; Calculate the Euclidean distance between the node vectors as a second similarity metric; The initial association relationship is determined by combining the first similarity metric and the second similarity metric.

6. The method according to claim 1, characterized in that, The step of determining the target association relationship between the node vectors based on the initial association relationship and the environmental information includes: The temporal correlation between the node vectors is determined based on the acquisition time of each power data. Based on the geographical location and device identifier of each power data point, the spatial association between the node vectors is determined; The target association is determined by combining the semantic similarity, temporal association, and spatial association in the initial association.

7. A device for constructing a graphical model, characterized in that, The device includes: The data acquisition module is used to acquire power data, the metadata structure corresponding to the power data, and the environmental information of the power data; and to determine the modality type of the power data based on the power data and the metadata structure; the environmental information includes at least one of the following: acquisition time, geographic identifier, and device identifier; The vector mapping module is used to map the power data and the corresponding metadata structure into corresponding node vectors according to the modality type. The association determination module is used to determine an initial association relationship based on the semantic similarity between the node vectors; and to determine a target association relationship between the node vectors based on the initial association relationship and the environmental information. The model building module is used to connect the node vectors according to the target association relationship to obtain a target graph model; wherein, the target graph model is used to determine the nodes and node paths corresponding to abnormal data; the node paths are used to determine the source of the anomaly.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.