Small sample detection process optimization method for user side terminal and control loop
By combining GAN and KDE methods, the small sample detection process of the power system is optimized, which solves the problem of insufficient detection efficiency and accuracy in the case of small sample data, and achieves more efficient and more accurate power load management system detection.
Patent Information
- Application Number
- CN202510220583.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-13
AI Technical Summary
The existing power system detection technology is insufficient in efficiency and accuracy under small sample data, making it difficult to meet the needs of the new power load management system for efficient and accurate data processing.
Using a method combining generative adversarial network (GAN) and non-parametric kernel density estimation (KDE), small sample data is enhanced through GAN, and probability density estimation is used to optimize detection cycles and sample selection strategies.
It improves the efficiency of using small sample data sets, enhances the adaptability and accuracy of the detection process, supports accurate status monitoring and management, and promotes the accuracy of stable system operation and maintenance decisions.
Smart Images

Figure CN120146283A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system maintenance, and in particular to an optimization method for the small-sample detection process of a user-side terminal and a control loop. Background Art
[0002] In a power system, regular detection is an important measure to ensure the normal operation, safety, and stability of the power system. Through regular detection, potential problems can be discovered and solved in a timely manner. However, there may be situations where detection is not timely or too intensive in a fixed detection cycle. Data sampling in equipment condition detection often adopts random sampling, systematic sampling, etc. These sampling methods are simple and easy to implement, but they have disadvantages such as large deviation and complicated procedures. Traditional regular detection and sample selection cannot meet the high requirements of social development for power system management.
[0003] A new type of power load management system not only needs to adapt to a complex and changeable power network structure but also must meet the increasing power supply demand. Efficient and accurate data processing technology is crucial for ensuring the stability and security of the system, which is particularly significant in the user side and control loop aspects.
[0004] On-site detection of the user side and control loop is crucial for maintaining the normal operation of the power system. The energy demand of users may fluctuate due to seasons, time, or specific events, and real-time monitoring of these changes is a complex and critical task. In addition, as a core component of the power system, the stability and performance of the control loop directly affect the operation efficiency and safety of the entire system. Although there is relatively rich theory and experience in the detection of control loops, existing detection technologies still face many limitations, especially in terms of efficiency and accuracy in the context of small-sample data.
[0005] As an advanced data augmentation technology, the generative adversarial network GAN can effectively generate high-quality synthetic data in multiple fields. This technology provides the possibility to solve the small-sample problem. However, how to adjust and optimize GAN to ensure the quality and representativeness of the generated data, and how to effectively use these data for real-time detection and system optimization, remains an urgent problem to be solved. At the same time, non-parametric kernel density estimation KDE, as a flexible probability density estimation method, provides an analysis means that does not depend on the prior distribution of data and is suitable for processing datasets with complex and unknown distributions.
[0006] Therefore, developing a method that combines the generative adversarial network and non-parametric kernel density estimation to optimize the small-sample detection process and improve the detection efficiency and accuracy of the user side and control loop in the power load management system has become a key technical challenge for enhancing system stability and safe operation. Summary of the Invention
[0007] The object of the present invention is to provide a method for optimizing the small-sample detection process of a user-side terminal and a control loop, improving the detection efficiency and accuracy of a new load management system in the case of insufficient data, combining GAN and KDE, improving the utilization efficiency of a small-sample data set, enhancing the adaptive ability and accuracy of the detection process, effectively supporting the implementation of accurate status monitoring and management work, and promoting the stable operation of the system and the accuracy of maintenance decisions.
[0008] To achieve the above object, the present invention provides a method for optimizing the small-sample detection process of a user-side terminal and a control loop, comprising the following steps:
[0009] S1. Collect on-site detection data of the user-side terminal and the control loop based on the detection period and the sample selection strategy;
[0010] S2. Preprocess the on-site detection data to form a training data set;
[0011] S3. Use the generative adversarial network GAN to perform data augmentation on the training data set;
[0012] S4. During the data augmentation process, implement immediate reward calculation and parameter update to optimize the performance of the generative adversarial network GAN;
[0013] S5. Apply non-parametric kernel density estimation KDE to perform probability density estimation on the augmented training data set, and optimize the detection period and the sample selection strategy based on the probability density estimation result;
[0014] S6. Based on the optimized detection period and the sample selection strategy, regularly update the probability density estimation result using newly collected data, and implement periodic detection and sample selection.
[0015] Preferably, in S2, the preprocessing includes numerical data normalization, vectorizing text data using the Word2Vec word embedding method, and splicing processing:
[0016] S21. Numerical data normalization;
[0017] Normalize the numerical data in the on-site detection data to a unified range, and the formula is:
[0018]
[0019] S22. Vectorize the text data in the on-site detection data using the Word2Vec word embedding method;
[0020] S23. The splicing processing includes adopting a direct splicing method, and inputting the data processed in S21 and S22 into the GAN model for training.
[0021] Preferably, in S3, the generative adversarial network GAN includes a generator and a discriminator. The generator is used to generate fake data samples based on the real data samples in the training dataset, and the discriminator is used to distinguish between real data samples and fake data samples. The loss function of the discriminator is:
[0022]
[0023] where, (X) is the real data sample, (z) is the random noise vector, and G(z) is the fake data sample; D(X) is the output probability of the discriminator, representing the probability that (X) is a real data sample; Ε[ ] represents the expectation.
[0024] Preferably, in S4, the immediate reward is divided into a generator reward and a discriminator reward. The reward function of the generator is log(1 - D(G(z)))(3), and the reward function of the discriminator is logD(X) + log(1 - D(G(z)))(4). The calculation of the immediate reward includes calculating the scores of the discriminator for real data samples and fake data samples, and adjusting the parameters of the generator and the discriminator according to the scores of the discriminator for real data samples and fake data samples.
[0025] Preferably, in S4, the parameter update is divided into the parameter update of the generator and the parameter update of the discriminator; the gradient descent method is used to update the parameters of the generator to maximize its ability to deceive the discriminator; the gradient ascent method is used to update the parameters of the discriminator to maximize its reward.
[0026] Preferably, the parameter update formula of the generator is:
[0027]
[0028] where, θ G 、α G are the parameters and learning rate of the generator;
[0029] The parameter update formula of the discriminator is:
[0030]
[0031] where, θ D 、α D are the parameters and learning rate of the discriminator.
[0032] Preferably, in S5, the non-parametric kernel density estimation KDE uses a Gaussian kernel function to perform probability density analysis on the enhanced training dataset. The formula of the non-parametric kernel density estimation KDE is:
[0033]
[0034] where, n is the number of sample points in the enhanced training dataset, h is the bandwidth, xi is a single sample point of the enhanced training dataset, and K is the Gaussian kernel function;
[0035] Based on the probability density estimation results, optimize the detection period and the sample selection strategy, including the following steps:
[0036] S51. Analyze the density function;
[0037] According to the probability density estimation results, identify the high-density area and the low-density area of the data in the enhanced training dataset;
[0038] S52. Set the sampling inspection period;
[0039] For the high-density area and the low-density area, set the corresponding sampling inspection periods respectively;
[0040] S53. Sample selection strategy;
[0041] Optimize the sample selection strategy, including increasing the collection of sample quantities for the low-density area within the set sampling inspection period.
[0042] Preferably, a small sample detection process optimization system for a user-side terminal and a control loop, characterized by including:
[0043] A data collection module, used for collecting and storing on-site detection data of the user-side terminal and the control loop;
[0044] A data preprocessing module, used for preprocessing the data in the data collection module and forming a training dataset;
[0045] A data enhancement module, using the generative adversarial network GAN to enhance the training dataset;
[0046] A GAN performance optimization module, during the data enhancement process, implementing immediate reward calculation and parameter update to optimize the performance of the generative adversarial network GAN;
[0047] A probability density estimation module, applying non-parametric kernel density estimation KDE to perform probability density estimation on the enhanced training dataset, and optimizing the detection period and the sample selection strategy based on the probability density estimation results;
[0048] A process optimization module, based on the optimized detection period and the sample selection strategy, regularly updates the probability density estimation results using newly collected data, and implements periodic detection and sample selection.
[0049] Preferably, a computer device, comprising: one or more processors; the processors are configured to store one or more programs; when the one or more programs are executed by the one or more processors, the method for optimizing the small sample detection process of a user-side terminal and a control loop as described in any one of claims 1 to 7 is implemented.
[0050] Preferably, a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the method for optimizing the small sample detection process of a user-side terminal and a control loop as described in any one of claims 1 to 7 is implemented.
[0051] Therefore, the present invention adopts the above-mentioned method for optimizing the small sample detection process of a user-side terminal and a control loop, uses the generative adversarial network GAN to automatically generate high-quality data samples, combines the mechanism of immediate reward calculation and parameter update to optimize the GAN model training, and ensures that the generated data better conforms to the operating characteristics of the actual system. At the same time, through non-parametric kernel density estimation KDE, which does not depend on the prior distribution of the data, the probability density of the data set can be flexibly estimated, thereby optimizing the detection process and sampling strategy. Combining GAN and KDE, this method not only improves the utilization efficiency of the small sample data set, but also enhances the adaptive ability and accuracy of the detection process, effectively supports the implementation of precise condition monitoring and management work, and promotes the stable operation of the system and the accuracy of maintenance decisions.
[0052] The technical solution of the present invention will be further described in detail below with reference to the drawings and embodiments. Description of the Drawings
[0053] Figure 1 It is a schematic structural diagram of an embodiment of the method for optimizing the small sample detection process of a user-side terminal and a control loop according to the present invention. Detailed Embodiments
[0054] The technical solution of the present invention will be further described below with reference to the drawings and embodiments.
[0055] Unless otherwise defined, the technical terms or scientific terms used in the present invention shall have the ordinary meanings understood by those of ordinary skill in the art to which the present invention pertains. The "first", "second" and similar terms used in the present invention do not denote any order, quantity or importance, but are only used to distinguish different components. Words such as "comprising" or "including" mean that the elements or items appearing before the word cover the elements or items listed after the word and their equivalents, without excluding other elements or items. Words such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Upper", "lower", "left", "right", etc. are only used to indicate relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0056] Example 1
[0057] The present invention provides an optimization method for the small-sample detection process of a user-side terminal and a control loop. The process is as Figure 1 shown and includes the following steps:
[0058] S1. Based on the detection period and the sample selection strategy, collect on-site detection data of the user-side terminal and the control loop through a load operation and maintenance detector, etc.
[0059] S2. Preprocess the on-site detection data to form a training data set.
[0060] The preprocessing includes numerical data normalization, vectorizing text data using the Word2Vec word embedding method, and splicing processing:
[0061] S21. Numerical data normalization;
[0062] Normalize the numerical data in the on-site detection data to a unified range (such as 0 to 1) for easy model processing. The calculation formula is:
[0063]
[0064] S22. Vectorize the text data using the Word2Vec word embedding method.
[0065] S23. In a direct splicing manner, input the data of S21 and S22 into the GAN model for training.
[0066] S3. Use the generative adversarial network GAN to perform data augmentation on the training data set.
[0067] The generative adversarial network GAN consists of a generator and a discriminator. Through the continuous adversarial process between the generator and the discriminator, the quality of the generated data is improved, and the original small sample dataset is expanded. Specifically, the generator is used to generate fake data samples based on the real data samples in the training dataset, and is responsible for converting the input random noise vector into as real data samples as possible; the discriminator is used to distinguish whether the input samples come from real data samples or fake data samples, and is trained until the discriminator cannot distinguish between real data samples and fake data samples, while enabling the generator to generate as real data as possible. The loss function of the discriminator is:
[0068]
[0069] where (X) is the real data sample, (z) is the random noise vector, and G(z) is the fake data sample; D(X) is the output probability of the discriminator, representing the probability that (X) is a real sample; Ε[ ] represents the expectation.
[0070] S4. During the data augmentation process, immediate reward calculation and parameter update are implemented to optimize the performance of the generative adversarial network GAN.
[0071] The immediate reward is divided into the generator reward and the discriminator reward. The goal of the generator is to deceive the discriminator so that the discriminator mistakes the generated samples for real samples. The generator reward function is log(1 - D(G(z)))(3). The goal of the discriminator is to maximize the correct identification of real data samples or fake data samples. The discriminator reward function is logD(X) + log(1 - D(G(z)))(4). The immediate reward calculation includes calculating the scores of the discriminator for real data samples and fake data samples, and adjusting the parameters of the generator and the discriminator according to the scores of the discriminator for real data samples and fake data samples.
[0072] The parameter update is divided into the parameter update of the generator and the parameter update of the discriminator; the gradient descent method is used to update the parameters of the generator to maximize its ability to deceive the discriminator. The update formula is:
[0073]
[0074] where θ G and α G are the parameters and learning rate of the generator.
[0075] The gradient ascent method is used to update the parameters of the discriminator to maximize its reward. The update formula is:
[0076]
[0077] where θ D and α D are the parameters and learning rate of the discriminator.
[0078] S5. Apply non-parametric kernel density estimation (KDE) to perform probability density estimation on the enhanced training dataset, and optimize the detection period and sample selection strategy based on the probability density estimation results.
[0079] The non-parametric kernel density estimation (KDE) uses a Gaussian kernel function to perform probability density analysis on the enhanced training dataset. The reason for using the Gaussian kernel function for density estimation is that the Gaussian kernel can provide good smoothing effects when dealing with small-sample data. The key to bandwidth selection lies in balancing the bias and variance of the estimation, which can be optimized through methods such as cross-validation. The formula for non-parametric kernel density estimation (KDE) is:
[0080]
[0081] where n is the number of sample points in the enhanced training dataset, h is the bandwidth, x i is a single sample point in the enhanced training dataset, and K is the Gaussian kernel function.
[0082] Based on the probability density estimation results, optimize the detection period and sample selection strategy, including the following steps:
[0083] S51. Analyze the density function;
[0084] According to the probability density estimation results, identify the high-density and low-density regions in the enhanced training dataset. The high-density region represents normal operations or typical behaviors, while the low-density region indicates possible abnormal, changing, or uncommon states.
[0085] S52. Set the sampling inspection period;
[0086] For the high-density region, a longer sampling inspection period can be set because the behaviors in the high-density region are relatively regular and change little; for the low-density region, a shorter sampling inspection period is set because the low-density region may be associated with higher risks or changes and requires more frequent monitoring to capture possible abnormalities or changes.
[0087] S53. Sample selection strategy;
[0088] According to the probability density estimation results, optimize the sample selection strategy. For example, within the predetermined sampling inspection period, increase the number of samples for the low-density region to ensure sufficient data to support accurate decision-making and analysis.
[0089] S6. Based on the optimized detection period and sample selection strategy, regularly update the probability density estimation results using newly collected data, and implement periodic detection and sample selection to reflect the latest operating status and data patterns of the system. Dynamic adjustment ensures that the detection strategy is synchronized with the system state, improving the monitoring efficiency and accuracy.
[0090] The present invention also provides a small sample detection process optimization system for user-side terminals and control circuits. Each module and its functions are described as follows:
[0091] A data collection module, which is used to collect and store on-site detection data of user-side terminals and control circuits;
[0092] A data preprocessing module, which is used to preprocess the data in the data collection module and form a training data set;
[0093] A data augmentation module, which uses the generative adversarial network GAN to augment the training data set;
[0094] A GAN performance optimization module, which implements immediate reward calculation and parameter update during the data augmentation process to optimize the performance of the generative adversarial network GAN;
[0095] A probability density estimation module, which applies non-parametric kernel density estimation KDE to estimate the probability density of the augmented training data set. Based on the probability density estimation results, it optimizes the detection period and sample selection strategy;
[0096] A process optimization module, which, based on the optimized detection period and sample selection strategy, regularly updates the probability density estimation results using newly collected data, and implements periodic detection and sample selection.
[0097] The present invention also relates to a computer device and a computer-readable storage medium. The computer device includes one or more processors for storing one or more programs; when the one or more programs are executed by the one or more processors, it implements the small sample detection process optimization method for user-side terminals and control circuits described in this embodiment. The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the small sample detection process optimization method for user-side terminals and control circuits described in this embodiment.
[0098] Therefore, the present invention adopts the above-mentioned small sample detection process optimization method for user-side terminals and control circuits, uses the generative adversarial network GAN to automatically generate high-quality data samples, combines the mechanism of immediate reward calculation and parameter update to optimize the training of the GAN model, and ensures that the generated data better conforms to the operating characteristics of the actual system. At the same time, through non-parametric kernel density estimation KDE, which does not depend on the prior distribution of the data, it can flexibly estimate the probability density of the data set, and then optimize the detection process and sampling strategy. Combining GAN and KDE, this method not only improves the utilization efficiency of the small sample data set, but also enhances the adaptive ability and accuracy of the detection process, effectively supports the implementation of accurate condition monitoring and management work, and promotes the stable operation of the system and the accuracy of maintenance decisions.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions of the present invention or make equivalent replacements, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for optimizing a small sample detection process of a user-side terminal and a control loop, characterized in that: The following steps are involved: S1. Based on the detection cycle and sample selection strategy, collect on-site detection data of user-side terminals and control loops; S2. Preprocess the on-site detection data to form a training data set; S3, using the generative adversarial network GAN to enhance the training data set; S4. Implement instant reward calculation and parameter update during data enhancement to optimize the performance of the Generative Adversarial Network (GAN). S5. Apply non-parametric kernel density estimation KDE to perform probability density estimation on the enhanced training data set, and optimize the detection cycle and sample selection strategy based on the probability density estimation results; S6. Based on the optimized detection cycle and sample selection strategy, regularly use newly collected data to update the probability density estimation results and implement periodic detection and sample selection.
2. According to claim 1, a method for optimizing a small sample detection process of a user-side terminal and a control loop is characterized in that: In S2, preprocessing includes normalization of numerical data, vectorization of text data using the Word2Vec word embedding method, and concatenation processing: S21, normalization of numerical data; Normalize the numerical data in the field detection data to a unified range, the formula is: S22, using the Word2Vec word embedding method to vectorize the text data in the field detection data; S23, the splicing processing includes using a direct splicing method to input the data processed by S21 and S22 into the GAN model for training.
3. The method for optimizing a small sample detection process of a user-side terminal and a control loop according to claim 1, characterized in that: In S3, the generative adversarial network GAN includes a generator and a discriminator. The generator is used to generate false data samples based on the real data samples in the training data set, and the discriminator is used to distinguish between real data samples and false data samples. The loss function of the discriminator is: Among them, (X) is a real data sample, (z) is a random noise vector, G(z) is a false data sample; D(X) is the discriminator output probability, indicating the probability that (X) is a real data sample; Ε[] represents the expectation.
4. The method for optimizing a small sample detection process of a user-side terminal and a control loop according to claim 3, characterized in that: In S4, the immediate reward is divided into generator reward and discriminator reward. The reward function of the generator is log(1-D(G(z)))(3), and the reward function of the discriminator is logD(X)+log(1-D(G(z)))(4). The immediate reward calculation includes calculating the discriminator's scores for real data samples and fake data samples, and adjusting the parameters of the generator and discriminator according to the discriminator's scores for real data samples and fake data samples.
5. The method for optimizing a small sample detection process of a user-side terminal and a control loop according to claim 3 is characterized in that: In S4, parameter updates are divided into parameter updates of the generator and the discriminator. The parameters of the generator are updated using the gradient descent method to maximize its ability to deceive the discriminator. Update the parameters of the discriminator using gradient ascent to maximize its reward.
6. A method for optimizing a small sample detection process of a user-side terminal and a control loop according to claim 5, characterized in that: The parameter update formula of the generator is: Among them, θ G , α G are the parameters and learning rate of the generator; The parameter update formula of the discriminator is: Among them, θ D , α D are the parameters and learning rate of the discriminator.
7. The method for optimizing a small sample detection process of a user-side terminal and a control loop according to claim 1, characterized in that: In S5, the non-parametric kernel density estimation KDE uses a Gaussian kernel function to perform probability density analysis on the enhanced training data set. The formula for the non-parametric kernel density estimation KDE is: Among them, n is the number of sample points in the enhanced training data set, h is the bandwidth, and x i is a single sample point of the enhanced training data set, and K is the Gaussian kernel function; Based on the probability density estimation results, the detection cycle and sample selection strategy are optimized, including the following steps: S51, analyze density function; According to the probability density estimation results, identify the high-density area and the low-density area of the data in the enhanced training data set; S52, setting the sampling inspection cycle; For high-density areas and low-density areas, set corresponding sampling cycles respectively; S53, sample selection strategy; Optimize the sample selection strategy, including increasing the number of samples collected in low-density areas within the set sampling cycle.
8. A small sample detection process optimization system for a user-side terminal and a control loop, characterized in that: include: Data collection module, used to collect and store on-site detection data of user-side terminals and control loops; A data preprocessing module, used to preprocess the data in the data collection module and form a training data set; A data enhancement module, which uses a generative adversarial network (GAN) to perform data enhancement on the training data set; The GAN performance optimization module implements instant reward calculation and parameter update during data enhancement to optimize the performance of the Generative Adversarial Network (GAN); The probability density estimation module uses non-parametric kernel density estimation KDE to estimate the probability density of the enhanced training data set, and optimizes the detection cycle and sample selection strategy based on the probability density estimation results; The process optimization module, based on the optimized detection cycle and sample selection strategy, regularly uses newly collected data to update the probability density estimation results and implement periodic detection and sample selection.
9. A computer device, characterized in that: include: one or more processors; The processor is used to store one or more programs; When the one or more programs are executed by the one or more processors, a small sample detection process optimization method for a user-side terminal and a control loop as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, a small sample detection process optimization method for a user-side terminal and a control loop as described in any one of claims 1 to 7 is implemented.