Semantic fragment-based power distribution network operation state evaluation entity extraction method and system, and storage medium
Through the entity extraction method based on semantic fragments, the BERT model and the improved multi-layer perceptron model are used to solve the problem of complex association relationships of distribution network equipment and difficult to identify unstructured text, and the efficiency and accuracy of distribution network operation status evaluation are achieved.
Patent Information
- Application Number
- CN202411580910.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-25
AI Technical Summary
It is difficult to effectively identify the complex relationships and unstructured texts between distribution network equipment, which affects the accuracy and efficiency of the operating status evaluation of the distribution network.
The entity extraction method based on semantic fragments is adopted, and the semantic fragments are reconstructed and embedded by collecting data related to the operating status of the distribution network using the BERT model. Combined with the improved multi-layer perceptron model, the accurate identification of entity tags is achieved.
It improves the ability to understand complex texts, fully captures the complex relationship between various power entities in the distribution network, and improves the efficiency and accuracy of the operating status evaluation of the distribution network.
Smart Images

Figure CN119514546A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distribution network operation status assessment, and in particular to a distribution network operation status assessment entity extraction method, system and storage medium based on semantic fragments. Background Art
[0002] The distribution network is directly facing users and is a key link in the power supply business. Realizing the digital transformation of the distribution network is crucial to accelerating the construction of a new power system. A large number of distribution network projects such as distributed energy, microgrids, and integrated energy systems will be invested and constructed, making the operation status of the distribution network more complicated. In the traditional evaluation process, professionals usually rely on experience, and lack a unified evaluation system, making it impossible to evaluate the operation status of the distribution network efficiently and accurately. At the same time, the distribution network involves a lot of equipment information, and the data has a wide range of correlations. The integration of various types of information is not sufficient. The evaluation theory knowledge system is huge and usually stored in text form, which is not convenient for operators to learn and use quickly.
[0003] Constructing a knowledge graph of the distribution network operation status can make full use of the distribution network data information, characterize the concepts, entities, events and their relationships in the distribution network, and thus transform massive multi-source heterogeneous data and evaluation theories into graphs for unified operation management, reduce the learning time of operators, and improve the efficiency and accuracy of distribution network operation status evaluation. However, there are complex relationships between entities such as substations, lines, and power equipment involved in the distribution network, and the above relationships contain a large amount of unstructured text. Automatically identifying and naming key information in distribution network projects through entity extraction methods can provide effective support and help for equipment managers. The effect of relationship extraction also directly affects the construction and application of distribution network operation status evaluation graphs.
[0004] Therefore, how to effectively identify entities based on the complex relationships between distribution network equipment and unstructured texts needs further research. Summary of the invention
[0005] Purpose of the invention: The purpose of the present invention is to provide a method, system and storage medium for entity extraction of distribution network operation status assessment based on semantic fragments, so as to improve the accuracy of entity extraction.
[0006] Technical solution: To achieve the above-mentioned purpose, the method for extracting entities for evaluating the operation status of a distribution network based on semantic fragments described in the present invention comprises the following steps:
[0007] S1: Collect data related to the operating status of the distribution network;
[0008] S2: Perform entity sampling based on negative sampling on the collected data to obtain a sampling set containing a large number of semantic fragments;
[0009] S3: Use the trained BERT model to reconstruct the semantic fragment, dividing it into the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic fragment;
[0010] S4: Input the reconstructed semantic segment into the improved multi-layer perceptron MLP model to obtain the entity label of the semantic segment.
[0011] The method for performing entity sampling based on negative sampling on the collected data in S2 is:
[0012] S2.1: Generate B sequence, B = generateBoundaryLabels(S);
[0013] S2.2: If B i =1, then S i As the center, select a substring s with a length of 2ρ+1 j ;
[0014] S2.3: If s j If the number of 1s contained in is less than M, then s j Add to sampling set;
[0015] S2.4: If the number of substrings selected in S2.2 has reached M, stop sampling;
[0016] S2.5: If the number of selected substrings cannot reach M, then i = 0, uniformly sample the sequence S until the number of substrings reaches M;
[0017] S2.6: Check whether a specific keyword exists in S. If so, add the specific keyword as a complete semantic segment to the sampling set;
[0018] S2.7: Obtain a sampling set.
[0019] Where S represents the original distribution network corpus sequence, where each element represents a word or character; S i represents the i-th element in the sequence S; B represents a binary sequence of the same length as S, used to mark entity boundaries. i is the start or end position of the entity, then B i =1, otherwise B i =0; ρ represents the maximum length of the substring, and M represents the maximum number of sampled semantic segments.
[0020] The specific keywords described in S2.6 include terms representing specific voltage levels.
[0021] Among them, the BERT model in S3 consists of an internal embedding layer, a multi-head self-attention mechanism layer, an encoding layer and an output layer. The internal embedding layer splits the input semantic fragment into three matrices of different spatial dimensions: word, block, and position. The multi-head self-attention mechanism layer is used to calculate the attention weight of each element in the matrix and capture the long-distance dependency between the elements in the matrix. The encoding layer encodes the output of the multi-head self-attention mechanism layer to obtain a feature vector representing the semantic fragment. The feature vector consists of three parts: the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic fragment.
[0022] The trained BERT model mentioned in S3 refers to a model obtained by pre-training using a large amount of annotated text data. During the pre-training stage, the MLM and NSP training tasks are used to force the BERT model to learn complex semantic relationships between words, sentences, and even sentence pairs.
[0023] The embedding of the first word in S3 represents the embedding vector of the first word or the most important word in the semantic segment, which is obtained by word embedding in the BERT model, or the embedding after being processed by multiple layers of multi-head self-attention mechanism layers and encoding layers;
[0024] The embedding of the last word represents the embedding vector of the last word or another important word in the semantic segment, which is obtained through the word embedding in the BERT model, or the embedding after processing through multiple layers of multi-head self-attention mechanism layers and encoding layers;
[0025] The embedding of the semantic segment length represents the length information of the entire semantic segment.
[0026] Among them, the MLP model described in S4 is a neural network structure, which is constructed by stacking multiple neuron layers, including an input layer, one or more hidden layers and an output layer. The improved multi-layer perceptron layer introduces an adaptive learning rate optimization algorithm, a cross entropy loss function, a Gaussian error linear unit as an activation function, and batch normalization and dropout techniques.
[0027] Among them, the method of obtaining the entity label of the semantic fragment using the MLP model in S4 is: using the weights and activation functions of the hidden layer to process the feature vector of the input semantic fragment, generating the entity label probability of each semantic fragment in the output layer, converting the output into a probability distribution through the softmax function, and selecting the label with the maximum probability as the final entity label.
[0028] The present invention provides a distribution network operation status evaluation entity extraction system based on semantic fragments, comprising the following modules:
[0029] A data collection module, used to collect data related to the operation status of the distribution network;
[0030] The entity sampling module is used to perform entity sampling based on negative sampling on the collected data to obtain a sampling set containing a large number of semantic fragments;
[0031] The semantic fragment construction module is used to reconstruct the semantic fragment using the trained BERT model, which is divided into the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic fragment;
[0032] The entity label naming module is used to input the reconstructed semantic fragment into the improved multi-layer perceptron MLP model to obtain the entity label of the semantic fragment.
[0033] The present invention provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes any one of the above methods.
[0034] Beneficial effects: The present invention has the following advantages: The present invention can improve the ability to understand complex texts, fully capture the complex relationships between various power entities in the distribution network, and thus improve the efficiency and accuracy of the distribution network operation status assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A diagram of the knowledge graph architecture for distribution network operation evaluation;
[0036] Figure 2 This is a schematic diagram of the named entity recognition model;
[0037] Figure 3 Schematic diagram of the BERT model;
[0038] Figure 4 Schematic diagram of the improved multi-layer perceptron model. DETAILED DESCRIPTION
[0039] The technical solution of the present invention is described in detail below in conjunction with the embodiments and drawings.
[0040] like Figure 1 As shown in the figure, the construction process of the distribution network operation status evaluation knowledge graph includes knowledge extraction, knowledge fusion, knowledge processing, knowledge updating, comprehensive evaluation, etc. The knowledge graph can be constructed based on conceptual models and logical rules formed by multi-type data, and make full use of knowledge bases such as expert experience and real-time data to continuously update the graph.
[0041] Among them, knowledge extraction is the process of converting unstructured or semi-structured data (assessment cases, procedural texts, etc.) involved in distribution network projects into structured data through deep learning models. This process consists of entity extraction, relationship extraction, and attribute extraction. Among them, entity extraction mainly includes equipment entities such as lines, distribution transformers, and disconnectors; digital entities such as operating parameters and asset data; and text entities such as evaluation guidelines and procedural texts. The extraction of the above entities will affect the overall performance of the evaluation map to a certain extent.
[0042] Knowledge fusion is a key step in constructing the knowledge graph for distribution network operation status assessment, which mainly includes coreference resolution, entity disambiguation, and knowledge merging. Among them, coreference resolution unifies the same entities in different text descriptions into standardized entity names. For example, "main transformer" and "main transformer" are two different texts, which need to be associated using coreference resolution technology, which is usually implemented using rule-based and data-driven methods. Entity disambiguation is used to identify and solve the confusion of entities (such as equipment, lines, substations, etc.) caused by similar names, unclear descriptions, or inconsistent data during the operation and evaluation of the distribution network. For example, "South Line 1" and "South Line 1 Branch" need to be distinguished using entity disambiguation technology. Knowledge merging is to integrate distribution network-related information from different sources, different formats, or different time periods into a unified knowledge base to better evaluate the operation status of the distribution network. For example, the extracted evaluation rules are merged with other structured knowledge to form the operation status assessment knowledge.
[0043] Knowledge computing reasoning refers to processing the fused knowledge to discover new hidden information and conduct quality assessment, etc. For example, through relational reasoning, that is, reasoning about the association and mutual influence between entities through the edges (relationships) in the graph, the connection relationship and operating status between devices can be analyzed and perceived, and the possible impact of a certain device failure on the entire distribution network can be inferred; through attribute calculation, that is, calculating related indicators or parameters based on the attributes of the nodes in the graph (such as voltage, current, temperature, etc.), the operating status of the distribution network can be evaluated.
[0044] Knowledge updating is the process of expanding or changing various types of knowledge information in the knowledge graph. In order to maintain the timeliness and accuracy of the evaluation results, the evaluation graph needs to update the operating data regularly or in real time. For example, when a device fails, the status information of the device will be updated to "failure" in real time and displayed in the graph; or according to the key indicators and trends obtained from the analysis, the rules and thresholds in the evaluation graph are adjusted. If the voltage fluctuation of a line exceeds the normal range, the corresponding warning mechanism will be triggered, and the corresponding evaluation logic will be updated in the evaluation graph.
[0045] The knowledge graph for distribution network operation status evaluation covers two core strategies: case reasoning and logical rule reasoning. It deeply integrates the complex rules of distribution network operation and expert experience, and combines specific evaluation indicators to conduct in-depth analysis and comprehensive evaluation. On the one hand, it can quickly locate current problems and learn from successful handling experience by analogy with similar historical cases. On the other hand, it follows the distribution network operation rules and expert knowledge and makes reasoning and judgment through logical rules. The two methods complement each other and jointly achieve a comprehensive evaluation of the distribution network operation status.
[0046] Regarding the knowledge extraction link in the knowledge graph, there are a large number of entity nesting problems in the distribution network data. For example, "Renmin Road 10kV Substation" is an entity with the label "substation", but it also contains the "address label" information "Renmin Road". The traditional named entity recognition algorithm based on sequence annotation has low recognition accuracy for the above nested entities. To solve this problem, since the structured distribution network equipment ledgers and operation data are relatively simple, the subject word extraction method can be used to identify entities. For unstructured evaluation guidelines and other data, the present invention proposes an improved named entity recognition model based on semantic fragments, which can directly use the fragments in the distribution network corpus as candidate entities, thereby avoiding the multi-label problem caused by word-based algorithms.
[0047] like Figure 2 As shown in the figure, it is a schematic diagram of the named entity recognition model, which can be divided into a data layer, an embedding layer and an improved multi-layer perceptron layer. The data layer is based on the previously collected distribution network semantic data, and samples to obtain a sampling set containing a large number of semantic fragments. Then, the semantic fragments of the sampling set are input into the embedding layer and split into three parts, including the embedding of the first word, the embedding of the last word and the embedding of the length of the semantic fragment. The split semantic fragments are input into the improved multi-layer perceptron layer to obtain the entity label of the semantic fragment.
[0048] In the data layer, it is necessary to implement entity sampling based on negative sampling for the distribution network semantic data. The sampling process is as follows:
[0049] (1.1) Generate B sequence: B = generateBoundaryLabels(S);
[0050] (1.2) If B i =1, then S i As the center, select a substring s with a length of 2ρ+1 j ;
[0051] (1.3) If s j If the number of 1s contained in is less than M, then s j Add to sampling set;
[0052] (1.4) If the number of substrings selected in step (1.2) has reached M, stop sampling;
[0053] (1.5) If the number of selected substrings cannot reach M, then i = 0, uniformly sample the sequence S until the number of substrings reaches M;
[0054] (1.6) Check whether there are specific keywords (such as "10kV", "35kV", etc.) in S. If so, add these keywords as complete semantic fragments to the sampling set;
[0055] (1.7) Obtain a sampling set.
[0056] Where S represents the original distribution network corpus sequence, where each element represents a word or character; S i represents the i-th element in the sequence S; B represents a binary sequence of the same length as S, used to mark entity boundaries. i is the start or end position of the entity, then B i =1, otherwise B i =0; ρ represents the maximum length of the substring, and M represents the maximum number of sampled semantic segments.
[0057] In the embedding layer, the trained BERT (Bidirectional Encoder Representations from Transformers) model is used to reconstruct the input semantic fragment and divide the semantic fragment into three parts: the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic fragment.
[0058] The basic architecture of the BERT model consists of an internal embedding layer, a multi-head self-attention mechanism layer, an encoding layer, and an output layer. Each layer processes the semantic fragments as follows: Figure 3 shown.
[0059] (2.1) The sample set obtained from the data layer is input into the internal embedding layer. These semantic fragments are split into three matrices of different dimensions: word, block, and position in the embedding layer to better display relevant information. Word embedding is done through the word vector matrix W t Each word X in the input text BERT Convert to a real-valued vector V t Right now:
[0060] V t =X BERT ×W t
[0061] Among them, W t is the word vector matrix, V tThe encoding matrix represents the specific vocabulary. Similarly, block embedding represents the block attribute of vocabulary, and position embedding represents the position attribute of vocabulary. When the specific vocabulary related to the operation of the distribution network appears repeatedly in a certain semantics and is located in different positions, it should be distinguished by the block embedding matrix.
[0062] (2.2) Through the embedding of different dimensions mentioned above, the output matrix Y of the embedding matrix in the BERT model can be obtained Embedings , and then transformed through the multi-head self-attention mechanism layer to obtain the intrinsic meaning of the semantic fragment. The specific method is as follows:
[0063] The attention weight of each element in the output matrix of the embedding layer is calculated according to the following formula to capture the long-range dependencies between the elements in the matrix.
[0064]
[0065] Among them, Q, K, V are query, key, and value matrices respectively, and W Q , W K , W V The transformation parameter matrix to be trained is used to calculate the output Y through the following self-attention calculation MHA ,
[0066]
[0067]
[0068] Among them, d k is the dimension of the key vector, f softmax is the activation function.
[0069] Softmax is used for probability normalization to ensure that the sum of the correlations between the processed words is 1, and to highlight the important words related to the current word. At the same time, the BERT model performs multiple self-attention processes on the input distribution network semantics in the same coding unit, and the results of each self-attention calculation are vectorized.
[0070] Among them, “elements” refer to the word embedding, block embedding, and position embedding output by the embedding layer, which are essentially words related to the distribution network.
[0071] (2.3) Output Y of the multi-head self-attention mechanism layer MHX The input is sent to the encoding layer for Encoder, which includes the normalization layer and the fully connected layer. The calculation formula is as follows:
[0072]
[0073] Among them, X Encoder is the encoding layer input, Y MHXis the output of the above multi-head self-attention mechanism layer, Y Encoder is the output of the encoding layer, FeedForward is the output of the fully connected layer, and LayerNorm is the calculation function for normalizing the matrix []. In this scheme, the fully connected layer includes two layers of fully connected neural networks. The first layer uses Relu as the activation function, and the second layer does not use the activation function. The formula is as follows:
[0074] FeedForward(X)=max(0,XW1+b1)W2+b2
[0075] Among them, X is the input of the fully connected layer; W1, W2, b1, and b2 represent the parameters to be trained in the fully connected layer.
[0076] Based on the above basic architecture, the BERT model obtains feature vectors and constructs semantic fragments in the following way:
[0077] (3.1) Acquisition of feature vector:
[0078] The BERT model uses three embeddings to obtain feature vectors: TokenEmbeddings, SegmentEmbeddings, and PositionEmbeddings.
[0079] TokenEmbeddings: Convert each word (token) in the input text into a vector of fixed dimension. For example, in BERT, each word is converted into a 768-dimensional vector representation.
[0080] SegmentEmbeddings: used to distinguish the first and second sentences in a sentence pair. In BERT, the segmentembedding value of all tokens (including [CLS] and [SEP]) in the first sentence is 0, and the segmentembedding value of all tokens in the second sentence is 1.
[0081] PositionEmbeddings: Since the Transformer architecture itself does not contain information about processing sequence order, BERT adds position embeddings to enable the model to understand the position information of words in the sentence.
[0082] (3.2) Construction of eigenvector:
[0083] Add the above three embeddings element by element to get a synthetic representation, which is the input of the BERT encoding layer, and its shape is [batch_size, seq_length, embedding_dims], where embedding_dims is usually 768.
[0084] After being processed by the multi-layer Transformer encoder of the BERT model, each input token will get a corresponding contextual representation, namely a feature vector.
[0085] (3.3) Semantic fragment construction:
[0086] During the pre-training phase of BERT, the MaskedLanguageModel (MLM) task is used, in which a portion of tokens are randomly selected and replaced with the [MASK] tag, and then the model is trained to predict the original token.
[0087] Another pre-training task is Next Sentence Prediction (NSP), which predicts whether two sentences are adjacent in the original text, which helps the model understand the logical relationship between sentences.
[0088] Through these pre-training tasks, BERT learns rich language representations and is able to capture complex semantic relationships between words, sentences, and even sentence pairs, thereby constructing feature vectors that can represent semantic fragments.
[0089] In summary, the BERT model combines Token Embeddings, Segment Embeddings, and Position Embeddings, as well as the processing of multi-layer Transformer encoders, to obtain feature vectors that can represent semantic fragments, and construct complex semantic fragments based on this.
[0090] We can assume that a corpus X to be recognized contains n characters, n ], the feature vector obtained after the encoder is X = [x1, x2, ..., x n ],Right now:
[0091] X=BERT(X)
[0092] According to the above principles, the semantic segment h is constructed e , each semantic segment consists of three parts, namely the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic segment:
[0093] h e (s i )=[xstart(i) ||x end(i) ||φ(s i )]
[0094] Among them, S i is the i-th element in the first step data layer sampling sequence S, x start represents the embedding of the first word, x end represents the embedding of the last word, Indicates the length of the semantic segment.
[0095] In the above formula, a semantic fragment (such as a sentence or phrase) is converted into a vector representation of a fixed length, which consists of three parts.
[0096] The embedding of the first word x start :
[0097] This is the first part of the semantic fragment, representing the embedding vector of the first word (or the most important word) in the semantic fragment. In the BERT model, this is usually obtained through TokenEmbeddings, but it can also be a context-dependent embedding after processing through a multi-layer Transformer encoder.
[0098] The embedding of the last word x end :
[0099] This is the second part of the semantic fragment, which represents the embedding vector of the last word (or another important word) in the semantic fragment. Again, this can be the original Token Embedding or the embedding processed by the Transformer encoder.
[0100] Embedding of semantic fragment length
[0101] This is the third part of the semantic segment, which represents the length information of the entire semantic segment. This embedding can be a variant of Position Embeddings or a separately trained embedding to represent the length of the semantic segment.
[0102] like Figure 4 As shown in Figure 1, the constructed semantic fragment is input into the improved multi-layer perceptron layer to obtain its entity label. The improved multi-layer perceptron (MLP) layer is a neural network structure that builds a complex model by stacking multiple neuron layers to enhance the model's expressiveness and effectively handle nonlinear data modeling tasks.
[0103] The architecture consists of an input layer, one or more hidden layers, and an output layer. The number and size of hidden layers can be set as required, and the dimensions of the input and output layers can be customized.
[0104] Based on the traditional MLP, the improved multi-layer perceptron layer introduces adaptive learning rate optimization algorithms (such as RAdam), cross entropy loss function, Gaussian error linear unit (ReLU) as activation function, batch normalization and dropout technology. These improvements help the model to converge quickly and accurately, effectively alleviate the problem of overfitting and gradient vanishing, accelerate the convergence process of the model, and avoid the attenuation of gradients in back propagation. Specifically: in the process of gradient back propagation, the RAdam adaptive learning rate optimization algorithm is used to ensure that the model converges quickly and accurately, and the cross entropy loss function is selected for performance evaluation; random regularization technology is incorporated to alleviate the problem of overfitting and gradient vanishing; batch normalization is introduced after each hidden layer to accelerate the convergence process of the model and avoid the attenuation of gradients in back propagation; dropout technology is used to randomly remove a certain proportion of neurons in each hidden layer to further suppress the risk of overfitting.
[0105] Data processing: The input data is first converted into low-dimensional dense vectors through the embedding layer. Then, these vectors are input into the improved multi-layer perceptron layer. In the hidden layer of the multi-layer perceptron layer, these vectors are processed by weights and activation functions. Finally, the label probability of the entity is generated in the output layer.
[0106] Embedding layer input data to MLP: The output of the embedding layer (including the trained BERT model) is the feature vector representation of the encoded distribution network semantic data. These feature vectors contain deep semantic features and can be used for entity recognition tasks.
[0107] Each semantic segment consists of three parts: the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic segment. This means that the data input to the improved multi-layer perceptron layer is indeed a semantic segment split into the above three parts. The improved multi-layer perceptron layer is able to label the semantic segments according to these embeddings. This process is carried out through the following steps: Input the feature vector of the semantic segment to the input layer of the multi-layer perceptron layer. These vectors are processed by the weights and activation functions of the hidden layer. At the output layer, the entity label probability of each semantic segment is generated. The output is converted into a probability distribution through the softmax function, and the label with the maximum probability is selected as the final entity label.
[0108] In general, the improved multi-layer perceptron layer is able to process the semantic fragment feature vectors generated by the BERT model and identify and label entities based on these vectors.
Claims
1. A distribution network operation status assessment entity extraction method based on semantic fragments, characterized in that: The following steps are involved: S1: Collect data related to the operating status of the distribution network; S2: Perform entity sampling based on negative sampling on the collected data to obtain a sampling set containing a large number of semantic fragments; S3: Use the trained BERT model to reconstruct the semantic fragment, dividing it into the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic fragment; S4: Input the reconstructed semantic segment into the improved multi-layer perceptron MLP model to obtain the entity label of the semantic segment.
2. The entity extraction method for distribution network operation status assessment based on semantic fragments according to claim 1 is characterized in that: The method for performing entity sampling based on negative sampling on the collected data in S2 is: S2.1: Generate B sequence, B = generateBoundaryLabels(S); S2.2: If B i =1, then S i As the center, select a substring s with a length of 2ρ+1 j ; S2.3: If s j If the number of 1s contained in is less than M, then s j Add to sampling set; S2.4: If the number of substrings selected in S2.2 has reached M, stop sampling; S2.5: If the number of selected substrings cannot reach M, then i = 0, uniformly sample the sequence S until the number of substrings reaches M; S2.6: Check whether a specific keyword exists in S. If so, add the specific keyword as a complete semantic segment to the sampling set; S2.7: Obtain a sampling set; Where S represents the original distribution network corpus sequence, where each element represents a word or character; S i represents the i-th element in the sequence S; B represents a binary sequence of the same length as S, used to mark entity boundaries. i is the start or end position of the entity, then B i =1, otherwise B i =0; ρ represents the maximum length of the substring, and M represents the maximum number of sampled semantic segments.
3. The entity extraction method for distribution network operation status assessment based on semantic fragments according to claim 2 is characterized in that: The specific keywords described in S2.6 include terms representing specific voltage levels.
4. The entity extraction method for distribution network operation status assessment based on semantic fragments according to claim 1 is characterized in that: The BERT model in S3 consists of an internal embedding layer, a multi-head self-attention mechanism layer, an encoding layer, and an output layer. The internal embedding layer splits the input semantic fragment into three matrices of different spatial dimensions: word, block, and position. The multi-head self-attention mechanism layer is used to calculate the attention weight of each element in the matrix and capture the long-distance dependencies between the elements in the matrix. The encoding layer encodes the output of the multi-head self-attention mechanism layer to obtain a feature vector representing the semantic fragment. The feature vector consists of three parts: the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic fragment.
5. The entity extraction method for distribution network operation status assessment based on semantic fragments according to claim 4 is characterized in that: The trained BERT model mentioned in S3 refers to a model obtained by pre-training using a large amount of annotated text data. During the pre-training stage, MLM and NSP training tasks are used to force the BERT model to learn complex semantic relationships between words, sentences and even sentence pairs.
6. The entity extraction method for distribution network operation status assessment based on semantic fragments according to claim 3 is characterized in that: The embedding of the first word in S3 represents the embedding vector of the first word or the most important word in the semantic segment, which is obtained through the word embedding in the BERT model, or the embedding after being processed by multiple layers of multi-head self-attention mechanism layers and encoding layers; The embedding of the last word represents the embedding vector of the last word or another important word in the semantic segment, which is obtained through the word embedding in the BERT model, or the embedding after processing through multiple layers of multi-head self-attention mechanism layers and encoding layers; The embedding of the semantic segment length represents the length information of the entire semantic segment.
7. The entity extraction method for distribution network operation status assessment based on semantic fragments according to claim 1 is characterized in that: The MLP model described in S4 is a neural network structure constructed by stacking multiple neuron layers, including an input layer, one or more hidden layers, and an output layer. The improved multi-layer perceptron layer introduces an adaptive learning rate optimization algorithm, a cross entropy loss function, a Gaussian error linear unit as an activation function, and batch normalization and dropout techniques.
8. The entity extraction method for distribution network operation status assessment based on semantic fragments according to claim 1 is characterized in that: The method of using the MLP model in S4 to obtain the entity label of the semantic fragment is as follows: the feature vector of the input semantic fragment is processed using the weights and activation function of the hidden layer, and the entity label probability of each semantic fragment is generated in the output layer. The output is converted into a probability distribution through the softmax function, and the label with the maximum probability is selected as the final entity label.
9. A distribution network operation status assessment entity extraction system based on semantic fragments, characterized in that: Includes the following modules: A data collection module, used to collect data related to the operation status of the distribution network; The entity sampling module is used to perform entity sampling based on negative sampling on the collected data to obtain a sampling set containing a large number of semantic fragments; The semantic fragment construction module is used to reconstruct the semantic fragment using the trained BERT model, which is divided into the embedding of the first word, the embedding of the last word, and the embedding of the length of the semantic fragment; The entity label naming module is used to input the reconstructed semantic fragment into the improved multi-layer perceptron MLP model to obtain the entity label of the semantic fragment.
10. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions which, when executed by a computing device, cause the computing device to perform any one of the methods according to claims 1 to 8.