Intelligent substation virtual loop automatic checking method and system

By combining the SBERT network model and twin network, the virtual terminals in the virtual circuits of smart substations are automatically verified, solving the problem of inaccurate virtual circuit verification and achieving efficient and accurate virtual terminal matching.

CN120011828BActive Publication Date: 2025-12-12WENZHOU ELECTRIC POWER BUREAU
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510473084.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-12-12
Estimated Expiration
2045-04-16

AI Technical Summary

Technical Problem

In smart substations, the verification results of virtual loops are inaccurate, manual verification is inefficient and prone to errors, and existing automatic verification methods suffer from poor matching and overfitting problems.

Method used

An automatic verification method based on the SBERT network model is adopted. By obtaining the text description of the virtual terminals in the virtual loop, cleaning and encoding are performed. The similarity between sentence pairs is calculated by combining the Siamese network with the BERT model to determine the virtual terminal matching.

Benefits of technology

It significantly improves the accuracy of automatic verification of virtual terminals, reduces the error rate of manual verification, and enhances verification efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011828B_ABST
    Figure CN120011828B_ABST
Patent Text Reader

Abstract

The application discloses an intelligent substation virtual loop automatic checking method and system, which can be applied to the technical field of intelligent substations, obtains text descriptions of multiple virtual terminals in an intelligent substation virtual loop, then cleans each text description to obtain corresponding cleaned texts, encodes each cleaned text by using a target checking model trained based on an SBERT network model to obtain embedding vectors of each character, obtains corresponding sentence vectors based on the embedding vectors of the characters, determines multiple sentence pairs according to the sentence vectors, calculates the similarity between each sentence pair to obtain a text similarity value, and judges whether the text similarity is greater than a preset threshold value; if yes, each virtual terminal is determined to be matched, and the above method significantly improves the accuracy of automatic checking of the virtual terminals.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent substation, and particularly relates to an intelligent substation virtual loop automatic checking method and system. BACKGROUND

[0002] Relay protection equipment realizes various fault removal and subsequent fault analysis by converting primary large current into secondary small current. In a traditional substation, the electrical signal communication between devices is realized through cable end-to-end connection, so each electrical signal needs a set of cables for transmission, and the wiring is complex. In an intelligent substation, the electrical signal in the traditional substation is converted into an optical signal through electronic information technology, so that the information transmission between devices can be realized through several optical fibers, without the need to lay a large number of cables to transmit electrical signals. In order to be connected with the secondary loop of the traditional substation, the concept of virtual loop is introduced in the intelligent substation, the virtual loop represents the secondary loop in the traditional substation, and the virtual terminal represents the terminal description of both ends of the virtual loop, which represents the transmission path of information between devices. It is particularly important in the intelligent substation, and connection errors of the virtual loop may cause serious consequences such as protection misoperation and refusal. Therefore, before the intelligent substation is put into operation, the virtual loop design of the substation configuration description (SCD) needs to be checked.

[0003] Each virtual terminal in the virtual loop has its own text description, which can represent its own function. Therefore, the current conventional virtual loop checking is mainly manual, but due to the strong professional identification and poor readability of the secondary loop represented by the virtual loop, especially in high-voltage substations, the connection of the virtual loop is more complex. This leads to low efficiency and easy errors in manual comparison. In addition, there is no standard for the specific implementation of the virtual loop of the intelligent device in China at present, so the virtual loop text description of each manufacturer is not the same, making the virtual loop checking more difficult.

[0004] In recent years, some studies have proposed to use natural language processing (NLP) to realize automatic checking of virtual terminals. As one of the core research directions in the field of artificial intelligence, NLP has been applied in various fields with the development of deep neural networks and pre-training models, so as to improve the intelligent level of the industry. Literature proposes that the mapping between the standard virtual terminal library and the non-standard virtual terminal library can be established based on the Levenshtein distance fuzzy matching algorithm, so as to realize automatic checking. However, since the method uses the continuous Bag-of-Words (CBOW) model to encode the text, the matching effect of some virtual terminals with large differences in two-end text description is not good. Literature proposes to use an improved bi-directional long short-term memory (Bi-LSTM) to obtain the sentence vector of the virtual terminal text, and realizes the automatic checking of the virtual terminal by comparing the similarity of the sentence vectors of the two-end virtual terminal text. However, this method needs complex parameter tuning and has overfitting problem. SUMMARY

[0005] To solve the above technical problems, the embodiments of the present application provide an intelligent substation virtual loop automatic checking method and system to solve the technical problem of inaccurate checking results in the prior art when checking the virtual loop of an intelligent substation.

[0006] The first aspect of the embodiments of the present application provides an intelligent substation virtual loop automatic checking method, which comprises:

[0007] Obtaining the text description of a plurality of virtual terminals in the virtual loop of an intelligent substation;

[0008] Cleaning each text description to obtain the corresponding cleaned text, inputting each cleaned text into a target checking model to make the target checking model encode each cleaned text to obtain the embedding vector of each character, and obtaining the corresponding sentence vector based on the embedding vector of each character, wherein the checking model is obtained by training an SBERT network model;

[0009] According to the sentence vector, a plurality of sentence pairs are determined, the similarity between each sentence pair is calculated to obtain a text similarity value, and it is judged whether the text similarity is greater than a preset threshold. If it is greater, each virtual terminal is determined to be matched.

[0010] In a possible implementation manner of the first aspect, the target checking model is obtained by training an SBERT network model, comprising:

[0011] Obtaining a text dataset of a plurality of virtual terminals in the virtual loop of an intelligent substation, dividing the dataset into a training set and a test set according to a preset proportion;

[0012] The training sets are cleaned to obtain corresponding cleaned training sets, and the cleaned training sets are input into an SBERT network model for training to obtain an initial verification model.

[0013] The initial verification model is adjusted by using test sample data to obtain a target verification model.

[0014] In a possible implementation manner of the first aspect, the text in the training set is cleaned to obtain a cleaned training set, including:

[0015] Invalid information in each training set is removed, and text information represented by English letters is expanded to real meaning to obtain a corresponding cleaned training set.

[0016] In a possible implementation manner of the first aspect, the cleaned training sets are input into an SBERT network model for training to obtain an initial verification model, including:

[0017] Each cleaned training set is encoded to obtain a space embedding vector of each sample character, and a sentence vector corresponding to each cleaned training set is obtained based on the space embedding vector of each sample character.

[0018] Each cleaned training set is encoded to obtain a space embedding vector of each sample character, and a sentence vector corresponding to each cleaned training set is obtained based on the space embedding vector of each sample character.

[0019] Based on the sentence vector corresponding to each cleaned training set, a plurality of sample sentence pairs are determined, a similarity between each sample sentence pair is calculated to obtain a corresponding similarity value, and the calculation formula of the similarity value is:

[0020]

[0021] In the formula, , The embedding vectors corresponding to each cleaned text are represented respectively.

[0022] According to each similarity value, a mean square error is obtained, the SBERT network model is back propagated according to the mean square error, and the training is stopped until a preset condition is reached to obtain an initial verification model, and the mean square error function is:

[0023]

[0024] In the formula, is a real similarity score, is a sentence similarity score calculated by the model.

[0025] In a possible implementation manner of the first aspect, the initial checking model is adjusted by using the test set to obtain a target checking model, including:

[0026] The test data is input into the initial checking model for checking to obtain an initial checking result;

[0027] According to the initial checking result, a preset evaluation formula is used to calculate the initial checking result to obtain an evaluation value, wherein the preset evaluation formula is:

[0028]

[0029] In the formula, P is a probability that an actual positive sample in the initial checking result is positive, and R represents a probability that the actual positive sample is predicted to be positive;

[0030] If the evaluation value is greater than a preset evaluation value, it is determined that the initial checking result is a trained checking model, and if the evaluation value is less than the preset evaluation value, the SBERT network model is continuously trained according to the training set until the target checking model is obtained.

[0031] In a possible implementation manner of the first aspect, the SBERT network model is obtained by combining a twin network with a BERT model.

[0032] To solve the same technical problem, a second aspect of an embodiment of the present application provides an intelligent substation virtual loop automatic checking system, including:

[0033] An acquisition module is configured to acquire text descriptions of a plurality of virtual terminals in an intelligent substation virtual loop;

[0034] An encoding module is configured to clean each text description to obtain a corresponding cleaned text, input each cleaned text into a target checking model, and enable the target checking model to encode each cleaned text to obtain an embedding vector of each character, and obtain a corresponding sentence vector based on the embedding vector of each character, wherein the checking model is obtained by training the SBERT network model;

[0035] A similarity calculation module is configured to determine a plurality of sentence pairs based on the sentence vector, calculate a similarity between each sentence pair to obtain a text similarity value, and determine whether the text similarity is greater than a preset threshold value, and if so, determine that each virtual terminal is matched.

[0036] In a possible implementation manner of the second aspect, the encoding module includes a sample data acquisition unit, a training unit, and an adjustment unit, wherein:

[0037] The sample data acquisition unit is configured to acquire a text data set of a plurality of virtual terminals in an intelligent substation virtual loop, and divide the data set into a training set and a test set according to a preset proportion.

[0038] The training unit is configured to clean each training set to obtain a corresponding cleaned training set, input each cleaned training set into an SBERT network model for training, and obtain an initial verification model.

[0039] The adjusting unit is configured to adjust the initial verification model by using test sample data to obtain a target verification model.

[0040] The third aspect of the embodiment of the present application provides a computer device, comprising:

[0041] a memory configured to store a computer program;

[0042] a processor configured to execute the computer program to implement the steps of the intelligent substation virtual loop automatic verification method according to the first aspect.

[0043] The fourth aspect of the embodiment of the present application provides a storage medium, the storage medium storing a computer program, and the computer program is executed by a processor to implement the steps of the intelligent substation virtual loop automatic verification method according to the first aspect.

[0044] The technical scheme of the present application has the following advantages:

[0045] The intelligent substation virtual loop automatic verification method provided by the embodiment of the present application obtains the text description of the plurality of virtual terminals in the intelligent substation virtual loop, then cleans each text description to obtain a corresponding cleaned text, encodes each cleaned text by using a target verification model trained based on an SBERT network model to obtain the embedding vector of each character, obtains a sentence vector based on the embedding vector of each character, determines a plurality of sentence pairs according to the sentence vector, calculates the similarity between each sentence pair to obtain a text similarity value, and judges whether the text similarity is greater than a preset threshold value. If yes, it is determined that each virtual terminal is matched. The above method significantly improves the accuracy of automatic verification of the virtual terminal. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the specific embodiments of the present application or the technical scheme in the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application. Those skilled in the art can obtain other drawings without creative labor based on these drawings.

[0047] Figure 1 The verification flowchart of the intelligent substation virtual loop automatic verification method in the embodiment of the present application;

[0048] Figure 2A virtual terminal automatic checking flowchart based on an SBERT network model for the intelligent substation virtual loop automatic checking method in the embodiment of the present application is shown in Figure 1.

[0049] Figure 3 A BERT model pre-training stage basic architecture diagram for the intelligent substation virtual loop automatic checking method in the embodiment of the present application is shown in Figure 2.

[0050] Figure 4 A specific task flowchart based on a BERT model for the intelligent substation virtual loop automatic checking method in the embodiment of the present application is shown in Figure 3.

[0051] Figure 5 A twin network structure schematic diagram for the intelligent substation virtual loop automatic checking method in the embodiment of the present application is shown in Figure 4.

[0052] Figure 6 An SBERT structure classification task flowchart for the intelligent substation virtual loop automatic checking method in the embodiment of the present application is shown in Figure 5.

[0053] Figure 7 An SBERT structure text task similarity task flowchart for the intelligent substation virtual loop automatic checking method in the embodiment of the present application is shown in Figure 6.

[0054] Figure 8 A system block diagram of the intelligent substation virtual loop automatic checking system in the embodiment of the present application is shown in Figure 7. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.

[0056] The intelligent substation virtual loop automatic checking method provided in the embodiments of the present application is shown in Figure 1. Figure 1 Figure 1 A virtual loop automatic checking method flowchart for an intelligent substation is shown in Figure 1, which includes steps S101-S103, and each step is specifically as follows.

[0057] S101, obtaining text descriptions of a plurality of virtual terminals in an intelligent substation virtual loop.

[0058] In this embodiment, text descriptions of a plurality of virtual terminals in an intelligent substation virtual loop are obtained.

[0059] ​S102, each text description is cleaned to obtain a corresponding cleaned text, each cleaned text is input into a target checking model, the target checking model encodes each cleaned text to obtain an embedding vector of each character, a sentence vector is obtained based on the embedding vector of each character, and the target checking model is obtained by training an SBERT network model.

[0060] In this embodiment, the virtual terminal end-to-end text similarity is calculated based on the generated training model. After obtaining the text similarity, whether the virtual terminal is matched is automatically judged according to the set correctness threshold, and finally the automatic checking of the virtual terminal is realized. Specifically, each text description is cleaned to obtain a corresponding cleaned text, each cleaned text is input into a target checking model, the target checking model encodes each cleaned text to obtain an embedding vector of each character, and a sentence vector is obtained based on the embedding vector of each character.

[0061] It should be noted that the generated training model refers to the target checking model, and the target checking model is obtained by training an SBERT network model.

[0062] In an embodiment, the SBERT network model is obtained by combining a twin network and a BERT model.

[0063] In this embodiment, BERT is a deep learning model based on Transformer, which adopts a bidirectional training and pre-training-fine-tuning method to improve the understanding ability of language, and has greatly improved the performance of multiple NLP algorithms compared with traditional convolutional neural network (CNN) and recurrent neural network (RNN) type NLP algorithms. The overall framework of BERT includes two stages of pre-training and fine-tuning. The basic architecture of the pre-training stage is as shown in Figure 3 .

[0064] In the pre-training stage, BERT has two self-supervised tasks, one is the masked language model (MLM). In order to make full use of the semantic relationship between the context, BERT model adopts MLM mode to train the data, by replacing a part of the input corpus with [MASK], and then predicting the word through the context, so that the BERT model can better understand the context semantics. In order to effectively avoid the problem of overfitting. In the pre-training process, BERT, 15% of the words will be replaced by [MASK] to improve the performance of BERT model in predicting the next word. The other task of BERT is next sentence prediction (NSP), which judges whether two sentences have context relationship. The information of the sentence will be saved in the word vector output [CLS].

[0065] At the same time, the BERT model performs next sentence prediction (NSP) training, given two sentences, it predicts whether the two sentences have context relationship, which is very helpful for implementing sentence pair matching task. Overall, the pre-stage model is trained based on the general text field of big data to form a basic BERT model. In the fine-tuning stage, the pre-trained model is adjusted through the specific task data set, and the weights of the BERT model are updated through the back propagation algorithm, and the overall training process is as shown in Figure 4 .

[0066] Siamese network structure (siamese network) as a special neural network architecture is widely used in metric tasks. By learning a group of input structure similar samples, the spatial distance of the data pair is formed to measure the similarity of the data pair. Its structure is as shown in Figure 5 .

[0067] The key of siamese network structure is that two sub-networks share the same weights and parameters, which ensures the symmetry of two network training, so its input order is not sensitive to data, and the number of training parameters can be reduced. It is generally composed of four parts: input pair, shared parameter feature extractor, similarity measure and loss function. The shared parameter feature extractor is generally a group of deep neural networks, which processes a group of input pairs to generate fixed-length feature vectors. The similarity measure can obtain the similarity of two feature vectors by using cosine similarity, Euclidean distance, Manhattan distance, etc. The loss function has two ways: contrastive loss and triplet, which realizes the optimization of the spatial embedding of similar samples and dissimilar samples.

[0068] Considering that the virtual terminals at both ends of the virtual loop are semantically similar texts, especially the fact that some Chinese semantics in the virtual terminal statement pair are not the same, but in the virtual terminal, they refer to the same object, the twin network is used to train the input virtual terminal text pair, so as to correctly recognize the virtual terminal texts with relatively large differences in Chinese semantics.

[0069] In order to compare the sentence vectors of different length texts, the SBERT model formed by combining the twin network and the BERT model is used to measure the text similarity. The sentence embedding vector in the low dimension is obtained through the twin network structure, and then the cosine similarity or Euclidean distance is used to calculate the similarity between the two sentences.

[0070] The biggest advantage of the SBERT model is that each sentence is encoded into a fixed vector in advance, and the cosine similarity of the two text vectors can be simply calculated when calculating the similarity. The complex process of calculating the context representation of the BERT model when comparing sentence vectors is avoided, so the BERT model has better performance in calculating text similarity and clustering problems. There are two forms of basic structures. Figure 6 and Figure 7 as shown. Figure 6 is a text classification task structure diagram based on the SBERT model, and the classification function is:

[0071]

[0072] Among them, , respectively represent the embedding vectors corresponding to the input texts, represent the text embedding difference, is the training weight.

[0073] Figure 7 is a SBERT model based on a regression objective function, which can be used to calculate the text similarity, and the Manhattan distance is used to calculate the text similarity, and the calculation formula is:

[0074]

[0075] Among them, , respectively represent the embedding vectors corresponding to the input texts.

[0076] The calculation result is between [0, 1]. The larger the text similarity value is, the higher the similarity of the two virtual terminal texts is. The structure of the twin network combined with the BERT forms the SBERT network model, and the SBERT model is used to train the virtual terminal text, and finally the virtual loop automatic verification is realized.

[0077] In one embodiment, the target verification model is obtained by training an SBERT network model, including:

[0078] Obtain a text dataset of multiple virtual terminals in a virtual circuit of a smart substation, and divide the dataset into a training set and a test set according to a preset ratio;

[0079] Each training set is cleaned to obtain a cleaned training set. The cleaned training sets are then input into the SBERT network model for training to obtain the initial verification model.

[0080] The initial verification model is adjusted using test sample data to obtain the target verification model.

[0081] In this embodiment, the virtual terminal text exported from 20 220kV smart substations is used as the dataset, which is divided into a training set and a test set in a 6:4 ratio. The text descriptions in the training set are cleaned to obtain a cleaned training set. Each cleaned training set is then input into the SBERT network model for training to obtain an initial verification model. The initial verification model is then adjusted using the test set to obtain the target verification model.

[0082] Specifically, such as Figure 2 As shown, first import the virtual terminal text from the substation's SCD file. A 220kV substation's SCD file contains the following root node (SCL Root), device definitions (device definitively...).

[0083] ions), communication configuration, datasets, logical nodes, functional blocks, intelligent electronic device configuration (int-

[0084] Intelligent electronic devices (IEDs), such as relay protection devices, measurement and control devices, etc. SCD files typically contain... <ied>Tags, which are used to define detailed configuration of each IED, including communication address, function module, data set, etc. The required virtual loop is saved in the IED data set, which describes the virtual loop connection between devices in the substation in detail. The required virtual terminal text is exported from the module as a text file for subsequent processing.

[0085] To obtain the available virtual terminal contrast text material, 20 complete SCD files of 220kV substations built are extracted, and the virtual loop connection text of all devices is exported from the files. The virtual loop text exported from a set of 220KV line protection is shown in Table 1.

[0086] Table 1 Virtual terminal export text example

[0087]

[0088] A exported virtual loop template contains six parts, among which, External IED Name represents the IED name corresponding to the virtual terminal of the external connection device of the device. Since the virtual loop is exported from the line protection, the corresponding opposite side is the intelligent terminal of the bay; External Data Reference represents the reference address of the virtual terminal of the external device; External Data Description represents the description of the virtual terminal of the external device. The internal IED name, virtual terminal reference address and virtual terminal description with the Internal keyword represent the internal IED name, virtual terminal reference address and virtual terminal description of the device. Only two key fields are used in this paper: External Data Description and Internal Data Description, that is, the text description of the two ends of the virtual loop.

[0089] After obtaining the virtual loop text, first, the text is cleaned, and the similarity of the text of the two ends of the virtual terminal is labeled. Then, the cleaned text is used as the input of the SBERT model, and the SBERT model based on the virtual terminal text, that is, the initial checking model, is obtained after the model is fine-tuned. After obtaining the fine-tuned model, the The target checking model is obtained by measurement.

[0090] In practical application, based on the target checking model, the text description of the obtained multiple virtual terminals is processed, and the cosine similarity of the two virtual terminal texts is calculated to quantify the text similarity of the virtual terminal. Specifically, first, the text description is input into the BERT model, and the space embedding of each character can be obtained through the encoding layer of the BERT model, and then the sentence vector is obtained.

[0091] In an embodiment, each training set is cleaned to obtain a corresponding cleaned training set, including:

[0092] Invalid information is removed from the text in the training set, and the text information represented by English letters is expanded to have real meaning, thus obtaining the corresponding cleaned training set.

[0093] In this embodiment, the description text of the virtual terminal is generally semi-structured text. Some virtual terminal descriptions may contain parts that are not related to the semantics of the sentence. At the same time, some virtual terminal descriptions are too brief, and some may not even contain Chinese structure. These virtual terminal texts will produce overfitting noise in the training results when sentence embedding training is performed later. Therefore, data cleaning of virtual terminals is required in the early stage of training.

[0094] Taking the virtual terminal text in Table 2 as an example, such as "Switch 1 Circuit Breaker Position A Phase _GOOSE", the "_GOOSE" at the end of the text has no reference value for analyzing the semantics of the sentence. GOOSE is an abbreviation for Generic object oriented Substation event GOOSE, which indicates that the virtual terminal transmits information through a GOOSE message. It is irrelevant to the semantics and can be directly removed. The cleaned text is "Switch 1 Circuit Breaker Position A Phase". Similarly, some statements containing "_SV" or "_MMS" can be processed using the same method.

[0095] Another type of text that needs to be processed is text represented by English letters, such as "Ia1" and "Ua1", which represent the transmission path of protective current between devices. Such statements should be expanded to their true meaning, such as "Ia1" being expanded to "protective current Ia1".

[0096] Table 2 Examples of Virtual Terminal Text Cleaning

[0097]

[0098] Additionally, some phrases contain connecting symbols such as "_", "(", "")", which should be removed from the original sentence. Some manufacturers use Roman numeral symbols such as "I" and "II", which should be standardized to Arabic numerals.

[0099] In one embodiment, the cleaned training sets are input into the SBERT network model for training to obtain an initial verification model, including:

[0100] Encode each cleaned training set to obtain the spatial embedding vector of each sample character. Based on the spatial embedding vector of each sample character, obtain the sentence vector corresponding to each cleaned training set.

[0101] Based on the sentence vectors corresponding to each cleaned training set, a plurality of sample sentence pairs are determined, the similarity between each sample sentence pair is calculated, and a corresponding similarity value is obtained, wherein the calculation formula of the similarity value is:

[0102]

[0103] In the formula, , respectively represent the embedding vectors corresponding to each cleaned text;

[0104] According to each similarity value, a mean square error is obtained, and the SBERT network model is back propagated according to the mean square error until a preset condition is met to stop training, and an initial verification model is obtained, wherein the mean square error function is:

[0105]

[0106] In the formula, is a true similarity score, is a sentence similarity score calculated by the model.

[0107] In this embodiment, the embedding vector is obtained by combining the twin network and the BERT model. First, the Chinese sentence is input into the BERT model, and the space embedding vector of each character can be obtained through the encoding layer of the BERT model. After obtaining the space embedding vector of each character , the sentence vector v is calculated by the average pooling method, and the calculation method is:

[0108]

[0109] In the formula, represents the sentence vector, represents the space embedding vector of the character , and represents the number of characters.

[0110] In addition, since the twin network structure is adopted in this text, the vectors and of the sentence pair are obtained after the sentence pair is respectively input into the BERT model, the Manhattan distance is used to represent the similarity of the two sentences, and the calculation formula of the similarity value is:

[0111]

[0112] In the formula, , respectively represent the sentence vectors corresponding to each cleaned text.

[0113] The calculation result is between [0, 1]. The greater the text similarity value is, the higher the similarity of the two virtual terminal texts is. At this time, the loss function of the twin network can be defined as the mean square error of the set sentence pair similarity and the model calculated sentence pair similarity:

[0114]

[0115] In the formula, is the true similarity score, is the model calculated sentence similarity score.

[0116] Then the parameters of the whole model are updated again through the back propagation algorithm, and the twin network model is trained to calculate the embedding vector of the input description text.

[0117] First, input the Chinese sentence into the BERT model, and the space embedding of each character can be obtained through the encoding layer of the BERT model. After obtaining the space embedding vector hi of each character, the sentence vector v is calculated by the average pooling method, and the calculation method is as follows:

[0118] In an embodiment, the test set is used to adjust the initial checking model to obtain a target checking model, including:

[0119] The test data is input into the initial checking model for checking to obtain an initial checking result;

[0120] According to the initial checking result, a preset evaluation formula is used to calculate the initial checking result to obtain an evaluation value, wherein the preset evaluation formula is:

[0121]

[0122] In the formula, P is the probability that the sample with a positive initial checking result is actually positive, and R represents the probability that the sample actually positive is predicted to be positive;

[0123] If the evaluation value is greater than the preset evaluation value, the initial checking result is determined to be the trained checking model, and if the evaluation value is less than the preset evaluation value, the SBERT network model is continuously trained according to the training set until the target checking model is obtained.

[0124] In the present embodiment, in order to verify the effectiveness of the model proposed in the present embodiment, an algorithm program is established based on the Pytorch platform of Python language. The virtual terminal text derived from 20 220kV intelligent substations is taken as a data set, which is divided into a training set and a test set in a ratio of 6:4. The main parameters when the virtual terminal text data is used to fine-tune the SBERT model are shown in Table 3.

[0125] Table 3 SBERT fine-tuning parameters

[0126]

[0127] Based on the SBERT model proposed in this paper, the text comparison result of the virtual terminal is obtained, and the similarity of the text is represented by [0, 1]. The maximum similarity value is 1, and the minimum similarity value is 0. Table 4 and Table 5 give a part of the similarity values of GOOSE and SV virtual terminals respectively.

[0128] Table 4 Partial GOOSE virtual terminal text verification result

[0129]

[0130] Table 5 Partial SV virtual terminal text verification result

[0131]

[0132] From Table 4, it can be seen that the algorithm proposed in this paper is accurate for some text verification results with similar Chinese semantics. By fine-tuning the SEBERT model, the algorithm can also accurately verify some texts with low Chinese semantic similarity, such as "Yongtiao_Zhutiao (network port 3)" and "Tiao branch 6". From Table 5, it can be seen that since the data is cleaned in this paper, the algorithm can also have better verification results for pure English virtual terminals. If the virtual terminal text is not cleaned, such as "protect C phase voltage U c1 " and "U c ", the original matching degree can only reach 0.45, which proves that the pre-processing strategy of data cleaning proposed in this paper has significant effect.

[0133] In order to verify the effectiveness of the method proposed in this paper in virtual terminal verification work, this paper compares the method proposed in this paper with other text similarity calculation algorithms. Table 6 lists the verification effects of four different algorithms. They are respectively based on the improved Levenshtein distance fuzzy verification method, the virtual loop automatic verification method based on the improved Bi-LSTM algorithm, the text similarity calculation based on the BERT basic database, and the method proposed in this paper. The precision and recall are used to evaluate the model. The precision P represents the probability of actual positive samples in the samples predicted as positive by the model, and the recall R represents the probability of actual positive samples predicted as positive by the algorithm. The F1 score representing the overall ability of the model is calculated as follows:

[0134]

[0135] Table 6 Performance analysis of different models

[0136]

[0137] As can be seen from Table 6, the Levenshtein distance fuzzy algorithm has poor effect because of its simple implementation method and without considering the text semantics and context association, F1=0.46. The Bi-LSTM algorithm has great improvement compared with the traditional method, but it is sensitive to parameters, and different parameters may have a great influence on the verification result. In this example, F1=0.74, especially for some pure English virtual terminal text and a large number of virtual terminal text irrelevant to semantics, the semantic similarity is not satisfactory. The performance of the algorithm based on the BERT model is similar to that based on the Bi-LSTM algorithm, but there is still a large error for some special text.

[0138] The algorithm performance of the four models is the best in the automatic verification algorithm based on the SBERT pre-training model proposed in this paper. On the one hand, the model uses a twin network structure, which greatly improves the correctness of the virtual terminal text that does not match the Chinese semantics but refers to the same object, and also has a good matching degree for some English phrases. On the other hand, SBERT is based on the BERT model, which can better capture the text features at the word and character levels, and effectively avoid overfitting. Therefore, the method proposed in this paper has better performance than the other three methods in virtual terminal automatic verification.

[0139] S103, according to the sentence vector, a plurality of sentence pairs are determined, the similarity between each sentence pair is calculated, the text similarity value is obtained, and it is judged whether the text similarity is greater than a preset threshold value. If it is greater, each virtual terminal matching is determined.

[0140] In this embodiment, since the twin network structure is used in this paper, after the sentence pair is input into the BERT model, the sentence pair will be obtained respectively, and then the Manhattan distance is used to represent the similarity of the two sentences.

[0141] After obtaining the quantized text similarity, a correct threshold value δ, i.e. a preset threshold value, is specified. The virtual terminal with a text similarity less than the value is a virtual terminal matching with doubts, and the virtual terminal with a text similarity greater than the threshold value is a correct virtual terminal matching. Finally, the virtual terminal automatic verification based on SBERT is realized.

[0142] It should be noted that the correct threshold value δ, i.e. the preset threshold value, is set to 0.8.

[0143] The intelligent substation virtual loop automatic checking system provided by the embodiment of the application, as shown in Figure 8 , as shown in Figure 8 is a system block diagram of the intelligent substation virtual loop automatic checking system, which comprises:

[0144] The acquisition module 801 is configured to acquire the text description of a plurality of virtual terminals in the intelligent substation virtual loop.

[0145] The encoding module 802 is configured to clean each text description to obtain a corresponding cleaned text, input each cleaned text into a target checking model, and enable the target checking model to encode each cleaned text to obtain an embedding vector of each character, and obtain a corresponding sentence vector based on the embedding vector of each character, wherein the checking model is obtained by training an SBERT network model;

[0146] The similarity calculation module 803 is configured to determine a plurality of sentence pairs based on the sentence vector, calculate the similarity between each sentence pair to obtain a text similarity value, and determine whether the text similarity is greater than a preset threshold value. If yes, it is determined that each virtual terminal is matched.

[0147] In an embodiment, the encoding module includes a sample data acquisition unit, a training unit, and an adjustment unit, wherein,

[0148] The sample data acquisition unit is configured to acquire a text data set of a plurality of virtual terminals in a virtual loop of a smart substation, and divide the data set into a training set and a test set according to a preset proportion;

[0149] The training unit is configured to clean the text in the training set to obtain a cleaned training set, and input each cleaned training set into an SBERT network model for training to obtain an initial checking model;

[0150] The adjustment unit is configured to adjust the initial checking model using the test set to obtain a target checking model.

[0151] The specific embodiments of the intelligent substation virtual loop automatic checking system are basically the same as the above-mentioned specific embodiments of the intelligent substation virtual loop automatic checking method, and will not be repeated here.

[0152] In an embodiment of the present application, a computer device is provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the above steps when executing the computer program. The computer device provided in the embodiment has similar principles and technical effects to the above method embodiments, and will not be repeated here.

[0153] In an embodiment of the present application, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the above steps. The computer readable storage medium provided in the embodiment has similar principles and technical effects to the above method embodiments, and will not be repeated here.

[0154] Any combination of the technical features in the above embodiments can be made, and for the sake of brevity, not all possible combinations are described above. However, any combination of features described is to be considered as being encompassed by the scope of the present disclosure.

[0155] The above-described specific embodiments further illustrate the objects, technical solutions, and advantages of the present application. It should be understood that the above-described specific embodiments are merely illustrative of the present application and are not intended to limit the scope of the present application. It is specifically pointed out that any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principles of the present application shall be included in the scope of the present application.< / ied>

Claims

1. A method for automatically checking a virtual loop of a smart substation, characterized in that, include: Obtain text descriptions of multiple virtual terminals in a virtual circuit of a smart substation; Each of the text descriptions is cleaned to obtain the corresponding cleaned text. Each of the cleaned texts is then input into the target verification model so that the target verification model encodes each of the cleaned texts to obtain the embedding vector of each character. Based on the embedding vector of each character, the corresponding sentence vector is obtained. The verification model is obtained by training an SBERT network model. Based on the sentence vector, multiple sentence pairs are determined, the similarity between each sentence pair is calculated, and a text similarity value is obtained. It is then determined whether the text similarity is greater than a preset threshold. If it is greater, then each virtual terminal is determined to be matched. The target verification model is obtained by training an SBERT network model and includes: Obtain a text dataset of multiple virtual terminals in the virtual circuit of a smart substation, and divide the dataset into a training set and a test set according to a preset ratio; The text in the training set is cleaned to obtain a cleaned training set. Each cleaned training set is then input into the SBERT network model for training to obtain an initial verification model. The initial verification model is adjusted using the test set to obtain the target verification model; The text in the training set is cleaned to obtain a cleaned training set, including: Invalid information is removed from the text in the training set, and the text information represented by English letters is expanded to have real meaning, thus obtaining the corresponding cleaned training set. The target verification model calculates the text similarity between the two ends of the virtual terminal.

2. The intelligent substation virtual loop automatic checking method of claim 1, wherein, The step of inputting each of the cleaned training sets into the SBERT network model for training to obtain the initial verification model includes: Encode each of the cleaned training sets to obtain the spatial embedding vector of each sample character, and obtain the sentence vector corresponding to each of the cleaned training sets based on the spatial embedding vector of each sample character. Based on the sentence vectors corresponding to each of the cleaned training sets, multiple sample sentence pairs are determined, and the similarity between each sample sentence pair is calculated to obtain the corresponding similarity value. The formula for calculating the similarity value is as follows: In the formula, , respectively represent the embedding vectors corresponding to each of the cleaned texts. Based on the various similarity values, the mean squared error is obtained. The SBERT network model is then backpropagated based on this mean squared error until a preset condition is met, at which point training stops, resulting in an initial validation model. The mean squared error function is: wherein is the true similarity score, is the model computed sentence similarity score.

3. The intelligent electronic device virtual loop automatic checking method of claim 1, wherein, The step of adjusting the initial verification model using a test set to obtain the target verification model includes: The test data is input into the initial verification model for verification to obtain the initial verification result; Based on the initial verification results, the initial verification results are calculated using a preset evaluation formula to obtain an evaluation value, wherein the preset evaluation formula is: In the formula, P is the probability that a sample with an initial positive verification result is actually positive, and R is the probability that a sample that is actually positive is predicted to be positive. If the evaluation value is greater than a preset evaluation value, it is determined that the initial checking result is a trained checking model, and if the evaluation value is less than the preset evaluation value, the training based on the SBERT network model is continued until a target checking model is obtained.

4. The intelligent electronic device virtual loop automatic checking method of claim 1, wherein, The SBERT network model is obtained by combining a twin network and a BERT model.

5. An intelligent substation virtual loop automatic checking system, characterized in that, The method comprises the steps of: An acquisition module is configured to acquire text descriptions of a plurality of virtual terminals in a virtual loop of a smart substation. An encoding module is configured to clean each of the text descriptions to obtain corresponding cleaned texts, input each of the cleaned texts into a target checking model, and enable the target checking model to encode each of the cleaned texts to obtain an embedding vector of each character, and obtain a sentence vector based on the embedding vector of each character, wherein the checking model is obtained by training an SBERT network model; A similarity calculation module is configured to determine a plurality of sentence pairs based on the sentence vector, calculate a similarity between each of the sentence pairs to obtain a text similarity value, and determine whether the text similarity is greater than a preset threshold value, and if so, determine that each of the virtual terminals is matched. The encoding module comprises a sample data acquisition unit, a training unit and an adjustment unit, wherein The sample data acquisition unit is configured to acquire a text data set of a plurality of virtual terminals in a virtual loop of a smart substation, and divide the data set into a training set and a test set according to a preset proportion; The training unit is configured to clean the texts in the training set to obtain a cleaned training set, and input each of the cleaned training sets into an SBERT network model for training to obtain an initial checking model; The adjustment unit is configured to adjust the initial checking model using the test set to obtain a target checking model; The cleaning of the texts in the training set to obtain a cleaned training set comprises: Invalid information in the texts in the training set is removed, and text information represented by English letters is expanded to real meanings to obtain corresponding cleaned training sets; The target checking model calculates a text similarity between two virtual terminals.

6. A computer device, comprising: The method comprises the steps of: A memory is configured to store a computer program; A processor is configured to execute the computer program to implement the smart substation virtual loop automatic checking method according to any one of claims 1 to 4.

7. A storage medium, characterized by A storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the smart substation virtual loop automatic checking method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Virtual loop verification method and device, equipment and medium

    CN117076187A