Relay protection device defect text grading method, system, equipment and medium
By constructing a relay protection knowledge graph and using BiLSTM model to rank defect text, the problem of low accuracy of defect grading of relay protection devices is solved, and efficient and accurate defect level identification and disposal strategy output is achieved.
Patent Information
- Application Number
- CN202411407626.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-03-14
AI Technical Summary
The defect classification of the prior art relay protection devices has the problem of low accuracy, mainly because they rely on manual completion of defect classification, which is inefficient and difficult to accurately judge complex situations.
By constructing a relay protection knowledge graph, pre-processing of defect text data, and using a two-way long and short-term memory network (BiLSTM) to build a defect text rating model to achieve automated defect level recognition.
The efficiency and accuracy of defect grading of relay protection devices are improved, the problem of low accuracy in related technologies is solved, and the corresponding defect handling strategies are output through the knowledge graph to assist operation and maintenance personnel in making decisions.
Smart Images

Figure CN119621964A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of relay protection devices, and in particular to a method, system, device and medium for grading defect text of relay protection devices. Background Art
[0002] Relay protection is the first line of defense to ensure the safe and stable operation of the power grid, and its reliability is crucial to ensure the normal operation of the entire power system. With the continuous expansion of the power grid, the number of relay protection devices has increased dramatically, and with it comes a large amount of text data on the causes, phenomena and treatment of equipment defects. These data contain very valuable information and are crucial for the classification of equipment defect levels.
[0003] At present, most equipment defect classification work still relies on manual work, which is not only inefficient, but also difficult to make accurate judgments for some unclear or complex situations, resulting in the classification accuracy being affected. Therefore, the defect classification of relay protection devices in the related art has the problem of low accuracy. Summary of the invention
[0004] The embodiments of the present application provide a method, system, device and medium for grading the defect text of a relay protection device, so as to at least solve the problem of low accuracy in the defect grading of relay protection devices in the related art.
[0005] In a first aspect, an embodiment of the present application provides a method for grading a defect text of a relay protection device, the method comprising:
[0006] Constructing a relay protection knowledge graph based on the historical operating condition data of the relay protection device after pre-acquisition and processing, wherein the knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application;
[0007] Based on the relay protection knowledge graph, the relay protection defect data is preprocessed to obtain a defect text data set;
[0008] Based on the defective text data set, a defective text grading model is constructed according to a bidirectional long short-term memory network, wherein the defective text grading model includes a sample data input layer, a hidden layer and an output layer;
[0009] The current defect text data is input into the defect text grading model, and the defect text grading result is output.
[0010] In one embodiment, before constructing a relay protection knowledge graph based on pre-acquired historical operating condition data of the relay protection device, the method further includes:
[0011] According to the historical operating condition data of the relay protection device, the historical operating condition data is preprocessed, data marked and data enhanced to obtain the processed historical operating condition data of the relay protection device; wherein,
[0012] The preprocessing includes data mean filling method, data deletion default value, data normalization, standardization and regularization;
[0013] The data labeling includes labeling using a data enhancement tool, where the data enhancement tool uses synonym conversion and K-nearest neighbor classification.
[0014] In one embodiment, the step of constructing a relay protection knowledge graph based on pre-acquired historical operating condition data of the relay protection device includes:
[0015] The knowledge extraction layer extracts entities and relationships from different types of historical operating condition data based on databases, preset rules, and deep learning;
[0016] The knowledge model layer integrates the entities and the relationships according to the k-means clustering algorithm and the cosine similarity algorithm, and uses Neo4j and MongoDB to store the relationship knowledge and attribute knowledge;
[0017] The knowledge management layer manages and maintains the constructed knowledge graph;
[0018] The knowledge application layer, through the constructed knowledge graph, operates rule electronicization, fault handling, dialogue question and answer, and intelligent search.
[0019] In one embodiment, the knowledge extraction layer extracts entities and relationships from different types of historical operating condition data based on a database, preset rules, and deep learning, including:
[0020] Knowledge extraction based on database, converting structured data into entities and relationships through extraction, transformation and loading;
[0021] Rule-based knowledge extraction, extracting entities and relationships through word segmentation tools and regular expressions;
[0022] Knowledge extraction based on deep learning, segmenting the text through Chinese word segmentation tools, and converting the segmented text into word vectors using Word2Vec; identifying entity labels through bidirectional long short-term memory networks and conditional random fields; and identifying relationship labels between entities through convolutional neural networks.
[0023] In one embodiment, the defect text grading model is constructed based on the defect text dataset according to a bidirectional long short-term memory network, including:
[0024] Initialize the defect text data set randomly, and divide it into a training set and a test set in proportion;
[0025] Extracting features from the training set by using a bidirectional long short-term memory network;
[0026] The features are weighted through an attention mechanism layer;
[0027] Calculating the output of the defect text grading model, and determining the recognition result of the defect grade based on the output;
[0028] The test set is used to evaluate the performance of the defect text rating model.
[0029] In one embodiment, the step of inputting the current defect text data into the defect text grading model and outputting the defect text grading result includes:
[0030] The current defect text data is input into the defect text grading model, and after iterative calculation, a score is output. Based on the score and according to a preset grade rule, the grade of the defect text is determined, and the grade is used as the recognition result of the defect text grading model; wherein the grade rule includes:
[0031] When the output score is 0-0.45 points, the defect text level is determined to be critical;
[0032] When the output score is 0.45-0.75 points, the defect text level is determined to be severe;
[0033] When the output score is 0.75-0.9, the defect text level is determined to be average;
[0034] When the output score is 0.9-1, the defect text level is determined to be normal.
[0035] In one embodiment, after inputting the current defect text data into the defect text grading model and outputting the defect text grading result, the method further includes:
[0036] Based on the recognition result, output a corresponding defect handling strategy according to the knowledge graph;
[0037] The corresponding defect handling strategies include:
[0038] When the defect text level is critical, stop the operation of related equipment and analyze the cause of the fault;
[0039] When the defect text level is determined to be serious, adjusting the parameters of the relay protection device to reduce the equipment load;
[0040] When the defect text level is determined to be general, conduct routine inspections to observe the defect development trend;
[0041] When the defect text level is determined to be normal, continue to monitor the status of the relay protection device.
[0042] In a second aspect, an embodiment of the present application provides a relay protection device defect text grading system, the system comprising a module for obtaining temperature, stress and thermomechanical fatigue life of a blade, a module for obtaining a target test sample, a module for obtaining a fixture, and a module for obtaining a relay protection device defect text grading result, wherein:
[0043] The module for obtaining temperature, stress and thermomechanical fatigue life of the blade is used to obtain the temperature, stress and thermomechanical fatigue life of the blade based on the blade performance parameters according to the pre-established three-dimensional model of the target gas turbine blade;
[0044] The module for obtaining a target test sample is used to determine a test sample of a blade based on the thermomechanical fatigue life of the blade, wherein the test sample is of a non-standard size, and to pre-process the test sample to obtain a target test sample;
[0045] The fixture acquisition module is used to determine a fixture matching the target test sample based on the target test sample;
[0046] The module for obtaining the defect text grading result of the relay protection device is used to test the target test sample through the fixture according to the fitting result of the relationship between the thermal strain and the temperature, and obtain the defect text grading result of the relay protection device.
[0047] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements a method for grading defect text of a relay protection device as described in the first aspect above.
[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for grading defect text of a relay protection device as described in the first aspect above.
[0049] The embodiments of the present application provide a method, system, device and medium for grading defect text of a relay protection device, which have at least the following technical effects.
[0050] According to the historical working condition data of the relay protection device after pre-acquisition and processing, a relay protection knowledge graph is constructed. The knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application. Based on the relay protection knowledge graph, the relay protection defect data is preprocessed to obtain a defect text data set. The knowledge in the control field can be refined, extracted, associated and integrated to form a knowledge model, which can remove redundant information, improve the accuracy of input sample data, and further improve the accuracy of classification. Based on the defect text data set, a defect text grading model is constructed according to a bidirectional long short-term memory network. The defect text grading model includes a sample data input layer, a hidden layer and an output layer. The classification efficiency is improved by the defect text grading model based on the bidirectional long short-term memory network. The current defect text data is input into the defect text grading model, and the defect text grading result is output. The defect text grading of the relay protection device is realized, the efficiency and accuracy of the defect grading of the relay protection device are improved, and the problem of low accuracy of the defect grading of the relay protection device in the related technology is solved.
[0051] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0053] Figure 1 is a flow chart of a method for grading a defect text of a relay protection device according to an embodiment of the present application;
[0054] Figure 2 is a flowchart of step S101 according to an exemplary embodiment;
[0055] Figure 3 is a flowchart of step S103 according to an exemplary embodiment;
[0056] Figure 4 is a block diagram of a system for grading defect text of a relay protection device according to an exemplary embodiment
[0057] Figure 5 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0059] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0060] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0061] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0062] Relay protection is the first line of defense to ensure the safe and stable operation of the power grid, and its reliability is crucial to ensure the normal operation of the entire power system. With the continuous expansion of the power grid, the number of relay protection devices has increased dramatically, and with it comes a large amount of text data on the causes, phenomena and treatment of equipment defects. These data contain very valuable information and are crucial for the classification of equipment defect levels.
[0063] In recent years, artificial intelligence technology has shown great potential in solving complex physical mechanisms and nonlinear problems due to its good adaptive learning and nonlinear mapping characteristics. At the same time, the development of knowledge graph technology has also provided new possibilities for its application in various fields. Knowledge graphs can refine, extract, associate and integrate knowledge in specific fields to form knowledge models, so that machines have certain cognitive abilities and thus realize automated and intelligent operations. In the field of relay protection of power systems, the application of knowledge graphs has gradually become a trend.
[0064] At present, most equipment defect classification work still relies on manual work, which is not only inefficient, but also difficult to make accurate judgments for some unclear or complex situations, resulting in the classification accuracy being affected. Therefore, the defect classification of relay protection devices in the related art has the problem of low accuracy.
[0065] In view of the above background, the present invention proposes a method, system, device and medium for textual grading of relay protection device defects. By constructing a relay protection knowledge graph, preprocessing the relay protection defect data, and using BiLSTM (bidirectional long short-term memory network) for vectorized expression and feature extraction, a model that can automatically identify the defect level is finally obtained. In addition, combined with the constructed knowledge graph, the model can output corresponding disposal strategies to provide auxiliary decision-making and defect data analysis and processing references for on-site operation and maintenance personnel.
[0066] In a first aspect, an embodiment of the present application provides a method for grading a defect text of a relay protection device, which is applied to a stator winding end of a steam turbine generator. Figure 1 It is a flow chart for textual classification of relay protection device defects, such as Figure 1 As shown, a method for grading a defect text of a relay protection device includes:
[0067] Step S101: construct a relay protection knowledge graph based on the historical operating condition data of the relay protection device that has been processed in advance. The knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application.
[0068] Step S102: Based on the relay protection knowledge graph, pre-process the relay protection defect data to obtain a defect text data set.
[0069] Step S103: Based on the defective text dataset, a defective text grading model is constructed according to a bidirectional long short-term memory network. The defective text grading model includes a sample data input layer, a hidden layer, and an output layer.
[0070] Step S104: input the current defect text data into the defect text grading model, and output the defect text grading result.
[0071] In summary, according to the historical working condition data of the relay protection device after pre-acquisition and processing, a relay protection knowledge graph is constructed. The knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application. Based on the relay protection knowledge graph, the relay protection defect data is preprocessed to obtain a defect text data set. The knowledge in the control field can be refined, extracted, associated and integrated to form a knowledge model, which can remove redundant information, improve the accuracy of the input sample data, and further improve the accuracy of classification. Based on the defect text data set, a defect text grading model is constructed according to the bidirectional long short-term memory network. The defect text grading model includes a sample data input layer, a hidden layer and an output layer. The classification efficiency is improved by the defect text grading model based on the bidirectional long short-term memory network. The current defect text data is input into the defect text grading model, and the defect text grading result is output. The defect text grading of the relay protection device is realized, the efficiency and accuracy of the defect grading of the relay protection device are improved, and the problem of low accuracy of the defect grading of the relay protection device in the related technology is solved.
[0072] In one embodiment, before constructing a relay protection knowledge graph based on pre-acquired historical operating condition data of the relay protection device, the method further includes:
[0073] According to the historical working condition data of the relay protection device, the historical working condition data is preprocessed, data marked and data enhanced to obtain the processed historical working condition data of the relay protection device; wherein,
[0074] Preprocessing includes data mean imputation, data default value removal, data normalization, standardization and regularization;
[0075] Data labeling includes labeling using data augmentation tools, which use synonym conversion and K-nearest neighbor classification.
[0076] Optionally, the data mean filling method can fill missing values by calculating the mean of the column (or related attributes) in which the missing data is located. The overall distribution characteristics of the data can be retained to reduce the deviation caused by missing values. Data deletion default values, deleting records or features containing missing values, can avoid the uncertainty caused by missing values, but may lose some information. Data normalization, converting data to the same scale range, such as [0,1], to avoid the impact of features of different dimensions or magnitudes on model training. Standardization, converting data to the form of a standard normal distribution, that is, the mean is 0 and the standard deviation is 1, making the differences between features more obvious, which helps to improve the convergence speed and accuracy of the model. Regularization, by adding penalty terms to limit model complexity and prevent overfitting. Use data enhancement tools, such as synonym conversion and K-nearest neighbor classification, to increase the diversity and accuracy of data. Synonym conversion: By replacing words in the text with synonyms, the diversity of the data set is increased, so that the model can better generalize to new samples. K-nearest neighbor classification: used to handle classification tasks, by finding the nearest neighbor samples for labeling, it helps to improve the accuracy of labeled data. Specifically, for the input raw data, data preprocessing, data labeling and data enhancement are performed. Data preprocessing includes data mean filling method, data deletion of default values, data normalization, standardization and regularization; data labeling includes manual labeling and labeling using data enhancement tools. Manual labeling uses the current standard BIOES specification. The data enhancement tool uses synonym conversion and K-nearest Neighbors (KNN) classification, which are easier to implement in engineering.
[0077] By obtaining the historical operating condition data of the processed relay protection device in advance, we can ensure that the constructed knowledge graph is more accurate and comprehensive, and provide high-quality data support for subsequent model training and application.
[0078] Figure 2 is a flowchart of step S101 according to an exemplary embodiment. Figure 2 As shown, step S101, based on the historical working condition data of the relay protection device after pre-acquisition and processing, a relay protection knowledge graph is constructed, and the knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application. Specifically, the following steps are included:
[0079] Step S1011, knowledge extraction layer, extracting entities and relationships from different types of historical operating condition data based on databases, preset rules and deep learning.
[0080] Optionally, step S1011, the knowledge extraction layer, extracts entities and relationships from different types of historical operating condition data according to a database, preset rules and deep learning, including: database-based knowledge extraction, converting structured data into entities and relationships by extraction, conversion and loading; rule-based knowledge extraction, extracting entities and relationships through word segmentation tools and regular expressions; deep learning-based knowledge extraction, segmenting the text through a Chinese word segmentation tool, and converting the segmented text into a word vector using a conversion tool (Word2Vec); identifying entity labels through a bidirectional long short-term memory network and a conditional random field; and identifying relationship labels between entities through a convolutional neural network.
[0081] Specifically, the defect text dataset obtained is used as the input of the knowledge layer. Database-based, rule-based and deep learning methods are used to extract entities and relationships for different input types of labeled data. Based on database knowledge extraction, structured data is converted into entities and relationships through extraction-translation-loading (ETL); rule-based knowledge extraction is implemented using Chinese word segmentation tools and regular expressions; deep learning-based knowledge extraction uses Chinese word segmentation and Word2Vec to convert text into word vectors, and uses word vectors as input. Bilateral Long-Short Term Memory-Conditional Random Field (BiLSTM-CRF) is used to identify entity labels, and Convolutional Neural Network (CNN) is used to identify relationship labels. In order to improve the accuracy of Chinese word segmentation, an electric power professional dictionary is added to the Jieba word segmentation tool, and the dictionary is constructed by manual and information entropy methods.
[0082] Through step S1011, the knowledge extraction layer extracts entities and relationships from different types of historical operating data according to the database, preset rules and deep learning. Entities and relationships can be effectively extracted from different types of historical operating data, providing a high-quality data foundation for building a relay protection knowledge graph. Combining databases, rules and deep learning methods, entities and relationships can be extracted from multiple angles and dimensions, making the constructed knowledge graph more comprehensive and rich. By adding a professional electric power dictionary to the Jieba word segmentation tool, the accuracy of Chinese word segmentation can be significantly improved.
[0083] Step S1012, knowledge model layer, entities and relationships are merged according to the k-means clustering algorithm and the cosine similarity algorithm, and the repository (Neo4j and MongoDB) is used to store the relationship knowledge and attribute knowledge.
[0084] Optionally, this layer uses k-means clustering algorithm and cosine similarity algorithm to fuse the identified entities and relationships. Then, the knowledge is represented and stored, using Neo4j and MongoDB to store relationship knowledge and attribute knowledge respectively. The main function of the knowledge model layer is to fuse entities and relationships extracted from different sources, and to represent and store the fused knowledge. By fusing entities and relationships using k-means clustering algorithm and cosine similarity algorithm, the consistency and integrity of entities and relationships in the knowledge graph can be improved, and duplicate and conflicting information can be reduced. Using Neo4j to store relationship knowledge can easily query complex relationships between entities; using MongoDB to store attribute knowledge can flexibly manage the attribute information of entities. This makes the knowledge graph both flexible and easy to maintain.
[0085] Step S1013: The knowledge management layer manages and maintains the constructed knowledge graph.
[0086] Optionally, this layer manages the constructed control knowledge graph. Professionals review and verify the constructed knowledge graph according to scheduling regulations, work instructions, operating procedures, etc. to ensure that it meets the actual application requirements. As time goes by, such as when the equipment name and operation mode change, professionals are required to expand and maintain the knowledge graph. The main function of the knowledge management layer is to manage and maintain the constructed knowledge graph to ensure the accuracy and timeliness of the knowledge graph. Through professional review and verification, erroneous information in the knowledge graph can be discovered and corrected in a timely manner to ensure its accuracy.
[0087] Step S1014, the knowledge application layer, through the constructed knowledge graph, runs rule electronicization, fault handling, dialogue question and answer, and intelligent search.
[0088] Optionally, the knowledge graph constructed by the application supports application scenarios such as electronic operation rules, fault handling, dialogue question and answer, and intelligent search. The main function of the knowledge application layer is to use the constructed knowledge graph to support a variety of application scenarios, including electronic operation rules, fault handling, dialogue question and answer, and intelligent search. Through the knowledge application layer of step S1014, the value of the constructed knowledge graph can be fully utilized to support a variety of application scenarios and improve the operation and maintenance efficiency and service quality in the field of relay protection. It not only improves work efficiency, but also improves service quality and promotes the sharing and development of knowledge.
[0089] Through step S101, a relay protection knowledge graph is constructed based on the historical operating condition data of the relay protection device obtained and processed in advance. The knowledge in the field of regulation can be refined, extracted, associated, and integrated to form a knowledge model, which can remove redundant information, improve the accuracy of input sample data, and further improve the accuracy of classification.
[0090] Step S102: Based on the relay protection knowledge graph, pre-process the relay protection defect data to obtain a defect text data set.
[0091] Optionally, obtain raw data: obtain relevant defect records from the historical operating data of the relay protection equipment. These data come from different sources, including equipment logs, maintenance reports, fault records, etc. Clean the raw data. And perform data labeling. According to the labeled data, based on the knowledge graph in step S101, the entities and relationships obtained, construct a defect text dataset, which should include defect text and its corresponding defect level label.
[0092] Figure 3 is a flowchart of step S103 according to an exemplary embodiment. Figure 3 As shown, step S103, based on the defective text data set, a defective text grading model is constructed according to a bidirectional long short-term memory network, and the defective text grading model includes a sample data input layer, a hidden layer and an output layer. Specifically, the following steps are included:
[0093] Step S1031, randomly initialize the defect text data set, and divide it into a training set and a test set in proportion;
[0094] Step S1032, extracting features from the training set through a bidirectional long short-term memory network;
[0095] Step S1033, weighting the features through the attention mechanism layer;
[0096] Step S1034, calculating the output of the defect text grading model, and determining the recognition result of the defect grade based on the output;
[0097] Step S1035: Use the test set to evaluate the performance of the defect text grading model.
[0098] Optionally, step S103 includes: the defect text rating model of BiLSTM (bidirectional long short-term memory network) with attention mechanism is divided into three parts, a sample data input layer, a hidden layer and an output layer, and the hidden layer includes a BiLSTM layer and an attention mechanism layer.
[0099] Step S1031: Calculate the sample data input layer, randomly initialize the defect text data set, and divide the training set and test set into 7:3; the text data becomes a feature vector form that can be directly accepted and processed by the hidden layer. Set the maximum length of each input defect text to 128, which is conducive to speeding up the training process and reducing memory consumption.
[0100] Step S1032: Calculate the hidden layer;
[0101] Computing BiLSTM layers
[0102] Calculate using the following formula:
[0103] L t =δ(W l ·[h t-1 ,d t ]+b l ) (1)
[0104] i t =δ(W i ·[h t-1 ,d t ]+b i ) (2)
[0105]
[0106] o t =δ(W o ·[h t-1 ,d t ]+b o ) (5)
[0107] h t =o t tanh(C t ) (6)
[0108] Where: d t represents the output at time t, L t represents the output of the forget gate at time t, i t represents the output of the update gate at time t, o t represents the output of the output gate at time t, δ is the activation function, tanh is the activation function, W l , W i , W c , W o and b l 、b i 、b c 、b o is the weight coefficient matrix and offset vector of each corresponding part, h t-1 and h t They represent the hidden layer outputs at time t-1 and time t, respectively, and C t-1 represents the neurons before updating, C t represents the updated neuron, represents a candidate neuron.
[0109] The hidden layer state of BiLSTM at the current moment is determined by the current input d t , the output of the previous forward propagation hidden layer state and the output of the hidden layer state of the next moment The three parts jointly determine that BiLSTM is composed of two unidirectional LSTMs. Therefore, the hidden layer state of BiLSTM at time t can be obtained by forward propagating the hidden layer state The calculation formulas are shown in (7), (8) and (9):
[0110]
[0111] Where: W i (i=1,2,…,6) represents the weight from one unit layer to another. Set the number of hidden units of LSTM to 300, the learning rate to 0.001, the regularization method to Dropout, the corresponding parameter to 0.4, the optimizer to Adam, the number of training rounds to 50, and the batch size to 32. The above parameter settings can accelerate the training process and improve the stability and generalization ability of model training.
[0112] Step S1033: Calculate the attention mechanism layer;
[0113] The weight coefficient calculation formula of the attention mechanism layer is:
[0114] e t =u a tanh(W a h t +b a ) (10)
[0115]
[0116] Where: e t Indicates the output vector h from the BiLSTM network layer at time t t The determined attention probability distribution value; u a and W a is the weight coefficient, b a is the bias coefficient, and the output of the attention mechanism layer at time t is composed of s t express.
[0117] Step S1034: Calculate the output layer
[0118] The input of the output layer is the output of the attention mechanism layer in the hidden layer. The output layer is fully connected to calculate the output Y=[y1,y2...,y m ] T. The multi-classification Softmax function is used to calculate the corresponding classification "score" of the input of the output layer, and the recognition result of the defect text classification is obtained according to the range of the "score". Finally, according to the recognition result, the constructed knowledge graph will output the corresponding disposal strategy to assist the operation and maintenance personnel in making decisions. The specific formula for calculating the classification "score" is:
[0119] y t =softmax(W s s t +b s ) (13)
[0120] Where: y t represents the predicted output value at time t; W s is the weight matrix; b s is the deviation vector.
[0121] Step S1035: Evaluate the performance of the defect text grading model through the test set to complete the construction of the defect text grading model.
[0122] Through step S103, based on the defect text data set, a defect text grading model is constructed according to the bidirectional long short-term memory network, thereby improving the classification efficiency and the classification accuracy.
[0123] In one embodiment, step S104, inputting the current defect text data into the defect text grading model, and outputting the defect text grading result. Specifically includes:
[0124] The current defect text data is input into the defect text grading model, and after iterative calculation, a score is output. Based on the score and according to the preset grading rules, the grade of the defect text is determined, and the grade is used as the recognition result of the defect text grading model; wherein the grading rules include:
[0125] When the output score is 0-0.45 points, the defect text level is determined to be critical;
[0126] When the output score is 0.45-0.75, the defect text level is determined to be severe;
[0127] When the output score is 0.75-0.9, the defect text level is determined to be general;
[0128] When the output score is 0.9-1, the defect text level is determined to be normal.
[0129] Optionally, the previously divided validation set is used as the input of the grading model. The output of the prediction model. The data is input into the trained BiLSTM defect text grading model, and after iterative calculation, the recognition result of the defect text grading is output. The current defect text data is input into the already trained defect text grading model, and the model is iteratively calculated to output a score, and then the grade of the defect text is determined according to the preset grade rules. This grade will serve as the final recognition result of the defect text grading model. Through step S104, the current defect text data can be input into the already trained BiLSTM defect text grading model, and a score is output through the iterative calculation of the model, and the grade of the defect text is determined according to the preset grade rules. This method not only improves the classification efficiency, but also improves the classification accuracy, providing strong support for the operation and maintenance of relay protection devices.
[0130] In one embodiment, after inputting the current defect text data into the defect text grading model and outputting the defect text grading result, the method further includes:
[0131] Based on the recognition results, the corresponding defect handling strategy is output according to the knowledge graph;
[0132] Among them, the corresponding defect handling strategies include:
[0133] When the defect text level is critical, stop the operation of related equipment and analyze the cause of the fault;
[0134] When the defect text level is determined to be serious, adjust the parameters of the relay protection device to reduce the equipment load;
[0135] When the defect text level is determined to be general, conduct routine inspections to observe the defect development trend;
[0136] When the defect text level is determined to be normal, continue to monitor the status of the relay protection device.
[0137] Optionally, the recognition result (i.e., defect level) output by the defect text grading model is input into the knowledge graph. The disposal strategy corresponding to the level in the knowledge graph is queried based on the recognition result. The disposal strategies include:
[0138] Critical level: Stop the operation of related equipment and analyze the cause of the failure;
[0139] Severity level: Adjust the parameters of the relay protection device to reduce the equipment load;
[0140] General level: Conduct routine inspections and observe defect development trends;
[0141] Normal level: Continue to monitor the status of the relay protection device.
[0142] By combining the recognition results with the knowledge graph, the corresponding defect handling strategy can be output to guide on-site operation and maintenance personnel to take appropriate actions. This approach not only improves the efficiency and accuracy of decision-making, but also enhances the safety and stability of relay protection devices.
[0143] In summary, according to the historical working condition data of the relay protection device after pre-acquisition and processing, a relay protection knowledge graph is constructed. The knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application. Based on the relay protection knowledge graph, the relay protection defect data is preprocessed to obtain a defect text data set. The knowledge in the control field can be refined, extracted, associated and integrated to form a knowledge model, which can remove redundant information, improve the accuracy of the input sample data, and further improve the accuracy of classification. Based on the defect text data set, a defect text grading model is constructed according to the bidirectional long short-term memory network. The defect text grading model includes a sample data input layer, a hidden layer and an output layer. The classification efficiency is improved by the defect text grading model based on the bidirectional long short-term memory network. The current defect text data is input into the defect text grading model, and the defect text grading result is output. The defect text grading of the relay protection device is realized, the efficiency and accuracy of the defect grading of the relay protection device are improved, and the problem of low accuracy of the defect grading of the relay protection device in the related technology is solved.
[0144] In a second aspect, an embodiment of the present application provides a system for grading defect texts of relay protection devices. Figure 4 FIG. 1 is a block diagram of a system for grading defect text of a relay protection device according to an exemplary embodiment. Figure 4 As shown, the system includes a module 410 for constructing a relay protection knowledge graph, a module 420 for obtaining a defect text data set, a module 430 for constructing a defect text grading model, and a module 430 for obtaining a defect text grading result, wherein:
[0145] A relay protection knowledge graph construction module 410 is used to construct a relay protection knowledge graph based on the historical operating condition data of the relay protection device obtained and processed in advance, and the knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application;
[0146] A defect text data set acquisition module 420 is used to pre-process the relay protection defect data based on the relay protection knowledge graph to acquire a defect text data set;
[0147] Constructing a defect text grading model 430, which is used to construct a defect text grading model based on a defect text data set and a bidirectional long short-term memory network, wherein the defect text grading model includes a sample data input layer, a hidden layer, and an output layer;
[0148] The defect text grading result acquisition module 440 is used to input the current defect text data into the defect text grading model and output the defect text grading result.
[0149] In summary, the present invention provides a relay protection device defect text grading system, which solves the problem of low accuracy in relay protection device defect grading in related technologies by constructing a relay protection knowledge graph module 410, obtaining a defect text data set module 420, constructing a defect text grading model 420 and obtaining a defect text grading result module 430. Specifically, a relay protection knowledge graph is constructed based on the historical operating condition data of the relay protection device after pre-acquisition and processing, and the knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application. Based on the relay protection knowledge graph, the relay protection defect data is preprocessed to obtain a defect text data set. The knowledge in the control field can be refined, extracted, associated and integrated to form a knowledge model, which can remove redundant information, improve the accuracy of the input sample data, and further improve the accuracy of classification. Based on the defect text data set, a defect text grading model is constructed according to a bidirectional long short-term memory network, and the defect text grading model includes a sample data input layer, a hidden layer and an output layer. The classification efficiency is improved by the defect text grading model based on the bidirectional long short-term memory network. The current defect text data is input into the defect text grading model, and the defect text grading result is output. The defect text grading of the relay protection device is realized, the efficiency and accuracy of the defect grading of the relay protection device are improved, and the problem of low accuracy of the defect grading of the relay protection device in the related technology is solved.
[0150] It should be noted that the system for textual rating of relay protection device defects provided in this embodiment is used to implement the above-mentioned implementation mode, and the descriptions that have been made will not be repeated. As used above, the terms "module", "unit", "subunit", etc. can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the above embodiment is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0151] In a third aspect, an embodiment of the present application provides an electronic device, Figure 5 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 5 As shown, the electronic device may include a processor 51 and a memory 52 storing computer program instructions.
[0152] Specifically, the processor 51 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0153] Among them, the memory 52 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 52 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 52 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 52 may be inside or outside the data processing device. In a specific embodiment, the memory 52 is a non-volatile memory. In a specific embodiment, the memory 52 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0154] The memory 52 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 51 .
[0155] The processor 51 implements any one of the relay protection device defect text grading methods in the above-mentioned embodiments by reading and executing computer program instructions stored in the memory 52 .
[0156] In one embodiment, a device for grading defect text of a relay protection device may further include a communication interface 53 and a bus 50. Figure 5 As shown, the processor 51, the memory 52, and the communication interface 53 are connected via a bus 50 and communicate with each other.
[0157] The communication interface 53 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 53 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.
[0158] The bus 50 includes hardware, software or both, and couples the components of a device for fault text grading of a relay protection device to each other. The bus 50 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 50 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 50 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0159] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, a method for grading a defect text of a relay protection device provided in the first aspect is implemented.
[0160] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0161] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of a method for grading defect text of a relay protection device provided in the first aspect.
[0162] Among them, the program code for executing the present invention can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.
[0163] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0164] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for grading defect text of a relay protection device, characterized in that: The method comprises: Constructing a relay protection knowledge graph based on the historical operating condition data of the relay protection device after pre-acquisition and processing, wherein the knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application; Based on the relay protection knowledge graph, the relay protection defect data is preprocessed to obtain a defect text data set; Based on the defective text data set, a defective text grading model is constructed according to a bidirectional long short-term memory network, wherein the defective text grading model includes a sample data input layer, a hidden layer and an output layer; The current defect text data is input into the defect text grading model, and the defect text grading result is output.
2. The method according to claim 1, characterized in that The method of constructing a relay protection knowledge graph based on the historical operating condition data of the relay protection device obtained in advance includes: The knowledge extraction layer extracts entities and relationships from different types of historical operating condition data based on databases, preset rules, and deep learning; The knowledge model layer fuses the entities and the relationships according to k-means clustering and cosine similarity, and uses a repository to store relationship knowledge and attribute knowledge; The knowledge management layer manages and maintains the constructed knowledge graph; The knowledge application layer, through the constructed knowledge graph, operates rule electronicization, fault handling, dialogue question and answer, and intelligent search.
3. The method according to claim 2, characterized in that The knowledge extraction layer extracts entities and relationships from different types of historical operating condition data based on databases, preset rules and deep learning, including: Knowledge extraction based on database, converting structured data into entities and relationships through extraction, transformation and loading; Rule-based knowledge extraction, extracting entities and relationships through word segmentation tools and regular expressions; Knowledge extraction based on deep learning, segmenting the text through Chinese word segmentation tools, and converting the segmented text into word vectors using conversion tools; identifying entity labels through bidirectional long short-term memory networks and conditional random fields; and identifying relationship labels between entities through convolutional neural networks.
4. The method according to claim 1, characterized in that The defect text grading model is constructed based on the defect text dataset according to a bidirectional long short-term memory network, including: Initialize the defect text data set randomly, and divide it into a training set and a test set in proportion; Extracting features from the training set by using a bidirectional long short-term memory network; The features are weighted through an attention mechanism layer; Calculating the output of the defect text grading model, and determining the recognition result of the defect grade based on the output; The test set is used to evaluate the performance of the defect text rating model.
5. The method according to claim 1, characterized in that The step of inputting the current defect text data into the defect text grading model and outputting the defect text grading result comprises: The current defect text data is input into the defect text grading model, and after iterative calculation, a score is output. Based on the score and according to a preset grade rule, the grade of the defect text is determined, and the grade is used as the recognition result of the defect text grading model; wherein the grade rule includes: When the output score is 0-0.45 points, the defect text level is determined to be critical; When the output score is 0.45-0.75 points, the defect text level is determined to be severe; When the output score is 0.75-0.9, the defect text level is determined to be average; When the output score is 0.9-1, the defect text level is determined to be normal.
6. The method according to claim 5, characterized in that After inputting the current defect text data into the defect text grading model and outputting the defect text grading result, the method further includes: Based on the recognition result, output a corresponding defect handling strategy according to the knowledge graph; The corresponding defect handling strategies include: When the defect text level is critical, stop the operation of related equipment and analyze the cause of the fault; When the defect text level is determined to be serious, adjusting the parameters of the relay protection device to reduce the equipment load; When the defect text level is determined to be general, conduct routine inspections to observe the defect development trend; When the defect text level is determined to be normal, continue to monitor the status of the relay protection device.
7. The method according to claim 1, characterized in that Before constructing a relay protection knowledge graph based on pre-acquired historical operating condition data of the relay protection device, the method further includes: According to the historical operating condition data of the relay protection device, the historical operating condition data is preprocessed, data marked and data enhanced to obtain the processed historical operating condition data of the relay protection device; wherein, The preprocessing includes data mean filling method, data deletion default value, data normalization, standardization and regularization; The data labeling includes labeling using a data enhancement tool, where the data enhancement tool uses synonym conversion and K-nearest neighbor classification.
8. A relay protection device defect text grading system, characterized in that: The system includes a module for constructing a relay protection knowledge graph, a module for obtaining a defect text data set, a module for constructing a defect text grading model, and a module for obtaining a defect text grading result, wherein: The module for constructing a relay protection knowledge graph is used to construct a relay protection knowledge graph based on the historical operating condition data of the relay protection device obtained and processed in advance, and the knowledge graph includes knowledge extraction, knowledge model, knowledge management and knowledge application; The defect text data set acquisition module is used to pre-process the relay protection defect data based on the relay protection knowledge graph to acquire the defect text data set; The defect text grading model is constructed, which is used to construct the defect text grading model based on the defect text data set according to the bidirectional long short-term memory network, and the defect text grading model includes a sample data input layer, a hidden layer and an output layer; The defect text grading result acquisition module is used to input the current defect text data into the defect text grading model and output the defect text grading result.
9. An electronic device, characterized in that: It comprises a memory and a processor, a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements a method for grading defect text of a relay protection device as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for grading defect text of a relay protection device as described in any one of claims 1 to 7 is implemented.