Method and system for automatically checking virtual loop of intelligent substation
By applying an automatic calibration method based on SBERT network model in intelligent substations, the problems of virtual loop calibration complexity and low automatic calibration efficiency are solved, and high-accuracy virtual terminal automatic matching is achieved.
Patent Information
- Application Number
- CN202510473084.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-04-16
AI Technical Summary
In smart substations, the verification of virtual loops is low in efficiency and error-prone due to its complexity and poor readability of text descriptions. The existing automatic verification methods have poor matching effects and overfitting problems.
The automatic verification method based on the SBERT network model is adopted, and the text description of virtual terminals in the virtual loop of the intelligent substation is cleaned and encoded, and the similarity of sentence pairs is calculated using the twin network structure to achieve automatic matching of virtual terminals.
It significantly improves the automatic calibration accuracy of virtual terminals, avoids inefficiency and errors in manual verification, and reduces overfitting through data cleaning and model training.
Smart Images

Figure CN120011828A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent substations, and in particular to an automatic verification method and system for a virtual circuit of an intelligent substation. Background Art
[0002] Relay protection equipment converts a large primary current into a small secondary current to achieve various fault removal and subsequent fault analysis. In a traditional substation, the electrical signal communication between its devices is achieved through end-to-end cable connection, so each electrical signal requires a set of cables for transmission, and the wiring is complicated. The smart substation converts the electrical signals in the traditional substation into optical signals through electronic information technology. Therefore, several optical fibers are needed between the intelligent electronic devices (IEDs) in the station to achieve information transmission between devices, without laying a large number of cables to transmit electrical signals. In order to get a connection with the secondary circuit of the traditional substation, the smart substation introduces the concept of virtual circuit, which represents the secondary circuit in the traditional substation with a virtual circuit, and the terminal description at both ends of the virtual circuit is represented by a virtual terminal, which represents the transmission path of information between devices. It is particularly important in smart substations. Incorrect connection of virtual circuits may cause serious consequences such as protection misoperation and refusal to operate. Therefore, before the smart substation is put into operation, the virtual circuit design of the substation configuration description (SCD) needs to be verified.
[0003] Each virtual terminal in a virtual circuit has its own text description, which can represent its own function. Therefore, the current conventional virtual circuit verification is mainly done manually. However, due to the high professionalism and poor readability of the secondary circuit identification represented by it, the connection of the virtual circuit is more complicated, especially in high-voltage substations. As a result, manual item-by-item comparison is inefficient and prone to errors. In addition, there is no standard for the specific implementation of virtual circuits in domestic smart devices, so the text descriptions of virtual circuits of various manufacturers are also different, making the verification of virtual circuits more difficult.
[0004] In recent years, some studies have proposed to use natural language processing (NLP) to achieve fully automatic verification of virtual terminals. As one of the core research directions in the field of artificial intelligence, NLP has been applied to various fields to improve the intelligence level of the industry as deep neural networks and pre-trained models have been proposed. The 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 to achieve automatic verification. However, since this method uses the continuous Bag-of-Words (CBOW) model to encode the text, the matching effect of some virtual terminals with large differences in the text descriptions at both ends is not good. The literature proposes to use improved bidirectional long short-term memory (Bi-LSTM) to obtain the sentence vector of the virtual terminal text, and realize automatic verification of the virtual terminal by comparing the sentence vector similarity of the virtual terminal texts at both ends. However, this method requires complex parameter adjustment and has overfitting problems. Summary of the invention
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method and system for automatically checking a virtual circuit of a smart substation, so as to solve the technical problem of inaccurate checking results when checking a virtual circuit of a smart substation in the prior art.
[0006] A first aspect of an embodiment of the present invention provides a method for automatically checking a virtual circuit in a smart substation, the method comprising: Get the text description of multiple virtual terminals in the virtual circuit of the smart substation; Clean each text description to obtain a corresponding cleaned text, input each cleaned text into a target verification model, so that the target verification model encodes each cleaned text to obtain an embedding vector of each character, and obtains a corresponding sentence vector based on the embedding vector of each character, wherein the verification model is obtained by training an SBERT network model; According to the sentence vector, multiple sentence pairs are determined, the similarity between each sentence pair is calculated, and the text similarity value is obtained. It is determined whether the text similarity is greater than a preset threshold. If so, each virtual terminal is determined to match.
[0007] In a possible implementation manner of the first aspect, the target verification model is obtained by training the SBERT network model, including: Obtain a text data set of multiple virtual terminals in a virtual circuit of a smart substation, and divide the data set into a training set and a test set according to a preset ratio; Each training set is cleaned to obtain a corresponding cleaned training set, and each cleaned training set is input into the SBERT network model for training to obtain an initial calibration model; The initial calibration model is adjusted using the test sample data to obtain the target calibration model.
[0008] In a possible implementation manner of the first aspect, cleaning text in a training set to obtain a cleaned training set includes: Invalid information in each training set is removed, and the text information represented by English letters is expanded to the true meaning to obtain the corresponding cleaned training set.
[0009] In a possible implementation of the first aspect, each cleaned training set is input into an SBERT network model for training to obtain an initial calibration model, including: Encode each cleaned training set to obtain a spatial embedding vector of each sample character, and obtain a sentence vector corresponding to each cleaned training set based on the spatial embedding vector of each sample character; Encode each cleaned training set to obtain a spatial embedding vector of each sample character, and obtain a sentence vector corresponding to each cleaned training set based on the spatial embedding vector of each sample character; Based on the sentence vectors corresponding to each cleaned training set, multiple sample sentence pairs are determined, and the similarity between each sample sentence pair is calculated to obtain the corresponding similarity value, where the calculation formula of the similarity value is: In the formula, , Respectively represent the embedding vectors corresponding to each cleaned text; According to each similarity value, the mean square error is obtained, and the SBERT network model is back-propagated according to the mean square error until the preset condition is reached to stop training and obtain the initial calibration model, where the mean square error function is: In the formula, is the true similarity score, The sentence similarity score computed for the model.
[0010] In a possible implementation of the first aspect, adjusting the initial calibration model using the test set to obtain a target calibration model includes: Input the test data into the initial calibration model for calibration to obtain the initial calibration results; According to the initial verification result, the initial verification result is calculated using the preset evaluation formula to obtain the evaluation value, where the preset evaluation formula is: In the formula, P is the probability that the sample with the initial positive verification result is actually positive, and R represents the probability that the sample that is actually positive is predicted to be positive; If the evaluation value is greater than the preset evaluation value, the initial verification result is determined to be the trained verification model. If the evaluation value is less than the preset evaluation value, the SBERT network model is continued to be trained according to the training set until the target verification model is obtained.
[0011] In a possible implementation manner of the first aspect, the SBERT network model is obtained by combining the twin network with the BERT model.
[0012] In order to solve the same technical problem, a second aspect of an embodiment of the present invention provides an automatic verification system for a virtual circuit of a smart substation, comprising: An acquisition module, used for acquiring text descriptions of multiple virtual terminals in a virtual circuit of a smart substation; The encoding module is used to clean each text description to obtain the corresponding cleaned text, input each cleaned text into the target verification model, so that the target verification model encodes each cleaned text to obtain the embedding vector of each character, and obtain the corresponding sentence vector based on the embedding vector of each character, wherein the verification model is obtained by training the SBERT network model; The similarity calculation module is used to determine multiple sentence pairs based on the sentence vector, calculate the similarity between each sentence pair, obtain the text similarity value, and determine whether the text similarity is greater than a preset threshold. If so, determine that each virtual terminal is matched.
[0013] 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: The sample data acquisition unit is used to acquire a text data set of multiple virtual terminals in a virtual circuit of a smart substation, and divide the data set into a training set and a test set according to a preset ratio; The training unit is used to clean each training set to obtain a corresponding cleaned training set, and input each cleaned training set into the SBERT network model for training to obtain an initial calibration model; The adjustment unit is used to adjust the initial calibration model using the test sample data to obtain the target calibration model.
[0014] A third aspect of an embodiment of the present invention provides a computer device, including: Memory for storing computer programs; The processor is used to implement the steps of the automatic verification method of the virtual circuit of the intelligent substation as described in the first aspect when executing the computer program.
[0015] A fourth aspect of an embodiment of the present invention provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for automatic verification of virtual circuits in a smart substation according to the first aspect are implemented.
[0016] The technical solution of the present invention has the following advantages: The embodiment of the present invention provides an automatic verification method for a virtual circuit of a smart substation, obtains text descriptions of multiple virtual terminals in a virtual circuit of a smart substation, and then cleans each text description to obtain a corresponding cleaned text, and encodes each cleaned text by using a target verification model obtained by training based on an SBERT network model to obtain an embedding vector of each character, and obtains a corresponding sentence vector based on the embedding vector of each character, and determines multiple sentence pairs according to the sentence vectors, calculates the similarity between each sentence pair, obtains a text similarity value, and determines whether the text similarity is greater than a preset threshold value. If so, it is determined that each virtual terminal matches, and the above method significantly improves the accuracy of automatic verification of virtual terminals. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a calibration flow chart of the automatic calibration method of the virtual circuit of the intelligent substation in the embodiment of the present invention; Figure 2 It is a flowchart of automatic verification of virtual terminals based on the SBERT network model in the automatic verification method of virtual circuits of smart substations in an embodiment of the present invention; Figure 3 This is a basic architecture diagram of the BERT model pre-training stage of the method for automatic verification of virtual circuits in smart substations in an embodiment of the present invention; Figure 4 It is a specific task flow chart based on the BERT model of the automatic verification method of the virtual circuit of the intelligent substation in the embodiment of the present invention; Figure 5 A schematic diagram of a twin network structure of a method for automatic verification of a virtual circuit of a smart substation in an embodiment of the present invention; Figure 6 It is a SBERT structure classification task flow chart of the automatic verification method of the virtual circuit of the intelligent substation in the embodiment of the present invention; Figure 7It is a task flow chart of SBERT structure text task similarity of the method for automatic verification of virtual circuits of smart substations in an embodiment of the present invention; Figure 8 It is a system block diagram of the automatic verification system of the virtual circuit of the intelligent substation in the embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0020] The embodiment of the present invention provides a method for automatically checking a virtual circuit in a smart substation. Figure 1 As shown, Figure 1 The flowchart of the method for automatic verification of virtual circuits in smart substations includes steps S101 to S103. The specific steps are as follows: S101. Obtain text descriptions of multiple virtual terminals in a virtual circuit of a smart substation.
[0021] In this embodiment, text descriptions of multiple virtual terminals in a virtual circuit of a smart substation are obtained.
[0022] S102. Clean each text description to obtain a corresponding cleaned text, input each cleaned text into a target verification model so that the target verification model encodes 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 verification model is obtained by training an SBERT network model.
[0023] In this embodiment, the text similarity at both ends of the virtual terminal is calculated based on the generated training model. After obtaining the text similarity, it is automatically determined whether the virtual terminal matches according to the set correctness threshold, and finally the automatic verification of the virtual terminal is realized. Specifically, each text description is cleaned to obtain the corresponding cleaned text, and each cleaned text is input into the target verification model. The target verification model encodes each cleaned text to obtain the embedding vector of each character, and the corresponding sentence vector is obtained based on the embedding vector of each character.
[0024] It should be noted that the generated training model refers to the target verification model, which is obtained by training the SBERT network model.
[0025] In one embodiment, the SBERT network model is obtained by combining the twin network with the BERT model.
[0026] In this embodiment, BERT is a deep learning model based on Transformer. Compared with traditional NLP algorithms such as convolutional neural network (CNN) and recurrent neural network (RNN), it uses two-way training and pre-training-fine-tuning methods to improve language understanding, and has greatly improved multiple NLP performance. The overall framework of BERT includes two stages: pre-training and fine-tuning. The basic architecture of the pre-training stage is as follows: Figure 3 shown.
[0027] In the pre-training stage, BERT has two self-supervised tasks, one of which is the masked language model (MLM). In order to make full use of the semantic relationship between contexts, the BERT model uses the MLM mode to train data. By replacing part of the words in the input corpus with [MASK] and then predicting the word through the context, the BERT model can better understand the context semantics. In order to effectively avoid the problem of overfitting. During the pre-training process of BERT, 15% of the words will be replaced by [MASK] to improve the performance of the BERT model in predicting the next word. Another task of BERT is the next sentence prediction (Next Sentence Pridiction, NSP), which determines whether two sentences are in a context relationship. The information of the sentence will be saved in the word vector output [CLS].
[0028] At the same time, the BERT model performs next sentence prediction (NSP) training. Given two sentences, it predicts whether the two sentences have a contextual relationship, which is very helpful for achieving sentence pair matching tasks. In general, the pre-stage model is trained based on big data in the general text field to form a basic BERT model. In the fine-tuning stage, the pre-trained model is adjusted on a dataset for a specific task, and the weights of the BERT model are updated through the back-propagation algorithm. The overall training process is as follows: Figure 4 shown.
[0029] As a special neural network architecture, the siamese network is widely used in measurement tasks. It measures the similarity of data pairs by learning a set of samples with similar input structures and forming a spatial distance between data pairs. Figure 5 shown.
[0030] The key to the twin network structure is that the two sub-networks share the same weights and parameters to ensure the symmetry of the training of the two networks. Therefore, it is not sensitive to the input order of the data and can reduce the number of training parameters. It generally consists of four parts: input pairs, feature extractors with shared parameters, similarity metrics, and loss functions. The feature extractors with shared parameters are generally a set of deep neural networks that process a set of input pairs to generate feature vectors of fixed length. The similarity metric can use cosine similarity, Euclidean distance, Manhattan distance, etc. to obtain the similarity of two feature vectors. There are two types of loss functions: contrast loss and triples, which optimize the spatial embedding of similar and dissimilar samples.
[0031] Taking into account that the virtual terminals at both ends of the virtual loop are texts with similar semantics, especially the special case that there are some Chinese texts with different semantics in the virtual terminal sentence pairs but refer to the same object in the virtual terminals, the twin network is used to train the input virtual terminal text pairs to achieve the correct identification of virtual terminal texts with large differences in Chinese semantics.
[0032] In order to compare sentence vectors of texts of different lengths, the SBERT model formed by combining the twin network and the BERT model is used to measure text similarity. The low-dimensional embedding vector of the sentence is obtained through the twin network structure, and then the similarity between the two sentences is calculated through cosine similarity or Euclidean distance.
[0033] The biggest advantage of the SBERT model is that each sentence is encoded into a fixed vector in advance. When calculating the similarity, it is only necessary to simply calculate the cosine similarity of the vectors of the two texts. This avoids the complex process of calculating the context representation when comparing sentence vectors in the BERT model. Therefore, it has better performance in measuring text similarity and clustering problems compared to the BERT model. There are two forms of its basic structure. Figure 6 and Figure 7 shown. Figure 6 This is a diagram of the text classification task structure based on the SBERT model, and its classification function is: in, , Respectively represent the embedding vectors corresponding to the input text, | represents text embedding differences, is the training weight.
[0034] Figure 7 It is an SBERT model based on the regression objective function, which can be used to calculate text similarity. Manhattan distance is used to calculate text similarity. The calculation formula is: in, , They respectively represent the embedding vectors corresponding to the input text.
[0035] The calculation result is between [0,1]. The larger the text similarity value, the higher the similarity between the two virtual terminal texts. The structure combining the twin network and BERT is adopted to form the SBERT network model. The present invention adopts the SBERT model to train the virtual terminal text, and finally realizes the automatic verification of the virtual circuit.
[0036] In one embodiment, the target verification model is obtained by training the SBERT network model, including: Obtain a text data set of multiple virtual terminals in a virtual circuit of a smart substation, and divide the data set into a training set and a test set according to a preset ratio; Each training set is cleaned to obtain a corresponding cleaned training set, and each cleaned training set is input into the SBERT network model for training to obtain an initial calibration model; The initial calibration model is adjusted using the test sample data to obtain the target calibration model.
[0037] In this embodiment, the virtual terminal texts derived from 20 220kV smart substations are used as a data set, which is divided into a training set and a test set at a ratio of 6:4. The text descriptions in the training set are cleaned to obtain a cleaned training set, and each cleaned training set is input into the SBERT network model for training to obtain an initial calibration model. Then, the initial calibration model is adjusted using the test set to obtain a target calibration model.
[0038] Specifically, Figure 2 As shown in the figure, first import the virtual terminal text from the SCD file of the substation. The SCD file of a 220kV substation contains the following root nodes (SCL Root), device definition (device definition- ions), communication configuration, datasets, logical nodes, functional blocks, intelligent electronic device configuration (int- elligent electronic devices, IED), such as relay protection devices, measurement and control devices, etc. SCD files usually have <ied>Tags are used to define the detailed configuration of each IED, including communication addresses, functional modules, data sets, etc. The required virtual circuits are saved in the IED data set, which describes in detail the virtual circuit connections between the devices in the substation. The required virtual terminal text is exported from this module as a text file for subsequent processing.
[0039] In order to obtain the available virtual terminal comparison text materials, the complete SCD files of 20 built 220kV substations were extracted, and the virtual circuit connection texts of all devices were derived from them. The virtual circuit texts derived from a set of 220KV line protection are shown in Table 1.
[0040] Table 1 Example of virtual terminal export text An exported virtual circuit template contains six parts, among which External IED Name indicates the IED name corresponding to the virtual terminal of the device connected externally. Since the virtual circuit is exported from the line protection, the opposite side corresponds to the intelligent terminal of the interval; External Data Reference indicates 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 one with the Internal keyword indicates the IED name, virtual terminal reference address and virtual terminal description inside the device. This article only needs to use two key fields: External Data Description and Internal Data Description, which are the text descriptions of the two ends of the virtual circuit.
[0041] After obtaining the virtual circuit text, firstly, the text is cleaned and the text at both ends of the virtual terminal is annotated for similarity. Then the cleaned text is used as the input of the SBERT model, and the model is fine-tuned to obtain the SBERT model based on the virtual terminal text, that is, the initial verification model. After obtaining the fine-tuned model, After measurement, the target verification model is obtained.
[0042] In practical applications, the text descriptions of multiple virtual terminals are processed based on the target verification model, the cosine similarity of the texts of two virtual terminals is calculated, and the text similarity of the virtual terminals is quantified. Specifically, the text description is first input into the BERT model, and the spatial embedding of each character can be obtained through the encoding layer of the BERT model, and then the sentence vector is obtained.
[0043] In one embodiment, each training set is cleaned to obtain a corresponding cleaned training set, including: Invalid information in the text in the training set is removed, and the text information represented by English letters is expanded to the real meaning to obtain the corresponding cleaned training set.
[0044] In this embodiment, the description text of the virtual terminal is generally a semi-structured text, and the description of some virtual terminals will contain a part that is irrelevant to the semantics of the sentence; at the same time, some virtual terminal descriptions are too brief, and some even do not contain Chinese structure. These virtual terminal texts will produce overfitting noise on the training results during subsequent sentence embedding training. Therefore, data cleaning work needs to be performed on the virtual terminals in the early stage of training.
[0045] Take the virtual terminal text in Table 2 as an example. For example, "Switch 1 Circuit Breaker Position A Phase_GOOSE", the "_GOOSE" after the text has no reference value for analyzing the semantics of the sentence. GOOSE is the abbreviation of Generic object oriented Substation event GOOSE, which refers to the virtual terminal transmitting information through GOOSE messages. It has nothing to do with semantics and can be directly removed. The cleaned text is "Switch 1 Circuit Breaker Position A Phase". Similarly, some sentences containing "_SV" and "_MMS" can be processed by the same operation.
[0046] 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 the protection current between devices. Such sentences should be expanded to their true meaning, such as "Ia1" is expanded to "protection current Ia1".
[0047] Table 2 Example of cleaning virtual terminal text In addition, some phrases contain some connecting symbols, such as "_", "(", "")", etc., which should be removed from the original sentence. Some manufacturers use Roman numerals "I", "II" and other symbols, which should be unified into Arabic numerals.
[0048] In one embodiment, each cleaned training set is input into the SBERT network model for training to obtain an initial calibration model, including: Encode each cleaned training set to obtain a spatial embedding vector of each sample character, and obtain a sentence vector corresponding to each cleaned training set based on the spatial embedding vector of each sample character; Based on the sentence vectors corresponding to each cleaned training set, multiple sample sentence pairs are determined, and the similarity between each sample sentence pair is calculated to obtain the corresponding similarity value, where the calculation formula of the similarity value is: In the formula, , Respectively represent the embedding vectors corresponding to each cleaned text; According to each similarity value, the mean square error is obtained, and the SBERT network model is back-propagated according to the mean square error until the preset condition is reached to stop training and obtain the initial calibration model, where the mean square error function is: In the formula, is the true similarity score, The sentence similarity score computed for the model.
[0049] 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. The spatial embedding vector of each character can be obtained through the encoding layer of the BERT model. Then the sentence vector v is calculated by the average pooling method, and the calculation method is: In the formula, represents the sentence vector, Representing characters The spatial embedding vector of Indicates the number of characters.
[0050] In addition, since this paper adopts the twin network structure, after inputting each sentence pair into the BERT model, the vectors of the sentence pairs will be obtained respectively. and , Manhattan distance is used to represent the similarity between two sentences. The calculation formula of the similarity value is: In the formula, , Respectively represent the sentence vectors corresponding to each cleaned text.
[0051] The calculation result is between [0,1]. The larger the text similarity value, the higher the similarity between the two virtual terminal texts. At this time, the loss function of the twin network can be defined as the mean square error between the set sentence pair similarity and the sentence pair similarity calculated by the model: In the formula, is the true similarity score, The sentence similarity score computed for the model.
[0052] Then the parameters of the entire model are updated through the back-propagation algorithm, and based on this training, the twin network model is obtained to calculate the embedding vector of the input description text.
[0053] First, the Chinese sentence is input into the BERT model. The spatial embedding of each character can be obtained through the encoding layer of the BERT model. After obtaining the spatial embedding vector hi of each character, the sentence vector v is calculated by the average pooling method. The calculation method is: In one embodiment, the initial calibration model is adjusted using the test set to obtain a target calibration model, including: Input the test data into the initial calibration model for calibration to obtain the initial calibration results; According to the initial verification result, the initial verification result is calculated using the preset evaluation formula to obtain the evaluation value, where the preset evaluation formula is: In the formula, P is the probability that the sample with the initial positive verification result is actually positive, and R represents the probability that the sample that is actually positive is predicted to be positive; If the evaluation value is greater than the preset evaluation value, the initial verification result is determined to be the trained verification model. If the evaluation value is less than the preset evaluation value, the SBERT network model is continued to be trained according to the training set until the target verification model is obtained.
[0054] In this embodiment, in order to verify the effectiveness of the model proposed in this paper, an algorithm program is established through the Pytorch platform based on the Python language. The virtual terminal texts derived from 20 220kV smart substations are used as a data set, which is divided into a training set and a test set at a ratio of 6:4. The main parameters for fine-tuning the SBERT model using virtual terminal text data are shown in Table 3.
[0055] Table 3 SBERT fine-tuning parameters Based on the SBERT model proposed in this paper, the text comparison results of virtual terminals are obtained, and the similarity of the text is represented by [0,1]. 1 is the maximum similarity value and 0 is the minimum similarity value. Tables 4 and 5 respectively give the similarity values of some GOOSE and SV virtual terminals.
[0056] Table 4 Verification results of some GOOSE virtual terminal texts Table 5 Verification results of some SV virtual terminal texts As can be seen from Table 4, the algorithm proposed in the present invention has accurate verification results for texts with similar Chinese semantics. By fine-tuning the SEBERT model, the algorithm can also accurately verify texts with relatively low Chinese semantic similarity, such as "permanent jump_direct jump (network port 3)" and "jump branch 6". As can be seen from Table 5, due to the data cleaning in this paper, the algorithm can also obtain good verification results for pure English virtual terminals. If the virtual terminal text is not cleaned, such as "protection phase C voltage U c1 ” and "U c ” The original matching degree can only reach 0.45, which proves that the pre-strategy of data cleaning proposed in this paper has significant effects.
[0057] To verify the effectiveness of the method proposed in this paper in virtual terminal verification work, other text similarity measurement algorithms are used in this paper for comparison with the method proposed in this paper. Table 6 lists the verification effects of four different algorithms. They are the fuzzy verification method based on the modified Levenshtein distance, the virtual circuit automatic verification method based on the improved Bi-LSTM algorithm, the text similarity measurement directly implemented 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 that the actual positive samples among the samples predicted as positive by us, and the recall R represents the probability that the samples actually positive are predicted as positive by the algorithm. The F1 score representing the overall ability of the model is calculated as follows: Table 6 Performance analysis of different models As can be seen from Table 6, the fuzzy algorithm based on the Levenshtein distance has poor effects because its implementation method is relatively simple and it does not consider the text semantics and its context connection, with F1 = 0.46. The use of the Bi-LSTM algorithm has a great improvement compared with the traditional method, but it is sensitive to parameters. Using different parameters may have a greater impact on the verification results. The F1 of this example in this paper is 0.74. Especially for some pure English virtual terminal texts and virtual terminal texts containing a large amount of semantics-irrelevant texts, the semantic similarity measurement is less than satisfactory. The performance of the algorithm based on the BERT model is similar to that of the algorithm based on the Bi-LSTM algorithm, but there are also large errors for some special texts.
[0058] The algorithm with the best performance among the four models is the automatic verification algorithm based on the SBERT pre-training model proposed in this paper. On the one hand, because the model adopts a twin network structure, it has greatly improved the verification correctness of some Chinese semantics that do not match but refer to the same object in the virtual terminal text, and also has a good match for the verification of some English phrases. On the other hand, SBERT is based on the BERT model, which can better capture the text features at the vocabulary and character levels, and effectively avoid overfitting. Therefore, the method proposed in this paper has better performance in automatic verification of virtual terminals than the other three methods.
[0059] S103, according to the sentence vector, determine multiple sentence pairs, calculate the similarity between each sentence pair, obtain the text similarity value, and judge whether the text similarity is greater than a preset threshold value. If so, determine that each virtual terminal is matched.
[0060] In this embodiment, since this paper adopts a twin network structure, after inputting each sentence pair into the BERT model, sentence pairs will be obtained respectively, and then the Manhattan distance is used to represent the similarity between the two sentences. After obtaining the quantified text similarity, a correct threshold δ is specified, that is, the preset threshold. Virtual terminals with text similarity less than this value are questionable virtual terminal matches, while those greater than the threshold are correct virtual terminal matches, ultimately achieving automatic verification of virtual terminals based on SBERT.
[0061] It should be noted that the correct threshold δ, that is, the preset threshold, is set to 0.8.
[0062] The embodiment of the present invention provides a system for automatically checking virtual circuits in a smart substation, such as Figure 8 As shown, Figure 8 This is the system block diagram of the automatic verification system for the virtual circuit of the smart substation, including: An acquisition module 801 is used to acquire text descriptions of multiple virtual terminals in a virtual circuit of a smart substation; The encoding module 802 is used to clean each text description to obtain a corresponding cleaned text, input each cleaned text into a target verification model, so that the target verification model encodes 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 verification model is obtained by training an SBERT network model; The similarity calculation module 803 is used to determine multiple sentence pairs based on the sentence vectors, calculate the similarity between each sentence pair, obtain the text similarity value, and determine whether the text similarity is greater than a preset threshold. If so, determine that each virtual terminal is matched.
[0063] In one embodiment, the encoding module includes a sample data acquisition unit, a training unit and an adjustment unit, wherein: The sample data acquisition unit is used to acquire a text data set of multiple virtual terminals in a virtual circuit of a smart substation, and divide the data set into a training set and a test set according to a preset ratio; The training unit is used to clean the text in the training set to obtain a cleaned training set, and each cleaned training set is input into the SBERT network model for training to obtain an initial verification model; The adjustment unit is used to adjust the initial calibration model using the test set to obtain the target calibration model.
[0064] The specific implementation of the system for automatic verification of virtual circuits in smart substations is substantially the same as the specific implementation of the method for automatic verification of virtual circuits in smart substations described above, and will not be described in detail herein.
[0065] In one embodiment of the present application, a computer device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and the above steps are implemented when the processor executes the computer program; the computer device provided in this embodiment has an implementation principle and technical effects similar to those of the above method embodiments, and will not be repeated here.
[0066] In one embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and the above steps are implemented when the computer program is executed by a processor; the computer-readable storage medium provided in this embodiment has an implementation principle and technical effects similar to those of the above method embodiment, and will not be repeated here.
[0067] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0068] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.< / ied>
Claims
1. A method for automatic verification of virtual circuits in smart substations, characterized in that: include: Get the text description of multiple virtual terminals in the virtual circuit of the smart substation; Cleaning each of the text descriptions to obtain a corresponding cleaned text, inputting each of the cleaned texts into a target verification model so that the target verification model encodes each of the cleaned texts to obtain an embedding vector of each character, and obtaining a corresponding sentence vector based on the embedding vector of each character, wherein the verification model is obtained by training an SBERT network model; According to the sentence vector, multiple sentence pairs are determined, the similarity between each of the sentence pairs is calculated to obtain a text similarity value, and it is determined whether the text similarity is greater than a preset threshold. If so, it is determined that each of the virtual terminals matches.
2. The method for automatic verification of virtual circuits in smart substations according to claim 1, characterized in that: The target verification model is obtained by training the SBERT network model, including: Obtain a text data set of multiple virtual terminals in a virtual circuit of a smart substation, and divide the data set into a training set and a test set according to a preset ratio; Cleaning the text in the training set to obtain a cleaned training set, inputting each of the cleaned training sets into an SBERT network model for training to obtain an initial calibration model; The initial calibration model is adjusted using the test set to obtain a target calibration model.
3. The method for automatic verification of virtual circuits in smart substations according to claim 2, characterized in that: The step of cleaning the text in the training set to obtain a cleaned training set includes: Invalid information in the text in the training set is removed, and the text information represented by English letters is expanded to the real meaning to obtain the corresponding cleaned training set.
4. The method for automatic verification of virtual circuits in smart substations according to claim 2, characterized in that: The step of inputting each of the cleaned training sets into the SBERT network model for training to obtain an initial calibration model comprises: Encoding each of the cleaned training sets to obtain a spatial embedding vector of each sample character, and obtaining a sentence vector corresponding to each of the cleaned training sets based on the spatial embedding vector of each of the sample characters; Based on the sentence vectors corresponding to each of the cleaned training sets, multiple sample sentence pairs are determined, and the similarities between each of the sample sentence pairs are calculated to obtain corresponding similarity values, wherein the calculation formula of the similarity value is: In the formula, , Respectively represent the embedding vectors corresponding to each of the cleaned texts; According to each of the similarity values, a mean square error is obtained, and the SBERT network model is back-propagated according to the mean square error until the training is stopped when the preset condition is reached, and an initial calibration model is obtained, wherein the mean square error function is: In the formula, is the true similarity score, The sentence similarity score computed for the model.
5. The method for automatic verification of virtual circuits in smart substations according to claim 2, characterized in that: The step of adjusting the initial calibration model using the test set to obtain a target calibration model includes: Inputting the test data into the initial calibration model for calibration to obtain an initial calibration result; According to the initial verification result, the initial verification result is 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 the sample with the initial positive verification result is actually positive, and R represents the probability that the sample that is actually positive is predicted to be positive; If the evaluation value is greater than the preset evaluation value, the initial verification result is determined to be a trained verification model. If the evaluation value is less than the preset evaluation value, the SBERT network model is continued to be trained according to the training set until the target verification model is obtained.
6. The method for automatic verification of virtual circuits in smart substations according to claim 1, characterized in that: The SBERT network model is obtained by combining the twin network with the BERT model.
7. An automatic verification system for virtual circuits in smart substations, characterized in that: include: An acquisition module, used to acquire text descriptions of multiple virtual terminals in a virtual circuit of a smart substation; An encoding module, used for cleaning each of the text descriptions to obtain a corresponding cleaned text, inputting each of the cleaned texts into a target verification model so that the target verification model encodes each of the cleaned texts to obtain an embedding vector of each character, and obtaining a corresponding sentence vector based on the embedding vector of each character, wherein the verification model is obtained by training an SBERT network model; The similarity calculation module is used to determine multiple sentence pairs according to the sentence vector, calculate the similarity between each of the sentence pairs, obtain a text similarity value, and determine whether the text similarity is greater than a preset threshold. If so, determine that each of the virtual terminals matches.
8. The automatic verification system for virtual circuits of smart substations according to claim 7, characterized in that: The encoding module includes a sample data acquisition unit, a training unit and an adjustment unit, wherein: The sample data acquisition unit is used to acquire a text data set of multiple virtual terminals in a virtual circuit of a smart substation, and divide the data set into a training set and a test set according to a preset ratio; The training unit is used to clean the text in the training set to obtain a cleaned training set, and input each of the cleaned training sets into the SBERT network model for training to obtain an initial verification model; The adjustment unit is used to adjust the initial calibration model using the test set to obtain a target calibration model.
9. A computer device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method for automatic verification of virtual circuits in a smart substation as claimed in any one of claims 1 to 6 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the method for automatic verification of virtual circuits of smart substations according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Virtual loop verification method and device, equipment and medium
CN117076187A
Emotion recognition intelligent contract construction method based on cross fusion and confidence evaluation
CN118799948A