Power grid accident information identification method, device, equipment and medium
By constructing a target recognition network model based on preprocessing sub-model, two-way memory network sub-model and conditional random field sub-model, the automatic identification of grid accident information is realized, and the problem of low recognition efficiency of traditional grid accident information is solved, and the identification efficiency and Accuracy reduces labor costs.
Patent Information
- Application Number
- CN202411552299.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-01-10
AI Technical Summary
The traditional method of identifying power grid accident information relies on manual operations, resulting in high cost and low efficiency. It is impossible to efficiently and accurately identify power grid accident information in a large amount of data, and it is impossible to effectively prevent and deal with accidents in a timely manner.
The target recognition network model is adopted based on preprocessing submodel, bidirectional memory network submodel and conditional random field submodel. Through automated named entity recognition technology, complex information in power grid accident descriptions can be quickly captured and parsed, and key accident information can be extracted.
It realizes efficient and accurate information identification in a large number of power grid accident data, reduces manual analysis and processing time and cost, improves the efficiency and accuracy of power grid accident handling, and provides a strong basis for emergency response and decision-making.
Smart Images

Figure CN119293563A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for identifying power grid accident information. Background Art
[0002] Due to the particularity of the power industry, the mortality rate of power accidents is higher than that of other types of work-related accidents, which seriously endangers the personal safety of power grid practitioners and the safe production of related companies. It is of great practical significance to study the laws of accidents that have occurred.
[0003] At present, the traditional way to identify power grid accident information mainly involves manually extracting multiple dimensions from a large amount of data, organizing it into a more readable table for analysis, and obtaining key information from power grid accidents. However, the traditional way of identifying power grid accident information has high labor costs and cannot efficiently and accurately identify power grid accident information in a large amount of data samples. The efficiency of identifying power grid accident information is low, and thus accidents cannot be effectively prevented and handled in a timely manner. Summary of the invention
[0004] The present invention provides a power grid accident information identification method, device, equipment and medium to achieve rapid and automatic identification of key power grid accident information, which can reduce labor costs, can efficiently and accurately identify power grid accident information in a large amount of power grid accident data, and improve the efficiency of identifying power grid accident information, thereby effectively preventing and promptly handling accidents.
[0005] In a first aspect, an embodiment of the present invention provides a method for identifying power grid accident information, comprising:
[0006] Obtaining target power grid accident description data to be identified;
[0007] Inputting the target power grid accident description data into a pre-trained target recognition network model to recognize named entity information, wherein the target recognition network model is obtained by training an initial recognition network model based on target sample data, and the initial recognition network model is constructed based on a preprocessing sub-model, a bidirectional memory network sub-model, and a conditional random field sub-model;
[0008] Based on the output result of the target identification network model, key accident information in the target power grid accident description data is determined.
[0009] In a second aspect, an embodiment of the present invention further provides a power grid accident information identification device, comprising:
[0010] A target data acquisition module is used to acquire target power grid accident description data to be identified;
[0011] A named entity recognition module, used for inputting the target power grid accident description data into a pre-trained target recognition network model to recognize the named entity information, wherein the target recognition network model is obtained by training an initial recognition network model based on target sample data, and the initial recognition network model is constructed based on a preprocessing sub-model, a bidirectional memory network sub-model and a conditional random field sub-model;
[0012] The accident information determination module is used to determine the key accident information in the target power grid accident description data based on the output result of the target identification network model.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, characterized in that the electronic device comprises: at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power grid accident information identification method provided in any embodiment of the present invention.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to execute the power grid accident information identification method provided by any embodiment of the present invention when executing.
[0017] The technical solution of the embodiment of the present invention can effectively capture and parse the complex information in the power grid accident description and improve the accuracy and efficiency of recognition by acquiring the target power grid accident description data to be identified and inputting the target power grid accident description data into a pre-trained target recognition network model to identify the named entity information. Among them, the target recognition network model is obtained by training the initial recognition network model based on the target sample data, and the initial recognition network model is constructed based on the preprocessing sub-model, the bidirectional memory network sub-model and the conditional random field sub-model. Based on the output result of the target recognition network model, the key accident information in the target power grid accident description data is determined. By realizing automated information extraction and processing through the target recognition network model, the core elements of the power grid accident can be quickly locked, and the power grid accident information can be efficiently and accurately identified in a large amount of power grid accident data, providing a strong basis for subsequent emergency response and decision support, reducing the time and cost of manual analysis and processing, and improving the efficiency and accuracy of power grid accident processing.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0020] Figure 1 is a flow chart of a method for identifying power grid accident information provided according to Embodiment 1 of the present invention;
[0021] Figure 2 is a flow chart of a method for identifying power grid accident information provided according to Embodiment 2 of the present invention;
[0022] Figure 3 is a schematic diagram of a training process of a target recognition network model involved in Embodiment 2 of the present invention;
[0023] Figure 4 is a structural diagram of a preprocessing sub-model involved in Embodiment 2 of the present invention;
[0024] Figure 5 This is a structural diagram of an LSTM model involved in Embodiment 2 of the present invention;
[0025] Figure 6 is a schematic diagram of a model training loss curve involved in Embodiment 2 of the present invention;
[0026] Figure 7 is a schematic diagram of a model accuracy comparison result involved in Embodiment 2 of the present invention;
[0027] Figure 8 is a schematic diagram of the structure of a power grid accident information identification device provided according to Embodiment 3 of the present invention;
[0028] Fig. 9 It is a structural schematic diagram of an electronic device for implementing the power grid accident information identification method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "target", "current", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Embodiment 1
[0032] Figure 1 A flowchart of a method for identifying power grid accident information is provided for the first embodiment of the present invention. This embodiment is applicable to the case of identifying power grid accident information. Figure 1 As shown, the method can be executed by a power grid accident information identification device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method specifically comprises the following steps:
[0033] S110: Obtain target power grid accident description data to be identified.
[0034] The target power grid accident description data may refer to text materials describing the power grid accident situation, cause, process, result and other related information. These text materials may come from various channels, including but not limited to accident reports, on-site records, investigation records, news reports and the like.
[0035] Specifically, the power grid accident description data that needs to be analyzed and identified is collected. These data may come from multiple channels such as monitoring systems, fault recording systems, and manual reports, and may include detailed descriptions of power grid accident phenomena, impact ranges, equipment status, etc., to ensure that the input data for the subsequent identification process is comprehensive and accurate, laying the foundation for subsequent analysis and identification work.
[0036] S120. Input the target power grid accident description data into a pre-trained target recognition network model to identify named entity information, wherein the target recognition network model is obtained by training an initial recognition network model based on target sample data, and the initial recognition network model is constructed based on a preprocessing sub-model, a bidirectional memory network sub-model, and a conditional random field sub-model.
[0037] Among them, the target recognition network model may refer to a deep learning model specifically used to identify named entity information in power grid accident description data, which can automatically identify key accident-related information from the text, such as accident type, time, location, equipment, etc. Named entity information may refer to entities with specific meaning or referentiality in the power grid accident description text, such as accident type (such as short circuit, tripping, etc.), time (such as the time of accident), location (such as substation name, line number, etc.), equipment (such as transformer, switch, etc.), etc. Target sample data may refer to a power grid accident description data set used to train the target recognition network model. The initial recognition network model may refer to a deep learning model that is built before training and has not been tuned. The preprocessing submodel may refer to the part responsible for data preprocessing in the target recognition network model. For example, the preprocessing submodel may be a (Bidirectional Encoder Representations from Transformers, BERT) preprocessing model. The bidirectional memory network submodel may refer to a special recurrent neural network structure that can simultaneously consider the context information of the input sequence. For example, the bidirectional memory network submodel may be a (Bi-directional Long Short-Term Memory, BiLSTM) bidirectional long short-term memory network. The conditional random field sub-model may refer to an undirected graph model for sequence labeling tasks. For example, the conditional random field sub-model may be a (Conditional Random Fields, CRF) conditional random field.
[0038] Specifically, the target recognition network model is constructed based on the preprocessing sub-model, the bidirectional memory network sub-model and the conditional random field sub-model. The preprocessing sub-model is used to clean and preliminarily process the input data, the bidirectional memory network sub-model can capture the contextual information in the input data, and the conditional random field sub-model is used to optimize the output sequence and improve the accuracy of recognition. The initial recognition network model is trained using the target sample data, and through continuous iteration and optimization, the model can accurately identify the key information in the power grid accident description. The target power grid accident description data is input into the trained model, and the model will output the recognized named entity information, such as accident type, occurrence time, affected equipment, fault phenomenon, etc. The use of deep learning technology, especially the combination of bidirectional memory network and conditional random field, can effectively capture and parse the complex information in the power grid accident description, and improve the accuracy and efficiency of recognition.
[0039] Exemplarily, the preprocessing sub-model serves as the input layer of the initial recognition network model, the bidirectional memory network sub-model serves as the middle layer of the initial recognition network model, and the conditional random field sub-model serves as the output layer of the initial recognition network model; wherein the preprocessing sub-model is used to perform word segmentation and full-word masking on the input data to obtain masked results; the bidirectional memory network sub-model is used to perform feature extraction on the masked results to obtain feature extraction results; and the conditional random field sub-model labels the feature extraction results to obtain output results.
[0040] Exemplarily, the target sample data includes target training sample data and target test sample data; the target sample data is determined based on original general sample data and original power grid accident sample data.
[0041] The target training sample data may refer to a data set used to train a machine learning model or a deep learning model, and the target test sample data may refer to a data set used to evaluate the performance of a trained model.
[0042] Exemplarily, based on the original general sample data and the original power grid accident sample data, the target sample data is determined, including: merging the original general sample data and the original power grid accident sample data according to a preset distribution ratio to obtain the original sample data; dividing and labeling the original sample data based on a preset labeling method and a preset division ratio to obtain the divided target training sample data and target test sample data.
[0043] Among them, the original general sample data may refer to a series of general information that is not necessarily directly related to power grid accidents. The original power grid accident sample data may refer to data directly related to power grid accidents. It may include records of power grid accidents that have occurred in the past, such as the time, location, type, scope of impact, loss situation and other information of the accident. The preset allocation ratio may refer to the ratio between the preset original general sample data and the original power grid accident sample data. The original sample data may refer to the data obtained by merging the original general sample data and the original power grid accident sample data. The preset marking method may refer to a preset marking method for sample data. For example, the preset marking method may be the (BeginningInside Outside, BIO) marking method. The preset division ratio may refer to a preset division method for the original sample data.
[0044] Specifically, the original general sample data and the original power grid accident sample data are merged according to a preset distribution ratio to obtain a more comprehensive and diverse original sample data, which can make the trained model more robust and able to handle more types of input data. Based on the preset labeling method (such as manual labeling, automatic labeling, etc.) and the preset division ratio (such as 70% for training and 30% for testing), the merged original sample data is divided and labeled. The labeling process is the process of associating the input features of each sample with its corresponding output label. By using diverse original sample data for training, the model can learn more types of feature combinations and change rules, thereby improving the generalization ability of the model on unseen data. The independent test sample data set allows us to evaluate the performance of the model more objectively.
[0045] S130. Determine key accident information in the target power grid accident description data based on the output result of the target identification network model.
[0046] Among them, key accident information can refer to information that can directly reflect the characteristics, impact scope, severity and need for immediate response of power grid accidents. This information is crucial for quickly locating the cause of the accident, assessing the impact of the accident, formulating emergency response strategies and restoring the normal operation of the power grid.
[0047] Specifically, the named entity information output by the model is further analyzed and processed to extract key accident information that is of great value to the analysis, disposal and recovery of power grid accidents. This key information may include the main cause of the accident, the scope of impact, the status of key equipment, etc. Through automated information extraction and processing, the core elements of power grid accidents can be quickly identified, providing a strong basis for subsequent emergency response and decision support.
[0048] The technical solution of the embodiment of the present invention can effectively capture and parse the complex information in the power grid accident description, and improve the accuracy and efficiency of recognition by acquiring the target power grid accident description data to be identified, and inputting the target power grid accident description data into a pre-trained target recognition network model to identify the named entity information. Among them, the target recognition network model is obtained by training the initial recognition network model based on the target sample data, and the initial recognition network model is constructed based on the preprocessing sub-model, the bidirectional memory network sub-model and the conditional random field sub-model. Based on the output result of the target recognition network model, the key accident information in the target power grid accident description data is determined. Through the target recognition network model to achieve automated information extraction and processing, the core elements of the power grid accident can be quickly locked, and the power grid accident information can be efficiently and accurately identified in a large amount of power grid accident data, providing a strong basis for subsequent emergency response and decision support, reducing the time and cost of manual analysis and processing, and improving the efficiency and accuracy of power grid accident processing.
[0049] Embodiment 2
[0050] Figure 2 This is a flow chart of a method for identifying power grid accident information provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment adds the step of "training the initial identification network model based on the target sample data to obtain the target identification network model". The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0051] See also Figure 2 Another power grid accident information identification method provided in this embodiment specifically includes the following steps:
[0052] S210: Obtain target power grid accident description data to be identified.
[0053] S220, training the initial recognition network model based on the target sample data to obtain a target recognition network model.
[0054] Specifically, the target sample data is input into the preprocessing sub-model in the initial recognition network model for preprocessing, and the preprocessing result is subjected to feature extraction according to the bidirectional memory network sub-model to obtain the feature extraction result, and the feature extraction result is labeled according to the conditional random field sub-model to determine the output result. Furthermore, the model is optimized according to the output result to obtain the target recognition network model.
[0055] Exemplarily, S220 may include: inputting the target training sample data into the initial recognition network model to identify the named entity information and obtain an identified target prediction sequence; tuning the initial recognition network model based on a preset optimization algorithm and the target prediction sequence to obtain an optimized candidate recognition network model; optimizing the candidate recognition network model based on the target test sample data to obtain an optimized target recognition network model.
[0056] The target prediction sequence may refer to a sequence of prediction results of the model on the output data (such as labels, categories, etc.) according to the patterns or rules learned during the training process after the input data (such as text, images, etc.) is given. The preset optimization algorithm may refer to an algorithm used in the training process of the machine learning model to find the parameter value that can minimize the objective function (or loss function). The goal of the optimization algorithm is to iteratively update the model parameters.
[0057] Specifically, the target training sample data is cleaned using the preprocessing sub-model to remove noise such as irrelevant characters and special symbols. The cleaned data is segmented to divide the continuous text into meaningful vocabulary units, and the segmentation results are fully masked, which can reduce the difference between pre-training and fine-tuning. The bidirectional memory network sub-model is used to extract features from the word vector after full word masking. The bidirectional memory network sub-model can capture the context information in the text, which is crucial for understanding the sentence structure and semantics. The conditional random field sub-model is used to annotate the feature set extracted by the bidirectional memory network sub-model to obtain the identified target prediction sequence. Based on the preset optimization algorithm and the annotated target prediction sequence, the initial recognition network model is tuned. The model parameters are adjusted through the back propagation algorithm to make the model prediction more accurate. This process is repeated until the model performance meets the requirements or reaches the preset training rounds. Finally, the tuned candidate recognition network model is further optimized using the target test sample data. Through the feedback of test data, the model parameters or structure are further adjusted to improve the generalization ability of the model on unknown data, ensuring that the target recognition network model not only has a high accuracy but also has good robustness and generalization.
[0058] Exemplarily, the initial recognition network model is tuned based on a preset optimization algorithm and a target prediction sequence to obtain a tuned recognition network model to be selected, including: based on the target prediction sequence, determining the error between the target prediction sequence and the true label; based on the error and a preset optimization algorithm, the initial recognition network model is tuned to obtain a recognition network model to be selected.
[0059] The true label may refer to a known and accurate classification, annotation or result corresponding to the target training sample data.
[0060] Specifically, during the training phase, the model generates a target prediction sequence based on the input target training sample data. This prediction sequence is the model's understanding and judgment of the current input data, expressed as a series of labels or classification results. By comparing the target prediction sequence with the true label, the error between the two can be calculated. This error is usually measured using some kind of loss function, such as cross entropy loss, mean square error, etc., depending on the nature of the task. Furthermore, a preset optimization algorithm is used to adjust the parameters of the initial recognition network model to reduce the error and improve the accuracy of the model, and obtain the candidate recognition network model. By continuously adjusting the model parameters to minimize the prediction error, we can significantly improve the accuracy of the model. This enables the model to more accurately identify or classify input data in practical applications.
[0061] Exemplarily, the candidate recognition network model is optimized based on the target test sample data to obtain the optimized target recognition network model, including: inputting the target test sample data into the trained candidate recognition network model for evaluation, and determining the candidate model parameters corresponding to the candidate recognition network model; optimizing the candidate model parameters corresponding to the candidate recognition network model based on a preset confidence threshold to obtain the optimized target recognition network model.
[0062] The preset confidence threshold may refer to an important parameter preset to determine the credibility of the model prediction result. It is usually a value between 0 and 1, indicating the reliability or confidence level of the model prediction result.
[0063] Specifically, the target test sample data is input into the trained candidate recognition network model. The target test sample data is predicted using the candidate recognition network model, and the corresponding prediction results are generated. The prediction results are compared with the true labels corresponding to the target test sample data, and the performance indicators of the model on the test set, such as accuracy, recall, etc., are calculated. Based on the preset confidence threshold, the performance of the candidate recognition network model is evaluated to see whether it meets the requirements. If the model performance does not reach the threshold, the candidate recognition network model needs to be further optimized. This can be achieved by adjusting the model parameters. The optimization process may require multiple iterations until the model performance meets the requirements or reaches the preset optimization number limit, and the optimized target recognition network model is obtained. By evaluating the model performance on the test set, problems that may exist in the model during the training process can be discovered and corrected in a timely manner, so that the target recognition network model can process the user input data faster and more accurately, and give corresponding prediction results.
[0064] S230, inputting the target power grid accident description data into a pre-trained target recognition network model to recognize named entity information.
[0065] S240. Based on the output result of the target identification network model, determine the key accident information in the target power grid accident description data.
[0066] The technical solution of the embodiment of the present invention is to input the target training sample data into the initial recognition network model to identify the named entity information, obtain the identified target prediction sequence, and improve the model's ability to understand the input data and the recognition accuracy. The initial recognition network model is tuned based on the preset optimization algorithm and the target prediction sequence to obtain the tuned candidate recognition network model to improve the accuracy and robustness of recognition. The candidate recognition network model is optimized based on the target test sample data to obtain the optimized target recognition network model to ensure the reliability of the model in practical applications. Through the input of a large number of training samples, the model can learn the general laws and characteristics of power grid accident description data, providing a basis for subsequent tuning and optimization. Further, according to iterative tuning, the model can gradually learn more accurate and generalized named entity recognition capabilities, improve recognition accuracy and robustness, and finally, through the evaluation of test sample data, the generalization ability of the model on unseen data can be verified to ensure the reliability of the model in practical applications.
[0067] Exemplarily, the training process of the above target recognition network model is as follows: Figure 3 As shown, specifically:
[0068] BERT preprocessing sub-model such as Figure 4 As shown in , it is used to obtain the contextual representation of the input sequence. First, the text is segmented, and after segmentation, some words are masked. The whole word masking method can solve the problem that traditional masking is not applicable to Chinese text, and reduce the difference between pre-training and fine-tuning. Then add tags to the sequence. At this time, the output of each text sequence includes three parts: word embedding, paragraph embedding, and position embedding, and each part is converted into a vector, and then added layer by layer to obtain the output. The obtained sequence vector is input into the bidirectional encoder, and the encoder is used to extract features to generate a sequence word vector with rich features.
[0069] The BiLSTM layer models the BERT output. Each word vector in the input sequence is taken as input, and the contextual representation of each word is calculated through forward and backward propagation to capture the following information. The BiLSTM layer consists of two LSTM units. First, the word vector in the input sequence is taken as input, and the input sequence is processed in forward and reverse order through forward and backward LSTM respectively. The forward LSTM unit is responsible for capturing the contextual information from the start position of the sequence to the current position, while the reverse LSTM unit is responsible for capturing the contextual information from the end position of the sequence to the current position, that is, BiLSTM can simultaneously consider the previous and next contextual information of the current position. In this way, the contextual representation of each word is calculated, and then the output at each moment is merged. The output of this layer can be used as a feature extractor to extract the contextual information of each word in the input sequence for subsequent label prediction tasks. The LSTM model structure is as follows Figure 5 shown.
[0070] The features output by the BiLSTM layer are passed to the CRF layer for labeling, and the optimal label prediction sequence is found through the relationship between adjacent labels. The CRF layer first models the transition probability between labels by defining a transition matrix, then constrains the rationality of the label sequence based on the transition probability, and uses a dynamic programming algorithm to find the optimal label prediction sequence to improve the accuracy of sequence labeling.
[0071] Assume that the input observation sequence is X = {x1, x2, ..., x n}; The output state prediction sequence is Y = (y1, y2, ..., y n ), the CRF layer scoring formula is as follows:
[0072]
[0073] in:
[0074] A i,j -Transition score matrix, which represents the probability of the i-th label in the transfer matrix transferring to the j-th label
[0075] P i,j -The output score matrix of the BiLSTM layer to the CRF layer
[0076] After decoding, we get the maximum score output sequence:
[0077] y * =argmaxS(X,Y)
[0078] The CRF layer will directly output the entity prediction label.
[0079] The initial recognition network model is tuned according to the preset optimization algorithm and the obtained target prediction sequence to obtain the tuned candidate recognition network model, and the candidate recognition network model is optimized according to the target test sample data to obtain the optimized target recognition network model.
[0080] It should be noted that in order to achieve the best training effect, it is necessary to find the best model training iteration cycle. A training cycle that is too short will cause the model to fail to learn features well or has not yet converged; a training cycle that is too long will cause the model to over-learn and produce overfitting problems. As the entity recognition training progresses, the loss value of the model steadily decreases from a higher initial value, showing a clear convergence trend. In the early stages of training, the loss decreases rapidly, indicating that the model quickly learns the main features of the data set. As the number of epochs increases, the rate of loss decreases and the curve tends to stabilize. Throughout the training process, the fluctuation of loss gradually decreases, indicating that the learning process of the model tends to stabilize. In the end, the loss curve approaches a low and stable value. The schematic diagram of the model training loss curve is shown in Figure 6 shown.
[0081] Under the optimal training cycle (epochs = 20), the relationship extraction experiment was carried out. The accuracy was used as the evaluation index, according to the experimental results. When only the original general sample data was used for training, the relationship extraction accuracy for power grid accidents was 0.312, and the extracted relationships were limited to time, location and number of deaths. After adding the original power grid accident sample data, the relationship extraction accuracy reached 0.937, and the following information was extracted comprehensively for the text content: time, location, accident type, number of deaths, occurrence area, voltage level, direct cause, indirect cause, etc. The experimental results show that after adding power grid accident-related corpus to the general data set, the accuracy of the relationship extraction results is greatly improved, which is conducive to the subsequent entity recognition work and verifies the effectiveness of the constructed data set.
[0082] Exemplarily, in order to prove the effectiveness of the model proposed in the present invention, it is trained on the established data set with the BERT-LSTM-CRF and BiLSTM-CRF models to compare the accuracy, recall and F1 values of the named entity recognition results. According to the experimental results of the three models. The BERT-BiLSTM-CRF model proposed in the present invention can recognize the overall semantic features by combining the BERT pre-training model, and output high-quality word vectors by immediately solving the polysemy problem of a word in the context. Compared with the BiLSTM-CRF entity recognition model without the BERT pre-training module, the performance is greatly improved, with an accuracy increase of 21.5%, a recall increase of 31.8%, and an F1 value increase of 27%. In addition, this model effectively captures the contextual information in the input sequence by adopting a bidirectional long short-term memory network. Compared with the model using a unidirectional LSTM, its accuracy is increased by 4.6%, the recall rate is increased by 5.4%, and the F1 value is increased by 5%. Figure 7 The accuracy comparison results of the three models are shown in Figure 2.
[0083] Embodiment 3
[0084] Figure 8 This is a schematic diagram of the structure of a power grid accident information identification device provided by the third embodiment of the present invention. Figure 8 As shown, the device includes: a target data acquisition module 310, a named entity recognition module 320 and an accident information determination module 330.
[0085] Wherein, the target data acquisition module 310 is used to acquire the target power grid accident description data to be identified;
[0086] A named entity recognition module 320 is used to input the target power grid accident description data into a pre-trained target recognition network model to recognize the named entity information, wherein the target recognition network model is obtained by training an initial recognition network model based on the target sample data, and the initial recognition network model is constructed based on a preprocessing sub-model, a bidirectional memory network sub-model and a conditional random field sub-model;
[0087] The accident information determination module 330 is used to determine key accident information in the target power grid accident description data based on the output result of the target identification network model.
[0088] The technical solution of this embodiment can effectively capture and parse the complex information in the power grid accident description, and improve the accuracy and efficiency of recognition by obtaining the target power grid accident description data to be identified, and inputting the target power grid accident description data into a pre-trained target recognition network model to identify the named entity information. Among them, the target recognition network model is obtained by training the initial recognition network model based on the target sample data, and the initial recognition network model is constructed based on the preprocessing sub-model, the bidirectional memory network sub-model and the conditional random field sub-model. Based on the output result of the target recognition network model, the key accident information in the target power grid accident description data is determined. Through the target recognition network model to achieve automated information extraction and processing, the core elements of the power grid accident can be quickly locked, and the power grid accident information can be efficiently and accurately identified in a large amount of power grid accident data, providing a strong basis for subsequent emergency response and decision support, reducing the time and cost of manual analysis and processing, and improving the efficiency and accuracy of power grid accident processing.
[0089] Optionally, the preprocessing sub-model serves as the input layer of the initial recognition network model, the bidirectional memory network sub-model serves as the middle layer of the initial recognition network model, and the conditional random field sub-model serves as the output layer of the initial recognition network model; wherein the preprocessing sub-model is used to perform word segmentation and full-word masking on the input data to obtain masked results; the bidirectional memory network sub-model is used to perform feature extraction on the masked results to obtain feature extraction results; and the conditional random field sub-model labels the feature extraction results to obtain output results.
[0090] Optionally, the target sample data includes target training sample data and target test sample data; the target sample data is determined based on original general sample data and original power grid accident sample data.
[0091] Optionally, the device further comprises:
[0092] The sample data determination unit is used to merge the original general sample data and the original power grid accident sample data according to a preset distribution ratio to obtain the original sample data; based on a preset labeling method and a preset division ratio, the original sample data is divided and labeled to obtain the divided target training sample data and target test sample data.
[0093] Optionally, the device further comprises: a target recognition network model determination module,
[0094] The target recognition network model determination module includes:
[0095] A prediction sequence acquisition unit is used to input the target training sample data into the initial recognition network model to recognize the named entity information and obtain the recognized target prediction sequence;
[0096] A candidate model determination unit is used to optimize the initial recognition network model based on a preset optimization algorithm and the target prediction sequence to obtain an optimized candidate recognition network model;
[0097] The target model determination unit is used to optimize the candidate recognition network model based on the target test sample data to obtain an optimized target recognition network model.
[0098] Optionally, the candidate model determination unit is specifically used to: determine the error between the target prediction sequence and the true label based on the target prediction sequence; and tune the initial recognition network model based on the error and a preset optimization algorithm to obtain the candidate recognition network model.
[0099] Optionally, the target model determination unit is specifically used to: input the target test sample data into a trained candidate recognition network model for evaluation, and determine the candidate model parameters corresponding to the candidate recognition network model; optimize the candidate model parameters corresponding to the candidate recognition network model based on a preset confidence threshold, and obtain an optimized target recognition network model.
[0100] The power grid accident information identification device provided in the embodiment of the present invention can execute the power grid accident information identification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0101] Fig. 9 A schematic diagram of the structure of an electronic device 12 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as desktop computers, workstations, servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0102] like Fig. 9 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0103] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0104] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0105] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig. 9 not shown, usually called a "hard drive"). Although Fig. 9 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0106] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0107] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0108] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a method for identifying power grid accident information provided by the embodiment of the present invention, the method comprising:
[0109] Obtaining target power grid accident description data to be identified;
[0110] Inputting the target power grid accident description data into a pre-trained target recognition network model to recognize named entity information, wherein the target recognition network model is obtained by training an initial recognition network model based on target sample data, and the initial recognition network model is constructed based on a preprocessing sub-model, a bidirectional memory network sub-model, and a conditional random field sub-model;
[0111] Based on the output result of the target identification network model, key accident information in the target power grid accident description data is determined.
[0112] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the power grid accident information identification method provided by any embodiment of the present invention.
[0113] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the power grid accident information identification method provided in any embodiment of the present invention are implemented. The method includes:
[0114] Obtaining target power grid accident description data to be identified;
[0115] Inputting the target power grid accident description data into a pre-trained target recognition network model to recognize named entity information, wherein the target recognition network model is obtained by training an initial recognition network model based on target sample data, and the initial recognition network model is constructed based on a preprocessing sub-model, a bidirectional memory network sub-model, and a conditional random field sub-model;
[0116] Based on the output result of the target identification network model, key accident information in the target power grid accident description data is determined.
[0117] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0118] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0119] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0120] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0122] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for identifying power grid accident information, characterized in that: The method comprises: Obtaining target power grid accident description data to be identified; Inputting the target power grid accident description data into a pre-trained target recognition network model to recognize named entity information, wherein the target recognition network model is obtained by training an initial recognition network model based on target sample data, and the initial recognition network model is constructed based on a preprocessing sub-model, a bidirectional memory network sub-model, and a conditional random field sub-model; Based on the output result of the target identification network model, key accident information in the target power grid accident description data is determined.
2. The method according to claim 1, characterized in that The preprocessing sub-model serves as the input layer of the initial recognition network model, the bidirectional memory network sub-model serves as the middle layer of the initial recognition network model, and the conditional random field sub-model serves as the output layer of the initial recognition network model; wherein, The preprocessing sub-model is used to perform word segmentation processing and full-word masking processing on the input data to obtain a masking result; The bidirectional memory network sub-model is used to perform feature extraction on the mask result to obtain a feature extraction result; The conditional random field sub-model labels the feature extraction result to obtain an output result.
3. The method according to claim 1, characterized in that The target sample data includes target training sample data and target testing sample data; The target sample data is determined based on the original general sample data and the original power grid accident sample data.
4. The method according to claim 3, characterized in that Determining the target sample data based on the original general sample data and the original power grid accident sample data includes: The original general sample data and the original power grid accident sample data are merged according to a preset distribution ratio to obtain the original sample data; Based on a preset labeling method and a preset division ratio, the original sample data is divided and labeled to obtain divided target training sample data and target test sample data.
5. The method according to claim 1, characterized in that The target recognition network model is obtained by training the initial recognition network model based on the target sample data, including: Input the target training sample data into the initial recognition network model to recognize the named entity information and obtain the recognized target prediction sequence; Based on a preset optimization algorithm and the target prediction sequence, the initial recognition network model is tuned to obtain a tuned candidate recognition network model; The candidate recognition network model is optimized based on the target test sample data to obtain an optimized target recognition network model.
6. The method according to claim 5, characterized in that The step of optimizing the initial recognition network model based on the preset optimization algorithm and the target prediction sequence to obtain the optimized recognition network model to be selected includes: Based on the target prediction sequence, determining the error between the target prediction sequence and the true label; The initial recognition network model is tuned based on the error and a preset optimization algorithm to obtain a candidate recognition network model.
7. The method according to claim 5, characterized in that The step of optimizing the candidate recognition network model based on the target test sample data to obtain an optimized target recognition network model includes: Input the target test sample data into the trained candidate recognition network model for evaluation, and determine the candidate model parameters corresponding to the candidate recognition network model; Based on a preset confidence threshold, the candidate model parameters corresponding to the candidate recognition network model are optimized to obtain an optimized target recognition network model.
8. A power grid accident information identification device, characterized in that: include: A target data acquisition module is used to acquire target power grid accident description data to be identified; A named entity recognition module, used for inputting the target power grid accident description data into a pre-trained target recognition network model to recognize the named entity information, wherein the target recognition network model is obtained by training an initial recognition network model based on target sample data, and the initial recognition network model is constructed based on a preprocessing sub-model, a bidirectional memory network sub-model and a conditional random field sub-model; The accident information determination module is used to determine the key accident information in the target power grid accident description data based on the output result of the target identification network model.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power grid accident information identification method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the power grid accident information identification method according to any one of claims 1 to 7 when executed.