A substation operation and maintenance knowledge generation method and device and a storage medium
By constructing a logical generation model and combining one-hot encoding and multi-head attention mechanism, the problem of slow knowledge updates in substation simulation training systems is solved, enabling personalized and refined training on substation operation and maintenance knowledge, and improving the accuracy and efficiency of the training system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID CO LTD GUANGZHOU POWER SUPPLY BUREAU TRAINING & EVALUATION CENT
- Filing Date
- 2023-06-16
- Publication Date
- 2026-05-12
AI Technical Summary
Existing substation simulation training systems cannot keep up with the development of the new generation of power systems. The training system's question bank is updated slowly and the knowledge content is scarce. It is easy to become outdated, easy to omit, and easy to be biased, making it difficult to meet the professional training needs of substation operation and maintenance personnel.
By constructing a logic generation model and combining an artificial intelligence language model with power system logic, knowledge content and a question bank related to substations are generated. One-hot encoding and multi-head attention mechanisms are used to ensure the accuracy of logical operations, and the model is fine-tuned through cross-entropy loss function to improve the accuracy of generation.
It enables targeted, personalized, and refined training on substation operation and maintenance knowledge, improves the accuracy and efficiency of the training system, and reduces the omissions and biases caused by manual question generation.
Smart Images

Figure CN116701656B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, device, and storage medium for generating substation operation and maintenance knowledge, belonging to the field of simulation training and learning technology. Background Technology
[0002] With the digitalization and intelligentization of power systems, a large number of new technologies, equipment, and systems are being applied in substations. Substation maintenance personnel need to master the basic principles of power systems, possess safe operation skills, have the skills to repair and troubleshoot electrical equipment, and understand the principles and usage of various testing equipment. The nature of their profession requires substation maintenance personnel to have the ability to update their knowledge to adapt to the constantly evolving work environment. This presents challenges for the training of substation maintenance personnel. Currently, the training of substation maintenance personnel mainly involves theoretical knowledge learning, simulation training, equipment training, apprenticeship, and hands-on practice. Among these, simulation training, by simulating a real environment, allows trainees to experience and practice relevant skills in a virtual environment. It features high safety, low cost, high realism, and strong repeatability, effectively solving the problem of difficulty in conducting on-site training in real substations, making it one of the important training methods for substation maintenance personnel.
[0003] However, existing substation simulation training systems still rely primarily on traditional teaching, demonstrations, exercises, and examinations, failing to keep pace with the development of next-generation power systems. Furthermore, due to a limited number of professional trainers, the training system's question bank is updated slowly and the knowledge content is severely lacking, easily becoming outdated, prone to omissions, and susceptible to bias. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device and storage medium for generating substation operation and maintenance knowledge. By reasonably designing the introduction of relevant logical knowledge of intelligent substations into a generative artificial intelligence model, the corresponding knowledge content and question bank are generated using the model.
[0005] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0006] In a first aspect, the present invention provides a method for generating substation operation and maintenance knowledge, including:
[0007] Input the instruction into the preset judgment module J, and determine whether the instruction contains a part of the power system logic;
[0008] Inputting the portion containing power system logic into a pre-built logic generation model EL generates a series of substation logic configurations and provides knowledge / question answers;
[0009] The output of the logic generation model EL is embedded into the preset natural language processing module NL to output the result.
[0010] Furthermore, the method for constructing the logic generation model EL includes:
[0011] The original textual knowledge information and substation information are preprocessed to obtain an output vector.
[0012] The output vector is connected to a preset artificial intelligence language model P. The logic operation of the substation device is not trained, but directly mapped to a set of keys in the multi-head attention mechanism.
[0013] By adjusting different logic and occluding different devices, the model is trained to predict the occluded devices and their states, thus obtaining a pre-trained model P.
[0014] Fine-tuning the pre-trained model P to a generative model enables it to generate a series of logical operations and provide results, serving as the logical generative model EL.
[0015] Furthermore, the step of preprocessing the original knowledge information text content and substation information to obtain an output vector includes:
[0016] The original textual knowledge information and substation information were used to generate high-dimensional vectors using the one-heat method.
[0017] A high-dimensional vector is encoded using a neural network to obtain an output vector.
[0018] Furthermore, the step of connecting the output vector to a preset artificial intelligence language model P, without training the logic operations of the substation devices, directly maps them to a set of keys in a multi-head attention mechanism, including:
[0019] The output vector 'a' is concatenated to the artificial intelligence language model P, where the output vector 'a' corresponds to different positions in the artificial intelligence language model P. i There are different q, k, and v matrices and their functions, where q is the query matrix, k is the key matrix, and v is the vector matrix;
[0020] The logical operations in the output vector sequence a are extracted into the key matrix, and the elements of the k matrix are fixed here, so no further training is needed.
[0021] Furthermore, the method for fine-tuning the pre-trained model P to a generative model includes setting the loss function to the cross-entropy between the result of the logical operation string and the true result.
[0022] Furthermore, the portion of the instruction that does not contain power system logic is either passed to the natural language processing module NL or discarded directly.
[0023] Secondly, the present invention provides a substation operation and maintenance knowledge generation device, comprising:
[0024] An input module is used to input instructions into a preset judgment module J, and to determine whether the instructions contain a part of power system logic.
[0025] The generation module is used to input the part containing the power system logic into the pre-built logic generation model EL, generate a series of substation logic configurations, and provide knowledge / question answers;
[0026] The output module is used to embed the output of the logical generation model EL into the preset natural language processing module NL and output the result.
[0027] Furthermore, the method for constructing the logical generation model EL in the generation module includes:
[0028] The original textual knowledge information and substation information are preprocessed to obtain an output vector.
[0029] The output vector is connected to a preset artificial intelligence language model P. The logic operation of the substation device is not trained, but directly mapped to a set of keys in the multi-head attention mechanism.
[0030] By adjusting different logic and occluding different devices, the model is trained to predict the occluded devices and their states, thus obtaining a pre-trained model P.
[0031] Fine-tuning the pre-trained model P to a generative model enables it to generate a series of logical operations and provide results, serving as the logical generative model EL.
[0032] Thirdly, the present invention provides an electronic device, including a processor and a storage medium;
[0033] The storage medium is used to store instructions;
[0034] The processor is configured to operate according to the instructions to perform the steps of the method according to any of the preceding claims.
[0035] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the preceding methods.
[0036] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0037] This invention provides a method, device, and storage medium for generating substation operation and maintenance knowledge. It completes the pre-training of the model through the context learning capability of the artificial intelligence language model. Through reasonable design, it integrates substation-related power system theoretical knowledge, various operations, equipment data, and other information with the pre-trained model. The model takes the question content and the trainee's answer as input instructions and outputs corresponding knowledge content and new questions in response to these instructions, so as to conduct targeted, personalized, and refined training. Attached Figure Description
[0038] Figure 1 This is a wiring diagram of a primary system of a substation provided in an embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram of an autoencoder neural network provided in an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of the self-attention mechanism provided in an embodiment of the present invention;
[0041] Figure 4 This is a flowchart of the substation operation and maintenance knowledge generation method provided in the embodiments of the present invention. Detailed Implementation
[0042] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0043] Example 1
[0044] This embodiment introduces a method for generating substation operation and maintenance knowledge, including:
[0045] Input the instruction into the preset judgment module J, and determine whether the instruction contains a part of the power system logic;
[0046] Inputting the portion containing power system logic into a pre-built logic generation model EL generates a series of substation logic configurations and provides knowledge / question answers;
[0047] The output of the logic generation model EL is embedded into the preset natural language processing module NL to output the result.
[0048] like Figure 4 As shown in the figure, the substation operation and maintenance knowledge generation method provided in this embodiment involves the following steps in its application process:
[0049] S1: Preprocess the existing textual knowledge information and substation information. Generate high-dimensional vectors for various devices / equipment using the one-hot encoding method, and encode them using neural networks or other means to obtain output vectors (preferably, an auto-encoder can be used);
[0050] S2: Connect the above output vector to the artificial intelligence language model P. Preferably, the logic operations of the substation devices are not trained, but directly mapped to a set of keys in the multi-head attention mechanism;
[0051] S3: By adjusting different logic and masking different devices, the model is trained to predict the masked devices and their states, thus obtaining the pre-trained model P.
[0052] S4: Fine-tuning the pre-trained model P to a generative model can generate a series of logical operations and provide results, serving as the logical generative model EL.
[0053] S5: Input instruction (Prompt). First, pass the instruction to the judgment module J to determine whether the instruction contains the part of the power system logic.
[0054] S6: Pass the part of S5 that does not contain power system logic into the natural language processing module NL (or discard it directly). Preferably, it can be combined with the external large model API.
[0055] S7: Pass the part of S5 containing the power system logic into the logic generation model EL.
[0056] S8: Generates a series of substation logic configurations through the logic generation model EL and provides knowledge / question answers.
[0057] S9: Embed the output of the logical generation model EL into the natural language processing module NL and output the result (if there is no NL module, directly output the result of EL).
[0058] S1-S4 represent the training methods for the generative model, while S5-S9 represent the usage methods and systems for the model.
[0059] The following description, in conjunction with a preferred embodiment, illustrates the content involved in the above embodiments.
[0060] by Figure 1 Taking the wiring diagram of the primary system of a certain substation as an example, when the switch CB21 of line 2 needs to be changed from the operating state to the maintenance state, its operation must meet the switching operations shown in Table 1 below:
[0061] Table 1
[0062] 1 Disconnect CB21 circuit breaker 2 Disconnect DS21 disconnect switch 3 Disconnect the DS22 isolating switch 4 Close the ES22 grounding switch 5 Close the ES23 grounding switch
[0063] The DS21 and DS22 disconnect switches have a specific operating sequence. During a power outage, first disconnect the DS21 disconnect switch on the load side, then disconnect the DS22 disconnect switch on the busbar side. During power restoration, first close the DS22 disconnect switch on the busbar side, then close the DS21 disconnect switch on the load side. The operating sequence must be considered during logic programming. Furthermore, when a disconnect switch is opened, it must be in the open position; when a disconnect switch is closed, it must be in the closed position. Additionally, the grounding switch electrically connected directly to the disconnect switch must be in the open position, and the grounding wire must be disconnected. See Table 2 for details.
[0064] Table 2
[0065] DS21 tripping conditions F: DS21=1, DS22=1, ES22=0, ES23=0, ES21=0, CB21=0! DS21 closing conditions H: DS21=0, DS22=1, ES22=0, ES23=0, ES21=0, CB21=0! DS22 tripping conditions F: DS22=1, DS21=0, ES22=0, ES23=0, ES21=0, CB21=0! DS22 closing conditions H: DS22=0, DS21=0, ES22=0, ES23=0, ES21=0, CB21=0!
[0066] The above illustrates one of the most basic operational logics, where H represents the closing condition, F represents the opening condition, ":" indicates the start of the logic, DS21, etc., represent disconnectors, 0 represents opening, 1 represents closing, "!" indicates the end of the logic, "," indicates AND, "+" indicates OR, and "=" indicates the result. As the circuit becomes more complex, the logic rules become extremely intricate, making manual training and question generation prone to oversights and biases. This logic rule can be learned through an artificial intelligence language model, and then automatically generated through a generative model to produce the corresponding logic configuration sequence and the corresponding result, thus automating question generation.
[0067] Pre-trained language models can be used to process various time-series signals and have been proven by ChatGPT and other algorithms to possess powerful logic processing and generation capabilities. Theoretically, they are well-suited for solving challenges such as question bank generation and question-answering in substation operation and maintenance knowledge training systems. However, these models are prone to errors when directly applied to power systems, making it difficult to guarantee the accuracy of generated signals and logic. This is a challenge in combining AI language models with power systems. This solution achieves the combination of the two by building a small logic model of the power system and aligning it with the pre-trained model.
[0068] This will be achieved through the following steps:
[0069] (1) For artificial intelligence models, the input is usually an integer or floating-point number, not a string. Therefore, the logic above, such as "F:DS21=1,DS22=1", cannot be directly input into the artificial intelligence model. The usual method is to perform one-hot encoding. For example, F is defined as (1,0,0,0,0,0), ":" is defined as (0,1,0,0,0,0), "=" is defined as (0,0,1,0,0,0), and so on. Then, these one-hot encodings are input into the neural network to obtain a new vector a (such as using an auto-encoder).
[0070] An autoencoder is a self-learning model based on neural networks. Through a symmetrical network structure, it learns the dimensions of the original input data. Intuitively, autoencoders can be used for feature dimensionality reduction, similar to Principal Component Analysis (PCA), but they are more powerful because neural network models can extract more effective new features. Besides feature dimensionality reduction, the new features learned by the autoencoder can be fed into other models for subsequent calculations, analysis, and processing.
[0071] In principle, the output of the network should be consistent with the input. Therefore, backpropagation training can be performed based on the difference between the output and the input. The trained network can then achieve dimensionality reduction. Its compressed feature data is stored in the intermediate Code layer, and the corresponding vector is a. Figure 2 This is a simplified illustration of an autoencoder neural network. The actual network structure may be more complex, with adjustable layers and nodes.
[0072] (2) After encoding, the data is input into the artificial intelligence language model. The most commonly used method for language models is the multi-head self-attention mechanism, which is used by popular models such as ChatGPT.
[0073] like Figure 3 As shown, in the self-attention mechanism, the vector 'a' from the previous step is input into the model sequentially, corresponding to different positions of 'a'. i There are different q, k, and v matrices and their functions, where q is the query matrix, k is the key matrix, and v is the vector matrix. Multi-head refers to the approach taken for each vector a. i Each has multiple q, k, and v matrices. This architecture can be used to train a language model.
[0074] However, as mentioned earlier, a challenge in integrating AI language models with power systems lies in ensuring the accuracy of generated signals and logic. Therefore, this solution extracts the logical operations from the original input sequence 'a' into the key matrix, fixing the elements of the k matrix here and eliminating the need for further training. Because the physical meaning of the logical operations is clear, the corresponding operations can be directly executed on the vectors. This significantly reduces computation, promoting rapid model convergence while maintaining logical accuracy.
[0075] For example, the logical operation "+" (or) operates on 0 and 1, resulting in 1. Therefore, taking "+" on a sequence (0,1,0,1) and (1,0,1,0) yields (1,1,1,1). For relatively complex power vectors, this method directly avoids matrix operations and completes the operation. It should be noted that the logical operations here are not entirely consistent with the logical operations of power systems, but they are quite related.
[0076] (3) Subsequently, similar to conventional language models, by adjusting different logics and masking different vectors (i.e. devices), the model is trained to predict the masked devices and their states, thus obtaining a pre-trained model.
[0077] (4) After obtaining the model, fine-tune it. Fine-tuning methods include setting the loss function to the cross-entropy between the result of the logical operation string and the actual result. Specifically, this generative model can be used to predict the impact of a certain logical operation, the introduction of a certain device, or a failure on a substation. It can generate answers for specific questions or generate questions according to needs.
[0078] This invention designs a generative model for generating knowledge content, a question bank, a question-answering system, and simple predictions for a training system. This invention proposes a training method that incorporates power system logic symbols as fixed parameters into the weights of an artificial intelligence model. This significantly reduces the model's parameter space, making the model easier to train, more interpretable, and ultimately more accurate.
[0079] By leveraging the contextual learning capabilities of artificial intelligence language models, pre-training of the model is achieved. Through reasonable design, relevant power system theoretical knowledge, various operations, and equipment data related to substations are integrated with the pre-trained model. The question content and the trainee's answers serve as input instructions, enabling the model to output corresponding knowledge content and new questions in response to the trainee's input, thus providing targeted, personalized, and refined training.
[0080] Example 2
[0081] This embodiment provides a substation operation and maintenance knowledge generation device, including:
[0082] An input module is used to input instructions into a preset judgment module J, and to determine whether the instructions contain a part of power system logic.
[0083] The generation module is used to input the part containing the power system logic into the pre-built logic generation model EL, generate a series of substation logic configurations, and provide knowledge / question answers;
[0084] The output module is used to embed the output of the logical generation model EL into the preset natural language processing module NL and output the result.
[0085] Furthermore, the method for constructing the logical generation model EL in the generation module includes:
[0086] The original textual knowledge information and substation information are preprocessed to obtain an output vector.
[0087] The output vector is connected to a preset artificial intelligence language model P. The logic operation of the substation device is not trained, but directly mapped to a set of keys in the multi-head attention mechanism.
[0088] By adjusting different logic and occluding different devices, the model is trained to predict the occluded devices and their states, thus obtaining a pre-trained model P.
[0089] Fine-tuning the pre-trained model P to a generative model enables it to generate a series of logical operations and provide results, serving as the logical generative model EL.
[0090] Example 3
[0091] This embodiment provides an electronic device, including a processor and a storage medium;
[0092] The storage medium is used to store instructions;
[0093] The processor is configured to operate according to the instructions to perform the steps of the method according to any one of Embodiment 1.
[0094] Example 4
[0095] This embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described in Embodiment 1.
[0096] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating substation operation and maintenance knowledge, characterized in that, include: Input the instruction into the preset judgment module J, and determine whether the instruction contains a part of the power system logic; Inputting the portion containing power system logic into a pre-built logic generation model EL generates a series of substation logic configurations and provides knowledge / question answers; The output of the logical generation model EL is embedded into the preset natural language processing module NL, and the result is output. The method for constructing the logical generation model EL includes: The original textual knowledge information and substation information are preprocessed to obtain an output vector. The output vector is connected to a pre-defined artificial intelligence language model P. The logic operations of substation devices are not trained; they are directly mapped to a set of keys in a multi-head attention mechanism. This includes: The output vector 'a' is concatenated to the artificial intelligence language model P, where the output vector 'a' corresponds to different positions in the artificial intelligence language model P. i There are different q, k, and v matrices and their functions, where q is the query matrix, k is the key matrix, and v is the vector matrix; Extract the logical operations in the output vector a sequence into the key matrix, fix the elements of the k matrix here, and do not train again; By adjusting different logic and occluding different devices, the model is trained to predict the occluded devices and their states, thus obtaining a pre-trained model P. Fine-tuning the pre-trained model P to a generative model enables it to generate a series of logical operations and provide results, serving as the logical generative model EL.
2. The substation operation and maintenance knowledge generation method according to claim 1, characterized in that, The process of preprocessing existing knowledge information (textual content) and substation information to obtain an output vector includes: The original textual knowledge information and substation information were used to generate high-dimensional vectors using the one-heat method. A high-dimensional vector is encoded using a neural network to obtain an output vector.
3. The substation operation and maintenance knowledge generation method according to claim 1, characterized in that, The method for fine-tuning the pre-trained model P to a generative model includes setting the loss function to the cross-entropy between the result of the logical operation string and the true result.
4. The substation operation and maintenance knowledge generation method according to claim 1, characterized in that, The part of the instruction that does not contain power system logic is either passed to the natural language processing module NL or discarded directly.
5. A substation operation and maintenance knowledge generation device, characterized in that, include: An input module is used to input instructions into a preset judgment module J, and to determine whether the instructions contain a part of power system logic. The generation module is used to input the part containing the power system logic into the pre-built logic generation model EL, generate a series of substation logic configurations, and provide knowledge / question answers; The output module is used to embed the output of the logical generation model EL into the preset natural language processing module NL and output the result. The method for constructing the logical generation model EL in the generation module includes: The original textual knowledge information and substation information are preprocessed to obtain an output vector. The output vector is connected to a pre-defined artificial intelligence language model P. The logic operations of substation devices are not trained; they are directly mapped to a set of keys in a multi-head attention mechanism. This includes: The output vector 'a' is concatenated to the artificial intelligence language model P, where the output vector 'a' corresponds to different positions in the artificial intelligence language model P. i There are different q, k, and v matrices and their functions, where q is the query matrix, k is the key matrix, and v is the vector matrix; Extract the logical operations in the output vector a sequence into the key matrix, fix the elements of the k matrix here, and do not train again; By adjusting different logic and occluding different devices, the model is trained to predict the occluded devices and their states, thus obtaining a pre-trained model P. Fine-tuning the pre-trained model P to a generative model enables it to generate a series of logical operations and provide results, serving as the logical generative model EL.
6. An electronic device, characterized in that: Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 4.