A data risk identification method and device for distribution network planning domain
Patent Information
- Application Number
- CN202610917459.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-09-11
AI Technical Summary
[0004]本发明实施例提供一种配网规划域的数据风险识别方法及装置,能有效解决现有技术无法捕捉到多维数据操作之间的关系,导致数据风险的识别准确性低的问题
Smart Images

Figure CN122734552A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, and in particular to a method and apparatus for identifying data risks in a power distribution network planning area. Background Technology
[0002] Power distribution network planning increasingly relies on large amounts of multi-source data for decision support. This data comes from different subdomains of the power system, such as distribution networks, substations, equipment operating status, and historical dispatch data. Distribution network planning data plays a crucial role in the stable operation and optimized dispatch of the power system. Therefore, ensuring the accuracy, completeness, and reliability of the data is fundamental to guaranteeing the quality of distribution network planning decisions.
[0003] However, existing methods for identifying data risks in distribution network planning typically rely on static rules and manual checks, such as data consistency checks and outlier detection, lacking dynamic and intelligent risk identification mechanisms. Consequently, they fail to capture the relationships between multidimensional data operations, resulting in low accuracy in identifying data risks. Summary of the Invention
[0004] This invention provides a data risk identification method and apparatus for a distribution network planning domain, which can effectively solve the problem that existing technologies cannot capture the relationship between multi-dimensional data operations, resulting in low accuracy in data risk identification.
[0005] An embodiment of the present invention provides a data risk identification method for a distribution network planning domain, comprising: Obtain the first distribution network data of the distribution network planning domain to be identified and the second distribution network data of the associated distribution network planning domain; Semantic embedding is performed based on the first distribution network data, the second distribution network data, and the preset deep learning model to obtain the corresponding event embedding vector. Feature fusion is then performed based on the corresponding event embedding vector to generate the corresponding first event encoding vector and second event encoding vector. The first event encoding vector is partially semantically masked according to the preset initial masking vector to obtain the intermediate encoding vector of the first layer of the data encoding network. The initial masking vector is then reconstructed by binarization according to the vector statistical distribution characteristics corresponding to the second event encoding vector to obtain the reconstructed masking vector. Self-attention semantic capture is performed on the intermediate encoding vector of the first layer to obtain the intermediate encoding vector of the second layer. For each subsequent layer, the semantic capture mode of each layer is determined based on the similarity between the intermediate encoding vectors of the first two layers. When the semantic capture mode is masking, masking semantic capture is performed on the intermediate encoding vector of the previous layer based on the reconstructed masking vector to obtain the intermediate encoding vector of the current layer. When the semantic capture mode is self-attention, self-attention semantic capture is performed on the intermediate encoding vector of the previous layer to obtain the intermediate encoding vector of the current layer. The intermediate encoding vector of the last layer is used as the final event depth encoding vector, and semantic decoding is performed based on the final event depth encoding vector to generate data risk identification results.
[0006] Furthermore, semantic embedding is performed based on the first distribution network data, the second distribution network data, and a pre-defined deep learning model to obtain the corresponding event embedding vector, including: The corresponding operation events are extracted from the first distribution network data and the second distribution network data respectively, and integrated according to the order of the occurrence time of the events to obtain the corresponding first event sequence and second event sequence; The first event sequence and the second event sequence are respectively input into a preset deep learning model for semantic embedding to obtain the corresponding event embedding vectors.
[0007] Furthermore, feature fusion is performed based on the corresponding event embedding vectors to generate corresponding first event encoding vectors and second event encoding vectors, including: Global feature aggregation is performed based on the corresponding event embedding vector to obtain the corresponding global semantic vector; Extract the differential semantic vector from the corresponding event embedding vector to obtain the corresponding differential semantic vector; The corresponding global semantic vector and the corresponding differential semantic vector are concatenated and fused to generate the first event encoding vector corresponding to the first distribution network data and the second event encoding vector corresponding to the second distribution network data.
[0008] Furthermore, the differential semantic vector is extracted from the corresponding event embedding vector to obtain the corresponding differential semantic vector, including: Clustering is performed based on the event embedding vectors corresponding to the first distribution network data to obtain several cluster centers. The event embedding vectors corresponding to the cluster centers are used as the center embedding vectors. The first vector similarity between each corresponding event embedding vector and the center embedding vector is calculated. The event embedding vector with the smallest first vector similarity is used as the first embedding vector. The event embedding vectors corresponding to the second distribution network data are sorted according to the order of event occurrence to obtain an embedding vector sequence. The first event embedding vector is then added to the end of the embedding vector sequence to generate a cyclic vector sequence. Attention cross processing is performed on each event embedding vector and the center embedding vector in the cyclic vector sequence to obtain the event cross vector corresponding to each event. Calculate the second vector similarity between each corresponding event cross vector and the center embedding vector, and take the event embedding vector with the smallest second vector similarity as the second embedding vector. By concatenating the first and second embedding vectors, we obtain the difference semantic vectors corresponding to the first and second distribution network data.
[0009] Furthermore, based on the preset initial masking vector, local semantic masking is performed on the first event encoding vector to obtain the intermediate encoding vector of the first layer of the data encoding network, including: The occlusion event encoding vector is generated by multiplying the preset initial occlusion vector and the first event encoding vector at corresponding positions. The occlusion event encoding vector is segmented to obtain several local event encoding vectors; For each local event encoding vector, the associated semantic information is captured based on the current local event encoding vector and the adjacent local event encoding vectors to generate the corresponding event association encoding vector; All event-associated encoding vectors are combined in positional order to generate an event combination encoding vector; Based on the event combination encoding vector and the first event encoding vector, the associated semantic information is captured, and the intermediate encoding vector of the first layer is obtained.
[0010] Furthermore, based on the vector statistical distribution characteristics corresponding to the second event encoding vector, the initial masking vector is binarized and reconstructed to obtain the reconstructed masking vector, including: Calculate the mean and standard deviation of all vector parameters based on the second event encoding vector; Based on the vector size corresponding to the initial occlusion vector, generate random vectors of the same size according to the mean and standard deviation; Binarize the random vector to obtain a binary vector; The binarized vector is multiplied by the initial occlusion vector according to their positions to obtain the reconstructed occlusion vector.
[0011] Furthermore, for each subsequent layer after the second layer, the semantic capture pattern of each layer is determined based on the similarity of the intermediate encoding vectors of the first two layers, including: The semantic similarity of each subsequent layer is calculated based on the intermediate encoding vectors of the first two layers of each subsequent layer. The judgment is made based on semantic similarity and a preset similarity threshold; If the semantic similarity is greater than the similarity threshold, then the semantic capture mode of the current layer is determined to be masking. If the semantic similarity is less than or equal to the preset similarity threshold, then the semantic capture mode of the current layer is determined to be self-attention.
[0012] Furthermore, based on the reconstructed masking vector, masking semantic capture is performed on the intermediate encoding vector of the previous layer to obtain the intermediate encoding vector of the current layer, including: The target masking encoding vector of the current layer is generated by multiplying the reconstructed masking vector with the intermediate encoding vector of the previous layer at corresponding positions. The target masking encoding vector of the current layer is segmented to obtain several local target encoding vectors; For each target local encoding vector, capture the associated semantic information based on the current target local encoding vector and the adjacent target local encoding vectors, and generate the corresponding local associated encoding vector; All local associative coding vectors are combined in positional order to generate the target combined coding vector; The intermediate encoding vector of the current layer is obtained by capturing associated semantic information based on the target combined encoding vector and the intermediate encoding vector of the previous layer.
[0013] Furthermore, semantic decoding is performed based on the final event depth encoding vector to generate data risk identification results, including: The final event depth encoding vector is transformed to obtain a single-dimensional fully connected event vector. A linear mapping is performed based on the fully connected event vector to generate a data risk level value for the distribution network planning domain to be identified, and the data risk level value is used as the data risk identification result.
[0014] As an improvement to the above solution, another embodiment of the present invention provides a data risk identification device for a distribution network planning domain, comprising: The distribution network data acquisition module is used to acquire the first distribution network data of the distribution network planning domain to be identified and the second distribution network data of the associated distribution network planning domain; The event encoding vector generation module is used to perform semantic embedding based on the first distribution network data, the second distribution network data, and a preset deep learning model to obtain the corresponding event embedding vector, and to perform feature fusion based on the corresponding event embedding vector to generate the corresponding first event encoding vector and second event encoding vector. The masking vector reconstruction module is used to perform local semantic masking on the first event encoding vector according to the preset initial masking vector to obtain the intermediate encoding vector of the first layer of the data encoding network, and to perform binarization reconstruction on the initial masking vector according to the vector statistical distribution characteristics corresponding to the second event encoding vector to obtain the reconstructed masking vector. The semantic capture pattern determination module is used to perform self-attention semantic capture on the intermediate encoding vector of the first layer to obtain the intermediate encoding vector of the second layer. For each subsequent layer, the semantic capture pattern of each layer is determined based on the similarity between the intermediate encoding vectors of the first two layers. The encoding vector semantic capture module is used to perform masking semantic capture on the intermediate encoding vector of the previous layer based on the reconstructed masking vector when the semantic capture mode is masking, so as to obtain the intermediate encoding vector of the current layer. When the semantic capture mode is self-attention, it performs self-attention semantic capture based on the intermediate encoding vector of the previous layer to obtain the intermediate encoding vector of the current layer. The data risk identification result generation module is used to take the intermediate encoding vector of the last layer as the final event depth encoding vector, and perform semantic decoding based on the final event depth encoding vector to generate the data risk identification result.
[0015] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a data risk identification method for a distribution network planning domain as described in the above embodiments.
[0016] Another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the data risk identification method for a distribution network planning domain described in the above embodiment.
[0017] By implementing this invention, at least the following beneficial effects are achieved: This invention provides a data risk identification method and apparatus for distribution network planning domains. The method constructs a complete deep learning identification process using semantic embedding, multi-level semantic capture, and semantic decoding, eliminating the need for manual verification rule formulation and achieving dynamic, automated, and intelligent risk identification. This overcomes the efficiency and adaptability bottlenecks of static rules and manual methods. The method uses the first distribution network data of the distribution network planning domain to be identified and the second distribution network data of the associated distribution network planning domain as processing objects. Semantic embedding and feature fusion are used to generate corresponding event encoding vectors, mapping dispersed distribution network data operations to a unified semantic space. This effectively captures the semantic relationships between operations in different distribution network areas and different data dimensions, filling the gap in the ability to capture multi-dimensional operation relationships in existing technologies. Then, an initial masking vector is used to perform a first-level local semantic masking on the first event encoding vector, followed by... The masking vector is reconstructed by binarizing the statistical distribution characteristics of the second event encoding vector. The semantic information of the actual scene in the associated distribution network planning domain is integrated into the encoding constraint logic. By constraining the degree of freedom of encoding through external associated data, the semantic representation accuracy of the event encoding vector is significantly improved, providing a more reliable feature basis for the final risk identification. Finally, the basic deep features are extracted first through the second layer of self-attention semantic capture. Then, based on the similarity of the intermediate encoding vectors of the first two layers, the corresponding semantic capture mode is adaptively matched for the third layer and each subsequent layer. When the feature extraction tends to saturate, masking semantic capture is used to strengthen the risk features. When there is still room for feature extraction, self-attention semantic capture is used to deepen the semantic association. Through the hierarchical adaptive processing mechanism, multi-level deep semantic associations can be fully explored, and the overall accuracy of data risk identification can be effectively improved. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a data risk identification method for a distribution network planning domain according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a masking vector provided in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the generation of an event combination encoding vector according to an embodiment of the present invention; Figure 4 This is a schematic diagram of different semantic capture modes provided in an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the generation of an event depth encoding vector according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a data risk identification device for a distribution network planning domain provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] See Figure 1 To address the problem that existing technologies cannot capture the relationships between multi-dimensional data operations, leading to low accuracy in data risk identification, an embodiment of the present invention provides a flowchart illustrating a data risk identification method for a distribution network planning domain, comprising: S1. Obtain the first distribution network data of the distribution network planning domain to be identified and the second distribution network data of the associated distribution network planning domain; Specifically, the distribution network planning domain to be identified represents the area covered by distribution network planning services and serves as the business boundary for risk identification. The first distribution network data represents all distribution network business data generated within the distribution network planning domain to be identified, including various types of data such as power grid structure, equipment ledgers, GIS spatial data, electricity load data, distribution network operation data, planning project database, investment plan data, engineering design data, and load forecasting. The associated distribution network planning domain refers to distribution network areas that are related to the distribution network planning domain to be identified. This relationship is determined by two criteria: geographical proximity and historical distribution network data similarity exceeding a preset threshold. This data can be used to provide cross-domain reference constraints for risk identification within the distribution network planning domain to be identified. The second distribution network data consists of all distribution network business data within the associated distribution network planning domain, with data types consistent with the first distribution network data.
[0021] To illustrate, the full business data of the distribution network planning domain to be identified is collected as the first distribution network data, and the full business data of the distribution network planning domains with related relationships are collected simultaneously as the second distribution network data, so as to provide a cross-domain data foundation for subsequent risk identification.
[0022] To illustrate, the determination of associated distribution network planning domains can adopt two types of rules: one is that the distribution network areas are geographically directly adjacent, and the other is that the similarity of historical distribution network planning data is higher than a preset threshold. If either of the two rules is met, it can be determined as an associated distribution network planning domain. The specific threshold can be adjusted according to the business accuracy requirements.
[0023] S2. Semantic embedding is performed based on the first distribution network data, the second distribution network data, and the preset deep learning model to obtain the corresponding event embedding vector. Feature fusion is then performed based on the corresponding event embedding vector to generate the corresponding first event encoding vector and second event encoding vector. Specifically, deep learning models include data encoding networks and data decoding networks. The data encoding network is the network module in the deep learning model responsible for transforming unstructured event data into high-dimensional semantic vectors, and is the core component for semantic feature extraction. The event embedding vector is the vector representation obtained after semantic embedding of a single operational event, carrying all attribute semantic information of the operational event in the distribution network planning domain. The event encoding vector is the overall encoding vector obtained after semantic embedding and feature fusion of the event sequence of distribution network data, carrying both global semantic and differential semantic information.
[0024] To illustrate, two types of distribution network data are input into a preset deep learning model to complete semantic embedding, resulting in an event embedding vector corresponding to each operation event; then feature fusion is performed on all event embedding vectors in each domain to generate event encoding vectors corresponding to the first distribution network data and the second distribution network data, respectively.
[0025] Preferably, semantic embedding is performed based on the first distribution network data, the second distribution network data, and a preset deep learning model to obtain the corresponding event embedding vector, including: The corresponding operation events are extracted from the first distribution network data and the second distribution network data respectively, and integrated according to the order of the occurrence time of the events to obtain the corresponding first event sequence and second event sequence; The first event sequence and the second event sequence are respectively input into a preset deep learning model for semantic embedding to obtain the corresponding event embedding vectors.
[0026] Specifically, operational events are records of various operational behaviors generated throughout the entire lifecycle of distribution network planning data, and are the direct carriers of data risks. The first event sequence and the second event sequence represent ordered sets formed by arranging all operational events in the distribution network planning domain to be identified and the associated distribution network planning domain in chronological order of occurrence, respectively, thus preserving the temporal correlation characteristics of the events.
[0027] To illustrate, operation records across the entire data chain are extracted from the full business data of the first and second distribution networks, with each record corresponding to an independent operation event. These events are sorted in ascending order of their timestamps to form structured first and second event sequences, fully preserving the temporal logic of the events. The two event sequences are then input into the embedding layer of the data encoding network. A word embedding model is used to vectorize the attributes of each event, ultimately yielding an event embedding vector corresponding to each event.
[0028] To illustrate, each operation event includes six core attributes: event type (collection, cleaning, loading, querying, exporting, updating), initiating entity (system, scheduled task, operations personnel, administrator role), event time, location of occurrence (business database, ODS layer, data warehouse, reporting end), operation content, and access control status. The temporal attribute of the event sequence is an important feature for risk identification. Many abnormal risks manifest as continuous operations within a short period of time, and integrating them by time sequence can fully preserve this type of feature.
[0029] In a preferred embodiment of the present invention, operational events for the entire year of 2025 are extracted from the first distribution network data in the implementation scenario of city A. These events cover five types: data collection, cleaning, querying, exporting, and updating. The initiating entities include three categories: system automatic tasks, planning personnel, and administrators. The locations of these events cover three nodes: the business database, the data warehouse, and the reporting platform. The events are sorted according to their timestamps to form a first event sequence. Similarly, several operational events are extracted from the second distribution network data and organized to form a second event sequence. The two event sequences are input into the embedding layer of the data encoding network. The Word2Vec model is used to vectorize the six attributes of each event, and the vectors are concatenated to obtain a single event embedding vector. Finally, event embedding vectors of corresponding dimensions are obtained, completing the semantic embedding process.
[0030] Most existing technologies perform single-point detection on raw data, ignoring the temporal correlation of operational behaviors. Many risks can only be determined by the temporal characteristics of continuous operations. For example, if data is exported in batches multiple times in a short period of time, each operation may be within the normal permission range, but when strung together in time, there is a risk of data leakage.
[0031] This embodiment first extracts operation events from the original distribution network data, integrates them into a sequence according to time sequence, and then performs semantic embedding. This preserves both the attribute semantics of individual events and the temporal correlation between events, allowing subsequent feature extraction to capture risk features in the temporal dimension, which is more accurate than directly detecting scattered data.
[0032] Preferably, feature fusion is performed based on the corresponding event embedding vectors to generate corresponding first event encoding vectors and second event encoding vectors, including: Global feature aggregation is performed based on the corresponding event embedding vector to obtain the corresponding global semantic vector; Extract the differential semantic vector from the corresponding event embedding vector to obtain the corresponding differential semantic vector; The corresponding global semantic vector and the corresponding differential semantic vector are concatenated and fused to generate the first event encoding vector corresponding to the first distribution network data and the second event encoding vector corresponding to the second distribution network data.
[0033] Specifically, global feature aggregation merges and calculates the embedding vectors of all individual events in the sequence to obtain a vector representing the overall semantic features of the entire sequence. Aggregation methods include concatenation, element-wise addition, and averaging. The global semantic vector, obtained after global feature aggregation, represents the overall semantic features of the entire event sequence and reflects the overall trend of data operations within this domain. The differential semantic vector is an anomalous feature vector extracted from the event embedding vectors that deviates from the semantics of normal operations, focusing on representing the semantic information of a few anomalous operations.
[0034] Schematic, aggregation calculations are performed on all event embedding vectors corresponding to the first and second distribution network data, respectively, to obtain a first global semantic vector and a second global semantic vector. Difference features deviating from normal operational semantics are extracted from the event embedding vectors of the two types of distribution network data, respectively, to obtain a first difference semantic vector and a second difference semantic vector. The global semantic vector and the difference semantic vector of the same domain are concatenated in the dimensional direction to generate a first event encoding vector and a second event encoding vector. Specifically, the first global semantic vector and the first difference semantic vector are concatenated in the dimensional direction to generate the first event encoding vector, and the second global semantic vector and the second difference semantic vector are concatenated in the dimensional direction to generate the second event encoding vector.
[0035] Indicatively, global feature aggregation supports three common methods: directly concatenating all embedding vectors, summing element-wise over all embedding vectors, and averaging element-wise over all embedding vectors. Among these, mean aggregation avoids the impact of sequence length differences on vector dimensions and has stronger scenario adaptability. Concatenation and fusion do not lose information from either type of feature, and the final encoded vector has the dimension of the sum of the dimensions of the global semantic vector and the difference semantic vector.
[0036] In a preferred embodiment of the present invention, a first global semantic vector is obtained by calculating global features using mean aggregation based on the event embedding vector corresponding to the first distribution network data; a first differential semantic vector is obtained by extracting differential features. The two vectors are concatenated in the dimensional direction to obtain a first event encoding vector. Similarly, a second event encoding vector is obtained based on the event embedding vector corresponding to the second distribution network data. The differential semantic vector focuses on capturing the features of the three batch data export operations during the early morning period. These features are diluted by normal data in the global aggregation but are effectively enhanced in the differential vector.
[0037] Traditional feature encoding only performs global aggregation, and the resulting vector can only reflect the normal baseline of the overall operation. A few abnormal risk features will be diluted by a large amount of normal data, resulting in the missed detection of low-probability risk events.
[0038] This embodiment adopts a dual feature fusion approach of global semantics and differential semantics. On the one hand, it grasps the normal state of the overall operation through global semantics, and on the other hand, it extracts differential semantics separately to highlight abnormal features. The encoding vector formed by splicing the two can not only represent the overall semantics, but also focus on strengthening the feature weight of risk events. It can effectively reduce the false negative rate of a few risk events and significantly improve the ability of the encoding vector to represent risks.
[0039] Preferably, the differential semantic vector is extracted from the corresponding event embedding vector to obtain the corresponding differential semantic vector, including: Clustering is performed based on the event embedding vectors corresponding to the first distribution network data to obtain several cluster centers. The event embedding vectors corresponding to the cluster centers are used as the center embedding vectors. The first vector similarity between each corresponding event embedding vector and the center embedding vector is calculated. The event embedding vector with the smallest first vector similarity is used as the first embedding vector. The event embedding vectors corresponding to the second distribution network data are sorted according to the order of event occurrence to obtain an embedding vector sequence. The first event embedding vector is then added to the end of the embedding vector sequence to generate a cyclic vector sequence. Attention cross processing is performed on each event embedding vector and the center embedding vector in the cyclic vector sequence to obtain the event cross vector corresponding to each event. Calculate the second vector similarity between each corresponding event cross vector and the center embedding vector, and take the event embedding vector with the smallest second vector similarity as the second embedding vector. By concatenating the first and second embedding vectors, we obtain the difference semantic vectors corresponding to the first and second distribution network data.
[0040] Specifically, the center embedding vector is the event embedding vector corresponding to the cluster center obtained from clustering. Since normal operations account for the vast majority, the cluster center usually represents the baseline semantics of normal operations. The first vector similarity represents the semantic similarity between a single event embedding vector and the center embedding vector, used for initial screening of events deviating from normal semantics. The first embedding vector represents the event embedding vector with the lowest similarity to the center embedding vector, which is the candidate abnormal event vector with the highest semantic deviation selected in the initial screening. The cyclic vector sequence represents a closed-loop sequence formed by arranging the event embedding vectors chronologically and supplementing the end with the vector at the first position, used to strengthen the correlation features between the beginning and end of the chronological sequence. The event cross vector represents the vector obtained after the event embedding vector and the center embedding vector undergo attention cross-interaction, carrying the part of the event related to the semantics of normal operations. The second vector similarity represents the semantic similarity between the event cross vector and the center embedding vector, used for secondary screening of abnormal events. The second embedding vector represents the event embedding vector with the highest semantic deviation obtained from the screening.
[0041] Indicatively, a clustering algorithm is performed on all event embedding vectors to obtain the center embedding vectors corresponding to the clusters. The first vector similarity between each event embedding vector and the center embedding vector is calculated, and the vector with the lowest similarity is selected as the first embedding vector, completing the first anomaly screening. Then, all event embedding vectors are sorted by event occurrence time, and the first event embedding vector is added to the end of the sequence to form a cyclic vector sequence. Attention cross-vectors are performed on each vector in the sequence with the center embedding vector to obtain the corresponding event cross vectors, mining the semantically relevant parts of each event. Next, the second vector similarity between each event cross vector and the center embedding vector is calculated, and the original event embedding vector corresponding to the vector with the lowest similarity is selected as the second embedding vector, completing the second anomaly screening. Finally, the first and second embedding vectors are concatenated to obtain the differential semantic vector corresponding to this type of distribution network data.
[0042] To illustrate, the first screening is based on the overall semantic deviation of the original vectors, and the second screening is based on the residual deviation after normal semantic association. These two screenings locate anomalies from different dimensions, resulting in more comprehensive semantic coverage of the differences. Furthermore, since network distribution operations are periodic, supplementing at the beginning and end of the cycle strengthens the temporal correlation between the start and end points, preventing feature extraction bias due to insufficient context at the beginning and end of the cycle.
[0043] This embodiment employs a two-stage screening mechanism. The first stage identifies the highest deviation from the overall semantic level of the original vector, while the second stage identifies the highest deviation from the residual level after normal semantic association. This is equivalent to screening for anomalies from two different dimensions, enabling the capture of more subtle semantic discrepancies. Furthermore, cyclic temporal processing is incorporated to consider the periodic characteristics of power distribution network operations, resulting in more accurate temporal feature extraction. The final differential semantic vector contains richer anomaly information, effectively improving the recall rate of subsequent risk identification and reducing missed detections.
[0044] S3. Perform local semantic masking on the first event encoding vector according to the preset initial masking vector to obtain the intermediate encoding vector of the first layer of the data encoding network. Then, based on the vector statistical distribution characteristics corresponding to the second event encoding vector, perform binarization reconstruction on the initial masking vector to obtain the reconstructed masking vector. Specifically, the initial masking vector is a binary vector learned from samples during the deep learning model training phase, used for local semantic masking of the encoding vector. In the vector, 1 corresponds to retaining the semantic dimension, and 0 corresponds to masking the semantic dimension, carrying prior knowledge from the training samples. Local semantic masking means that by using the initial masking vector to block out some dimensions of the event encoding vector at their positions, the model is forced to explore the correlations between the remaining dimensions, thereby strengthening the deep semantic capture capability. The intermediate encoding vector is the intermediate result vector output after each level of semantic capture. The vector statistical distribution characteristics include the mean and standard deviation statistics of all vector parameters, reflecting the overall distribution pattern of the vector values. Binarization reconstruction represents the process of fusing with the initial masking vector to obtain the updated masking vector, aiming to integrate external semantic information into the masking mechanism. The reconstructed masking vector is the masking vector obtained after binarization reconstruction, simultaneously carrying training prior knowledge and actual semantic information from the associated distribution network planning domain.
[0045] Indicatively, the initial masking vector learned by the model training is used to perform local semantic masking on the first event encoding vector. After completing the first layer of deep semantic capture, the intermediate encoding vector of the first layer is output. At the same time, based on the vector statistical distribution characteristics of the second event encoding vector, the initial masking vector is binarized and reconstructed to obtain the reconstructed masking vector that integrates the semantic information of the association domain.
[0046] To illustrate, the initial masking vector is obtained through iterative optimization during model training. In the initial training stage, it can be set as a random vector, an all-zero vector, or an all-one vector. Through training with a large number of samples, the parameters are continuously adjusted, and finally the initial masking vector carrying the prior knowledge of the samples is learned.
[0047] In a preferred embodiment of the present invention, the training target event sequence of the training distribution network planning domain data and the training associated distribution network planning domain data of the training distribution network planning domain data are obtained; Secondly, using the data encoding network in the deep learning model, semantic encoding is performed on the training target event sequence and the training associated event sequence to form training target event encoding vector and training associated event encoding vector respectively. Furthermore, based on the training associated event encoding vector, the deep semantic relationship capture process of the training target event encoding vector is constrained or guided to form training event deep encoding vector. Then, the data decoding network in the deep learning model can be used to perform semantic decoding on the deep encoding vector of the training event to form the training risk identification result; Finally, the deep learning model can be trained based on the error between the training risk identification results and the risk label data corresponding to the training distribution network planning domain data until the error converges, thus obtaining the final trained deep learning model. For example, the parameters in the deep learning model can be updated along the direction of reducing the error until the error converges, thereby obtaining the trained deep learning model. The specific update process can refer to relevant existing technologies, and will not be specifically limited or described here.
[0048] Preferably, the first event encoding vector is partially semantically masked according to a preset initial masking vector to obtain the intermediate encoding vector of the first layer of the data encoding network, including: The occlusion event encoding vector is generated by multiplying the preset initial occlusion vector and the first event encoding vector at corresponding positions. The occlusion event encoding vector is segmented to obtain several local event encoding vectors; For each local event encoding vector, the associated semantic information is captured based on the current local event encoding vector and the adjacent local event encoding vectors to generate the corresponding event association encoding vector; All event-associated encoding vectors are combined in positional order to generate an event combination encoding vector; Based on the event combination encoding vector and the first event encoding vector, the associated semantic information is captured, and the intermediate encoding vector of the first layer is obtained.
[0049] Specifically, the occlusion event encoding vector represents the vector obtained by bitwise multiplying the initial occlusion vector and the first event encoding vector, with some semantic dimensions being masked. The local event encoding vector represents a short vector obtained after segmentation, carrying semantic information of local regions. The event association encoding vector represents a vector obtained by capturing the semantic association between local vectors and adjacent vectors. The event combination encoding vector represents the combined result obtained by concatenating all local association encoding vectors back into a long vector in their original positional order.
[0050] Schematic, the initial masking vector and the first event encoding vector are performed using a Hadamard product at corresponding positions to obtain the masked event encoding vector, completing local semantic masking. The masked event encoding vector is then segmented according to a preset segment length, resulting in multiple local event encoding vectors of equal length. Overlapping regions can be set between segments to preserve boundary relationships. For each local event encoding vector, its cross-attention with its left and right adjacent local event encoding vectors is calculated to uncover semantic relationships between adjacent segments, generating corresponding event association encoding vectors. If multiple adjacent vectors exist, the average or sum of the results is taken. Then, according to the original positional order of each local event encoding vector, all event association encoding vectors are concatenated and combined to obtain the event combination encoding vector. The cross-attention between the event combination encoding vector and the original first event encoding vector is calculated to uncover semantic relationships at the global level, ultimately obtaining the first-layer intermediate encoding vector.
[0051] To illustrate, the overlap length of segments can be set to 10%-30% to avoid the loss of semantic association at segment boundaries and to balance computational efficiency with feature integrity. The initial masking vector is a binary vector with only 0 or 1 elements, where 0 corresponds to masking the semantics of that dimension and 1 corresponds to preserving the semantics of that dimension.
[0052] In a preferred embodiment of the present invention, the reconstructed masking vector multiplied by the intermediate encoding vector in a positional manner takes the following form: Figure 2 As shown, 1 indicates the semantics preserved by reconstructing the masking vector, and 0 indicates the semantics masked by reconstructing the masking vector.
[0053] Traditional masking semantic capture methods mostly perform global attention restoration on the entire vector, which easily ignores fine-grained local correlations, resulting in insufficient precision in feature extraction and the averaging of many local abnormal features.
[0054] This embodiment employs a two-level capture structure. First, the long vector is segmented into smaller blocks, focusing on mining fine-grained relationships between adjacent blocks. Then, these blocks are pieced together to perform global association. This approach, essentially examining the details before looking at the whole, captures more nuanced semantic association features. Moreover, the entire process is completed under occlusion constraints, forcing the model to restore the occluded dimensions through association, further enhancing its ability to capture semantic associations. The resulting first-layer intermediate encoding vector has higher semantic representation accuracy, laying a more solid foundation for subsequent deep processing.
[0055] Preferably, based on the vector statistical distribution characteristics corresponding to the second event encoding vector, the initial masking vector is binarized and reconstructed to obtain the reconstructed masking vector, including: Calculate the mean and standard deviation of all vector parameters based on the second event encoding vector; Based on the vector size corresponding to the initial occlusion vector, generate random vectors of the same size according to the mean and standard deviation; Binarize the random vector to obtain a binary vector; The binarized vector is multiplied by the initial occlusion vector according to their positions to obtain the reconstructed occlusion vector.
[0056] Specifically, the vector parameters are the specific values of each dimension in the second event encoding vector. Binarization transforms continuous numerical values into values containing only 0 and 1, typically achieved by setting a threshold: values greater than the threshold are set to 1, and values less than or equal to the threshold are set to 0. The binarized vector is the vector containing only 0 and 1 obtained after binarization.
[0057] Schematic, the mean and standard deviation of all parameters of the second event encoding vector are calculated by iterating through all dimensions of the vector. Using the obtained mean and standard deviation as distribution parameters, a random vector of the same size, following a normal distribution, is generated based on the dimensions of the initial masking vector. A threshold of 0.5 is set, and each element of the random vector is binarized; elements greater than 0.5 are assigned a value of 1, and those less than or equal to 0.5 are assigned a value of 0, resulting in a binarized vector. The binarized vector is then multiplied by the initial masking vector at corresponding positions to obtain the final reconstructed masking vector.
[0058] To illustrate, the binarization threshold can be adjusted according to actual needs. The higher the threshold, the higher the proportion of 0 in the reconstructed vector and the stronger the occlusion. Those skilled in the art can configure it flexibly according to the scenario.
[0059] In a preferred embodiment of the present invention, such as Figure 3 As shown, the first event encoding vector is multiplied by the initial occlusion vector at corresponding positions to generate an occlusion event encoding vector. The occlusion event encoding vector is then segmented to obtain several local event encoding vectors. For each local event encoding vector, the associated semantic information is captured based on the current local event encoding vector and adjacent local event encoding vectors to generate a corresponding event association encoding vector. All event association encoding vectors are combined in positional order to generate an event combination encoding vector. Finally, the associated semantic information is captured based on the event combination encoding vector and the first event encoding vector to obtain the intermediate encoding vector of the first layer.
[0060] This embodiment uses the statistical features of the second event encoding vector of the associated distribution network planning domain to reconstruct the masking vector. This is equivalent to incorporating external reference information from the actual scenario into the masking rules, rather than relying solely on prior knowledge from training. The reconstructed masking vector retains the general risk features learned during training while also adapting to the actual business scenario reflected in the current associated distribution network planning domain. This makes the masking semantic capture effect more realistic and improves the accuracy of the encoded features in real-world scenarios.
[0061] S4. Perform self-attention semantic capture on the intermediate encoding vector of the first layer to obtain the intermediate encoding vector of the second layer. For each subsequent layer, determine the semantic capture mode of each layer based on the similarity of the intermediate encoding vectors of the first two layers. Specifically, self-attention semantic capture calculates the association weights of each dimension within the intermediate encoding vector through a self-attention mechanism, thereby uncovering deep semantic relationships within the vector itself. Semantic capture modes are semantic feature extraction methods used at the deep network layer level, and are divided into two categories: masking and self-attention.
[0062] Preferably, for each subsequent layer after the second layer, the semantic capture pattern of each layer is determined based on the similarity of the intermediate encoding vectors of the first two layers, including: The semantic similarity of each subsequent layer is calculated based on the intermediate encoding vectors of the first two layers of each subsequent layer. The judgment is made based on semantic similarity and a preset similarity threshold; If the semantic similarity is greater than the similarity threshold, then the semantic capture mode of the current layer is determined to be masking. If the semantic similarity is less than or equal to the preset similarity threshold, then the semantic capture mode of the current layer is determined to be self-attention.
[0063] Specifically, the similarity threshold is a pre-set semantic similarity threshold used to determine the degree of feature extraction saturation, which can be adjusted according to business accuracy requirements.
[0064] Schematic, the semantic similarity between the intermediate encoding vectors of the first layer and the intermediate encoding vectors of the second layer is calculated as a criterion for determining the saturation level of feature extraction. The calculated semantic similarity is compared with a preset similarity threshold. If the semantic similarity is greater than the similarity threshold, it indicates that the feature changes between the two layers are very small, and feature extraction has approached saturation. Therefore, the third layer adopts a masking semantic capture mode to force the mining of deeper abnormal features. If the semantic similarity is less than or equal to the similarity threshold, it indicates that there is still room for feature extraction. Therefore, the third layer adopts a self-attention semantic capture mode to further deepen the mining of semantic associations.
[0065] Similarly, the semantic capture mode of the fourth layer is determined based on the semantic similarity between the intermediate encoding vector of the second layer and the intermediate encoding vector of the third layer, and the semantic capture mode of each subsequent layer is also determined based on the semantic similarity between the intermediate encoding vectors of the first two layers.
[0066] In a preferred embodiment of the present invention, such as Figure 4As shown, self-attention semantic capture is performed based on the intermediate encoding vector of the first level to obtain the intermediate encoding vector of the second level. Then, the semantic similarity between the intermediate encoding vectors of the first and second levels is calculated to determine that the semantic capture mode of the third level is masking. Therefore, masking semantic capture is performed based on the reconstructed masking vector and the intermediate encoding vector of the second level to obtain the intermediate encoding vector of the third level.
[0067] This embodiment determines the saturation level of feature extraction by using the feature similarity between the previous two layers. It adaptively matches the semantic capture mode of all subsequent layers. If the features are not saturated, it continues to deepen the extraction using self-attention; if they are saturated, it switches to masking-style forced anomaly detection. It can automatically adjust the processing strategy according to the feature characteristics of the actual data, balancing the efficiency and depth of feature extraction. It avoids wasting computational resources and does not miss deep anomaly features, thus improving the overall recognition efficiency and accuracy.
[0068] S5. When the semantic capture mode is masking, masking semantic capture is performed on the intermediate encoding vector of the previous layer based on the reconstructed masking vector to obtain the intermediate encoding vector of the current layer. When the semantic capture mode is self-attention, self-attention semantic capture is performed on the intermediate encoding vector of the previous layer to obtain the intermediate encoding vector of the current layer. Indicatively, self-attention semantic capture is first performed on the intermediate encoding vector of the first layer to obtain the intermediate encoding vector of the second layer. The semantic similarity between the intermediate encoding vectors of the first two layers is calculated, and based on the semantic similarity result, the corresponding semantic capture pattern is matched for the third layer and each subsequent layer. If it is a layer matching a masking pattern, the masking vector is reconstructed to perform masking semantic capture on the intermediate encoding vector of the previous layer; if it is a layer matching a self-attention pattern, self-attention semantic capture is directly performed on the intermediate encoding vector of the previous layer, and deep feature extraction is completed layer by layer.
[0069] Preferably, the intermediate encoding vector of the previous layer is subjected to masking semantic capture based on the reconstructed masking vector to obtain the intermediate encoding vector of the current layer, including: The target masking encoding vector of the current layer is generated by multiplying the reconstructed masking vector with the intermediate encoding vector of the previous layer at corresponding positions. The target masking encoding vector of the current layer is segmented to obtain several local target encoding vectors; For each target local encoding vector, capture the associated semantic information based on the current target local encoding vector and the adjacent target local encoding vectors, and generate the corresponding local associated encoding vector; All local associative coding vectors are combined in positional order to generate the target combined coding vector; The intermediate encoding vector of the current layer is obtained by capturing associated semantic information based on the target combined encoding vector and the intermediate encoding vector of the previous layer.
[0070] Specifically, the target masking encoding vector is the masked vector obtained by multiplying the reconstructed masking vector and the intermediate encoding vector of the previous layer bitwise in the current layer. The target local encoding vector represents the local vector obtained by segmenting the target masking encoding vector. The local association encoding vector represents the resulting vector after capturing the semantic association between local vectors. The target combined encoding vector represents the global vector obtained by combining all local association encoding vectors positionally.
[0071] Schematic, the reconstructed masking vector is multiplied by the intermediate encoding vector output from the previous layer at corresponding positions to obtain the target masking encoding vector of the current layer. The target masking encoding vector is then segmented according to a preset segment length to obtain multiple target local encoding vectors; overlapping areas can be set in the segments to preserve boundary relationships. For each target local encoding vector, its deep association semantic information with adjacent target local encoding vectors is captured, generating a corresponding local association encoding vector. All local association encoding vectors are combined according to their original positional order to generate the target combined encoding vector. Finally, the deep association semantic information between the target combined encoding vector and the intermediate encoding vector of the previous layer is captured to obtain the intermediate encoding vector of the current layer.
[0072] Indicatively, all subsequent masking capture modes use the same reconstructed masking vector, eliminating the need for separate reconstruction at each layer, thus ensuring consistency of constraints and reducing computational complexity.
[0073] As we move deeper into the network, the features become highly abstract deep semantics. Ordinary self-attention can hardly uncover hidden anomalies anymore. Often, it just makes meaningless feature fine-tuning and may even introduce noise.
[0074] This embodiment continues to mine the correlation between dimensions in the deep semantic space through the masking forced model, which can further separate the features of abnormal risks from the already highly abstract features. It is equivalent to refining the abnormal features at a deeper level, which can effectively improve the ability to identify hidden and complex risks.
[0075] S6. Use the intermediate encoding vector of the last layer as the final event depth encoding vector, and perform semantic decoding based on the final event depth encoding vector to generate data risk identification results.
[0076] Specifically, semantic decoding maps high-dimensional event depth-encoded vectors to specific risk identification results, representing a transformation from feature space to business conclusions. Data risk identification results quantify the degree of risk in the data of the distribution network planning domain to be identified, and can be directly used for risk assessment and early warning at the business level.
[0077] Indicatively, the intermediate encoding vector output from the last network layer is used as the final event depth encoding vector. Semantic decoding is then performed on the final event depth encoding vector to generate an identification result that characterizes the risk level of the distribution network planning domain data to be identified.
[0078] To illustrate, the final data risk identification result is a quantified continuous value, which can be divided into multiple risk levels, such as low, medium and high, to suit different business processing procedures.
[0079] In a preferred embodiment of the present invention, such as Figure 5 As shown, in the first level of the deep semantic relation step, the first event encoding vector is captured by deep semantic relation based on the initial masking vector to obtain the intermediate encoding vector of the first level. Then, the intermediate encoding vector of the first level is partially masked based on the reconstructed masking vector to obtain the intermediate encoding vector of the next level. This process is repeated to obtain the intermediate encoding vector of the last level, which serves as the event deep encoding vector.
[0080] Preferably, semantic decoding is performed based on the final event depth encoding vector to generate data risk identification results, including: The final event depth encoding vector is transformed to obtain a single-dimensional fully connected event vector. A linear mapping is performed based on the fully connected event vector to generate a data risk level value for the distribution network planning domain to be identified, and the data risk level value is used as the data risk identification result.
[0081] Specifically, the fully connected event vector is a single-dimensional vector obtained after dimensional transformation through the fully connected layer, and it directly carries the risk level value. Linear mapping maps the vector value to a specified interval using a linear function. The data risk level value represents the level of risk in the distribution network planning domain, typically ranging from 0 to 1, with higher values indicating higher risk.
[0082] Indicatively, the final event deep encoding vector is input into a fully connected neural network layer. Through weight matrix transformation, a single-dimensional fully connected event vector is obtained, achieving dimensionality reduction mapping from high-dimensional semantic features to risk features. The numerical values of the fully connected event vector are linearly mapped and normalized to the 0-1 range to obtain the data risk level value for the distribution network planning domain to be identified. This value is then used as the final data risk identification result.
[0083] To illustrate, the risk level value can be classified into business levels, which are usually divided into three levels: low risk (0-0.3), medium risk (0.3-0.7), and high risk (0.7-1). Business personnel can take corresponding measures according to the level.
[0084] In a preferred embodiment of the present invention, the distribution network planning domain of the power supply company of city A is selected as the distribution network planning domain to be identified, and the distribution network planning domain of neighboring cities adjacent to it is selected as the associated distribution network planning domain. Distribution network planning data for the entire year of 2025 for the distribution network planning domain to be identified is collected, including equipment ledgers of lines and transformers, electricity load data, project databases and investment plan data of planned projects, as the first distribution network data; data of the same type from the associated distribution network planning domain during the same period is collected simultaneously as the second distribution network data. The two types of distribution network data are input into a pre-trained deep learning model. First, semantic embedding and feature fusion are completed through a data encoding network to obtain a first event encoding vector and a second event encoding vector. The initial masking vector learned during model training is used to locally mask the first event encoding vector, and after completing the first-layer semantic capture, the first-layer intermediate encoding vector is obtained; based on the mean and standard deviation of the second event encoding vector, the initial masking vector is binarized and reconstructed to obtain the reconstructed masking vector. A second layer of self-attention semantic capture is performed on the intermediate encoding vector of the first layer to obtain the intermediate encoding vector of the second layer. The cosine similarity between the two is found to be higher than the preset similarity threshold. Therefore, the third layer is determined to adopt a masking semantic capture mode. The semantic capture mode of each subsequent layer is determined based on the similarity between the intermediate encoding vectors of the first two layers. After layer-by-layer processing, the final event depth encoding vector is obtained. The input decoding network is subjected to dimensionality transformation and linear mapping, and the final output risk level value is 0.68, corresponding to a medium risk level, indicating that there is a risk of abnormal data operation in this distribution network planning domain, which requires further verification.
[0085] By implementing this embodiment, a complete deep learning recognition process can be constructed using semantic embedding, multi-level semantic capture, and semantic decoding. This eliminates the need for manual verification rule formulation, achieving dynamic and automated intelligent risk identification and overcoming the efficiency and adaptability bottlenecks of static rules and manual methods. The first distribution network data of the distribution network planning domain to be identified and the second distribution network data of the associated distribution network planning domain are used as processing objects. Semantic embedding and feature fusion are used to generate corresponding event encoding vectors, mapping the dispersed distribution network data operations to a unified semantic space. This effectively captures the semantic relationships between operations in different distribution network areas and different data dimensions, filling the gap in the ability to capture multi-dimensional operation relationships in existing technologies. Then, the first event encoding vector is partially masked using an initial masking vector, and then based on the second event encoding vector... The statistical distribution features are used to binarize and reconstruct the masking vectors, integrating the semantic information of the actual scenario in the associated distribution network planning domain into the coding constraint logic. By constraining the coding degrees of freedom through external associated data, the semantic representation accuracy of the event coding vectors is significantly improved, providing a more reliable feature basis for the final risk identification. Finally, the basic deep features are extracted first through the second layer of self-attention semantic capture, and then the semantic capture mode is adaptively matched for the third layer and each subsequent layer based on the similarity of the intermediate coding vectors of the first two layers. When the feature extraction tends to saturate, masking semantic capture is used to strengthen the risk features; when there is still room for feature extraction, self-attention semantic capture is used to deepen the semantic association. Through the hierarchical adaptive processing mechanism, multi-level deep semantic associations can be fully explored, ultimately effectively improving the overall accuracy of data risk identification.
[0086] See Figure 6 This is a schematic diagram of the structure of a data risk identification device for a distribution network planning domain provided in an embodiment of the present invention, comprising: The distribution network data acquisition module is used to acquire the first distribution network data of the distribution network planning domain to be identified and the second distribution network data of the associated distribution network planning domain; The event encoding vector generation module is used to perform semantic embedding based on the first distribution network data, the second distribution network data, and a preset deep learning model to obtain the corresponding event embedding vector, and to perform feature fusion based on the corresponding event embedding vector to generate the corresponding first event encoding vector and second event encoding vector. The masking vector reconstruction module is used to perform local semantic masking on the first event encoding vector according to the preset initial masking vector to obtain the intermediate encoding vector of the first layer of the data encoding network, and to perform binarization reconstruction on the initial masking vector according to the vector statistical distribution characteristics corresponding to the second event encoding vector to obtain the reconstructed masking vector. The semantic capture pattern determination module is used to perform self-attention semantic capture on the intermediate encoding vector of the first layer to obtain the intermediate encoding vector of the second layer. For each subsequent layer, the semantic capture pattern of each layer is determined based on the similarity between the intermediate encoding vectors of the first two layers. The encoding vector semantic capture module is used to perform masking semantic capture on the intermediate encoding vector of the previous layer based on the reconstructed masking vector when the semantic capture mode is masking, so as to obtain the intermediate encoding vector of the current layer. When the semantic capture mode is self-attention, it performs self-attention semantic capture based on the intermediate encoding vector of the previous layer to obtain the intermediate encoding vector of the current layer. The data risk identification result generation module is used to take the intermediate encoding vector of the last layer as the final event depth encoding vector, and perform semantic decoding based on the final event depth encoding vector to generate the data risk identification result.
[0087] This invention provides a data risk identification device for distribution network planning domains. It employs a complete deep learning identification process comprised of semantic embedding, multi-level semantic capture, and semantic decoding, eliminating the need for manual verification rule formulation and achieving dynamic, automated, and intelligent risk identification. This overcomes the efficiency and adaptability bottlenecks of static rules and manual methods. The device uses first distribution network data from the distribution network planning domain to be identified and second distribution network data from related distribution network planning domains as processing objects. Semantic embedding and feature fusion are used to generate corresponding event encoding vectors, mapping dispersed distribution network data operations to a unified semantic space. This effectively captures semantic relationships between operations in different distribution network areas and different data dimensions, filling the gap in existing technologies' ability to capture multi-dimensional operational relationships. Then, an initial masking vector is used to perform a first-level local semantic masking on the first event encoding vector, followed by a second... The statistical distribution characteristics of the event encoding vector are used to binarize and reconstruct the masking vector. The semantic information of the actual scenario in the associated distribution network planning domain is integrated into the encoding constraint logic. By constraining the degree of freedom of the encoding through external associated data, the semantic representation accuracy of the event encoding vector is significantly improved, providing a more reliable feature basis for the final risk identification. Finally, the basic deep features are extracted first through the second layer of self-attention semantic capture. Then, based on the similarity of the intermediate encoding vectors of the first two layers, the corresponding semantic capture mode is adaptively matched for the third layer and each subsequent layer. When the feature extraction tends to saturate, masking semantic capture is used to strengthen the risk features. When there is still room for feature extraction, self-attention semantic capture is used to deepen the semantic association. Through the hierarchical adaptive processing mechanism, multi-level deep semantic associations can be fully explored, and the overall accuracy of data risk identification can be effectively improved.
[0088] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0089] Those skilled in the art will clearly understand that, for convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0090] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a data risk identification method for a distribution network planning domain as described in the above embodiments. The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0091] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0092] The memory can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device or other volatile solid-state storage device.
[0093] Another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the data risk identification method for a distribution network planning domain described in the above embodiment.
[0094] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0095] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for identifying data risks in a distribution network planning domain, characterized in that, include: Obtain the first distribution network data of the distribution network planning domain to be identified and the second distribution network data of the associated distribution network planning domain; Semantic embedding is performed based on the first distribution network data, the second distribution network data, and the preset deep learning model to obtain the corresponding event embedding vector. Feature fusion is then performed based on the corresponding event embedding vector to generate the corresponding first event encoding vector and second event encoding vector. The first event encoding vector is partially semantically masked according to the preset initial masking vector to obtain the intermediate encoding vector of the first layer of the data encoding network. The initial masking vector is then reconstructed by binarization according to the vector statistical distribution characteristics corresponding to the second event encoding vector to obtain the reconstructed masking vector. Self-attention semantic capture is performed on the intermediate encoding vector of the first layer to obtain the intermediate encoding vector of the second layer. For each subsequent layer, the semantic capture mode of each layer is determined based on the similarity between the intermediate encoding vectors of the first two layers. When the semantic capture mode is masking, masking semantic capture is performed on the intermediate encoding vector of the previous layer based on the reconstructed masking vector to obtain the intermediate encoding vector of the current layer. When the semantic capture mode is self-attention, self-attention semantic capture is performed on the intermediate encoding vector of the previous layer to obtain the intermediate encoding vector of the current layer. The intermediate encoding vector of the last layer is used as the final event depth encoding vector, and semantic decoding is performed based on the final event depth encoding vector to generate data risk identification results.
2. The data risk identification method for a distribution network planning domain as described in claim 1, characterized in that, Semantic embedding is performed based on the first distribution network data, the second distribution network data, and a pre-set deep learning model to obtain the corresponding event embedding vector, including: The corresponding operation events are extracted from the first distribution network data and the second distribution network data respectively, and integrated according to the order of the occurrence time of the events to obtain the corresponding first event sequence and second event sequence; The first event sequence and the second event sequence are respectively input into a preset deep learning model for semantic embedding to obtain the corresponding event embedding vectors.
3. The data risk identification method for a distribution network planning domain as described in claim 1, characterized in that, Feature fusion is performed based on the corresponding event embedding vectors to generate corresponding first event encoding vectors and second event encoding vectors, including: Global feature aggregation is performed based on the corresponding event embedding vector to obtain the corresponding global semantic vector; Extract the differential semantic vector from the corresponding event embedding vector to obtain the corresponding differential semantic vector; The corresponding global semantic vector and the corresponding differential semantic vector are concatenated and fused to generate the first event encoding vector corresponding to the first distribution network data and the second event encoding vector corresponding to the second distribution network data.
4. The data risk identification method for a distribution network planning domain as described in claim 3, characterized in that, Extract the differential semantic vector from the corresponding event embedding vector to obtain the corresponding differential semantic vector, including: Clustering is performed based on the event embedding vectors corresponding to the first distribution network data to obtain several cluster centers. The event embedding vectors corresponding to the cluster centers are used as the center embedding vectors. The first vector similarity between each corresponding event embedding vector and the center embedding vector is calculated. The event embedding vector with the smallest first vector similarity is used as the first embedding vector. The event embedding vectors corresponding to the second distribution network data are sorted according to the order of event occurrence to obtain an embedding vector sequence. The first event embedding vector is then added to the end of the embedding vector sequence to generate a cyclic vector sequence. Attention cross processing is performed on each event embedding vector and the center embedding vector in the cyclic vector sequence to obtain the event cross vector corresponding to each event. Calculate the second vector similarity between each corresponding event cross vector and the center embedding vector, and take the event embedding vector with the smallest second vector similarity as the second embedding vector. By concatenating the first and second embedding vectors, we obtain the difference semantic vectors corresponding to the first and second distribution network data.
5. The data risk identification method for a distribution network planning domain as described in claim 1, characterized in that, Based on the preset initial masking vector, the first event encoding vector is partially semantically masked to obtain the intermediate encoding vector of the first layer of the data encoding network, including: The occlusion event encoding vector is generated by multiplying the preset initial occlusion vector and the first event encoding vector at corresponding positions. The occlusion event encoding vector is segmented to obtain several local event encoding vectors; For each local event encoding vector, the associated semantic information is captured based on the current local event encoding vector and the adjacent local event encoding vectors to generate the corresponding event association encoding vector; All event-associated encoding vectors are combined in positional order to generate an event combination encoding vector; Based on the event combination encoding vector and the first event encoding vector, the associated semantic information is captured, and the intermediate encoding vector of the first layer is obtained.
6. The data risk identification method for a distribution network planning domain as described in claim 1, characterized in that, Based on the vector statistical distribution characteristics corresponding to the second event encoding vector, the initial masking vector is binarized and reconstructed to obtain the reconstructed masking vector, including: Calculate the mean and standard deviation of all vector parameters based on the second event encoding vector; Based on the vector size corresponding to the initial occlusion vector, generate random vectors of the same size according to the mean and standard deviation; Binarize the random vector to obtain a binary vector; The binarized vector is multiplied by the initial occlusion vector according to their positions to obtain the reconstructed occlusion vector.
7. The data risk identification method for a distribution network planning domain as described in claim 1, characterized in that, For each subsequent layer after the second layer, the semantic capture pattern of each layer is determined based on the similarity of the intermediate encoding vectors of the first two layers, including: The semantic similarity of each subsequent layer is calculated based on the intermediate encoding vectors of the first two layers of each subsequent layer. The judgment is made based on semantic similarity and a preset similarity threshold; If the semantic similarity is greater than the similarity threshold, then the semantic capture mode of the current layer is determined to be masking. If the semantic similarity is less than or equal to the preset similarity threshold, then the semantic capture mode of the current layer is determined to be self-attention.
8. The data risk identification method for a distribution network planning domain as described in claim 1, characterized in that, Based on the reconstructed masking vector, masking semantic capture is performed on the intermediate encoding vector of the previous layer to obtain the intermediate encoding vector of the current layer, including: The target masking encoding vector of the current layer is generated by multiplying the reconstructed masking vector with the intermediate encoding vector of the previous layer at corresponding positions. The target masking encoding vector of the current layer is segmented to obtain several local target encoding vectors; For each target local encoding vector, capture the associated semantic information based on the current target local encoding vector and the adjacent target local encoding vectors, and generate the corresponding local associated encoding vector; All local associative coding vectors are combined in positional order to generate the target combined coding vector; The intermediate encoding vector of the current layer is obtained by capturing associated semantic information based on the target combined encoding vector and the intermediate encoding vector of the previous layer.
9. The data risk identification method for a distribution network planning domain as described in claim 1, characterized in that, Semantic decoding is performed based on the final event depth encoding vector to generate data risk identification results, including: The final event depth encoding vector is transformed to obtain a single-dimensional fully connected event vector. A linear mapping is performed based on the fully connected event vector to generate a data risk level value for the distribution network planning domain to be identified, and the data risk level value is used as the data risk identification result.
10. A data risk identification device for a distribution network planning domain, characterized in that, include: The distribution network data acquisition module is used to acquire the first distribution network data of the distribution network planning domain to be identified and the second distribution network data of the associated distribution network planning domain; The event encoding vector generation module is used to perform semantic embedding based on the first distribution network data, the second distribution network data, and a preset deep learning model to obtain the corresponding event embedding vector, and to perform feature fusion based on the corresponding event embedding vector to generate the corresponding first event encoding vector and second event encoding vector. The masking vector reconstruction module is used to perform local semantic masking on the first event encoding vector according to the preset initial masking vector to obtain the intermediate encoding vector of the first layer of the data encoding network, and to perform binarization reconstruction on the initial masking vector according to the vector statistical distribution characteristics corresponding to the second event encoding vector to obtain the reconstructed masking vector. The semantic capture pattern determination module is used to perform self-attention semantic capture on the intermediate encoding vector of the first layer to obtain the intermediate encoding vector of the second layer. For each subsequent layer, the semantic capture pattern of each layer is determined based on the similarity between the intermediate encoding vectors of the first two layers. The encoding vector semantic capture module is used to perform masking semantic capture on the intermediate encoding vector of the previous layer based on the reconstructed masking vector when the semantic capture mode is masking, so as to obtain the intermediate encoding vector of the current layer. When the semantic capture mode is self-attention, it performs self-attention semantic capture based on the intermediate encoding vector of the previous layer to obtain the intermediate encoding vector of the current layer. The data risk identification result generation module is used to take the intermediate encoding vector of the last layer as the final event depth encoding vector, and perform semantic decoding based on the final event depth encoding vector to generate the data risk identification result.