Risk grading evaluation method, system and equipment for relay protection operation
Through the Word2Vec model, the historical risk data is encoded and converted and the TextCNN neural network model is trained, which solves the limitations of traditional risk grading evaluation methods in complex risk situations, realizes real-time and accurate risk assessment of relay protection operations, and improves evaluation efficiency and accuracy.
Patent Information
- Application Number
- CN202411210164.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-17
AI Technical Summary
Traditional risk grading assessment methods in the prior art are difficult to achieve real-time and accurate risk assessment requirements, especially when dealing with complex multi-factor interactions and dynamic changes, they have strong limitations and strong subjectivity, lack accuracy and repeatability. sex.
The Word2Vec model is used to encode and convert historical risk data information, build a three-dimensional matrix of time step, feature number and channel number, train the TextCNN neural network model, optimize the model to obtain the optimal risk grading model, and achieve accurate evaluation of risk levels .
It improves the efficiency of risk grading model training, realizes accurate assessment of risk levels, solves the need for traditional methods to difficult to achieve real-time accurate risk assessment, and significantly improves the accuracy and repeatability of the analysis.
Smart Images

Figure CN119151292A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of relay protection, and in particular to a risk grading assessment method, system and equipment for relay protection operations. Background Art
[0002] Relay protection is the first line of defense for the safe operation of the power grid and a key technical means to ensure the stability of the power grid and the safety of equipment. In recent years, with the gradual expansion of the scale of the power grid, relay protection work has become more and more complex and arduous. Even small mistakes in many links may cause serious safety hazards. For example, the commissioning of new equipment, changes in system operation mode, and equipment maintenance will cause corresponding changes in protection configuration and setting values. It is these safety risks that have brought great challenges to the safety management of relay protection. Therefore, it is of great practical significance to identify, assess, classify, control and prevent risks in relay protection operations.
[0003] In the prior art, the risk grading of relay protection operations often adopts the risk matrix method, the hierarchical analysis method and the event tree analysis method; among them, the risk matrix method evaluates the risk degree through the two dimensions of the possibility and impact of risk, and divides the risk into different levels according to the combination of possibility and impact. However, this method has limitations when dealing with complex multi-factor interactions and dynamically changing risk situations. The quantitative standardization of the possibility and impact of risk is difficult to unify, resulting in strong subjectivity and the results may lack accuracy and repeatability; the hierarchical analysis method analyzes and evaluates the relative importance of different decision factors by establishing a hierarchical structure. In the risk grading, the weights of various risk factors are allocated and compared in a hierarchical manner. However, this method requires certain professional knowledge and experience in the setting of hierarchical structures and weights. In actual application, there may be problems of result deviation due to improper weight setting; the event tree analysis evaluates the risk level under different paths by analyzing the possible event occurrence paths and their probabilities. However, this method is relatively complex to establish and maintain, and requires an in-depth understanding of the operation process and detailed data support, which will increase the complexity of analysis when dealing with multi-variable and multi-path events.
[0004] Therefore, the present invention aims to provide a risk classification assessment method, system, device and medium for relay protection operations to solve the above-mentioned related problems. Summary of the invention
[0005] The technical problem to be solved by the present invention is that the traditional risk grading assessment method in the prior art is difficult to achieve real-time and accurate risk assessment requirements. The purpose is to provide a risk grading assessment method, system and equipment for relay protection operations. By using the Word2Vec model to encode and convert historical risk data information to obtain unified numerical features, the co-occurrence probability of neutral words and their context words is maximized, which helps to improve the efficiency of risk grading model training; at the same time, the trained risk grading model is used to effectively capture the risk features of risk data information, thereby achieving accurate assessment of risk levels, solving the problem that the traditional risk grading assessment method in the prior art is difficult to achieve real-time and accurate risk assessment requirements.
[0006] The present invention is achieved through the following technical solutions:
[0007] A risk grading assessment method for relay protection operation, the method comprising:
[0008] Obtain historical risk data information of relay protection operations, use the Word2Vec model to encode and convert the historical risk data information to obtain unified numerical features, and construct a three-dimensional matrix of time steps, number of features, and number of channels as the training set and test set of the model;
[0009] Input the three-dimensional matrix in the training set into the preset neural network model for training to obtain an initial risk grading model;
[0010] The initial risk grading model is optimized using the three-dimensional matrix in the test set until the loss function converges to obtain the optimal risk grading model;
[0011] The risk data information to be classified is input into the optimal risk classification model to output the corresponding risk level assessment results.
[0012] Furthermore, risk data information includes equipment operation records, operation logs, fault reports and maintenance information.
[0013] Furthermore, the preset neural network model adopts the TextCNN neural network model.
[0014] Furthermore, the historical risk data information of the relay protection operation is obtained, and the Word2Vec model is used to encode the historical risk data information, wherein the Skip-gram model in the Word2Vec model is used to encode the historical risk data information, specifically:
[0015] The objective function of the Skip-gram model is constructed with the goal of maximizing the co-occurrence probability of the central word and its context words;
[0016] Select a central word from the historical risk data information and input it into the Skip-gram model. Use the convolution module of the Skip-gram model to convolve and output the word vector representation of the context words of the central word.
[0017] The attention mechanism module and the maximum pooling module of the Skip-gram model are used to process the word vector representation, and the processed features are weighted summed to obtain the numerical features after encoding conversion.
[0018] Furthermore, the objective function is specifically:
[0019]
[0020] Where T represents the total number of words in the corpus; w t Indicates the central word; w t+j represents the context word; c represents the preset context window size threshold; j represents the context window size; P(w t+j ∣w t ) represents the conditional probability of the context word under the central word.
[0021] Furthermore, the conditional probability is:
[0022]
[0023] In the formula, The word vector representing the output word; represents the word vector of the input word; V represents the size of the vocabulary; w O Indicates the output word; w I Represents the input word.
[0024] Furthermore, the attention weight is specifically:
[0025]
[0026] In the formula, F represents the feature map matrix obtained by the convolution kernel, and its size is N×L, where N is equal to the number of feature maps; L is equal to the length of the feature map; α represents the attention weight, and its size is N×1; represents the weight matrix; W f represents the attention parameter matrix.
[0027] The present invention also provides a risk grading assessment system for relay protection operations, the risk grading system is used in any one of the above-mentioned risk grading assessment methods for relay protection operations, and the system includes:
[0028] The information processing module is used to obtain the historical risk data information of the relay protection operation, use the Word2Vec model to encode the historical risk data information, and construct a three-dimensional matrix of time steps, feature numbers and channel numbers as the training set and test set of the model;
[0029] The model training module is used to input the three-dimensional matrix in the training set into the preset neural network model for training to obtain an initial risk grading model;
[0030] The model optimization module is used to optimize the initial risk grading model using the three-dimensional matrix in the test set until the loss function converges to obtain the optimal risk grading model;
[0031] The risk grading module is used to input the risk data information to be graded into the optimal risk grading model to output the corresponding risk level assessment results.
[0032] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above-mentioned methods when executing the computer program.
[0033] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods described above are implemented.
[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0035] In the present invention, the Word2Vec model is used to encode and convert historical risk data information to maximize the co-occurrence probability of neutral words and their context words, which helps to improve the efficiency of risk grading model training. At the same time, the trained risk grading model is used to effectively capture the risk characteristics of risk data information, thereby achieving accurate assessment of risk levels, solving the problem that traditional risk grading assessment methods in the prior art are difficult to achieve real-time and accurate risk assessment requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0037] Figure 1 is a method flow chart of a risk classification assessment method for relay protection operations in this embodiment;
[0038] Figure 2 Schematic diagram of the structure of a Word2Vec model in a risk grading assessment method for relay protection operations in this embodiment;
[0039] Figure 3 Schematic diagram of the structure of a TextCNN neural network model in a risk grading assessment method for relay protection operations in this embodiment;
[0040] Figure 4 is a comparative schematic diagram of a risk classification assessment method for relay protection operations in this embodiment;
[0041] Figure 5 This is a schematic diagram of module connections of a risk grading assessment system for relay protection operations in this embodiment;
[0042] Figure 6 A schematic diagram of the structure of a computer device. DETAILED DESCRIPTION
[0043] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0044] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0045] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0046] Example 1
[0047] See also Figure 1-3 As shown, a risk classification assessment method for relay protection operation includes:
[0048] S1: Obtain historical risk data information of relay protection operations, use the Skip-gram model in the Word2Vec model to encode and convert the historical risk data information to obtain unified numerical features, and construct a three-dimensional matrix of time step, number of features and number of channels as the training set and test set of the model. The risk data information includes equipment operation records, operation logs, fault reports and maintenance information, specifically:
[0049] S101: With the central word w t Its context word w t+j The goal is to maximize the co-occurrence probability and construct the objective function of the Skip-gram model:
[0050]
[0051] Where T represents the total number of words in the corpus; w t Indicates the central word; w t+j represents the context word; c represents the preset context window size threshold; j represents the context window size; P(w t+j ∣w t ) represents the conditional probability of the context word under the central word, and the conditional probability is specifically:
[0052]
[0053] In the formula, The word vector representing the output word; represents the word vector of the input word; V represents the size of the vocabulary; w O Indicates the output word; w I Represents the input word.
[0054] S102: Select a central word w from the historical risk data information t Input into the Skip-gram model, and use the convolution module of the Skip-gram model to convolve and output the central word w t The context word w t+j The word vector representation of ;
[0055] Specifically, in this embodiment, the gradient descent method can also be used to maximize the objective function, thereby updating the model parameters (W1 and W2) of the Skip-gram model to obtain a better word vector representation.
[0056] S103: Use the attention mechanism module and the maximum pooling module of the Skip-gram model to process the word vector representation, perform weighted summation on the processed features, and obtain the numerical features after encoding conversion. The specific attention weight is:
[0057]
[0058] In the formula, F represents the feature map matrix obtained by the convolution kernel, and its size is N×L, where N is equal to the number of feature maps; L is equal to the length of the feature map; α represents the attention weight, and its size is N×1; represents the weight matrix; W f represents the attention parameter matrix;
[0059] Specifically, in this embodiment, by applying the attention weight α to the feature map F of each convolution kernel, a weighted feature map is obtained. Then for each weighted feature map Perform the maximum pooling operation Finally, all the pooled features Perform concatenation or weighted summation to obtain the numerical features after encoding conversion.
[0060] At the same time, it should be noted that after obtaining the numerical features, the numerical features are also pre-processed by standardization or normalization to ensure that all numerical features are on the same scale.
[0061] S104: Construct a three-dimensional matrix of time steps, feature numbers, and channel numbers as training sets and test sets for the model.
[0062] Specifically, this embodiment provides an exemplary method of obtaining 10,000 real-time data on relay protection operations from multiple authoritative institutions and power company databases as historical risk data information, and inviting 6 experts to conduct three rounds of scoring on the recorded relay protection operation risks, and calculating the weighted average, variance and other key data of the expert scoring results, and using the obtained results as the risk classification label for this operation. For details, see Tables 1 and 2 below. After processing, the historical risk data information is divided into a training set and a test set in a ratio of 8:2.
[0063] Table 1 Historical risk data information table of relay protection operation
[0064]
[0065] Table 2 Experts’ scoring of relay protection risks
[0066]
[0067] S2: Input the three-dimensional matrix in the training set into the TextCNN neural network model for training to obtain the initial risk grading model;
[0068] Specifically, this embodiment provides an exemplary method of selecting 16 three-dimensional matrices of [9, 12, 1] from the training set and inputting them into the TextCNN neural network model for training; wherein 9 indicates that the time step is 9, that is, 4 time periods are pushed forward and backward respectively based on the t time period and including the t time period, that is, (x t-4 ,...,x t ,...,x t+4 ); 12 means the number of features is 12, that is, each time period has 12 numerical features (10 continuous features and 2 discrete features); 1 means the number of channels is 1, which is a fixed value.
[0069] S3: Optimize the initial risk grading model using the three-dimensional matrix in the test set until the loss function converges to obtain the optimal risk grading model;
[0070] Specifically, in this embodiment, the initial risk grading model is optimized using the three-dimensional matrix in the test set until the loss function converges to obtain the optimal risk grading model; the model parameters are continuously adjusted through the back propagation algorithm and optimizer, such as the gradient descent algorithm, to improve the prediction accuracy of the model on given data.
[0071] S4: Input the risk data information to be classified into the optimal risk classification model to output the corresponding risk level assessment result.
[0072] It should be noted that, in this embodiment, the risk grading model after training is applied to the real-time risk grading of relay protection operations. By inputting the operation records, operation logs, fault reports and maintenance information of a certain equipment into the risk grading model of this method, the TextCNN model with the introduction of the attention mechanism will quickly give the real-time risk level assessment results of the relay protection operation; at the same time, this embodiment can also give corresponding warnings based on the obtained risk grading, and accurately give the treatment measures taken for similar risk levels in the data set, thereby providing real-time and accurate risk warnings and the treatment measures needed to be taken for power companies to formulate refined risk management strategies.
[0073] Specifically, in this embodiment, the Word2Vec model is used to encode and convert historical risk data information to maximize the co-occurrence probability of neutral words and their context words, which helps to improve the efficiency of risk grading model training. At the same time, the trained risk grading model is used to effectively capture the risk characteristics of risk data information, thereby achieving accurate assessment of risk levels, solving the problem that traditional risk grading assessment methods in the prior art are difficult to achieve real-time and accurate risk assessment requirements.
[0074] In order to comprehensively evaluate the accuracy of the risk grading model provided by the present invention, the risk grading model of the present invention is compared with several other common machine learning methods, such as support vector machine (SVM), random forest (RandomForest), naive Bayes (NaiveBayes) and K nearest neighbor (KNN). The comparison results are shown in Figure 4 As shown in the figure, the accuracy of support vector machine in risk classification is 85.0%, the recall rate is 83.5%, and the F1 score is 84.2%, and the training time is 2 hours; the accuracy of random forest in risk classification is 86.5%, the recall rate is 84.8%, and the F1 score is 85.6. The accuracy of naive Bayes and KNN is 82.0% and 83.5% respectively. These comparison results show that TextCNN shows superior performance in the task of relay protection operation risk classification, especially in processing text features, showing that TextCNN has obvious advantages in processing relay protection operation risk text data.
[0075] Example 2
[0076] See also Figure 5 As shown, the present invention also provides a risk grading assessment system for relay protection operations, the risk grading system is used in any one of the risk grading assessment methods for relay protection operations described above, and the system includes:
[0077] The information processing module 100 is used to obtain historical risk data information of relay protection operations, encode and convert the historical risk data information using the Word2Vec model, and construct a three-dimensional matrix of time steps, feature numbers, and channel numbers as a training set and a test set for the model;
[0078] The model training module 200 is used to input the three-dimensional matrix in the training set into a preset neural network model for training to obtain an initial risk grading model;
[0079] The model optimization module 300 is used to optimize the initial risk grading model using the three-dimensional matrix in the test set until the loss function converges to obtain the optimal risk grading model;
[0080] The risk grading module 400 is used to input the risk data information to be graded into the optimal risk grading model to output the corresponding risk grade assessment result.
[0081] It should be noted that the modules in the system of Example 2 correspond to the steps in the method of Example 1. The steps in the method of Example 1 have been described in detail in Example 1. In this Example 2, the contents of the modules in the system will not be described in detail.
[0082] Example 3
[0083] See also Figure 6 As shown, this embodiment further provides a computer device, including a memory 1005 and a processor 1001, wherein the memory 1005 stores a computer program, and the processor 1001 implements the steps of any one of the above methods when executing the computer program.
[0084] It should be noted that the processor 1001 is used to execute the steps in the above method embodiments according to the instructions in the program code. Alternatively, the processor 1001 implements the functions of each module / unit in the above system / device embodiments when executing the computer program.
[0085] Specifically, in this embodiment, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 1005, and are executed by the processor 1001 to complete the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
[0086] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor 1001 and a memory 1005. Those skilled in the art will appreciate that this does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include an input / output device 1003, a network access device 1002, a bus 1006, etc.
[0087] The processor 1001 may be a central processing unit (CPU), or other general-purpose processors 1001, digital signal processors 1001 (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 1001 may be a microprocessor or any conventional processor, etc.
[0088] The memory 1005 may be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device. The memory 1005 may also be an external storage device 1004 of the terminal device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device. Further, the memory 1005 may also include both the internal storage unit of the terminal device and the external storage device 1004. The memory 1005 is used to store computer programs and other programs and data required by the terminal device. The memory 1005 may also be used to temporarily store data that has been output or is to be output.
[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0090] Example 4
[0091] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above methods are implemented.
[0092] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, system or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), registers, hard disks, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above, or any other form of computer-readable storage medium known in the art.
[0093] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In an embodiment of the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system, or device.
[0094] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A risk classification assessment method for relay protection operations, It is characterized in that Methods include: Obtain historical risk data information of relay protection operations, use the Word2Vec model to encode and convert the historical risk data information to obtain unified numerical features, and construct a three-dimensional matrix of time steps, number of features, and number of channels as the training set and test set of the model; Input the three-dimensional matrix in the training set into the preset neural network model for training to obtain an initial risk grading model; The initial risk grading model is optimized using the three-dimensional matrix in the test set until the loss function converges to obtain the optimal risk grading model; The risk data information to be classified is input into the optimal risk classification model to output the corresponding risk level assessment results.
2. A risk classification assessment method for relay protection operations according to claim 1, It is characterized in that Risk data information includes equipment operation records, operation logs, fault reports and maintenance information.
3. A risk classification assessment method for relay protection operation according to claim 1, It is characterized in that The preset neural network model uses the TextCNN neural network model.
4. A risk classification assessment method for relay protection operation according to claim 1, It is characterized in that The historical risk data information of relay protection operations is obtained, and the Word2Vec model is used to encode the historical risk data information to obtain a unified numerical feature. The Skip-gram model in the Word2Vec model is used to encode the historical risk data information, specifically: The objective function of the Skip-gram model is constructed with the goal of maximizing the co-occurrence probability of the central word and its context words; Select a central word from the historical risk data information and input it into the Skip-gram model. Use the convolution module of the Skip-gram model to convolve and output the word vector representation of the context words of the central word. The attention mechanism module and the maximum pooling module of the Skip-gram model are used to process the word vector representation, and the processed features are weighted summed to obtain the numerical features after encoding conversion.
5. A risk classification assessment method for relay protection operation according to claim 4, It is characterized in that The specific objective function is: Where T represents the total number of words in the corpus; w t Indicates the central word; w t+j represents the context word; c represents the preset context window size threshold; j represents the context window size; P(w t+j ∣w t ) represents the conditional probability of the context word under the central word.
6. A risk classification assessment method for relay protection operation according to claim 5, It is characterized in that The conditional probability is: In the formula, The word vector representing the output word; represents the word vector of the input word; V represents the size of the vocabulary; w O Indicates the output word; w I Represents the input word.
7. A risk classification assessment method for relay protection operation according to claim 4, It is characterized in that The attention weights are: In the formula, F represents the feature map matrix obtained by the convolution kernel, and its size is N×L, where N is equal to the number of feature maps; L is equal to the length of the feature map; α represents the attention weight, and its size is N×1; represents the weight matrix; W f represents the attention parameter matrix.
8. A risk classification assessment system for relay protection operations, It is characterized in that The risk grading system is used in a risk grading assessment method for relay protection operations as described in any one of claims 1 to 7, and the system includes: The information processing module is used to obtain the historical risk data information of the relay protection operation, use the Word2Vec model to encode the historical risk data information, and construct a three-dimensional matrix of time steps, feature numbers and channel numbers as the training set and test set of the model; The model training module is used to input the three-dimensional matrix in the training set into the preset neural network model for training to obtain an initial risk grading model; The model optimization module is used to optimize the initial risk grading model using the three-dimensional matrix in the test set until the loss function converges to obtain the optimal risk grading model; The risk grading module is used to input the risk data information to be graded into the optimal risk grading model to output the corresponding risk level assessment results.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Relay protection fault identification and response system
CN119852950A
