Fault detection model training method and device, computer device, readable storage medium and program product
By performing data augmentation and representation optimization on the small sample training data of the power equipment fault detection model, and combining internal and external loop training and incremental learning, the small sample problem in the traditional model is solved, and efficient and accurate fault detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-16
AI Technical Summary
Traditional machine learning models often suffer from small sample size problems in power equipment fault detection, resulting in low detection accuracy and difficulty in ensuring processing efficiency.
By acquiring small sample model training data of the target device under different fault categories, data augmentation and representation optimization are performed. Meta-learning methods combining inner and outer loop training are used to extract shared parameters suitable for small sample learning, and incremental learning techniques are employed for dynamic optimization.
It improves the accuracy and processing efficiency of fault detection models, enabling them to quickly adapt to new tasks while maintaining the ability to detect old knowledge.
Smart Images

Figure CN122220871A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power operation and maintenance, and in particular to a fault detection model training method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] In the field of power equipment operation and maintenance, there are many types of equipment and complex fault types, characterized by nonlinear and non-stationary fault signals; weak early fault signals; and multi-factor coupling interference. Traditional rule-based or threshold-based methods are difficult to cope with these complex situations. Therefore, machine learning methods can be used to train fault detection models to realize equipment fault detection in the power equipment operation and maintenance process.
[0003] However, some faults in the operation and maintenance of power equipment occur infrequently or are difficult to monitor, leading to a prevalence of small sample problems. Traditional machine learning models are highly dependent on data and require a large number of labeled samples to support effective learning. When faced with small sample data, the models often struggle to generalize effectively, thus affecting detection accuracy and making it difficult to guarantee the processing efficiency of equipment fault detection. Summary of the Invention
[0004] Therefore, it is necessary to provide a fault detection model training method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can effectively improve the accuracy of fault detection based on fault detection models and improve processing efficiency, in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a method for training a fault detection model, including:
[0006] Obtain small sample model training data for the target device under different fault categories;
[0007] Data augmentation and representation optimization are performed on the small sample model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category. The meta-learning training data is then split into support set data and query set data.
[0008] The initial fault detection model is trained in an inner loop using the support set data corresponding to each fault category, and the local parameters corresponding to each fault category are updated to obtain the inner loop fault detection model.
[0009] The inner loop fault detection model is trained by using query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thereby obtaining a target fault detection model for the target device.
[0010] In one embodiment, obtaining small sample model training data for the target device under different fault categories includes:
[0011] Acquire multi-source data of the target device under fault conditions from historical data, as well as the fault category label corresponding to each device's multi-source data;
[0012] The multi-source data from the device is cleaned to obtain device cleaning data;
[0013] The equipment cleaning data is processed by vector encoding to obtain equipment feature vectors;
[0014] The device feature vector is standardized to obtain a standardized device feature vector;
[0015] Based on the fault category label, the standardized equipment feature vector is classified to obtain small sample model training data for the target equipment under different fault categories.
[0016] In one embodiment, the step of performing data augmentation and representation optimization processing on the small sample model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category includes:
[0017] For each fault category, the small sample model training data is adjusted and enhanced according to the data type of the small sample model training data to obtain adjusted and enhanced training data.
[0018] For each fault category, the small sample model training data is used to perform generative augmentation processing on the small sample model training data through a conditional adversarial generative network to obtain generative augmented training data.
[0019] For each fault category, the small sample model training data, the adjusted and enhanced training data, and the generated enhanced training data are summarized to obtain the model training data;
[0020] Sample representation optimization processing is performed on the model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category.
[0021] In one embodiment, the method further includes:
[0022] Obtain incremental learning training data for the target fault detection model;
[0023] The target fault detection model is incrementally trained based on the incremental learning training data to obtain an optimized fault detection model.
[0024] In one embodiment, the step of incrementally training the target fault detection model based on the incremental learning training data to obtain an optimized fault detection model includes:
[0025] The importance of parameters in the target fault detection model is determined by the elastic weight solidification method.
[0026] Based on the importance of the parameters, the frozen parameters and parameters to be updated in the target fault detection model are determined.
[0027] Construct an incremental training comprehensive loss function based on the frozen parameters and the parameters to be updated;
[0028] Based on the incremental learning training data and the incremental training comprehensive loss function, the target fault detection model is incrementally trained to obtain an optimized fault detection model.
[0029] In one embodiment, the incremental training process of the target fault detection model based on the incremental learning training data and the incremental training comprehensive loss function to obtain the fault detection optimized model includes:
[0030] Identify the sample uncertainty corresponding to each incremental learning training data;
[0031] Based on the aforementioned sample uncertainty, determine the sample weights of the corresponding incremental learning training data;
[0032] Based on the incremental learning training data with sample weights and the incremental training comprehensive loss function, the target fault detection model is incrementally trained to obtain an optimized fault detection model.
[0033] Secondly, this application also provides a fault detection model training device, comprising:
[0034] The data acquisition module is used to acquire small sample model training data for the target device under different fault categories;
[0035] The data augmentation module is used to perform data augmentation and representation optimization on the small sample model training data corresponding to each fault category, to obtain the meta-learning training data corresponding to each fault category, and to split the meta-learning training data into support set data and query set data.
[0036] The first training module is used to train the initial fault detection model in an inner loop using the support set data corresponding to each fault category, so as to update the local parameters corresponding to each fault category and obtain the inner loop fault detection model.
[0037] The second training module is used to perform outer loop training on the inner loop fault detection model using query set data containing all fault categories, so as to update the shared parameters corresponding to all fault categories and obtain the target fault detection model for the target device.
[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0039] Obtain small sample model training data for the target device under different fault categories;
[0040] Data augmentation and representation optimization are performed on the small sample model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category. The meta-learning training data is then split into support set data and query set data.
[0041] The initial fault detection model is trained in an inner loop using the support set data corresponding to each fault category, and the local parameters corresponding to each fault category are updated to obtain the inner loop fault detection model.
[0042] The inner loop fault detection model is trained by using query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thereby obtaining a target fault detection model for the target device.
[0043] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0044] Obtain small sample model training data for the target device under different fault categories;
[0045] Data augmentation and representation optimization are performed on the small sample model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category. The meta-learning training data is then split into support set data and query set data.
[0046] The initial fault detection model is trained in an inner loop using the support set data corresponding to each fault category, and the local parameters corresponding to each fault category are updated to obtain the inner loop fault detection model.
[0047] The inner loop fault detection model is trained by using query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thereby obtaining a target fault detection model for the target device.
[0048] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0049] Obtain small sample model training data for the target device under different fault categories;
[0050] Data augmentation and representation optimization are performed on the small sample model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category. The meta-learning training data is then split into support set data and query set data.
[0051] The initial fault detection model is trained in an inner loop using the support set data corresponding to each fault category, and the local parameters corresponding to each fault category are updated to obtain the inner loop fault detection model.
[0052] The inner loop fault detection model is trained by using query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thereby obtaining a target fault detection model for the target device.
[0053] The aforementioned fault detection model training method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire small sample model training data for the target device under different fault categories; perform data augmentation and representation optimization processing on the small sample model training data corresponding to each fault category to obtain meta-learning training data corresponding to each fault category, and split the meta-learning training data into support set data and query set data; perform inner loop training on the initial fault detection model using the support set data corresponding to each fault category to update the local parameters corresponding to each fault category, thereby obtaining an inner loop fault detection model; and perform outer loop training on the inner loop fault detection model using query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thereby obtaining a target fault detection model for the target device. After obtaining small sample model training data for the target device under different fault categories, this application first performs data augmentation and representation optimization on these small sample model training data to obtain meta-learning training data. Then, through a combination of inner and outer loop training, a task-level meta-learning method is adopted for different categories. By summarizing experience through training on multiple fault category tasks, shared parameters suitable for small sample learning are extracted to obtain the target fault detection model, thereby effectively ensuring the accuracy of fault detection based on the target fault detection model and improving processing efficiency. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a diagram illustrating the application environment of a fault detection model training method in one embodiment.
[0056] Figure 2 This is a flowchart illustrating a fault detection model training method in one embodiment;
[0057] Figure 3 This is a flowchart illustrating the fault detection model training method in another embodiment;
[0058] Figure 4 This is a structural block diagram of a fault detection model training device in one embodiment;
[0059] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] The fault detection model training method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located in the cloud or on another network server. When staff on terminal 102 need to train a corresponding fault detection model for a small sample of faults in the target device, they can initiate a model training request to server 104 through terminal 102. Server 104 extracts the relevant information from the model training request. Then, small sample model training data for the target device under different fault categories is acquired. Data augmentation and representation optimization are performed on the small sample model training data corresponding to each fault category to obtain meta-learning training data for each fault category. This meta-learning training data is then split into support set data and query set data. The initial fault detection model is trained in an inner loop using the support set data corresponding to each fault category to update the local parameters for each fault category, resulting in an inner loop fault detection model. Finally, the inner loop fault detection model is trained in an outer loop using query set data containing all fault categories to update the shared parameters for all fault categories, resulting in a target fault detection model for the target device. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Headset devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.
[0062] In one exemplary embodiment, such as Figure 2 As shown, a fault detection model training method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 201 to 207. Wherein:
[0063] Step 201: Obtain small sample model training data for the target device under different fault categories.
[0064] In this context, "target equipment" refers to the object to be detected by the fault detection model training method of this application. For example, during the operation and maintenance of power equipment, transformers, circuit breakers, transmission lines, and motors can all be considered target equipment for maintenance. "Fault category" refers to the specific type of fault that may occur in these devices, such as short circuit, overload, insulation aging, partial discharge, and mechanical wear. For small sample model training data, in classification tasks, if the number of samples in some categories is far less than that in others, a class imbalance problem will occur. For example, when collecting equipment status samples, there might be 10,000 normal equipment statuses, 50 fault A cases, and 80 fault B cases. In this situation, training the model using the full set of status data would easily lead to bias towards the majority class, ignoring the minority class and resulting in missed detections. The samples for fault A and fault B constitute the small sample. The solution of this application is suitable for solving the small sample problem in the equipment fault detection process; therefore, it selects small sample model training data of the target equipment under different fault categories as training data.
[0065] For example, when the equipment maintenance personnel at terminal 102 need to train corresponding fault detection models for various small-sample faults occurring on the target equipment to efficiently perform fault detection and processing, they can initiate a corresponding model training request to server 104 through terminal 102. Server 104 extracts relevant information from the model training request to identify the target equipment that needs training. Then, it extracts small-sample model training data suitable for different fault categories from the historical data of the target equipment. When this application is applied to the training of power equipment fault detection models, the multi-source data of power equipment (including equipment operating status, fault records, and environmental monitoring data) can be first converted into standardized inputs suitable for algorithm processing to obtain small-sample model training data.
[0066] Step 203: Perform data augmentation and representation optimization on the small sample model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category, and split the meta-learning training data into support set data and query set data.
[0067] Data augmentation is a data preprocessing technique that expands the training set by artificially generating variations of the original data. Its goal is to increase data diversity, alleviate overfitting, and improve the model's generalization ability. Representation optimization, on the other hand, is an optimization technique during model training that aims to learn efficient representations (features) of the data. By mapping the original data to a more discriminative feature space, it makes downstream tasks (such as classification) easier to learn. Meta-learning is a training method that learns universally applicable initial parameters, enabling the model to quickly adapt to new tasks under limited sample conditions.
[0068] For example, since small sample data is often insufficient to support complex model training, this application employs data augmentation to enhance data diversity and thus improve model training performance. Here, data augmentation and representation optimization are performed on the small sample model training data corresponding to each fault category to obtain meta-learning training data for each fault category. Then, the meta-learning training data for each fault category can be further split into support set data and query set data, thus corresponding to the subsequent meta-learning training process.
[0069] Step 205: The initial fault detection model is trained in an inner loop using the support set data corresponding to each fault category, so as to update the local parameters corresponding to each fault category and obtain the inner loop fault detection model.
[0070] Step 207: The inner loop fault detection model is trained by using query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thereby obtaining the target fault detection model for the target device.
[0071] For example, in the model training process, this application specifically adopts a task-level meta-learning method, summarizing experience through training on multiple tasks to extract meta-parameters suitable for few-shot learning. For the meta-learning training data, it is pre-split into support set data and query set data. That is, in the task definition, each few-shot task consists of a support set... The query set Q is composed of, and its specific representation is:
[0072]
[0073] in, Q is used for in-task model training; Q is used for inter-task meta-parameter updates.
[0074] The training process of the model can be divided into inner loop training and outer loop training. The inner and outer loop design of meta-learning is as follows:
[0075] The initial fault detection model is trained using the support set data corresponding to each fault category in an inner loop, and the local parameters corresponding to each fault category are updated to obtain the inner loop fault detection model: using the support set on each task. Model training can be specifically represented as:
[0076]
[0077] in, For learning rate, These are local parameters of task i.
[0078] After updating the local parameters for each fault category (i.e., each person), the inner loop fault detection model is trained using a query set containing all fault categories. This outer loop updates the shared parameters corresponding to all fault categories, resulting in a target fault detection model for the target device. The query set is then used on all tasks. Perform meta-parameter updates:
[0079]
[0080] in, The meta-learning rate, These are shared meta-parameters.
[0081] By training the model using this meta-learning approach, it can quickly adapt to new tasks with only a few gradient updates in practical applications. This step ensures that the model can achieve high detection accuracy with only a small number of samples and training steps when faced with new fault categories. The results of the meta-learning model training will serve as the basis for the dynamic optimization and update module, further improving the model's adaptability in real-time environments.
[0082] The above-mentioned fault detection model training method first obtains small sample model training data of the target device under different fault categories; performs data augmentation and representation optimization processing on the small sample model training data corresponding to each fault category to obtain meta-learning training data corresponding to each fault category, and splits the meta-learning training data into support set data and query set data; performs inner loop training on the initial fault detection model using the support set data corresponding to each fault category to update the local parameters corresponding to each fault category, thus obtaining the inner loop fault detection model; and performs outer loop training on the inner loop fault detection model using query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thus obtaining the target fault detection model for the target device. After obtaining small sample model training data for the target device under different fault categories, this application first performs data augmentation and representation optimization on these small sample model training data to obtain meta-learning training data. Then, through a combination of inner and outer loop training, a task-level meta-learning method is adopted for different categories. By summarizing experience through training on multiple fault category tasks, shared parameters suitable for small sample learning are extracted to obtain the target fault detection model, thereby effectively ensuring the accuracy of fault detection based on the target fault detection model.
[0083] In an exemplary embodiment, step 201 includes: acquiring multi-source data of the target device under fault conditions from historical data, and fault category labels corresponding to each multi-source data of the device; performing data cleaning processing on the multi-source data of the device to obtain cleaned data of the device; performing vector encoding processing on the cleaned data of the device to obtain device feature vectors; performing standardization processing on the device feature vectors to obtain standardized device feature vectors; and performing classification processing on the standardized device feature vectors according to the fault category labels to obtain small sample model training data of the target device under different fault categories.
[0084] For example, multi-source data on the target device under fault conditions, such as device operating status, fault records, and environmental monitoring data, can be collected as raw data. However, this data cannot be directly applied to model training. In this case, data preprocessing can be used to transform this data into small-sample model training data that can be used for model training. Data preprocessing specifically includes steps such as data cleaning, vector encoding, and standardization. The data cleaning process mainly removes sensor noise, outliers, and redundant data to ensure the quality of input data. For example, wavelet transform or low-pass filters can be used to remove high-frequency noise, and text cleaning can remove irrelevant characters and stop words; spelling errors can be corrected, etc. Vector encoding is performed on the cleaned device data. Through the implementation of vector encoding format conversion, heterogeneous data containing time series, image, or text data are uniformly encoded into vector representations. Finally, the device feature vectors are standardized to make them fall into a uniform range (such as [0,1]). The standardized device feature vectors are obtained to eliminate differences in different dimensions (such as temperature unit °C vs vibration unit g), avoiding the model bias towards high-amplitude features. For example, Min-Max normalization can be used to achieve standardization. Finally, based on the fault category labels, the standardized equipment feature vectors are classified to obtain small-sample model training data for the target equipment under different fault categories. In this embodiment, small-sample model training data is constructed by preprocessing the collected raw equipment multi-source data, thereby effectively improving the usability of the model training data.
[0085] In an exemplary embodiment, step 203 includes: for the small sample model training data corresponding to each fault category, performing sample adjustment and enhancement processing on the small sample model training data according to the data type of the small sample model training data to obtain adjusted and enhanced training data; for the small sample model training data corresponding to each fault category, performing generative enhancement processing on the small sample model training data through a conditional adversarial generative network to obtain generative enhanced training data; for each fault category, summarizing the small sample model training data, adjusted and enhanced training data, and generative enhanced training data to obtain model training data; and performing sample representation optimization processing on the model training data corresponding to each fault category to obtain meta-learning training data corresponding to each fault category.
[0086] For example, this application can specifically perform data augmentation processing on few-shot model training data by combining adjustment enhancement and generative enhancement. For the few-shot model training data corresponding to each fault category, the data is adjusted and enhanced according to its data type to obtain adjusted and enhanced training data. For example, for image data, enhanced data can be constructed by performing adjustments such as random rotation, cropping, mirroring, and adding noise to equipment fault images. Similarly, adjusted and enhanced data can be constructed by performing adjustments such as translation, adding noise, and time-scale transformation on sequence data such as current and voltage. The generative enhancement scheme utilizes a conditional generative adversarial network (cGAN) to generate virtual samples that meet specific conditions (such as a specific fault type). The cGAN generation formula is as follows:
[0087]
[0088] in, Let z be the generator, c be the input noise, and c be the condition; the output is the generated sample. The decision criterion is used to evaluate the quality of the generated samples. Conditional adversarial generative networks can efficiently construct and enhance training data. Then, by aggregating three types of data—small sample model training data, adjusted enhanced training data, and generated enhanced training data—the model training data is obtained. Based on the enhanced data, a contrastive learning method is used to optimize the representational ability of the samples, making similar samples closer together and different categories of samples more distinct, thus obtaining the meta-learning training data corresponding to each fault category. This process can be represented as:
[0089]
[0090] in, Indicates sample and samples The cosine similarity between them. In this embodiment, samples enhanced with data augmentation and representation optimization will be used as input for subsequent meta-learning model construction, ensuring that the model can effectively generalize under small sample conditions.
[0091] In an exemplary embodiment, the method further includes: acquiring incremental learning training data of the target fault detection model; and performing incremental training processing on the target fault detection model based on the incremental learning training data to obtain a fault detection optimization model.
[0092] For example, the above processing has completed the initial training and small-sample task adaptation of the fault detection model. However, in actual equipment operation and maintenance, the model needs to continuously adapt to new data and fault categories, while avoiding the forgetting of old knowledge by new tasks. Therefore, this application also includes a dynamic optimization and update process for the target fault detection model. Dynamic optimization requires the combination of incremental learning technology to retain the knowledge of old tasks during training for new tasks, while realizing the adaptive update of real-time data. When new fault types are collected, the original equipment multi-source data can be constructed using the above data preprocessing and data augmentation methods to construct incremental learning training data for the target fault detection model. Then, based on these incremental learning training data, the target fault detection model is incrementally trained to obtain the optimized fault detection model. In this embodiment, by collecting incremental learning training data corresponding to new fault types, the target fault detection model is incrementally trained, thereby effectively ensuring the detection accuracy of the optimized fault detection model for various faults.
[0093] In an exemplary embodiment, incremental training of the target fault detection model based on incremental learning training data to obtain an optimized fault detection model includes: determining the importance of parameters in the target fault detection model using the elastic weight solidification method; determining frozen parameters and parameters to be updated in the target fault detection model based on the importance of the parameters; constructing an incremental training comprehensive loss function based on the frozen parameters and parameters to be updated; and performing incremental training of the target fault detection model based on the incremental learning training data and the incremental training comprehensive loss function to obtain the optimized fault detection model.
[0094] For example, the specific process of incremental training can first employ the Elastic Weights Coagulation (EWC) method to protect important parameters of the old task through regularization, thereby ensuring the accuracy of the old task's detection while training the model. This process can be represented as:
[0095]
[0096] in, These are the parameters for the old task. The importance of the parameter indicates its contribution to the old task; This represents the regularization strength. During model training, the frozen parameters and parameters to be updated in the target fault detection model can be determined based on the importance of the parameters. That is, parameters important for the old task are frozen, and only parameters relevant to the new task are optimized.
[0097]
[0098] To enable the dynamically optimized model to quickly adapt to new data in a real-time environment while maintaining its ability to detect old fault categories, thus achieving a balance between new and old knowledge, the output of the dynamically optimized model is based on the following optimization formula.
[0099] Construct an incremental training loss function based on the frozen parameters and the parameters to be updated, and combine it with the incremental learning loss. Losses from new missions For multi-objective weighted optimization, the incremental training loss function for comprehensive optimization is defined as:
[0100]
[0101] in, and These are weighting coefficients used to balance adaptation to new tasks with protection of old tasks. This indicates the optimization goal for the newly added task; Regularized loss for elastic weights, used to preserve knowledge of old tasks.
[0102] Based on the loss function described above, the parameter update rule for the model can be defined as follows:
[0103]
[0104] in, For learning rate, The gradient of the comprehensive loss function is used for incremental training.
[0105] In this embodiment, through the above steps, the dynamically incrementally trained and optimized model can balance new task adaptation with the retention of old knowledge, achieving a balance between new and old knowledge and long-term performance stability. The final output model can quickly adapt to newly added fault data in real time and continuously optimize the detection effect of equipment operation and maintenance.
[0106] In an exemplary embodiment, incremental training of the target fault detection model based on incremental learning training data and incremental training comprehensive loss function to obtain a fault detection optimization model includes: identifying the sample uncertainty corresponding to each incremental learning training data; determining the sample weight of the corresponding incremental learning training data according to the sample uncertainty; and performing incremental training of the target fault detection model based on the incremental learning training data with sample weights and incremental training comprehensive loss function to obtain a fault detection optimization model.
[0107] For example, in the incremental training process of the model, some samples in the new fault samples may be affected by environmental noise (such as temperature fluctuations caused by thunderstorms). Direct equal training would lead to noisy samples dominating model updates. Therefore, in this process, adaptive learning based on sample uncertainty can be achieved through dynamic weight adjustment. Sample uncertainty includes data uncertainty, model uncertainty, and task uncertainty. Data uncertainty can be caused by factors such as sensor noise levels; for example, samples with low signal-to-noise ratios in vibration signals should have their weights reduced. Model uncertainty corresponds to the variance of multiple predictions, and samples with low confidence in classifying new faults can have their weights increased. Task uncertainty is related to the degree of difference in historical faults; samples that differ greatly from known fault patterns (potentially new faults) should have their weights increased. After determining the sample uncertainty corresponding to each incremental learning training data, the sample weights of the corresponding incremental learning training data can be determined based on the sample uncertainty. This process can be expressed as:
[0108]
[0109] in, This represents the sample uncertainty of the incremental learning training data. Finally, based on the incremental learning training data with sample weights and the incremental training comprehensive loss function, the target fault detection model is incrementally trained to obtain an optimized fault detection model. In this embodiment, sample weights are determined through model uncertainty, and then the sample weights guide the model's incremental training process, automatically selecting high-quality samples from a limited set of samples, avoiding noise contamination, and thus improving the model's incremental training effect.
[0110] In one embodiment, the training of the fault detection model based on few-sample detection can refer to... Figure 3 As shown, the process includes: preprocessing the input multi-source equipment data (including multi-dimensional data such as equipment faults, historical data, and real-time data) into standardized input suitable for algorithm processing; cleaning the multi-source equipment data to obtain cleaned equipment data; performing vector encoding on the cleaned equipment data to obtain equipment feature vectors; standardizing the equipment feature vectors to obtain standardized equipment feature vectors; and classifying the standardized equipment feature vectors according to fault category labels to obtain small sample model training data for the target equipment under different fault categories.
[0111] Then, data augmentation processing is performed on these small samples, including two methods: basic augmentation of sample adjustment and generative augmentation of the generative model. For the small sample model training data corresponding to each fault category, sample adjustment and augmentation processing is performed on the small sample model training data according to the data type of the small sample model training data to obtain adjusted and augmented training data. For the small sample model training data corresponding to each fault category, generative augmentation processing is performed on the small sample model training data through a conditional adversarial generative network to obtain generative augmented training data. For each fault category, the small sample model training data, adjusted and augmented training data, and generative augmented training data are summarized to obtain the model training data. Sample representation optimization processing is performed on the model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category.
[0112] Then, the initial fault detection model is trained using these meta-learning training data. The meta-learning training data is split into support set data and query set data. The initial fault detection model is trained in an inner loop using the support set data corresponding to each fault category to update the local parameters corresponding to each fault category, thus obtaining the inner loop fault detection model. The inner loop fault detection model is trained in an outer loop using the query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thus obtaining the target fault detection model for the target device.
[0113] After the model training is completed, for new fault categories, the model can be dynamically optimized and updated through incremental training. At this time, it is necessary to obtain the incremental learning training data of the target fault detection model; determine the importance of the parameters in the target fault detection model through the elastic weight solidification method; determine the frozen parameters and parameters to be updated in the target fault detection model based on the importance of the parameters; construct the incremental training comprehensive loss function based on the frozen parameters and parameters to be updated; and perform incremental training on the target fault detection model based on the incremental learning training data and the incremental training comprehensive loss function to obtain the fault detection optimized model.
[0114] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0115] Based on the same inventive concept, this application also provides a fault detection model training device for implementing the fault detection model training method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the fault detection model training device provided below can be found in the limitations of the fault detection model training method described above, and will not be repeated here.
[0116] In one exemplary embodiment, such as Figure 4 As shown, a fault detection model training device is provided, comprising:
[0117] The data acquisition module 401 is used to acquire small sample model training data of the target device under different fault categories.
[0118] The data augmentation module 403 is used to perform data augmentation and representation optimization on the small sample model training data corresponding to each fault category, so as to obtain the meta-learning training data corresponding to each fault category, and split the meta-learning training data into support set data and query set data.
[0119] The first training module 405 is used to perform inner loop training on the initial fault detection model using the support set data corresponding to each fault category, so as to update the local parameters corresponding to each fault category and obtain the inner loop fault detection model.
[0120] The second training module 407 is used to train the inner loop fault detection model using query set data containing all fault categories, so as to update the shared parameters corresponding to all fault categories and obtain the target fault detection model for the target device.
[0121] In one embodiment, the data acquisition module 401 is specifically used to: acquire multi-source data of the target device under fault conditions from historical data, and the fault category label corresponding to each multi-source data of the device; perform data cleaning processing on the multi-source data of the device to obtain cleaned data of the device; perform vector encoding processing on the cleaned data of the device to obtain device feature vectors; perform standardization processing on the device feature vectors to obtain standardized device feature vectors; and perform classification processing on the standardized device feature vectors according to the fault category labels to obtain small sample model training data of the target device under different fault categories.
[0122] In one embodiment, the data augmentation module 403 is specifically used for: performing sample adjustment and augmentation processing on the small sample model training data corresponding to each fault category according to the data type of the small sample model training data to obtain adjusted and augmented training data; performing generative augmentation processing on the small sample model training data corresponding to each fault category through a conditional adversarial generative network to obtain generatively augmented training data; summarizing the small sample model training data, adjusted and augmented training data, and generatively augmented training data for each fault category to obtain model training data; and performing sample representation optimization processing on the model training data corresponding to each fault category to obtain meta-learning training data corresponding to each fault category.
[0123] In one embodiment, the system further includes an incremental training module, configured to: acquire incremental learning training data of the target fault detection model; and perform incremental training on the target fault detection model based on the incremental learning training data to obtain an optimized fault detection model.
[0124] In one embodiment, the incremental training module is specifically used to: determine the importance of parameters in the target fault detection model using the elastic weight solidification method; determine the frozen parameters and parameters to be updated in the target fault detection model based on the importance of the parameters; construct an incremental training comprehensive loss function based on the frozen parameters and parameters to be updated; and perform incremental training on the target fault detection model based on the incremental learning training data and the incremental training comprehensive loss function to obtain an optimized fault detection model.
[0125] In one embodiment, the incremental training module is specifically used to: identify the sample uncertainty corresponding to each incremental learning training data; determine the sample weight of the corresponding incremental learning training data based on the sample uncertainty; and perform incremental training on the target fault detection model based on the incremental learning training data with sample weights and the incremental training comprehensive loss function to obtain the fault detection optimized model.
[0126] Each module in the aforementioned fault detection model training device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0127] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to fault detection model training. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a fault detection model training method.
[0128] In an exemplary embodiment, a computer device is provided, which may be a terminal, with the following internal structure diagram. The computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a fault detection model training method. The display unit of the computer device is used to form a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0129] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0130] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0131] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0132] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in the above-described method embodiments.
[0133] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0134] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0135] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0136] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for training a fault detection model, characterized in that, The method includes: Obtain small sample model training data for the target device under different fault categories; Data augmentation and representation optimization are performed on the small sample model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category. The meta-learning training data is then split into support set data and query set data. The initial fault detection model is trained in an inner loop using the support set data corresponding to each fault category, and the local parameters corresponding to each fault category are updated to obtain the inner loop fault detection model. The inner loop fault detection model is trained by using query set data containing all fault categories to update the shared parameters corresponding to all fault categories, thereby obtaining a target fault detection model for the target device.
2. The method according to claim 1, characterized in that, The acquisition of small sample model training data for the target device under different fault categories includes: Acquire multi-source data of the target device under fault conditions from historical data, as well as the fault category label corresponding to each device's multi-source data; The multi-source data from the device is cleaned to obtain device cleaning data; The equipment cleaning data is processed by vector encoding to obtain equipment feature vectors; The device feature vector is standardized to obtain a standardized device feature vector; Based on the fault category label, the standardized equipment feature vector is classified to obtain small sample model training data for the target equipment under different fault categories.
3. The method according to claim 1, characterized in that, The process of performing data augmentation and representation optimization on the small sample model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category includes: For each fault category, the small sample model training data is adjusted and enhanced according to the data type of the small sample model training data to obtain adjusted and enhanced training data. For each fault category, the small sample model training data is used to perform generative augmentation processing on the small sample model training data through a conditional adversarial generative network to obtain generative augmented training data. For each fault category, the small sample model training data, the adjusted and enhanced training data, and the generated enhanced training data are summarized to obtain the model training data; Sample representation optimization processing is performed on the model training data corresponding to each fault category to obtain the meta-learning training data corresponding to each fault category.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Obtain incremental learning training data for the target fault detection model; The target fault detection model is incrementally trained based on the incremental learning training data to obtain an optimized fault detection model.
5. The method according to claim 4, characterized in that, The incremental training process of the target fault detection model based on the incremental learning training data to obtain the optimized fault detection model includes: The importance of parameters in the target fault detection model is determined by the elastic weight solidification method. Based on the importance of the parameters, the frozen parameters and parameters to be updated in the target fault detection model are determined. Construct an incremental training comprehensive loss function based on the frozen parameters and the parameters to be updated; Based on the incremental learning training data and the incremental training comprehensive loss function, the target fault detection model is incrementally trained to obtain an optimized fault detection model.
6. The method according to claim 5, characterized in that, The step of incrementally training the target fault detection model based on the incremental learning training data and the incremental training comprehensive loss function to obtain the fault detection optimized model includes: Identify the sample uncertainty corresponding to each incremental learning training data; Based on the aforementioned sample uncertainty, determine the sample weights of the corresponding incremental learning training data; Based on the incremental learning training data with sample weights and the incremental training comprehensive loss function, the target fault detection model is incrementally trained to obtain an optimized fault detection model.
7. A fault detection model training device, characterized in that, The device includes: The data acquisition module is used to acquire small sample model training data for the target device under different fault categories; The data augmentation module is used to perform data augmentation and representation optimization on the small sample model training data corresponding to each fault category, to obtain the meta-learning training data corresponding to each fault category, and to split the meta-learning training data into support set data and query set data. The first training module is used to train the initial fault detection model in an inner loop using the support set data corresponding to each fault category, so as to update the local parameters corresponding to each fault category and obtain the inner loop fault detection model. The second training module is used to perform outer loop training on the inner loop fault detection model using query set data containing all fault categories, so as to update the shared parameters corresponding to all fault categories and obtain the target fault detection model for the target device.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.