LSTM-based power grid accident handling plan text similarity matching method and system

Through the text similarity matching method of the grid accident handling plan based on LSTM, semantic and structured features are extracted and integrated, the problem of insufficient accuracy and adaptability of similarity calculation in the prior art is solved, and a more efficient grid accident plan is achieved Match and respond.

CN119089210APending Publication Date: 2024-12-06STATE GRID JIANGSU ELECTRIC POWER CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410844432.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing text similarity evaluation method for power grid accident handling plans has problems such as low accuracy, low diversity, and low similarity calculation reliability and accuracy, which cannot achieve rapid response and processing.

Method used

The text similarity matching method of the grid accident handling plan based on LSTM is adopted. By sampling and segmenting the text library, the semantic and structured features of the post-accident method and accident handling steps are extracted using the LSTM model, and the feature fusion is performed, and cosine similarity is performed. Degree calculation outputs a comprehensive similarity score.

Benefits of technology

It improves the accuracy and diversity of text feature representation, improves the reliability and accuracy of similarity calculations, and enhances the adaptability and responsiveness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089210A_ABST
    Figure CN119089210A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid accident handling plan text similarity matching method and system based on LSTM, and relates to the technical field of natural language processing and power system safety, and the method comprises the steps: sampling a text library, and segmenting a sampling text; semantic feature extraction is carried out on the post-accident mode and the accident disposal steps through an LSTM model; extracting the structural features in the post-accident mode and the structural features in the accident disposal step, and carrying out feature fusion; and outputting a comprehensive similarity score based on the output fusion feature vector cosine similarity. According to the method, semantic feature extraction is performed on post-accident modes and accident handling steps through the LSTM model, the accuracy of text feature representation is improved, a weight matrix and a weighted inner product are introduced, the model adaptability is enhanced, the similarity calculation precision is improved, and the accuracy of the method is improved. The method has better effects in the aspects of similarity calculation reliability and precision, adaptability and text feature representation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing and power system safety technology, and in particular to a LSTM-based power grid accident disposal plan text similarity matching method and system. Background Art

[0002] During the operation of the power grid, the prevention and treatment of cross-section over-limit accidents are important links to ensure the safe and stable operation of the power grid. Traditional methods for assessing the similarity of emergency plan texts mainly rely on manual experience and simple text matching algorithms, which have the problems of low efficiency and poor accuracy. With the development of natural language processing technology, deep learning models (such as LSTM) are increasingly widely used in text similarity calculation, which can better understand the semantic information of the text and improve the accuracy of similarity assessment.

[0003] In the operation of modern power grids, the frequency and complexity of power grid accidents have brought great challenges to the stable operation of power systems. In order to effectively respond to and deal with power grid accidents, power grid operators usually formulate detailed accident handling plans. However, with the continuous expansion of the scale of power systems and the complexity of operating conditions, the number and complexity of power grid accident handling plans are also increasing. Traditional plan management and matching methods are difficult to meet the needs of fast and accurate plan retrieval. There is an urgent need for an efficient and intelligent plan matching method to improve the emergency response capability of power grid accidents.

[0004] Existing power grid accident disposal plan matching technologies mainly rely on keyword matching and rule-based retrieval methods. These methods have certain advantages when processing simple and structured information, but they show significant shortcomings when facing large-scale, unstructured plan texts. Keyword matching methods are easily affected by vocabulary diversity and semantic ambiguity, resulting in low accuracy of matching results. Although rule-based retrieval methods can improve the accuracy of matching to a certain extent, the design and maintenance costs of their rules are high, and they are difficult to adapt to the rapid updates and changes of power grid accident disposal plans. In addition, traditional methods have great limitations in processing semantic similarity and context understanding, and it is difficult to fully explore the deep information in the plan text. Summary of the invention

[0005] In view of the above-mentioned problems, the present invention is proposed.

[0006] Therefore, the technical problem solved by the present invention is that the existing plan text similarity evaluation method has the problems of low accuracy and diversity of text feature representation, low reliability and precision of similarity calculation, and inability to achieve rapid response and processing of power grid accidents.

[0007] To solve the above technical problems, the present invention provides the following technical solutions: a LSTM-based power grid accident handling plan text similarity matching method, comprising sampling a text library and segmenting the sampled text; extracting semantic features of post-accident methods and accident handling steps respectively through an LSTM model; extracting structured features in the post-accident methods and structured features in the accident handling steps, and performing feature fusion; and outputting a comprehensive similarity score based on the cosine similarity of the output fused feature vector.

[0008] As a preferred scheme of the LSTM-based power grid accident handling plan text similarity matching method described in the present invention, wherein: the sampling of the text library and segmentation of the sampled text includes randomly sampling two plan texts from the plan text library, and segmenting each plan text into two parts: post-accident methods and accident handling steps.

[0009] As a preferred solution of the LSTM-based power grid accident handling plan text similarity matching method described in the present invention, wherein: the semantic feature extraction of the post-accident method and the accident handling steps by the LSTM model includes using the LSTM model to extract semantic features of the post-accident method and the accident handling steps respectively, and outputting corresponding feature vectors;

[0010] The LSTM-Self-Attention model is a deep learning model that combines long short-term memory and self-attention mechanisms;

[0011] For the two given power grid accident plan texts to be matched, text-a and text-b, assuming that text-a and text-b are composed of la and lb words respectively, each word is trained by Self-Attention to output the corresponding text vector, and the word vector vi corresponding to each word in the text is concatenated in the original order to obtain the initial sentence vector representations Ma and Mb;

[0012] For text-a, we use the existing embedding model Word2Vec to represent each word in the text as an l a1 dimensional post-accident mode vector and l a2 The accident handling step vector of dimension is expressed as:

[0013]

[0014] in, Indicates l a1 Dimensional word vector, for each word in the post-accident method There is a vector corresponding to Represents words in the text, and same;

[0015] X a The vector is encoded using LSTM and converted into a fixed-dimensional vector representation, expressed as:

[0016]

[0017] Among them, h a1 、h a1 express and A vector of fixed dimension.

[0018] As a preferred solution of the LSTM-based power grid accident handling plan text similarity matching method described in the present invention, wherein: the extracting structured features in the post-accident method and the structured features in the accident handling steps includes extracting structured features in the post-accident method and the structured features in the accident handling steps;

[0019] The structural features include an out-of-limit device and an out-of-limit value;

[0020] The structural features include operating equipment and operating methods;

[0021] For the plan text text-a, the post-accident method of the text, such as event type, accident level, faulty equipment, and over-limit value, is extracted as the text vector, and the accident handling steps of the text, such as operating equipment and operating method, are extracted as the feature vector of the text. For the text text-a, the following structured feature vector is output, which is expressed as:

[0022]

[0023] in, The eigenvector representing the post-accident pattern, Indicates the event type. Indicates the accident level. and Indicates faulty equipment and corresponding over-limit values. The feature vector representing the accident handling steps, and Indicates operating equipment and operating methods;

[0024] Since the post-accident methods and structured features in the accident handling steps in the two texts are different, the text with a larger number of features is used as the main text, and the feature vectors with a smaller number of features are supplemented with 0 vectors.

[0025] As a preferred solution of the LSTM-based power grid accident disposal plan text similarity matching method described in the present invention, wherein: the feature fusion includes fusing semantic features with structural features to form a comprehensive feature vector, which is expressed as:

[0026]

[0027] Among them, f a1 、f a2 They respectively represent the semantic feature vectors extracted from the post-accident method and accident handling steps through the LSTM model.

[0028] As a preferred solution of the LSTM-based power grid accident disposal plan text similarity matching method of the present invention, wherein: the output of the comprehensive similarity score based on the cosine similarity of the output fused feature vector includes calculating the cosine similarity between the fused feature vectors and outputting the comprehensive similarity score of the two plan texts, which is expressed as:

[0029]

[0030] Among them, θ a1,b1 With θ a2,b2 Indicates the similarity between the post-accident methods part and the accident handling steps part of the two texts;

[0031] θ all =αθ a1,b1 +(1-α)θ a2,b2

[0032] Among them, θ all That is, the similarity between the two power grid accident handling plan texts. When θ all The larger the value of , the higher the similarity between the two plan texts.

[0033] As a preferred solution of the LSTM-based power grid accident disposal plan text similarity matching method described in the present invention, the output of the comprehensive similarity score based on the cosine similarity of the output fusion feature vector includes dynamically adjusting the feature weights according to the specific application scenario by introducing a weight matrix and a weighted inner product, considering the direct matching of the feature vector, and constructing a comprehensive similarity score model represented as follows:

[0034]

[0035] Among them, θ represents the comprehensive similarity score, the similarity between the two plan texts, W j Represents the weight matrix, which is used to adjust the importance of features, U j Represents the weight matrix, which is used to adjust the importance of features;

[0036] When the θ output is close to 1, it means f a1 and f a2 There is a linear correlation between the elements of

[0037] When the θ output is close to 0, it means fa1 and f a2 There is no linear correlation between the various elements.

[0038] Another object of the present invention is to provide a LSTM-based power grid accident handling plan text similarity matching system, which can output a comprehensive similarity score based on the cosine similarity of the output fused feature vector, thereby solving the problem of low reliability and accuracy of similarity calculation in the current plan text similarity evaluation method.

[0039] As a preferred solution of the LSTM-based power grid accident handling plan text similarity matching system described in the present invention, it includes: a text sampling and segmentation module, a semantic feature extraction module, a structured feature extraction module, a feature fusion module, and a similarity output module; the text sampling and segmentation module is used to sample and select two plan texts from the plan text library and perform text segmentation; the semantic feature extraction module is used to use the LSTM model to extract semantic features of the post-accident method and the accident handling steps respectively; the structured feature extraction module is used to extract the structured features in the post-accident method and the structured features in the accident handling steps; the feature fusion module is used to fuse the semantic features with the structured features to form a comprehensive feature vector; the similarity output module is used to output the cosine similarity between the fused feature vectors to obtain the feature fusion module of the two plan texts for the comprehensive similarity score.

[0040] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a method for text similarity matching of power grid accident disposal plans based on LSTM.

[0041] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a LSTM-based text similarity matching method for power grid accident handling plans.

[0042] The beneficial effects of the present invention are as follows: the LSTM-based power grid accident handling plan text similarity matching method provided by the present invention randomly samples texts in a plan text library to improve the model's understanding ability and processing efficiency of the plan text, respectively extracts semantic features of the post-accident method and the accident handling steps through the LSTM model to improve the accuracy of text feature representation, extracts structured features in the post-accident method and the structured features in the accident handling steps, performs feature fusion, improves feature representation diversity and accuracy, calculates the cosine similarity between fused feature vectors, outputs a comprehensive similarity score of two plan texts, improves similarity calculation reliability and accuracy, introduces a weight matrix and a weighted inner product, dynamically adjusts feature weights according to specific application scenarios, enhances model adaptability and improves similarity calculation accuracy, and the present invention achieves better results in terms of similarity calculation reliability and accuracy, adaptability, and text feature representation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of 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 described below 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.

[0044] Figure 1 An overall flow chart of the LSTM-based power grid accident handling plan text similarity matching method provided for the first embodiment of the present invention.

[0045] Figure 2 An overall flow chart of the LSTM-based power grid accident handling plan text similarity matching method provided for the first embodiment of the present invention.

[0046] Figure 3 A schematic diagram showing an interface for automatically generating text matching plans for a power grid accident handling plan text similarity matching method based on LSTM provided in the first embodiment of the present invention.

[0047] Figure 4 An overall flow chart of the LSTM-based power grid accident handling plan text similarity matching system provided for the third embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0049] Example 1

[0050] Reference Figure 1-Figure 3 , which is an embodiment of the present invention, provides a text similarity matching method for power grid accident disposal plans based on LSTM, including:

[0051] S1: Sample the text library and segment the sampled text.

[0052] Furthermore, two plan texts are randomly sampled and selected from the plan text library.

[0053] It should be noted that each plan text is divided into two parts: post-accident methods and accident handling steps.

[0054] S2: Semantic features of post-accident methods and accident handling steps are extracted through the LSTM model.

[0055] Furthermore, the LSTM model is used to extract semantic features of the post-accident methods and accident handling steps respectively to generate corresponding feature vectors.

[0056] In particular, the LSTM-Self-Attention model is a deep learning model that combines long short term memory (LSTM) and self-attention mechanism (Self-Attention), and is often used to process sequence data or text data.

[0057] For the two given power grid accident plan texts text-a and text-b to be matched, assuming that they are composed of la and lb words respectively, each word can obtain the corresponding text vector after Self-Attention training, and the word vector vi corresponding to each word in a text is concatenated in the original order to obtain the initial sentence vector representations Ma and Mb.

[0058] Taking text-a as an example, we use the existing embedding model Word2Vec to represent each word in the text as an l a1 dimensional post-accident mode vector and l a2 The accident handling step vector of dimension is

[0059]

[0060] in, Indicates l a1 Dimensional word vector, for each word in the post-accident method There is a vector corresponding to Represents words in the text, and same.

[0061] X a The vector is encoded using LSTM to convert it into a vector representation of fixed dimension, i.e.

[0062]

[0063] Among them, h a1 、h a1 express and A vector of fixed dimension.

[0064] S3: Extract the structured features in the post-accident mode and the structured features in the accident handling steps, and perform feature fusion.

[0065] Furthermore, the structured features of the post-accident mode (such as out-of-limit equipment, out-of-limit value, etc.) and the structured features of the accident handling steps (such as operating equipment, operating mode) are extracted.

[0066] For the emergency plan text-a, the post-accident method of the text, such as the event type, accident level, faulty equipment, and over-limit value, is extracted as the text vector, and the accident handling steps of the text, such as the operating equipment and operating method, are extracted as the feature vector of the text. That is, for the text text-a, the following structured feature vector can be obtained:

[0067]

[0068] in, is the characteristic vector of the post-accident mode, is the event type, is the accident level, and They are the faulty device and its corresponding over-limit value. is the characteristic vector of the accident handling step, and They are operating equipment and operating methods.

[0069] Since the structured features of the post-accident methods and accident handling steps in the two texts are not necessarily the same (different plan texts have different numbers of off-limit equipment, off-limit values, and may also have different numbers of operating equipment and operating methods), the text with a larger number of features is used as the main text, and the feature vectors with a smaller number of features are supplemented with 0 vectors.

[0070] It should be noted that the semantic features are fused with the structural features to form a comprehensive feature vector.

[0071]

[0072] Among them, f a1 、f a2 They respectively represent the semantic feature vectors extracted from the post-accident method and accident handling steps through the LSTM model.

[0073] S4: Output a comprehensive similarity score based on the cosine similarity of the output fused feature vectors.

[0074] Furthermore, by calculating the cosine similarity between the fused feature vectors, the comprehensive similarity score of the two plan texts is obtained.

[0075]

[0076] Among them, θ a1,b1 With θ a2,b2 It is the similarity between the post-accident methods part and the accident handling steps part of the two texts.

[0077] θ all =αθ a1,b1 +(1-α)θ a2,b2

[0078] Among them, θ all That is, the similarity between the two power grid accident handling plan texts. When θ all The larger the value of , the higher the similarity between the two plan texts.

[0079] It should be noted that by introducing the weight matrix and weighted inner product, dynamically adjusting the feature weights according to the specific application scenario, considering the direct matching of feature vectors, and constructing a comprehensive similarity score model expressed as:

[0080]

[0081] Among them, θ represents the comprehensive similarity score, the similarity between the two plan texts, W j Represents the weight matrix, which is used to adjust the importance of features, U j Represents the weight matrix, which is used to adjust the importance of features;

[0082] When the θ output is close to 1, it means f a1 and f a2 There is a linear correlation between the elements of

[0083] When the θ output is close to 0, it means f a1 and f a2 There is no linear correlation between the various elements.

[0084] By introducing the weight matrix and weighted inner product, the comprehensive similarity score model more accurately measures the similarity of two texts in important features. For the matching of power grid accident disposal plans, some features (such as equipment type, fault level) have different importance in different scenarios. The introduction of the weight matrix allows the model to dynamically adjust the feature weights according to the specific application scenario, improving the adaptability of the model. In practical applications, different accident types and disposal steps may require different weight adjustments.

[0085] The design of the comprehensive similarity score model not only considers the direct matching of feature vectors, but also considers the weighted matching degree through weighted inner product. This comprehensive similarity calculation method can more accurately reflect the actual similarity of two texts and improve the reliability of plan matching.

[0086] Example 2

[0087] An embodiment of the present invention provides a text similarity matching method for power grid accident handling plans based on LSTM. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0088] First, 1,000 emergency plan texts were randomly selected from the power grid accident disposal plan database to construct the text library required for the experiment. These texts cover different types of power grid accidents and their corresponding disposal steps.

[0089] Each emergency plan text is divided into two parts: post-accident methods and accident handling steps. Text segmentation includes structural processing of the text, extracting the accident description and handling steps in the text respectively.

[0090] The LSTM model is used to extract semantic features from the segmented post-accident methods and accident handling steps. The specific process is as follows:

[0091] Use the pre-trained Word2Vec model to represent each word in the text as a word vector.

[0092] The post-accident methods and accident handling steps are encoded through the LSTM model, and a semantic feature vector of fixed dimension is output.

[0093] Structural features are extracted from post-accident methods and accident handling steps. The structural features of post-accident methods include event type, accident level, faulty equipment and over-limit value; the structural features of accident handling steps include operating equipment and operating methods.

[0094] The semantic features are fused with the structural features to form a comprehensive feature vector, and the comprehensive similarity score is calculated based on the cosine similarity of the output fused feature vector.

[0095] A control experiment was set up, and the traditional keyword matching method was used as the control experimental group. This method evaluates the similarity of the plan text by extracting keywords from the text and calculating the similarity between the keywords.

[0096] Table 1 Experimental data table

[0097]

[0098] It can be seen from the data in the table that the similarity score of the plan text based on the LSTM-Self-Attention model is generally higher than that of the traditional keyword matching method. In the specific data, the similarity scores of plan number A001 are 0.92 and 0.75 respectively, and the accuracy rate is improved by 22.67% through the present invention. Similarly, the similarity scores of plan numbers A002, A003, A004 and A005 are improved by 25.00%, 25.71%, 23.29% and 22.54% respectively.

[0099] By using the LSTM-Self-Attention model to extract semantic features and structural features, combined with multi-level feature fusion and cosine similarity calculation, significant improvements in the calculation of plan text similarity are achieved. This improvement is mainly reflected in the following aspects:

[0100] Reliability and accuracy of similarity calculation:

[0101] The LSTM-Self-Attention model can capture the deep semantic information in the text, making up for the shortcomings of the traditional keyword matching method in dealing with complex semantic relationships.

[0102] By integrating semantic features and structural features, the comprehensiveness and accuracy of similarity calculation are improved. Specifically, the similarity score of plan number A001 is increased by 22.67%, indicating that the present invention can more accurately reflect the actual similarity between texts.

[0103] Accuracy of text feature representation:

[0104] The present invention extracts semantic features of post-accident methods and accident handling steps through the LSTM model, which can better understand the contextual relationship in the text.

[0105] The structured feature extraction and fusion further enhance the accuracy of feature representation. The table data shows that the similarity scores of plan numbers A002 and A003 are increased by 25.00% and 25.71% respectively, reflecting the advantages of the present invention in feature representation.

[0106] Adaptability:

[0107] Dynamically adjust the feature weights so that the model can flexibly adapt to different plan texts according to specific application scenarios. The adaptability scores in the table show that the adaptability scores of all plans are above 9.0, indicating that the present invention has high adaptability in different scenarios.

[0108] For example, the adaptability scores of plan numbers A004 and A005 are 9.4 and 9.2 respectively, indicating that the present invention is stable and reliable in processing diverse plan texts.

[0109] In summary, the present invention achieves better results in terms of similarity calculation reliability and precision, adaptability, and text feature representation accuracy.

[0110] Example 3

[0111] Reference Figure 4 , which is an embodiment of the present invention, provides a text similarity matching system for power grid accident disposal plans based on LSTM, including a text sampling and segmentation module, a semantic feature extraction module, a structured feature extraction module, a feature fusion module, and a similarity output module.

[0112] The text sampling and segmentation module is used to sample and select two plan texts from the plan text library and perform text segmentation, the semantic feature extraction module is used to use the LSTM model to extract semantic features of the post-accident method and the accident handling steps respectively, the structured feature extraction module is used to extract the structured features in the post-accident method and the structured features in the accident handling steps, the feature fusion module is used to fuse the semantic features with the structured features to form a comprehensive feature vector, the similarity output module is used to output the cosine similarity between the fused feature vectors, and the feature fusion module is used to obtain the comprehensive similarity score of the two plan texts.

[0113] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0114] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0115] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0116] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. It should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not limited. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

[0117] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A text similarity matching method for power grid accident disposal plans based on LSTM, characterized in that: include: Sampling the text library and segmenting the sampled text; The semantic features of post-accident methods and accident handling steps are extracted through the LSTM model; Extract the structured features in the post-accident mode and the structured features in the accident handling steps, and perform feature fusion; The comprehensive similarity score is output based on the cosine similarity of the output fused feature vectors.

2. The LSTM-based power grid accident handling plan text similarity matching method according to claim 1, characterized in that: The sampling of the text library and segmentation of the sampled texts include randomly sampling and selecting two emergency plan texts from the emergency plan text library, and segmenting each emergency plan text into two parts: post-accident methods and accident handling steps.

3. The LSTM-based power grid accident handling plan text similarity matching method as claimed in claim 2, characterized in that: The extracting semantic features of the post-accident method and the accident handling steps respectively by using the LSTM model includes extracting semantic features of the post-accident method and the accident handling steps respectively by using the LSTM model, and outputting corresponding feature vectors; The LSTM-Self-Attention model is a deep learning model that combines long short-term memory and self-attention mechanisms; For the two given power grid accident plan texts to be matched, text-a and text-b, assuming that text-a and text-b are composed of la and lb words respectively, each word is trained by Self-Attention to output the corresponding text vector, and the word vector vi corresponding to each word in the text is concatenated in the original order to obtain the initial sentence vector representations Ma and Mb; For text-a, we use the existing embedding model Word2Vec to represent each word in the text as an l a1 dimensional post-accident mode vector and l a2 The accident handling step vector of dimension is expressed as: in, Indicates l a1 Dimensional word vector, for each word in the post-accident method There is a vector corresponding to Represents words in the text, and same; X a The vector is encoded using LSTM and converted into a fixed-dimensional vector representation, expressed as: Among them, h a1 、h a1 express and A vector of fixed dimension.

4. The LSTM-based power grid accident handling plan text similarity matching method as claimed in claim 3, characterized in that: The extracting of structured features in the post-accident manner and the structured features in the accident handling steps includes extracting structured features in the post-accident manner and the structured features in the accident handling steps; The structural features include an out-of-limit device and an out-of-limit value; The structural features include operating equipment and operating methods; For the plan text text-a, the post-accident method of the text, such as event type, accident level, faulty equipment, and over-limit value, is extracted as the text vector, and the accident handling steps of the text, such as operating equipment and operating method, are extracted as the feature vector of the text. For the text text-a, the following structured feature vector is output, which is expressed as: in, The eigenvector representing the post-accident pattern, Indicates the event type. Indicates the accident level. and Indicates faulty equipment and corresponding over-limit values. The feature vector representing the accident handling steps, and Indicates operating equipment and operating methods; Since the post-accident methods and structured features in the accident handling steps in the two texts are different, the text with a larger number of features is used as the main text, and the feature vectors with a smaller number of features are supplemented with 0 vectors.

5. The LSTM-based power grid accident handling plan text similarity matching method as claimed in claim 4, characterized in that: The feature fusion includes fusing the semantic features with the structural features to form a comprehensive feature vector, which is expressed as: Among them, f a1 、f a2 They respectively represent the semantic feature vectors extracted from the post-accident method and accident handling steps through the LSTM model.

6. The LSTM-based power grid accident handling plan text similarity matching method according to claim 5, characterized in that: The outputting of the comprehensive similarity score based on the cosine similarity of the output fused feature vectors includes calculating the cosine similarity between the fused feature vectors and outputting the comprehensive similarity score of the two plan texts, which is expressed as: Among them, θ a1,b1 With θ a2,b2 Indicates the similarity between the post-accident methods part and the accident handling steps part of the two texts; i all =θ a1,b1 +(1-α)θ a2,b2 Among them, θ all That is, the similarity between the two power grid accident handling plan texts. When θ all The larger the value of , the higher the similarity between the two plan texts.

7. The LSTM-based power grid accident handling plan text similarity matching method according to claim 6, characterized in that: The output of the comprehensive similarity score based on the cosine similarity of the output fused feature vector includes dynamically adjusting the feature weights according to the specific application scenario by introducing a weight matrix and a weighted inner product, considering the direct matching of the feature vectors, and constructing a comprehensive similarity score model expressed as: Among them, θ represents the comprehensive similarity score, the similarity between the two plan texts, W j Represents the weight matrix, which is used to adjust the importance of features, U j Represents the weight matrix, which is used to adjust the importance of features; When the θ output is close to 1, it means f a1 and f a2 There is a linear correlation between the elements of When the θ output is close to 0, it means f a1 and f a2 There is no linear correlation between the various elements.

8. A system using the LSTM-based power grid accident handling plan text similarity matching method as described in any one of claims 1 to 7, characterized in that: It includes text sampling and segmentation module, semantic feature extraction module, structured feature extraction module, feature fusion module and similarity output module; The text sampling and segmentation module is used to sample and select two plan texts from the plan text library and perform text segmentation; The semantic feature extraction module is used to extract semantic features of the post-accident method and the accident handling steps respectively using the LSTM model; The structured feature extraction module is used to extract structured features in post-accident methods and structured features in accident handling steps; The feature fusion module is used to fuse semantic features with structural features to form a comprehensive feature vector; The similarity output module is used to output the cosine similarity between the fused feature vectors, and the feature fusion module of the two plan texts is used to obtain a comprehensive similarity score.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the LSTM-based power grid accident handling plan text similarity matching method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the LSTM-based power grid accident handling plan text similarity matching method described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Intelligent duplicate checking detection system and method based on multi-feature mimicry of target entity

    CN119761339A