A method for generating standardized test reports for SCD files based on correctness checking

Through the joint training method of Transformer and LSTM networks, standardized inspection reports of SCD files are automatically generated, solving the problem of time-consuming and laborious review of SCD files in smart substations, achieving efficient and accurate detection and report generation, and improving the operation and maintenance security of smart substations.

CN119477188BActive Publication Date: 2025-08-29YIBIN POWER SUPPLY COMPANY STATE GRID SICHUAN ELECTRIC POWER
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411385149.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-08-29
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The existing SCD file review methods for smart substations are time-consuming and labor-intensive, and the accuracy and comprehensiveness cannot be guaranteed. In particular, the inspection of secondary loop wiring and terminal wiring information relies on manual labor, which is time-consuming and accurate, which affects operation and maintenance and safe operation.

Method used

Using the end-to-end joint training method based on the Transformer model and LSTM network, the standardized detection report of SCD files is automatically generated through CTC loss function optimization, so as to realize the text feature extraction and prediction of text elements of SCD files, and generate accurate detection report.

Benefits of technology

It realizes automatic inspection of SCD files of smart substations, improves detection efficiency and accuracy, reduces manual intervention, ensures the comprehensiveness and accuracy of detection, and reduces virtual loop detection time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477188B_ABST
    Figure CN119477188B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating a standardized SCD file test report based on correctness checking. Based on the concept of a CRNN model, the CNN and RNN parts in the CRNN model are improved into a Transformer model and an LSTM network model, respectively, ultimately generating a standardized SCD file test report. The present invention can save a large amount of manual and tedious work, maximize the templateization of repetitive work, automate variable work, improve work efficiency, and realize fully automatic inspection of secondary equipment configuration and virtual circuit connection, as well as automatic generation of SCD file standardized test reports. This effectively improves the SCD file review and inspection efficiency of smart substations, increases the comprehensiveness and accuracy of the review, and reduces the time required for virtual circuit inspection of secondary equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent substation fault detection, and in particular relates to the design of a method for generating a standardized detection report of an SCD file based on correctness checking. Background Art

[0002] Existing fault detection technologies rely heavily on the decisions of technicians and experts. However, expert analysis is easily affected by fatigue, stress, knowledge level, psychological conditioning, and skill level, resulting in analytical results that deviate significantly from the actual situation, leading to misjudgments. Currently, fault detection technologies are primarily categorized into three categories: signal processing-based, analytical model-based, and artificial intelligence-based. The most systematic and earliest fault detection methods are those based on analytical models. They can deeply understand the dynamic characteristics of a system and perform real-time diagnosis without relying on historical data or known fault data. However, they struggle to obtain a system model, and robustness issues gradually emerge due to modeling interference, errors, and noise. Establishing an accurate mathematical model is becoming increasingly difficult. Since signal processing-based fault detection methods do not require a precise mathematical model, they avoid the difficulties of analytical model-based fault diagnosis methods. This method, which relies on measured signal data and determines faults based on signal eigenvalues, is largely model-independent and applicable to both nonlinear and linear systems. However, it only analyzes the data from the device under test and fails to analyze the coupling and correlation between high-dimensional signals in the system, making no further use of the underlying measurement information. Continuous technological progress has effectively improved the acquisition, processing, analysis, transmission, storage and application of system and equipment data. Deep learning can quickly process large amounts of data, analyze the advantages of useful information, detect difficult-to-detect faults, and effectively improve the accuracy of fault detection. Therefore, deep learning is increasingly used for fault detection in various fields.

[0003] Machine learning is divided into three categories: supervised learning, semi-supervised learning, and unsupervised learning. Deep learning, as a technology for implementing machine learning, has enabled machine learning to achieve more applications. Fault detection methods based on deep learning have the following advantages over traditional fault detection methods: (1) Deep learning has strong self-learning capabilities, which can avoid relying on expert diagnostic experience; (2) Deep learning's own classifier can extract feature parameters and perform identification, reducing the influence of human selection. Machine learning applications are very extensive, and its applications in the field of fault detection mainly include neural networks, decision trees, support vector machines, etc. Among them, neural networks have nonlinear mapping capabilities, self-learning capabilities, parallel computing capabilities, the ability to approximate arbitrary functions, and fault tolerance capabilities. They can perform fault detection based on the massive data collected during the operation of equipment or systems.

[0004] At present, the main types of neural networks are: (1) Convolutional neural networks (CNN) and deep convolutional neural networks (DCNN), which can directly input raw data without tedious pre-processing of complex signals such as language and images, and can learn and mine features at different levels; (2) Recurrent neural networks, which can process list and sequence data, mine temporal information in time series data, and use previously input information to enhance the judgment of current information, and have strong semantic mining and expression capabilities; (3) Deep belief networks (DBN), which are constructed by superimposing multiple restricted Boltzmann machines (RBMs). Compared with traditional fault detection methods, they do not require much diagnostic experience and signal technology, and have relatively strong versatility, adaptability, and the ability to process nonlinear and high-dimensional data. In order to further improve the accuracy of the model, it is possible to consider combining the neural network algorithm with other algorithms, such as combining the artificial neural network with the gray model to form a gray neural network.

[0005] Currently, deep learning has limitations in fault detection. Equipment fault detection often requires knowledge of the fault type before classification using a neural network. With technological advancements, the objects being diagnosed are becoming increasingly complex, making it increasingly difficult to obtain effective and accurate fault types, and new fault types are unpredictable. Unsupervised clustering algorithms, however, offer excellent scalability, and the combination of clustering algorithms and deep learning has attracted widespread attention. Fuzzy C-means clustering and convolutional neural networks have been combined to predict photovoltaic output at the minute level, successfully improving both prediction accuracy and robustness. Using K-means clustering and then constructing BPNN models based on each category for hourly forecasting of subway station air conditioning loads, the prediction accuracy is superior to using optimization algorithms to continuously optimize and update the BPNN model structure. The proximity propagation (AP) clustering algorithm is used to classify sample data, and a long-short-term memory (LSTM) network model is then constructed to predict grid-connected power for solar thermal power plants. Using K-means cluster centers as neurons in the pattern layer to train a probabilistic neural network significantly reduces model complexity and fault detection time.

[0006] For fault detection in smart grids, a feature extractor is constructed using a convolutional neural network to extract high-level features from time series data. Semi-supervised clustering is then performed on the extracted features to obtain sample labels. After sampling the fault samples using a sampling algorithm, a classifier constructed using a recurrent neural network is used for classification and identification. Clustering time series data paves the way for further research on time series data. A long short-term memory (LSTM) network is proposed to learn the inherent connections in time series data. The k-means clustering algorithm, with different distance measures, is then used to cluster the LSTM learning results.

[0007] In order to enhance the scalability of the fault detection model, ensure high diagnostic accuracy for existing fault types, and realize the identification and diagnosis of new faults, a clustering algorithm is introduced. The fault data diagnosed by the neural network model are clustered again with similar fault data, and finally the centroid distance is used to determine whether it is a new fault.

[0008] During the review process of smart substation SCD (Substation Configuration Description) files, there is currently no comprehensive and reliable technical means to intelligently check the correctness of the secondary virtual circuit in the SCD file. The most important information that on-site electrical personnel focus on, such as secondary circuit wiring and terminal connection information, is not checked and can only be implemented manually. The disadvantages are that it is time-consuming and difficult to ensure the accuracy. Manual review and inspection of each item is time-consuming and labor-intensive, and the accuracy and comprehensiveness cannot be guaranteed. This brings many inconveniences to the operation and maintenance, expansion and other work of smart substations, and poses a hidden danger to safe operation. Summary of the Invention

[0009] The purpose of the present invention is to solve the problem that the existing SCD file review method for smart substations is time-consuming and labor-intensive and cannot guarantee accuracy and comprehensiveness. A method for generating a standardized test report for SCD files based on correctness checking is proposed.

[0010] The technical solution of the present invention is: a method for generating a standardized test report of an SCD file based on correctness checking, comprising the following steps:

[0011] S1. Input the SCD file into the Transformer model to extract text features, and output the text features of the SCD file.

[0012] S2. Input the text features of the SCD file into the LSTM network model and output the prediction vector of the text elements of the SCD file.

[0013] S3. Construct a CTC loss function based on the prediction vector of the text element in the SCD file. Perform end-to-end joint training on the Transformer model and the LSTM network model based on the CTC loss function. Obtain the probability distribution vector of the text element in the SCD file with the goal of minimizing the CTC loss function.

[0014] S4. Select the token with the highest predicted probability in the probability distribution vector and convert it into a string to obtain the SCD file standardization detection report.

[0015] Furthermore, step S1 includes the following sub-steps:

[0016] S11. Get the representation vector of each word in the SCD file.

[0017] S12. Input the word representation vector into the encoder of the Transformer model to obtain the word encoding information matrix.

[0018] S13. Input the word encoding information matrix into the decoder of the Transformer model and decode to obtain the text features of the SCD file.

[0019] Furthermore, in step S11, the representation vector of the word is obtained by adding the embedding of the word and the embedding of the word position.

[0020] Furthermore, the embedding of word positions is represented by positional encoding, and the calculation formula is:

[0021] PE (pos,2i) =sin(pos / 10000 2i / d )

[0022] PE (pos,2i+1) =cos(pos / 10000 2i / d )

[0023] Where PE represents position encoding, pos represents the position of the word in the sentence, d represents the dimension of the position encoding, 2i represents even dimension, 2i+1 represents odd dimension, and 2i+1≤d.

[0024] Furthermore, the encoder in step S12 includes 6 encoder blocks connected in sequence, each encoder block has the same structure, and includes a self-attention layer and a feedforward neural network.

[0025] Furthermore, in step S13, the decoder includes a masked self-attention layer, an encoder-decoder attention layer, and a feedforward neural network connected in sequence.

[0026] Furthermore, in step S13, the decoder decodes the i+1th word in sequence according to the currently decoded 1st to ith words, and when decoding the i+1th word, it covers the words after the i+1th word through a masking operation.

[0027] Furthermore, step S2 includes the following sub-steps:

[0028] S21. Input the text features of the SCD file into the LSTM network model, determine the information that needs to be discarded through the forget gate, and determine the information that needs to be retained through the input gate:

[0029] f t =σ(W fi x t +W fh h t-1 +b f )

[0030] i t =σ(W xi x t +W xh h t-1 +b i )

[0031] where f t represents the output of the forget gate at the current time step, σ represents the sigmoid activation function, W fi and W fh are all weight matrices of the forget gate, x t represents the input of the current time step, h t-1 represents the hidden state of the previous time step, b f is the bias term of the forget gate, i t represents the output of the input gate at the current time step, W xi and W xh are the weight matrices of the input gate, b i is the bias term of the input gate.

[0032] S22. Input the information retained by the input gate to the output gate, determine the hidden state of the current time step and obtain the prediction vector of the text element of the SCD file:

[0033] C t =tanh(W xc x t +W hc h t-1 +b c )

[0034] o t =σ(W xo x t +W xh h t-1 +b o )

[0035] h t =o t *tanh(C t )

[0036] Among them C t Represents the memory cell state at the current time step, W xc and W hc are all weight matrices of memory units, b c is the bias term of the memory unit, o t Represents the prediction vector of the SCD file text element output by the output gate at the current time step, W xo and W xh are the weight matrices of the output gate, b o is the bias term of the output gate, ht Represents the hidden state at the current time step.

[0037] Furthermore, step S3 includes the following sub-steps:

[0038] S31. Transcribe the prediction vector of the text element of the SCD file into a label sequence.

[0039] S32. Construct the CTC loss function based on the prediction vector of the text element of the SCD file and the corresponding label sequence:

[0040] L(y)=-log(p(l|x))

[0041] Where L(y) represents the CTC loss function, x represents the prediction vector of the text element of the SCD file, l represents the label sequence, and p(l|x) represents the probability of observing the label sequence l given the prediction vector x.

[0042] S33. The prediction vector corresponding to the minimum CTC loss function value is used as the probability distribution vector of the text element of the SCD file.

[0043] The beneficial effects of the present invention are as follows: based on the idea of ​​the CRNN model, the present invention uses artificial intelligence to carry out SCD detection, which can save a lot of redundant manual work, template repetitive work to the maximum extent, automate variable work, improve work efficiency, realize full-automatic inspection of secondary equipment configuration and virtual circuit connection and automatic generation of SCD file standardized detection report, effectively improve the SCD file review and detection efficiency of smart substations, increase the comprehensiveness and accuracy of the review, and reduce the virtual circuit detection time of secondary equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 The figure shows a flow chart of a method for generating a standardized detection report of an SCD file based on correctness checking provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the embodiments shown and described in the accompanying drawings are merely exemplary and are intended to illustrate the principles and spirit of the present invention, rather than to limit the scope of the present invention.

[0046] The embodiment of the present invention provides a method for generating a standardized test report of an SCD file based on correctness checking, such as Figure 1 As shown, the following steps S1 to S4 are included:

[0047] S1. Input the SCD file into the Transformer model to extract text features, and output the text features of the SCD file.

[0048] Step S1 includes the following sub-steps S11 to S13:

[0049] S11. Get the representation vector of each word in the SCD file.

[0050] In the embodiment of the present invention, the representation vector of a word is obtained by adding the embedding of the word and the embedding of the word position, where the embedding refers to features extracted from the original data.

[0051] In the embodiment of the present invention, the embedding of word positions is represented by position encoding, and the calculation formula is:

[0052] PE (pos,2i) =sin(pos / 10000 2i / d )

[0053] PE (pos,2i+1) =cos(pos / 10000 2i / d )

[0054] Where PE represents the position encoding, pos represents the position of the word in the sentence, d represents the dimension of the position encoding (the same as the embedding dimension of the word in the embodiment of the present invention), 2i represents an even dimension, 2i+1 represents an odd dimension, and 2i+1≤d.

[0055] In addition to word embeddings, the Transformer also uses positional embeddings to represent the position of a word in a sentence. Because the Transformer doesn't use an RNN structure and instead relies on global information, it can't leverage word order, which is crucial for natural language processing. Therefore, the Transformer uses positional embeddings to store the relative or absolute position of a word in a sequence.

[0056] S12. Input the word representation vector into the encoder of the Transformer model to obtain the word encoding information matrix.

[0057] In an embodiment of the present invention, the encoder includes 6 encoder blocks connected in sequence, each encoder block has the same structure, including a self-attention layer and a feedforward neural network, and the matrix dimension of each encoder block output is exactly the same as the input.

[0058] S13. Input the word encoding information matrix into the decoder of the Transformer model and decode to obtain the text features of the SCD file.

[0059] In an embodiment of the present invention, the decoder includes a masked self-attention layer, an encoder-decoder attention layer, and a feedforward neural network connected in sequence.

[0060] The decoder decodes the i+1th word according to the currently decoded words 1 to i in sequence, and when decoding the i+1th word, it covers the words after the i+1th word through a masking operation.

[0061] The core of the Transformer is the self-attention mechanism, which dynamically assigns attention weight to each position in the sequence relative to other positions. This allows the model to effectively capture dependencies between words in a sentence, regardless of their distance. The Transformer also uses a multi-head attention mechanism, which involves running multiple self-attention mechanisms in parallel, with each head independently processing different parts. The outputs of these heads are then concatenated, improving the model's ability to capture diverse semantic relationships.

[0062] S2. Input the text features of the SCD file into the LSTM network model and output the prediction vector of the text elements of the SCD file.

[0063] Because LSTMs are unidirectional, they only use past information. However, in image-based sequences, context from both directions is mutually beneficial and complementary. Therefore, this embodiment of the present invention combines two LSTMs, one forward and one backward, into a single bidirectional LSTM. Furthermore, multiple layers of bidirectional LSTMs can be stacked, and deep structures allow for higher levels of abstraction than shallower layers. This embodiment of the present invention uses a two-layer bidirectional LSTM network model with 256 units each.

[0064] Step S2 includes the following sub-steps S21-S22:

[0065] S21. Input the text features of the SCD file into the LSTM network model, determine the information that needs to be discarded through the forget gate, and determine the information that needs to be retained through the input gate:

[0066] f t =σ(W fi x t +W fh h t-1 +b f )

[0067] i t =σ(W xi x t +W xh h t-1 +b i )

[0068] where f t represents the output of the forget gate at the current time step, σ represents the sigmoid activation function, W fi and W fh are all weight matrices of the forget gate, xt represents the input of the current time step, h t-1 represents the hidden state of the previous time step, b f is the bias term of the forget gate, i t represents the output of the input gate at the current time step, W xi and W xh are the weight matrices of the input gate, b i is the bias term of the input gate.

[0069] S22. Input the information retained by the input gate to the output gate, determine the hidden state of the current time step and obtain the prediction vector of the text element of the SCD file:

[0070] C t =tanh(W xc x t +W hc h t-1 +b c )

[0071] o t =σ(W xo x t +W xh h t-1 +b o )

[0072] h t =o t *tanh(C t )

[0073] Among them C t Represents the memory cell state at the current time step, W xc and W hc are all weight matrices of memory units, b c is the bias term of the memory unit, o t Represents the prediction vector of the SCD file text element output by the output gate at the current time step, W xo and W xh are the weight matrices of the output gate, b o is the bias term of the output gate, h t Represents the hidden state at the current time step.

[0074] S3. Construct a CTC (Connectionist Temporal Classification) loss function based on the prediction vector of the text element in the SCD file. Perform end-to-end joint training on the Transformer model and the LSTM network model based on the CTC loss function. Obtain the probability distribution vector of the text element in the SCD file with the goal of minimizing the CTC loss function.

[0075] Step S3 includes the following sub-steps S31 to S33:

[0076] S31. Transcribe the prediction vector of the text element of the SCD file into a label sequence.

[0077] Mathematically, transcription refers to finding the label sequence with the highest probability combination based on the predictions for each frame.

[0078] S32. Construct the CTC loss function based on the prediction vector of the text element of the SCD file and the corresponding label sequence:

[0079] L(y)=-log(p(l|x))

[0080] Where L(y) represents the CTC loss function, x represents the prediction vector of the text element of the SCD file, l represents the label sequence, and p(l|x) represents the probability of observing the label sequence l given the prediction vector x.

[0081] S33. The prediction vector corresponding to the minimum CTC loss function value is used as the probability distribution vector of the text element of the SCD file.

[0082] S4. Select the token with the highest prediction probability in the probability distribution vector and convert it into a string to obtain the true prediction result, thereby checking the SCD file and obtaining the SCD file standardization detection report.

[0083] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the present invention.

Claims

1. A method for generating a standardized test report for an SCD file based on correctness checking, characterized in that: The following steps are involved: S1. Input the SCD file into the Transformer model to extract text features, and output the text features of the SCD file; S2. Input the text features of the SCD file into the LSTM network model and output the prediction vector of the text elements of the SCD file; S3. Construct a CTC loss function based on the predicted vector of the text element in the SCD file. Perform end-to-end joint training on the Transformer model and the LSTM network model based on the CTC loss function. Obtain the probability distribution vector of the text element in the SCD file with the goal of minimizing the CTC loss function. S4. Select the token with the highest predicted probability in the probability distribution vector and convert it into a string to obtain the SCD file standardization test report; The step S2 comprises the following sub-steps: S21. Input the text features of the SCD file into the LSTM network model, use the forget gate to determine the information that needs to be discarded, and use the input gate to determine the information that needs to be retained: in represents the output of the forget gate at the current time step, σ represents the sigmoid activation function, and are all weight matrices of the forget gate, represents the input of the current time step, represents the hidden state at the previous time step, is the bias term of the forget gate, represents the output of the input gate at the current time step, and are the weight matrices of the input gate, is the bias term of the input gate; S22. Input the information retained by the input gate to the output gate, determine the hidden state of the current time step and obtain the prediction vector of the text element of the SCD file: in represents the memory cell state at the current time step, and are all weight matrices of memory units, is the bias term of the memory unit, Represents the prediction vector of the SCD file text element output by the output gate at the current time step, and are the weight matrices of the output gates, is the bias term of the output gate, represents the hidden state of the current time step; The step S3 includes the following sub-steps: S31, transcribing the prediction vector of the text element of the SCD file into a label sequence; S32. Construct the CTC loss function based on the prediction vector of the text element of the SCD file and the corresponding label sequence: in represents the CTC loss function, The prediction vector representing the text element of the SCD file, represents a tag sequence, Indicates that given a prediction vector The observed label sequence probability; S33. The prediction vector corresponding to the minimum CTC loss function value is used as the probability distribution vector of the text element of the SCD file.

2. The method for generating a SCD file standardization test report based on correctness check according to claim 1, characterized in that: The step S1 includes the following sub-steps: S11. Get the representation vector of each word in the SCD file; S12, input the word representation vector into the encoder of the Transformer model to obtain the word encoding information matrix; S13. Input the word encoding information matrix into the decoder of the Transformer model and decode to obtain the text features of the SCD file.

3. The method for generating a SCD file standardization test report based on correctness check according to claim 2, wherein: The representation vector of the word in step S11 is obtained by adding the embedding of the word and the embedding of the word position.

4. The method for generating a SCD file standardization test report based on correctness check according to claim 3, wherein: The embedding of the word position is represented by position encoding, and the calculation formula is: in represents the position code, Indicates the position of a word in a sentence. represents the dimension of the position encoding, represents an even dimension, Indicates odd dimension, 2i+1≤d.

5. The method for generating a SCD file standardization test report based on correctness check according to claim 2, wherein: The encoder in step S12 includes 6 encoder blocks connected in sequence, each of which has the same structure and includes a self-attention layer and a feedforward neural network.

6. The method for generating a SCD file standardization test report based on correctness check according to claim 2, characterized in that: The decoder in step S13 includes a masked self-attention layer, an encoder-decoder attention layer and a feedforward neural network connected in sequence.

7. The method for generating a SCD file standardization test report based on correctness check according to claim 2, wherein: In step S13, the decoder decodes the i+1th word according to the currently decoded 1st to ith words in sequence, and when decoding the i+1th word, it covers the words after the i+1th word through a masking operation.

Citation Information

Patent Citations

  • Text recognition method and device, equipment and medium

    CN113705313A