Fault diagnosis method, device and equipment based on few samples and storage medium
By performing data augmentation and reinforcement learning on power-related data of smart grid systems, and using a fault diagnosis model based on few samples to expand and iteratively train the original samples, the overfitting or underfitting problem of neural network models when there are few samples is solved, and the accuracy of fault diagnosis is improved.
Patent Information
- Application Number
- CN202311702817.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-12-11
AI Technical Summary
Existing fault diagnosis methods based on neural network models require a large amount of well-labeled and accurate data. In the absence of sufficient samples, overfitting or underfitting may occur, resulting in low accuracy of fault diagnosis.
By acquiring power-related data collected by measurement devices in the smart grid system, the original samples are expanded using a fault diagnosis model based on few samples, and the pre-set training model is iteratively trained based on the expanded target samples, including data augmentation technology and reinforcement learning, and the model training process is guided by reward signals.
It improves the accuracy of the fault diagnosis model, avoids overfitting or underfitting problems when there are insufficient samples, and enhances the model's generalization ability and the accuracy of fault diagnosis.
Smart Images

Figure CN117688447B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a fault diagnosis method, apparatus, device and storage medium based on few samples. Background Technology
[0002] Smart grid systems comprise numerous devices and components, such as generators, transformers, and switches. During grid system operation, various faults may occur, such as line short circuits and equipment failures, often leading to power outages or damage in certain areas of the grid. Therefore, timely and accurate fault diagnosis of the power grid system is crucial.
[0003] Existing technologies widely utilize neural network models for fault diagnosis in smart grid systems. These models can combine at least one type of input data (such as sensor measurements, image data, etc.) for fault diagnosis. However, fault diagnosis methods based on neural network models require a large amount of well-labeled, accurate data. In the absence of sufficient samples, overfitting or underfitting may occur, leading to low accuracy in fault diagnosis.
[0004] Application content
[0005] The main objective of this application is to provide a fault diagnosis method, apparatus, device, and storage medium based on a small sample size, aiming to solve the problem of low accuracy in fault diagnosis when there is a lack of sufficient samples.
[0006] To achieve the above objectives, this application provides a fault diagnosis method based on few samples, the steps of which include:
[0007] Acquire power-related data collected by measurement devices in the smart grid system;
[0008] Based on the power-related data, the smart grid system is subjected to fault diagnosis using a pre-set fault diagnosis model based on few samples, and the fault diagnosis results are obtained. The fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training the pre-set model to be trained based on the expanded target samples.
[0009] Optionally, before the step of acquiring power-related data collected by the measuring equipment in the smart grid system, the following steps are included:
[0010] Obtain the raw samples required for the fault diagnosis process of a smart grid system;
[0011] Random noise is added to the original sample to obtain the target sample;
[0012] Based on the target samples, the preset training model is iteratively trained to obtain a fault diagnosis model based on a small number of samples.
[0013] Optionally, the original sample includes current samples and voltage samples, and the step of adding random noise to the original sample to obtain the target sample includes:
[0014] In current sample I 原始 Add random current noise I 随机噪声 The current-enhanced sample I was obtained. new , and / or in voltage sample V 原始 Add random voltage noise V 随机噪声 The voltage enhancement sample V was obtained. new :
[0015] I new =I 原始 +I 随机噪声
[0016] V new =V 原始 +V 随机噪声
[0017] The enhanced sample is expanded to the original sample, and the number of samples in the expanded original sample is determined;
[0018] If the number of samples does not reach the preset value, return to the current sample I. 原始 Add random current noise I 随机噪声 The current-enhanced sample I was obtained. new , and / or in voltage sample V 原始 Add random voltage noise V 随机噪声 The voltage enhancement sample V was obtained. new The process continues until the number of samples reaches a preset value, at which point the addition of random noise stops, and the target sample is obtained.
[0019] Optionally, the step of iteratively training a preset model to be trained based on the target samples to obtain a fault diagnosis model based on a small number of samples includes:
[0020] Obtain predetermined stopping conditions, including training steps, target reward, and time limit;
[0021] The preset training model is trained based on the target sample, and it is determined whether the trained model meets the stopping condition.
[0022] If the trained model does not meet the stopping condition, the process returns to the step of training the preset model to be trained based on the target sample and determining whether the trained model meets the stopping condition, until the model meets the stopping condition, thus obtaining a fault diagnosis model based on a small number of samples.
[0023] Optionally, the step of training a preset model to be trained based on the target sample and determining whether the trained model meets the stopping condition includes:
[0024] Based on the target sample, it interacts with the smart grid system and receives the reward signal emitted by the smart grid system during the interaction process, wherein the reward signal is a signal used to guide the iterative process of the model to be trained;
[0025] The preset training model is trained based on the reward signal, and it is determined whether the trained model meets the stopping condition.
[0026] Optionally, the step of interacting with the smart grid system based on the target sample and receiving reward signals emitted by the smart grid system during the interaction includes:
[0027] Based on the target sample, the state of the smart grid system is obtained, wherein the state includes a set of voltage and current data;
[0028] Based on the state, an action is selected to be applied to the smart grid system, wherein the action includes adjusting voltage or current.
[0029] Receive the reward signal issued by the smart grid system based on the action.
[0030] Optionally, after the step of iteratively training a preset model to be trained based on the target samples to obtain a fault diagnosis model based on a small number of samples, the method further includes:
[0031] The fault diagnosis model based on few samples is sent to the user so that the user can evaluate, test and optimize the parameters of the fault diagnosis model based on few samples.
[0032] Furthermore, to achieve the above objectives, this application also provides a fault diagnosis device based on few samples, the fault diagnosis device based on few samples comprising:
[0033] The acquisition module is used to acquire power-related data collected by measurement devices in the smart grid system;
[0034] The diagnostic module is used to perform fault diagnosis on the smart grid system based on the power-related data and a preset fault diagnosis model based on few samples, and obtain fault diagnosis results; wherein, the fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training the preset model to be trained based on the expanded target samples.
[0035] Furthermore, to achieve the above objectives, this application also provides a fault diagnosis device based on few samples, characterized in that the device includes: a memory, a processor, and a fault diagnosis program based on few samples stored in the memory and executable on the processor, wherein the fault diagnosis program based on few samples is configured to implement the steps of the fault diagnosis method based on few samples.
[0036] In addition, to achieve the above objectives, this application also provides a storage medium, characterized in that the storage medium stores a fault diagnosis program based on few samples, wherein when the fault diagnosis program based on few samples is executed by a processor, it implements the steps of the fault diagnosis method based on few samples.
[0037] This application provides a fault diagnosis method, apparatus, device, and storage medium based on a limited sample size. Compared to related technologies that rely on neural network models for fault diagnosis, which require large amounts of well-labeled, accurate data and may suffer from overfitting or underfitting when sufficient samples are lacking, resulting in low accuracy, this application acquires power-related data collected by measuring devices in a smart grid system. Based on this power-related data, a pre-defined fault diagnosis model based on a limited sample size is used to diagnose faults in the smart grid system, yielding a fault diagnosis result. The limited sample size fault diagnosis model is obtained by expanding the original samples and iteratively training a pre-defined training model based on the expanded target samples. It is understood that in this application, acquiring power-related data from a smart grid system and using a pre-defined fault diagnosis model based on a limited sample size to diagnose faults in the smart grid system, utilizes data augmentation techniques to expand the original samples, avoiding overfitting or underfitting problems that may occur when sufficient samples are lacking, thereby improving the accuracy of the fault diagnosis model. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the first process of the first embodiment of the fault diagnosis method based on few samples in this application;
[0039] Figure 2 This is a flowchart illustrating the training process of the fault diagnosis model based on few samples in the fault diagnosis method of this application.
[0040] Figure 3This is a schematic diagram of the second process of the second embodiment of the fault diagnosis method based on few samples in this application;
[0041] Figure 4 This is a schematic diagram of a scenario from the second embodiment of the fault diagnosis method based on few samples in this application;
[0042] Figure 5 This is a schematic diagram of the third process of the third embodiment of the fault diagnosis method based on few samples in this application;
[0043] Figure 6 This is a structural block diagram of the fault diagnosis device based on a small number of samples in this application;
[0044] Figure 7 This is a schematic diagram of the hardware operating environment involved in the embodiments of this application.
[0045] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0046] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0047] Reference Figure 1 , Figure 1 This is a first flowchart illustrating the first embodiment of the fault diagnosis method based on a small number of samples in this application.
[0048] In the first embodiment, the fault diagnosis method based on few samples includes the following steps:
[0049] Step S10: Obtain power-related data collected by measurement devices in the smart grid system;
[0050] Step S20: Based on the power-related data, perform fault diagnosis on the smart grid system using a preset fault diagnosis model based on few samples to obtain fault diagnosis results; wherein, the fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training the preset model to be trained based on the expanded target samples.
[0051] This embodiment aims to improve the accuracy of fault diagnosis by expanding training data with data augmentation techniques when there are insufficient labeled samples, thereby achieving accurate fault classification with small sample sizes.
[0052] The specific steps are described below:
[0053] Step S10: Obtain power-related data collected by measurement devices in the smart grid system;
[0054] It should be noted that the execution subject of this embodiment is a fault diagnosis device based on few samples. The fault diagnosis device based on few samples is equipped with a fault diagnosis model based on few samples. The fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training the preset training model based on the expanded target samples. The fault diagnosis device based on few samples may be subordinate to a fault diagnosis device based on few samples.
[0055] It is understood that the smart grid system includes power-related equipment such as generators, transformers, and switches, the measuring equipment includes voltmeters and ammeters, the power-related data includes voltage data and current data, and the power-related data is used to reflect information such as the power load, voltage stability, and operating status of the power-related equipment.
[0056] For example, an ammeter A1 and a switch K1 connected in series with it are set in the same circuit. The ammeter A1 is used to collect the current data of the switch K1. The fault diagnosis device based on few samples determines the working state of the switch K1 by the current data obtained from the ammeter A1. That is, when the current is zero, the switch K1 is in the closed state, and when the current is not zero, the switch K1 is in the open state.
[0057] In practice, the measuring equipment is pre-installed by the user in the smart grid system according to actual needs.
[0058] For example, in cases where the actual requirement is to obtain the voltage stability of generator R1, the user connects voltmeter V1 in parallel with generator R1. Voltmeter V1 is used to collect voltage data of generator R1, and the fault diagnosis device based on few samples determines the voltage stability of generator R1 based on the voltage data obtained from voltmeter V1.
[0059] Step S20: Based on the power-related data, perform fault diagnosis on the smart grid system using a preset fault diagnosis model based on few samples to obtain fault diagnosis results; wherein, the fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training the preset model to be trained based on the expanded target samples.
[0060] It should be noted that after obtaining the original samples required for the fault diagnosis process of the smart grid system, the fault diagnosis device based on few samples adds random noise to the original samples to expand them. After expanding the original samples and obtaining the expanded target samples, the fault diagnosis device based on few samples interacts with the smart grid system based on the target samples and receives the reward signal issued by the smart grid system during the interaction. The fault diagnosis device based on few samples iteratively trains the preset training model based on the reward signal to obtain the fault diagnosis model based on few samples.
[0061] Understandably, after obtaining a fault diagnosis model based on few samples through iterative training, the fault diagnosis device based on few samples sends the fault diagnosis model based on few samples to the user so that the user can test and evaluate the performance of the fault diagnosis model based on few samples (including average cumulative reward, success rate, time efficiency, and other standards) to verify its performance in the real environment, and to optimize and improve the model parameters (including adjusting hyperparameters, changing the model structure, adopting different algorithms, etc.) to improve its performance and effectiveness.
[0062] In specific implementation, refer to Figure 2 The process of expanding the original samples and iteratively training the preset training model based on the expanded target samples to obtain the fault diagnosis model based on few samples includes: 1. Data augmentation (including data collection, data preprocessing, adding noise to the data, merging old and new data, and repeating the above steps performed by the fault diagnosis device based on few samples), 2. Reinforcement learning (including mapping data to reinforcement learning, defining state operations and rewards, initializing agent parameters, agent interaction with the environment, and updating the agent using reinforcement learning performed by the fault diagnosis device based on few samples), 3. Model training (including online test data operations performed by the fault diagnosis device based on few samples, and user-performed tests and evaluations of agent performance, optimization and improvement of model parameters, and repeating the above steps).
[0063] It is understood that, before performing fault diagnosis on the smart grid system based on the power-related data and obtaining the fault diagnosis result through a preset fault diagnosis model based on few samples, the fault diagnosis device based on few samples determines whether the smart grid system has a fault through the preset fault diagnosis model based on few samples. If it is determined that the smart grid system has a fault, the fault diagnosis device based on few samples performs fault diagnosis on the smart grid system through the preset fault diagnosis model based on few samples to obtain the fault diagnosis result.
[0064] For example, when the power-related data includes non-zero voltage data and zero current data of the generator, the few-sample-based fault diagnosis device determines that the generator has a fault through a preset few-sample-based fault diagnosis model, and performs fault diagnosis on the smart grid system through the preset few-sample-based fault diagnosis model, obtaining the fault diagnosis result as generator short circuit.
[0065] In this embodiment, compared to related technologies where fault diagnosis methods based on neural network models require a large amount of labeled, accurate data and may suffer from overfitting or underfitting when sufficient samples are lacking, resulting in low accuracy, this embodiment acquires power-related data collected by measurement devices in the smart grid system. Based on this power-related data, a pre-defined fault diagnosis model based on a small sample size is used to diagnose faults in the smart grid system, yielding a fault diagnosis result. The fault diagnosis model based on a small sample size is obtained by expanding the original samples and iteratively training a pre-defined model to be trained based on the expanded target samples. In other words, in this embodiment, power-related data from the smart grid system is acquired, and a pre-defined fault diagnosis model based on a small sample size is used to diagnose faults in the smart grid system. The fault diagnosis model based on a small sample size utilizes data augmentation techniques to expand the original samples, avoiding the overfitting or underfitting problems that may occur when sufficient samples are lacking, thereby improving the accuracy of the fault diagnosis model.
[0066] Furthermore, referring to Figure 3 Based on the above embodiments, a second embodiment of this application is provided. In this embodiment, before step S10, the fault diagnosis method based on few samples further includes the following steps:
[0067] Step A10: Obtain the raw samples required for the fault diagnosis process of the smart grid system;
[0068] It should be noted that after obtaining the raw data required for the fault diagnosis process of the smart grid system, the fault diagnosis device based on few samples preprocesses the obtained raw data to obtain raw samples. The preprocessing includes data cleaning, noise reduction, and normalization. Data cleaning refers to filtering out abnormal data that does not meet the requirements. Noise reduction refers to removing voltage or current data that does not contain information from the circuit or system. Normalization refers to unifying the dimensions of each data.
[0069] For example, when it is necessary to determine the power of a generator, the fault diagnosis device based on a small sample obtains the voltage data of the generator through a voltmeter connected in parallel with the generator and obtains the current data of the generator through an ammeter connected in series with the generator. Then, it normalizes the obtained current and voltage data based on the power formula, that is, it multiplies the current data and voltage data at the same moment to obtain the power data, thus obtaining the power data with the same unit (dimension) over a period of time.
[0070] Step A20: Add random noise to the original sample to obtain the target sample;
[0071] It should be noted that, referring to Figure 4 The random noise can be Gaussian noise whose probability density function follows a Gaussian distribution (i.e., a normal distribution). The Gaussian noise can be used to simulate interference sources (or noise sources), such as: the connection of high-power power electronic devices, the opening and closing of high-power electrical equipment, or the ordered or disordered changes in the electric and magnetic fields of space caused by lightning strikes.
[0072] It is understood that the original samples include current samples and voltage samples, and the fault diagnosis device based on few samples uses current sample I. 原始 Add random current noise I 随机噪声 The current-enhanced sample I was obtained. new , and / or in voltage sample V 原始 Add random voltage noise V 随机噪声 The voltage enhancement sample V was obtained. new :
[0073] I new =I 原始 +I 随机噪声
[0074] V new =V 原始 +V 随机噪声
[0075] In specific implementation, the few-sample-based fault diagnosis device expands the enhanced samples to the original samples and determines the number of samples in the expanded original samples. If the number of samples does not reach a preset value, the few-sample-based fault diagnosis device returns to the current sample I. 原始 Add random current noise I 随机噪声 The current-enhanced sample I was obtained. new , and / or in voltage sample V 原始 Add random voltage noise V 随机噪声 The voltage enhancement sample V was obtained. new The process continues until the number of samples reaches a preset value, at which point the addition of random noise stops, and the target sample is obtained.
[0076] Step A30: Iteratively train the preset model to be trained based on the target sample to obtain a fault diagnosis model based on a small number of samples.
[0077] It should be noted that the fault diagnosis device based on few samples maps the current samples and voltage samples in the target samples to the reinforcement learning environment and interacts with the smart grid system. The fault diagnosis device based on few samples iteratively trains the preset model to be trained based on the feedback of the smart grid system during the interaction process to obtain the fault diagnosis model based on few samples.
[0078] In this embodiment, compared to related technologies where fault diagnosis methods based on neural network models require a large amount of labeled, accurate data and may suffer from overfitting or underfitting due to insufficient samples, resulting in low accuracy, this embodiment obtains the original samples required for the fault diagnosis process of the smart grid system; adds random noise to the original samples to obtain target samples; and iteratively trains a preset model to be trained based on the target samples to obtain a fault diagnosis model based on fewer samples. That is, in this embodiment, original samples are obtained, and expanded target samples are obtained through noise addition. Then, the preset model to be trained is iteratively trained based on the target samples to increase the diversity and coverage of training data during model training, thereby improving the model's generalization ability and enabling it to better cope with different fault conditions and environmental changes.
[0079] Furthermore, referring to Figure 5 Based on the above embodiments, a third embodiment of this application is provided. In this embodiment, the fault diagnosis method based on few samples further includes the following steps:
[0080] Step B10: Based on the target sample, interact with the smart grid system and receive the reward signal emitted by the smart grid system during the interaction, wherein the reward signal is a signal used to guide the iterative process of the model to be trained;
[0081] It should be noted that the few-sample-based fault diagnosis device obtains the state of the smart grid system based on the target sample and actual needs. The state includes a set of voltage and current data. Based on the state, the few-sample-based fault diagnosis device selects an action to act on the smart grid system. The action includes adjusting the voltage or current. The few-sample-based fault diagnosis device receives a reward signal issued by the smart grid system based on the action.
[0082] For example, when the actual requirement is to maintain the voltage stability of the generator, the fault diagnosis device based on few samples acquires a set of voltage data of the generator as its state. If the acquired voltage data exceeds the safe range, the fault diagnosis device based on few samples selects an action to reduce the generator voltage through the model to be trained, and receives a reward signal issued by the generator based on the action.
[0083] In specific implementation, before interacting with the smart grid system based on the target sample, the fault diagnosis device based on few samples defines the state as a set of voltage and current data of the smart grid system selected according to actual needs, the action as the operation of adjusting voltage or current, and the reward signal as a value used to indicate the success rate of fault diagnosis.
[0084] For example, in the case of misidentification or failure to detect a fault, the smart grid system issues a reward signal with a success rate of 0% (negative); in the case of fault detection, the smart grid system issues a reward signal with a success rate of 60% (positive); and in the case of fault detection and accurate identification, the smart grid system issues a reward signal with a success rate of 100% (positive).
[0085] Step B20: Train the preset model to be trained based on the reward signal, and determine whether the trained model meets the stopping condition.
[0086] It should be noted that the fault diagnosis device based on few samples uses the reward signal to iteratively train the preset model to be trained in the direction that can obtain higher positive rewards.
[0087] For example, when using the Q-Learning algorithm (a type of reinforcement learning method), its formula is as follows:
[0088] Q(s,a)=(1-α)·Q(s,a)+α·(r+γ·maxQ(s′,a′))
[0089] Q(s,a) represents the value Q of the model taking action a in state s; α represents the learning rate (0≤α≤1), which is the value defined by the developer to balance the weights of old and new reward signals (a smaller learning rate can maintain a more stable learning process, while a larger learning rate can adapt to new reward signals more quickly); r is the immediate reward signal obtained after the model takes action a in state s; γ is the discount factor (0≤γ≤1), which is defined by the developer to represent the relative importance the model attaches to future reward signals (when γ is close to 0, it means the model pays more attention to immediate reward signals, while when γ is close to 1, it means the model pays more attention to future reward signals); maxQ(s′,a′) represents the maximum Q value of taking the next action a′ in the next state s′ (obtained through prediction).
[0090] It is understood that the stopping conditions are preset by the user according to the requirements of the task, the nature of the algorithm and the performance requirements. The stopping conditions include the number of training steps, the target reward and the time limit. The number of training steps refers to the number of iterations of training. The target reward refers to the success rate of model fault diagnosis reaching a preset value. The time limit refers to the maximum time of the iterative training process.
[0091] In specific implementation, after training the preset training model based on the reward signal, the fault diagnosis device based on few samples determines whether the trained model meets the stopping condition. If the trained model does not meet the stopping condition, the process returns to the step of training the preset training model based on the target sample and determining whether the trained model meets the stopping condition, until the model meets the stopping condition, training stops and a fault diagnosis model based on few samples is obtained.
[0092] In this embodiment, compared to related technologies where fault diagnosis methods based on neural network models require a large amount of labeled, accurate data and may suffer from overfitting or underfitting due to insufficient samples, resulting in low accuracy, this embodiment interacts with the smart grid system based on the target samples and receives reward signals from the smart grid system during the interaction. These reward signals guide the iterative process of the model to be trained. The model is trained based on these reward signals, and it is determined whether the trained model meets the stopping condition. In other words, this embodiment interacts with the smart grid system and trains the model based on the reward signals fed back by the smart grid system, thereby optimizing the fault diagnosis decision-making strategy and improving the accuracy of fault diagnosis.
[0093] Furthermore, embodiments of this application also propose a fault diagnosis device based on a small sample size, referring to... Figure 6The fault diagnosis device based on few samples includes:
[0094] The acquisition module 10 is used to acquire power-related data collected by measurement devices in the smart grid system;
[0095] The diagnostic module 20 is used to perform fault diagnosis on the smart grid system based on the power-related data and a preset fault diagnosis model based on few samples, and obtain fault diagnosis results; wherein, the fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training the preset model to be trained based on the expanded target samples.
[0096] Optionally, the fault diagnosis device based on few samples further includes:
[0097] The sample acquisition module is used to acquire the raw samples required for the fault diagnosis process of the smart grid system.
[0098] An additional module is used to add random noise to the original sample to obtain the target sample;
[0099] The training module is used to iteratively train the preset model to be trained based on the target samples to obtain a fault diagnosis model based on a small number of samples.
[0100] Optionally, the fault diagnosis device based on few samples further includes:
[0101] Sample enhancement module, used for current sample I 原始 Add random current noise I 随机噪声 The current-enhanced sample I was obtained. new , and / or in voltage sample V 原始 Add random voltage noise V 随机噪声 The voltage enhancement sample V was obtained. new :
[0102] I new =I 原始 +I 随机噪声
[0103] V new =V 原始 +V 随机噪声
[0104] A sample augmentation module is used to augment the enhanced sample to the original sample and determine the number of samples in the augmented original sample.
[0105] The iterative amplification module is used to return the current sample I if the number of samples has not reached a preset value. 原始 Add random current noise I 随机噪声 The current-enhanced sample I was obtained.new , and / or in voltage sample V 原始 Add random voltage noise V 随机噪声 The voltage enhancement sample V was obtained. new The process continues until the number of samples reaches a preset value, at which point the addition of random noise stops, and the target sample is obtained.
[0106] Optionally, the fault diagnosis device based on few samples further includes:
[0107] The condition acquisition module is used to acquire predetermined stopping conditions, including training steps, target reward, and time limit;
[0108] The condition determination module is used to train a preset model to be trained based on the target sample, and to determine whether the trained model meets the stopping condition.
[0109] The iterative training module is used to return to the step of training the preset model to be trained based on the target sample and determining whether the trained model meets the stopping condition if the trained model does not meet the stopping condition, until the model meets the stopping condition, and obtain a fault diagnosis model based on a small number of samples.
[0110] Optionally, the fault diagnosis device based on few samples further includes:
[0111] An environment interaction module is used to interact with the smart grid system based on the target sample and receive reward signals emitted by the smart grid system during the interaction process, wherein the reward signal is a signal used to guide the iterative process of the model to be trained.
[0112] The model training module is used to train a preset model to be trained based on the reward signal, and to determine whether the trained model meets the stopping condition.
[0113] Optionally, the fault diagnosis device based on few samples further includes:
[0114] The status acquisition module is used to acquire the status of the smart grid system based on the target sample, wherein the status includes a set of voltage and current data;
[0115] An action selection module is used to select an action to be applied to the smart grid system based on the state, wherein the action includes an operation of adjusting voltage or current;
[0116] A signal receiving module is used to receive reward signals issued by the smart grid system based on the action.
[0117] Optionally, the fault diagnosis device based on few samples further includes:
[0118] The model sending module is used to send the fault diagnosis model based on few samples to the user so that the user can evaluate, test and optimize the parameters of the fault diagnosis model based on few samples.
[0119] In this embodiment, power-related data collected by measuring devices in a smart grid system are acquired. Based on this power-related data, a pre-defined fault diagnosis model based on few samples is used to diagnose faults in the smart grid system, yielding a fault diagnosis result. The fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training a pre-defined training model based on the expanded target samples. In other words, in this embodiment, power-related data in the smart grid system is acquired, and a pre-defined fault diagnosis model based on few samples is used to diagnose faults in the smart grid system. The fault diagnosis model based on few samples utilizes data augmentation techniques to expand the original samples, avoiding overfitting or underfitting problems that may occur when there are insufficient samples, thereby improving the accuracy of the fault diagnosis model.
[0120] The specific implementation of the fault diagnosis device based on few samples in this application is basically the same as the embodiments of the fault diagnosis method based on few samples described above, and will not be repeated here.
[0121] Reference Figure 7 , Figure 7 This is a schematic diagram of the structure of a fault diagnosis device based on a few samples in the hardware operating environment involved in the embodiments of this application.
[0122] like Figure 7 As shown, the few-sample-based fault diagnosis device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0123] Those skilled in the art will understand that Figure 7 The structure shown does not constitute a limitation on fault diagnosis devices based on a small sample size, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0124] like Figure 7 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a fault diagnosis program based on a small sample size.
[0125] The operating system is a program that manages and controls the fault diagnosis equipment and software resources based on a few samples. It supports the operation of the network communication module, the user interface module, the fault diagnosis program based on a few samples, and other programs or software. The network communication module is used to manage and control the network interface 1002; the user interface module is used to manage and control the user interface 1003.
[0126] exist Figure 7 In the few-sample-based fault diagnosis device shown, the few-sample-based fault diagnosis device implements the steps of any of the above-described few-sample-based fault diagnosis methods by calling the few-sample-based fault diagnosis program stored in the memory 1005 through the processor 1001.
[0127] The specific implementation of the fault diagnosis device based on few samples in this application is basically the same as the embodiments of the fault diagnosis method based on few samples described above, and will not be repeated here.
[0128] Furthermore, embodiments of the present invention also propose a storage medium. This application provides a storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of the fault diagnosis method based on few samples described above.
[0129] The specific implementation of the storage medium in this application is basically the same as the embodiments of the fault diagnosis method based on few samples described above, and will not be repeated here.
[0130] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0131] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0133] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A fault diagnosis method based on a small number of samples, characterized in that, The steps of the fault diagnosis method based on few samples include: Acquire power-related data collected by measurement devices in the smart grid system; Based on the power-related data, the smart grid system is diagnosed using a pre-defined fault diagnosis model based on few samples to obtain fault diagnosis results; wherein, the fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training the pre-defined model to be trained based on the expanded target samples. Prior to the step of acquiring power-related data collected by the measuring equipment in the smart grid system, the following steps are included: Obtain the raw samples required for the fault diagnosis process of a smart grid system; Random noise is added to the original sample to obtain the target sample. The original sample includes current samples and voltage samples. The random noise is Gaussian noise whose probability density function follows a Gaussian distribution. Based on the target samples, the preset training model is iteratively trained to obtain a fault diagnosis model based on a small number of samples. The step of iteratively training a preset model to be trained based on the target samples to obtain a fault diagnosis model based on a small number of samples includes: Obtain predetermined stopping conditions, including training steps, target reward, and time limit; The preset training model is trained based on the target sample, and it is determined whether the trained model meets the stopping condition. The training is iterative training based on the reward signal, which is issued by the smart grid system based on the operation feedback of adjusting voltage or current. If the trained model does not meet the stopping condition, the process returns to the step of training the preset model to be trained based on the target sample and determining whether the trained model meets the stopping condition, until the model meets the stopping condition, thus obtaining a fault diagnosis model based on a small number of samples.
2. The fault diagnosis method based on few samples as described in claim 1, characterized in that, The step of adding random noise to the original sample to obtain the target sample includes: In current sample Add random current noise To obtain current-enhanced samples , and / or in voltage sample Add random voltage noise Voltage-enhanced samples were obtained. : The enhanced sample is expanded to the original sample, and the number of samples in the expanded original sample is determined; If the number of samples does not reach the preset value, return to the current sample... Add random current noise To obtain current-enhanced samples , and / or in voltage sample Add random voltage noise Voltage-enhanced samples were obtained. The process continues until the number of samples reaches a preset value, at which point the addition of random noise stops, and the target sample is obtained.
3. The fault diagnosis method based on few samples as described in claim 1, characterized in that, The step of training a preset model based on the target samples and determining whether the trained model meets the stopping condition includes: Based on the target sample, it interacts with the smart grid system and receives the reward signal emitted by the smart grid system during the interaction process, wherein the reward signal is a signal used to guide the iterative process of the model to be trained; The preset training model is trained based on the reward signal, and it is determined whether the trained model meets the stopping condition.
4. The fault diagnosis method based on few samples as described in claim 3, characterized in that, The step of interacting with the smart grid system based on the target sample and receiving reward signals emitted by the smart grid system during the interaction includes: Based on the target sample, the state of the smart grid system is obtained, wherein the state includes a set of voltage and current data; Based on the state, an action is selected to be applied to the smart grid system, wherein the action includes adjusting voltage or current. Receive the reward signal issued by the smart grid system based on the action.
5. The fault diagnosis method based on a small number of samples as described in claim 1, characterized in that, After the step of iteratively training the preset model to be trained based on the target samples to obtain a fault diagnosis model based on a small number of samples, the following steps are included: The fault diagnosis model based on few samples is sent to the user so that the user can evaluate, test and optimize the parameters of the fault diagnosis model based on few samples.
6. A fault diagnosis device based on a small sample size, characterized in that, The fault diagnosis device based on few samples includes: The acquisition module is used to acquire power-related data collected by measurement devices in the smart grid system; The diagnostic module is used to perform fault diagnosis on the smart grid system based on the power-related data and a preset fault diagnosis model based on few samples, and obtain fault diagnosis results; wherein, the fault diagnosis model based on few samples is obtained by expanding the original samples and iteratively training the preset model to be trained based on the expanded target samples. The sample acquisition module is used to acquire the raw samples required for the fault diagnosis process of the smart grid system. An addition module is used to add random noise to the original sample to obtain the target sample. The original sample includes current samples and voltage samples, and the random noise is Gaussian noise whose probability density function follows a Gaussian distribution. The training module is used to iteratively train the preset model to be trained based on the target samples to obtain a fault diagnosis model based on a small number of samples. The condition acquisition module is used to acquire predetermined stopping conditions, including training steps, target reward, and time limit; The condition determination module is used to train a preset training model based on the target sample and determine whether the trained model meets the stopping condition. The training is iterative training based on the reward signal, which is issued by the smart grid system based on the operation feedback of adjusting voltage or current. The iterative training module is used to return to the operation of training the preset model to be trained based on the target sample and determining whether the trained model meets the stopping condition if the trained model does not meet the stopping condition, until the model meets the stopping condition, and obtain a fault diagnosis model based on a small number of samples.
7. A fault diagnosis device based on a small sample size, characterized in that, The device includes: a memory, a processor, and a few-sample-based fault diagnosis program stored in the memory and executable on the processor, the few-sample-based fault diagnosis program being configured to implement the steps of the few-sample-based fault diagnosis method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a fault diagnosis program based on few samples, which, when executed by a processor, implements the steps of the fault diagnosis method based on few samples as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Small sample fault diagnosis method and system for power equipment based on virtual-real twinning space
CN111400930A
Fault diagnosis model self-learning method based on asynchronous parallel reinforcement learning
CN112801272A
