Relay protection task replying method based on semantic analysis
By applying a semantic analysis-based task approval method in relay protection, combined with random forest and fuzzy search technology, the problem of stable approval on manual dependence during relay protection is solved, and efficient and accurate task generation and processing is achieved. Improve work efficiency.
Patent Information
- Application Number
- CN202411493686.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-07
AI Technical Summary
Stable approvals are highly dependent on manual labor during relay protection, resulting in low work efficiency and it is difficult to quickly and accurately generate executable tasks when a fault occurs, extending the stable approval time.
Using the relay protection task approval method based on semantic analysis, a stable approval task selectable set and a fuzzy search task set are constructed by adding power-specific word data storage units, combining random forests and fuzzy search technology, and calculating the task matching degree to generate the final task.
The integrated generation process from stable approval to task name is realized, which significantly improves the efficiency and accuracy of relay protection work, shortens task processing time, and ensures the efficiency of workflow.
Smart Images

Figure CN119398700A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of relay protection of electric power systems and relates to a method for approving relay protection tasks based on semantic analysis. Background Art
[0002] Relay protection is the first line of defense for protecting the power system. Its main task is to quickly and accurately detect the fault location and take measures to protect the safe operation of power equipment when a fault occurs in the power system. With the rapid development of power grid construction, the system operation mode changes frequently. The work of power grid equipment maintenance, new equipment startup, and operation mode adjustment increases year by year. The corresponding relay protection device operation status and setting value adjustment increase accordingly, and the stability approval to be processed also increases year by year. At present, the stability approval process is highly dependent on manual labor, resulting in low work efficiency.
[0003] In order to reduce the degree of manual dependence in relay protection work, reduce manual workload, and reduce the probability of human errors, some intelligent technical means have been applied to the power field. For example, the Chinese invention patent application "Grid Provincial and Local Network Ordering and Safety Error Prevention Method Based on Integrated Control" with document number 201811381266.X supports multiple keyword fuzzy query historical ticket functions, applies historical tickets, and has the function of screening historical tickets that meet the current initial conditions by comparing the real-time status information obtained from OCS or EMS. In addition, the document also establishes an operation ticket anti-pollution prediction model, which can issue the intelligent operation ticket or return the intelligent operation ticket according to the safety and error prevention warning information of the operation ticket. This method can facilitate staff to take precautions in advance, reduce the probability of errors in dispatching operation tickets, and improve the reliability of power supply in the distribution network.
[0004] However, the devices, equipment, and lines involved in relay protection are complex, the names are highly similar, and the accuracy of fuzzy search is limited. In addition, when a power failure occurs, quickly and accurately generating executable tasks and shortening the stable approval time have become technical problems that need to be urgently solved in the relay protection process in the power field. Summary of the invention
[0005] In order to solve the problems of high dependence on manual labor and low work efficiency of stable approval in the relay protection process, the present invention proposes a relay protection task approval method based on semantic analysis to provide an efficient means for processing stable approval.
[0006] The technical solution adopted by the present invention is a method for approving relay protection tasks based on semantic analysis, which is implemented by means of a CPU and a dedicated storage unit with a task set. The key is to add a power-specific word data storage unit. On this basis, the semantic analysis method is as follows: S1, constructing a stable approval task optional set based on random forest, S2, constructing a fuzzy search task set by fuzzy search, and S3, calculating task matching and generating tasks;
[0007] Among them, the S1 step is:
[0008] S1-1. Collection and preprocessing of stable reply text: prepare stable reply text in the relay protection process, perform text preprocessing and segment text data into words or sentences;
[0009] S1-2, Feature extraction: Convert text into numerical features, calculate weights, and represent data with vectors;
[0010] S1-3, normalization processing: selecting key eigenvalues, and performing normalization processing on the key eigenvalues to obtain normalized eigenvalues;
[0011] S1-4. Build an integrated random forest model and form a stable selection of approval tasks according to the classification results obtained by the random forest;
[0012] The S2 step is:
[0013] S2-1, combine the stable reply and the keyword and calculate the similarity;
[0014] S2-2, construct a keyword set and a stable approval set, calculate the similarity matrix of the keywords, and take the maximum value as the final matching result of the keyword;
[0015] S2-3, construct a keyword set and a semantic task set, calculate the similarity matrix of the keywords, and take the maximum value as the semantic task matching result of the keyword;
[0016] S2-4, taking a group of tasks whose fuzzy matching degree of the current data is higher than the set threshold as the tasks generated by this data, combining and removing duplicates of the tasks constructed by all data to form a fuzzy search task set;
[0017] Step S3 specifically refers to merging the above-mentioned stable approval optional set and fuzzy search task set, comparing the task matching degree of the two under the same data, and taking a set of tasks with a higher task matching degree as the final generated tasks.
[0018] Specifically, in the above step S1-1, the above preprocessing process is to remove useless characters, delete punctuation marks, numbers, special characters in the text, and remove stop words.
[0019] More specifically, in the above step S1-2, the specific method for calculating the weight is the TF-IDF weight calculation method; in the above step S1-3, the normalization processing method is the Min-Max normalization processing method.
[0020] Furthermore, in the above step S2-1, the method for calculating the similarity is the Jaccard similarity calculation method.
[0021] Furthermore, in the above step S3, cosine similarity is used to evaluate the text matching degree.
[0022] Specifically, the above cosine similarity evaluation is to represent the text in the form of vectors, convert the similarity calculation between abstract texts into operations between text vectors, and assume that texts D1 and D2 are two vectors in the vector space model. The expression is:
[0023] and D2 are two vectors in the vector space model, expressed as:
[0024]
[0025] In formula 1, n is a positive integer, ω is the text weight;
[0026] Then the correlation coefficient Sim(D1,D2) between D1 and D2 is calculated as:
[0027]
[0028] In formula 2, i is a positive integer;
[0029] The tasks generated by random forest and fuzzy search are merged according to data type, and the task matching degree of the two methods under the same data is compared. The group of tasks with high task matching degree is taken as the final generated tasks.
[0030] The beneficial effect of the present invention is that the random forest algorithm is a bagging ensemble method based on a decision tree learner. It constructs multiple decision trees by adopting random resampling technology and node random splitting technology, and determines the final classification result by collective voting of these trees. The random forest algorithm is known for its simplicity, ease of implementation and low computational cost, and has shown excellent performance in classification problems. The present invention combines random forest with fuzzy search, which can more accurately perform semantic analysis on stable reply content, parse out key information, and provide data support for the generation and processing of related tasks.
[0031] The present invention aims at the stable reply of relay protection, intelligently generates relevant task types, shortens the task processing time, and is conducive to improving the work efficiency of relay protection. Through the present invention, an integrated generation process from stable reply to task name is realized, which greatly improves the efficiency and accuracy of stable reply processing and ensures the high efficiency of the work process. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is the overall semantic analysis flow chart of the present invention.
[0033] Figure 2 This is a flow chart of the random forest algorithm of the present invention.
[0034] Figure 3 This is a specific example of random forest classification processing in the present invention. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] The following are specific embodiments:
[0037] Attached Figure 1 The entire semantic analysis flow chart of the present invention is implemented by means of a CPU and a dedicated storage unit with a task set, and a power-specific word data storage unit is added. On this basis, the following is implemented:
[0038] S1. Construct an optional set of stable approval tasks based on random forest:
[0039] S1-1. Collection and preprocessing of stable reply texts:
[0040] Prepare several types of stable replies and perform semantic analysis on them after text preprocessing.
[0041] During text preprocessing, remove useless characters, delete punctuation marks, numbers, special characters, etc. in the text; remove stop words, delete common stop words that do not carry much information, such as certain modal particles, linking words, etc.; segment the text data into words or sentences.
[0042] S1-2. Feature extraction:
[0043] The text is converted into numerical features, and the TF-IDF weight calculation method is used to calculate the word frequency TF and the inverse document frequency IDF, and then calculate the TF-IDF weight. The calculation formula is as follows.
[0044]
[0045] This method can reduce the computational cost when processing large-scale text data, and can give higher weights to words that are of greater concern, thereby reducing the impact of some unimportant words.
[0046] After the data is preprocessed, it is represented by a vector as shown below:
[0047] D i =D i (ω i1 ,ω i2 ,L,ω in ),
[0048] In the above formula, i and n are positive integers, and ω is the text weight.
[0049] S1-3, Normalization processing:
[0050] Min-Max normalization is used to eliminate the influence of different dimensions.
[0051] Select key eigenvalues, standardize the extracted eigenvalues, and scale the eigenvalues to [0,1]. norm That is, the eigenvalue after normalization, the formula is: In the formula, x is any eigenvalue, X min is the minimum eigenvalue, X max is the maximum eigenvalue.
[0052] S1-4. Build an integrated random forest model and form a stable approval task optional set according to the classification results obtained by the random forest:
[0053] After data preprocessing is completed, multiple classifiers are trained with different training sets, such as building 2k+1 random forest-based models, SL1~SL 2k+1 , after training is completed, the same number of model files SL are generated 1seq ~SL 2k+1seq .
[0054] When performing classification, load the generated model file and the stable approval file to be classified. For a specific classifier, the decision tree makes a classification decision on the stable approval file, with V1~V 2k+1 express.
[0055] For the classification results obtained by multi-classifiers processing a single data, the majority voting method is used, that is, the voting process is limited by a threshold, and n1 and n2 represent the voting results of the multi-classifiers for two types.
[0056] To improve the accuracy, first determine the magnitude relationship between n1 and n2. If n1 > n2, then determine whether the number of votes of n1 is not less than the threshold T1 (k + 1 ≤ T1 ≤ 2k + 1). If so, classify it as result1; otherwise, classify it as result2. If n1 < n2, then determine whether n2 is not less than the threshold T2 (k + 1 ≤ T2 ≤ 2k + 1). If so, classify it as result2; otherwise, classify it as result1.
[0057] As shown in the following formula:
[0058]
[0059] The classification results obtained by the random forest form an optional set of stable approval tasks.
[0060] The flowchart of the random forest algorithm can be referred to in the appendix Figure 2 .
[0061] S2. Construct a fuzzy search task set by fuzzy search:
[0062] S2-1. After completing data preprocessing, combine stable approvals and keywords. Taking the fuzzy matching of keyword M1 and stable approval S1 as an example, the Jaccard similarity calculation formula is:
[0063]
[0064] S2-2. Construct a keyword set M = [M1, M2,..., Mn] and a stable approval set S = [S1, S2,..., Sn]. According to the Jaccard similarity calculation formula, calculate the similarity matrix of keywords such as M1 and M2, and take the maximum value as the final matching result of the keyword.
[0065] S2-3. Construct a keyword set M = [M1, M2,..., Mn] and a semantic task set N = [N1, N2,..., Nn]. According to the Jaccard similarity calculation formula, calculate the similarity matrix of keywords such as M1 and M2, and take the maximum value as the semantic task matching result of the keyword.
[0066] S2-4. Select a group of tasks with a fuzzy matching degree higher than the set threshold for the current data as the tasks generated by this data. Finally, combine and deduplicate the tasks constructed from all data to form a fuzzy search task set.
[0067] S3. Calculate the task matching degree and generate tasks:
[0068] Use cosine similarity to evaluate text matching. Through the space vector model, represent the text in the form of vectors, and convert the similarity calculation between abstract texts into the operation between text vectors
[0069] Assume that text D1 and D2 are two vectors in the vector space model, as shown below:
[0070]
[0071] In the above formula, n is a positive integer and ω is the text weight.
[0072] Then the correlation coefficient Sim(D1,D2) between D1 and D2 is calculated as:
[0073]
[0074] In the above formula, i is a positive integer.
[0075] The tasks generated by random forest and fuzzy search are merged according to data type, and the task matching degree of the two methods under the same data is compared. The set of tasks with higher task matching degree is taken as the final generated tasks.
[0076] Attached Figure 3 Taking a piece of approval text as an example, the random forest classification results are displayed in the form of a flowchart.
Claims
1. A method for approving relay protection tasks based on semantic analysis, implemented by means of a CPU and a dedicated storage unit with a task set, characterized in that: Add a data storage unit for power-specific terms, on this basis, the semantic analysis method is: S1, constructing a stable approval task optional set based on random forest, S2, constructing a fuzzy search task set through fuzzy search, and S3, calculating task matching and generating tasks; Among them, the S1 step is: S1-1. Collection and preprocessing of stable reply text: prepare stable reply text in the relay protection process, perform text preprocessing and segment text data into words or sentences; S1-2, Feature extraction: Convert text into numerical features, calculate weights, and represent data with vectors; S1-3, normalization processing: selecting key eigenvalues, and performing normalization processing on the key eigenvalues to obtain normalized eigenvalues; S1-4. Build an integrated random forest model and form a stable approval task optional set according to the classification results obtained by the random forest; The S2 step is: S2-1, combine the stable reply and the keywords and calculate the similarity; S2-2, construct a keyword set and a stable approval set, calculate the similarity matrix of the keywords, and take the maximum value as the final matching result of the keyword; S2-3, construct a keyword set and a semantic task set, calculate the similarity matrix of the keywords, and take the maximum value as the semantic task matching result of the keyword; S2-4, taking a group of tasks whose fuzzy matching degree of the current data is higher than the set threshold as the tasks generated by this data, combining and removing duplicates of the tasks constructed by all data to form a fuzzy search task set; Step S3 specifically refers to merging the stable approval optional set and the fuzzy search task set, comparing the task matching degree of the two under the same data, and taking a group of tasks with a higher task matching degree as the final generated tasks.
2. A method for approving relay protection tasks based on semantic analysis according to claim 1, characterized in that: In the step S1-1, the preprocessing process is to remove useless characters, delete punctuation marks, numbers, special characters in the text, and remove stop words.
3. A method for approving relay protection tasks based on semantic analysis according to claim 1, characterized in that: In the step S1-2, the specific method for calculating the weight is the TF-IDF weight calculation method; in the step S1-3, the normalization processing method is the Min-Max normalization processing method.
4. The method for approving relay protection tasks based on semantic analysis according to claim 1 is characterized in that: In the step S2-1, the method for calculating the similarity is the Jaccard similarity calculation method.
5. The method for approving relay protection tasks based on semantic analysis according to claim 1 is characterized in that: In the step S3, cosine similarity is used to evaluate the text matching degree.
6. A method for approving relay protection tasks based on semantic analysis according to claim 5, characterized in that: The cosine similarity evaluation is specifically to represent the text in the form of vectors, convert the similarity calculation between abstract texts into an operation between text vectors, and assume that the texts D1 and D2 are two vectors in the vector space model, and the expression is: In formula 1, n is a positive integer, ω is the text weight; Then the correlation coefficient Sim(D1,D2) between D1 and D2 is calculated as: In formula 2, i is a positive integer; The tasks generated by random forest and fuzzy search are merged according to data type, and the task matching degree of the two methods under the same data is compared. The group of tasks with high task matching degree is taken as the final generated tasks.
Citation Information
Patent Citations
Power grid provincial and regional network commanding and safety anti-misoperation method based on regulation and control integration
CN109740837A