A Judgment Method and System for the Operation and Maintenance Strategy of Electric Energy Meters Based on Unbalanced Samples

By applying judgment methods and systems based on unbalanced samples in the operation and maintenance of electricity meters, and using diffusion models and deep learning models for data analysis and fault classification, the automation and intelligence problems of operation and maintenance strategy adjustment in the existing technology are solved, and the accuracy and effectiveness of operation and maintenance are improved.

CN119848647BActive Publication Date: 2025-06-17国网福建省电力有限公司营销服务中心 +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510343584.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-06-17
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

The existing technology lacks intelligent decision-making support functions in the operation and maintenance of electricity meters, and cannot automatically adjust the operation and maintenance strategies based on operation and maintenance data and actual conditions, resulting in operation and maintenance decision-making errors and lack of unified standards.

Method used

A method and system for judging the operation and maintenance strategy of the power meter based on unbalanced samples is proposed. By obtaining the historical operation data of the power meter, the data is sampled using the improved diffusion model, and a CNN-LSTM model and support vector machine model are constructed for fault classification and operation and maintenance strategy judgment.

Benefits of technology

It improves the accuracy and timeliness of fault diagnosis, provides more comprehensive and in-depth operation and maintenance guidance, enhances the pertinence and effectiveness of operation and maintenance work, and improves the intelligence and scientificity of operation and maintenance strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848647B_ABST
    Figure CN119848647B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for judging the operation and maintenance strategy of electric energy meters based on unbalanced samples, belonging to the technical field of on-line monitoring of electric power metering. The method includes the following steps: obtaining the historical operation data of the electric energy meter, using an improved diffusion model to expand the samples of the normalized historical operation data to obtain sample data; constructing a fault judgment model, including a feature extraction layer and a fault classification layer; specifically, the feature extraction layer uses a CNN-LSTM model to extract feature vectors; specifically, the fault classification layer calculates the fault index and the importance index and inputs them into the model for fault classification; inputting the sample data into the fault judgment model for training to obtain the final fault judgment model; obtaining the to-be-evaluated operation data of the to-be-evaluated electric energy meter and inputting it into the final fault judgment model to obtain the fault type; obtaining the operation and maintenance strategy according to the fault type and making a judgment to obtain the judgment result of the operation and maintenance strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of on-line monitoring of electric power metering, and mainly relates to a method and system for judging the operation and maintenance strategy of electric energy meters based on unbalanced samples. Background Art

[0002] The electric energy meter is a key device for electric energy metering in the power system, and its accuracy is directly related to the calculation of electricity charges and the measurement of electricity consumption. With the development of power marketization and intelligence, the operation and maintenance management of electric energy meters becomes particularly important. First of all, the accurate metering of electric energy meters is the basis for ensuring the fairness of power transactions, and is of great significance for maintaining the order of the power market and protecting the rights and interests of consumers. Secondly, through the regular maintenance and calibration of electric energy meters, measurement errors can be detected and processed in time to avoid economic losses. In addition, the stable operation of electric energy meters is crucial for the safe and reliable power supply of the power grid. The operation and maintenance work can prevent and reduce the occurrence of faults and improve the operation efficiency of the power grid. With the development of technology, the functions of electric energy meters are becoming more and more complex, and a professional operation and maintenance team is needed to ensure their efficient and stable operation. Therefore, the operation and maintenance of electric energy meters is not only a technical requirement, but also a market and legal requirement, and plays an important role in improving the operation quality and service level of the entire power system.

[0003] However, the detection of traditional electric energy metering equipment mainly relies on manual work, which has certain limitations and is difficult to meet the development requirements of power enterprises under the new situation; some operation and maintenance personnel rely too much on personal experience when judging the operation and maintenance strategy, lacking scientific basis and data analysis, resulting in operation and maintenance decision-making errors, lacking unified standards, affecting the unity and standardization of operation and maintenance work, and the existing operation and maintenance systems also lack intelligent decision support functions and cannot automatically adjust the operation and maintenance strategy according to operation and maintenance data and actual situations.

[0004] The Chinese invention patent with the publication number "CN118885736A" discloses a "Small-Sample Mechanical Fault Diagnosis Method Based on Improved Denoising Diffusion Model", specifically disclosing that "collect the original vibration signals of key transmission components under different mechanical health states and perform preprocessing; use the short-time Fourier transform to convert the one-dimensional time-domain signal into a two-dimensional time-frequency diagram; construct a denoising diffusion model and improve the model structure; input the converted time-frequency diagram into the improved denoising diffusion model for training; use the trained denoising diffusion model to generate different types of samples, expand the original data set, and form a new data set; output the new data set to the constructed convolutional network to complete fault diagnosis". However, in the data processing process of this method, it is necessary to convert the one-dimensional time-domain signal into a two-dimensional time-frequency diagram and construct a denoising diffusion model for training. The process is relatively complex and requires high computing power and data processing technology. In addition, after the fault diagnosis is completed, this method does not further provide a detailed operation and maintenance strategy formulation and judgment process. In practical applications, operation and maintenance personnel may need to explore by themselves or rely on experience to formulate operation and maintenance strategies, which easily leads to inconsistencies and inefficiencies in the strategies. Summary of the Invention

[0005] In order to solve the above problems existing in the prior art, the present application provides a method and system for judging the operation and maintenance strategy of an electric energy meter based on unbalanced samples.

[0006] The technical solution of the present application is as follows:

[0007] On the one hand, the present invention proposes a method for judging the operation and maintenance strategy of an electric energy meter based on unbalanced samples, and the method includes:

[0008] Obtain the historical operation data of the electricity meter, perform normalization processing on the historical operation data to obtain the normalized historical operation data; construct an improved diffusion model, the improved diffusion model includes an input module, a data processing module, an encoder module, an inverse diffusion module and an output module, and the data processing module includes a first sub-module, a second sub-module and a third sub-module; the first sub-module includes an embedding unit; the second sub-module includes a diffusion unit and an embedding unit; the third sub-module includes an embedding unit and an LSTM unit; the input module obtains the normalized historical operation data and a preset diffusion step number, inputs the preset diffusion step number into the first sub-module, and inputs the normalized historical operation data into the second sub-module and the third sub-module; the embedding unit of the first sub-module obtains the preset diffusion step number and outputs the output result of the first sub-module; the diffusion unit of the second sub-module obtains the normalized historical operation data for diffusion, inputs the diffused data into the embedding unit of the second sub-module, and outputs the output result of the second sub-module. The embedding unit of the third sub-module divides the normalized historical operation data and performs one-dimensional linear projection to obtain the projection space of the electricity meter, and adds the position encoding of the electricity meter to the projection space to obtain the position vector space; inputs the position vector space into the LSTM unit of the third sub-module to obtain the output vector of the network unit of the LSTM unit; the encoder module includes stacked modules, each stacked module contains a normalization layer and a multi-head self-attention layer; use the improved diffusion model to perform sample augmentation on the normalized historical operation data to obtain sample data;

[0009] Construct a fault judgment model, including a feature extraction layer and a fault classification layer; among them, the feature extraction layer specifically uses a CNN-LSTM model to extract the feature vector of the sample data; the fault classification layer specifically calculates the fault index and the importance index, and inputs the fault index and the importance index into a support vector machine model for fault classification; the fault index is specifically based on the feature vector Calculate the fault degree of the electricity meter, and use the analytic hierarchy process to analyze the fault type to obtain the fault weight, and combine the fault weight and the fault degree to obtain the fault index; the importance index is specifically to calculate the correlation coefficient of the electricity meter, and perform weighted processing on the correlation coefficient to obtain the importance index of the electricity meter; input the sample data into the fault judgment model for training to obtain the final fault judgment model;

[0010] Obtain the to-be-evaluated operation data of the to-be-evaluated electricity meter, input the to-be-evaluated operation data into the final fault judgment model to obtain the fault type of the fault data in the to-be-evaluated operation data; obtain the operation and maintenance strategy of the to-be-evaluated electricity meter according to the fault type, and judge the operation and maintenance strategy to obtain the judgment result of the operation and maintenance strategy.

[0011] Preferably, the normalization process is specifically to map the historical operation data to the interval [0, 1], specifically as follows:

[0012] , ;

[0013] ;

[0014] ;

[0015] In the formula, represents the historical operation data sequence of the th electricity meter; represents the vector group corresponding to the th historical operation data of the th electricity meter. The vector group includes the output voltage , the output current , the output power and the power factor error ; represents the th output voltage of the th electricity meter; represents the th output current of the th electricity meter; represents the th output power of the th electricity meter; represents the th power factor error of the th electricity meter; represents the minimum value of the vector group corresponding to the th historical operation data of the th electricity meter; represents the maximum value of the vector group corresponding to the th historical operation data of the th electricity meter; represents the normalized historical operation data sequence of the th electricity meter; represents the vector group corresponding to the th normalized historical operation of the th electricity meter; represents the th normalized output voltage of the th electricity meter; represents the th normalized output current of the th electricity meter; represents the th electricity meter's A normalized output power; Denote the th normalized power factor error of the th electricity meter; Denote the index value of the th historical operation data sequence; Denote the length of the historical operation data sequence, i.e., the number of vector groups; Denote the th index value of the electricity meter.

[0016] Preferably, in the improved diffusion model:

[0017] The embedding unit of the first sub-module obtains the preset number of diffusion steps and outputs the embedding result , which is the output result of the first sub-module;

[0018] The diffusion unit of the second sub-module obtains the normalized historical operation data for diffusion, and inputs the diffused data into the embedding unit of the second sub-module, which is expressed by the formula:

[0019] ;

[0020] ;

[0021] , ;

[0022] ;

[0023] In the formula, Denote The historical operation data diffused after the preset number of diffusion steps, i.e., the diffused data; Denote the th normalized historical operation data sequence of the electricity meter; Denote the noise accumulation coefficient of the preset number of diffusion steps; Denote the noise ratio of the preset number of diffusion steps; Denote the diffusion rate of the preset number of diffusion steps; Denote the Gaussian noise that follows the standard normal distribution preset; Denote the index value of the preset number of diffusion steps; Denote the maximum value of the preset number of diffusion steps; Denote the th output result of the second sub-module after steps of diffusion of the electricity meter; Denote the embedding function; Denote the th index value of the electricity meter;

[0024] The output results of the first sub-module and the second sub-module are subjected to residual fusion, which is expressed by the formula:

[0025] ;

[0026] In the formula, represents the output result of the data processing module after the th electricity meter has undergone steps of diffusion; represents residual fusion; represents the output result of the first sub-module;

[0027] The embedding unit of the third sub-module divides the normalized historical operation data and performs one-dimensional linear projection, which is expressed by the formula:

[0028] ;

[0029] , ;

[0030] In the formula, represents the number of divided data blocks; represents the preset data block division size; represents the projection space of the th electricity meter; represents the data after one-dimensional linear projection of the th data block of the th electricity meter; represents the data of the th data block of the th electricity meter after division; represents the index value of the th data block; represents the length of the historical operation data sequence, that is, the number of vector groups; represents the data sequence set;

[0031] The position encoding of the electricity meter is added to the projection space to obtain the position vector space; the position vector space is input into the LSTM unit of the third sub-module, which is expressed by the formula:

[0032] ;

[0033] ;

[0034] ;

[0035] In the formula, represents the The position vector space of an electricity meter; Represents the position encoding; Represents the th data block of the th electricity meter's position vector space; Represents the network unit of the LSTM cell; Represents the set of hidden layer states, i.e., the output result of the third sub-module of the th electricity meter; Represents the th electricity meter's th data block's output vector of the network unit of the LSTM cell; Represents the th electricity meter's th data block's output vector of the network unit of the LSTM cell; Represents the th electricity meter's th data block's output vector of the network unit of the LSTM cell.

[0036] Preferably, the encoder module normalizes the output result of the data processing module and the set of hidden layer states and then inputs them into the multi-head self-attention layer, which is expressed by the formula:

[0037] , ;

[0038] ;

[0039] ;

[0040] ;

[0041] ;

[0042] ;

[0043] ;

[0044] ;

[0045] ;

[0046] In the formula, Represents the output of the stacked module after steps of diffusion of the th electricity meter; Represents the value vector of the th multi-head self-attention layer; Represents the The key vectors of multiple multi-head self-attention layers; Denote the query vectors of the multiple multi-head self-attention layers; Denote the linear layer; Denote the linear transformation matrix of the multiple value vectors; Denote the linear transformation matrix of the multiple key vectors; Denote the number of heads of the multi-head attention mechanism; Denote the attention mechanism; Denote the set of query vectors of the multi-head self-attention layer; Denote the set of key vectors of the multi-head self-attention layer; Denote the set of value vectors of the multi-head self-attention layer; Denote the index value of the multiple multi-head self-attention layers; Denote the multi-head self-attention mechanism; Denote the preset linear transformation matrix;

[0047] Use the output of the stacking module as the input of the next stacking module, and iterate times to generate the output of the encoder module ;

[0048] The inverse diffusion module obtains the output of the encoder module for sample augmentation to generate sample data, which is expressed by the formula:

[0049] ;

[0050] ;

[0051] ;

[0052] In the formula, Denote the sample data generated by the th electricity meter; Denote the posterior distribution; Denote the mean of the posterior distribution; Denote the calibration factor; Denote the output of the encoder module after steps of diffusion of the Denote after​​ Noise accumulation coefficient after step diffusion;

[0053] Train the inverse diffusion module using the loss function, which can be expressed by the formula:

[0054] ;

[0055] In the formula, represents the loss function; represents the expected value; represents the norm.

[0056] Preferably, the feature extraction layer specifically extracts the feature vector of the sample data using a CNN-LSTM model, which can be expressed by the formula:

[0057] ;

[0058] In the formula, represents the th feature vector of the electricity meter; represents the CNN-LSTM model;

[0059] The fault classification layer specifically calculates the fault index and importance index of the electricity meter and inputs them into a support vector machine model for fault classification. Among them, the fault index specifically calculates the fault degree of the electricity meter based on the feature vector, which can be expressed by the formula:

[0060] ;

[0061] ;

[0062] In the formula, represents the fault degree of the electricity meter; represents the feature mean of normal samples in the sample data; represents normal samples in the sample data; represents the number of normal samples in the sample data; represents the th feature vector of normal samples in the th sample data; represents the index value of normal samples in the th sample data; represents the feature vector of the th sample that is of the same type as the normal sample in the sample data; represents the th sample that is of the same type as the normal sample in the sample data; represents the maximum value of the feature vectors of normal samples in the sample data; Represents the maximum value of the eigenvector of the th sample in the sample data that is of the same category as the normal sample; Represents the minimum value of the eigenvector of the th sample in the sample data that is of the same category as the normal sample; Represents the mean value of the eigenvectors of the th sample in the sample data that is of the same category as the normal sample; Represents a preset first weight; Represents a preset second weight; Represents an activation function; Represents the th index value of the sample in the sample data that is of the same category as the normal sample.

[0063] Preferably, the analytic hierarchy process is used to analyze the fault type to obtain the fault weight, and the fault index is obtained by combining the fault weight and the fault degree, which is expressed by the formula:

[0064] , ;

[0065] In the formula, Represents the fault index; Represents a preset exponential decay factor; Represents the th fault weight; Represents the index value of the th fault weight;

[0066] The important index is specifically to calculate the correlation coefficient of the electric energy meter. The correlation coefficient includes a topological connection coefficient, a metering level coefficient, and an influence coefficient. The important index of the electric energy meter is obtained by weighting the correlation coefficient, which is expressed by the formula:

[0067] ;

[0068] ;

[0069] ;

[0070] ;

[0071] In the formula, Represents the important index of the electric energy meter; Represents the topological connection coefficient; Represents the degree of the line measured by the electric energy meter, that is, the number of lines connected to the electric energy meter; Represents the mean value of the degrees of the lines connected to the current line; Represents the metering level coefficient; Represents the metering level; represents the minimum value of the preset measurement level coefficient; represents the influence coefficient; represents the activation function; represents the power level; represents the weight of the preset topological connection coefficient; represents the weight of the preset measurement level coefficient; represents the weight of the preset influence coefficient;

[0072] The fault index and the importance index are input into the support vector machine model for fault classification. Specifically:

[0073] , ;

[0074] In the formula, represents the state of the electric energy meter, where represents normal state, represents error out-of-tolerance, represents DC current open circuit, represents DC voltage short circuit and represents control loop short circuit; represents the electric energy meter state number; represents the support vector machine model.

[0075] On the other hand, the present invention also provides a judgment system for the operation and maintenance strategy of an electric energy meter based on unbalanced samples. The system includes a data acquisition module, a fault judgment model, a data evaluation module, and a result output module, where:

[0076] The data acquisition module is used to acquire the historical operation data of the electric energy meter, perform normalization processing on the historical operation data to obtain the normalized historical operation data; construct an improved diffusion model, which includes an input module, a data processing module, an encoder module, an inverse diffusion module and an output module, and the data processing module includes a first sub-module, a second sub-module and a third sub-module; the first sub-module includes an embedding unit; the second sub-module includes a diffusion unit and an embedding unit; the third sub-module includes an embedding unit and an LSTM unit; the input module acquires the normalized historical operation data and a preset diffusion step number, inputs the preset diffusion step number into the first sub-module, and inputs the normalized historical operation data into the second sub-module and the third sub-module; the embedding unit of the first sub-module acquires the preset diffusion step number and outputs the output result of the first sub-module; the diffusion unit of the second sub-module acquires the normalized historical operation data for diffusion, inputs the diffusion data into the embedding unit of the second sub-module, and outputs the output result of the second sub-module. The embedding unit of the third sub-module divides the normalized historical operation data and performs one-dimensional linear projection to obtain the projection space of the electric energy meter, and adds the position encoding of the electric energy meter to the projection space to obtain the position vector space; inputs the position vector space into the LSTM unit of the third sub-module to obtain the output vector of the network unit of the LSTM unit; the encoder module includes stacked modules, each stacked module contains a normalization layer and a multi-head self-attention layer; use the improved diffusion model to perform sample augmentation on the normalized historical operation data to obtain sample data; transmit the sample data to the fault judgment model;

[0077] The fault judgment model module is used to construct a fault judgment model, which includes a feature extraction layer and a fault classification layer; among them, the feature extraction layer specifically uses a CNN-LSTM model to extract the feature vector of the sample data; the fault classification layer specifically calculates a fault index and an importance index, and inputs the fault index and the importance index into a support vector machine model for fault classification; the fault index is specifically based on the feature vector Calculate the fault degree of the electric energy meter, and use the analytic hierarchy process to analyze the fault type to obtain the fault weight, and combine the fault weight and the fault degree to obtain the fault index; the importance index is specifically to calculate the correlation coefficient of the electric energy meter, and perform weighted processing on the correlation coefficient to obtain the importance index of the electric energy meter; input the sample data into the fault judgment model for training to obtain the final fault judgment model;

[0078] The data evaluation module is used to obtain the to-be-evaluated operation data of the to-be-evaluated electricity meter, input the to-be-evaluated operation data into the final fault judgment model, and obtain the fault type of the fault data in the to-be-evaluated operation data; obtain the operation and maintenance strategy of the to-be-evaluated electricity meter according to the fault type, and judge the operation and maintenance strategy to obtain the judgment result of the operation and maintenance strategy.

[0079] The result output module is used to output the judgment result of the operation and maintenance strategy.

[0080] Preferably, in the improved diffusion model:

[0081] The embedding unit of the first sub-module obtains the preset number of diffusion steps and outputs the embedding result , which is the output result of the first sub-module;

[0082] The diffusion unit of the second sub-module obtains the normalized historical operation data for diffusion, and inputs the diffusion data into the embedding unit of the second sub-module, which is expressed by the formula:

[0083] ;

[0084] ;

[0085] , ;

[0086] ;

[0087] In the formula, represents the historical operation data after diffusion for the preset number of diffusion steps, that is, the diffusion data; represents the th normalized historical operation data sequence of the electricity meter; represents the noise accumulation coefficient for the preset number of diffusion steps; represents the noise ratio for the preset number of diffusion steps; represents the diffusion rate for the preset number of diffusion steps; represents the Gaussian noise that follows the standard normal distribution preset; represents the index value for the preset number of diffusion steps; represents the maximum value for the preset number of diffusion steps; represents the th output result of the second sub-module after steps of diffusion of the electricity meter; represents the embedding function; represents the th index value of the electricity meter;

[0088] The output results of the first sub-module and the second sub-module are subjected to residual fusion, which is expressed by the formula:

[0089] ;

[0090] In the formula, represents the output result of the data processing module after steps of diffusion for the th electricity meter; represents residual fusion; represents the output result of the first sub-module;

[0091] The embedding unit of the third sub-module divides the normalized historical operation data and performs one-dimensional linear projection, which is expressed by the formula:

[0092] ;

[0093] , ;

[0094] In the formula, represents the number of divided data blocks; represents the preset data block division size; represents the projection space of the th electricity meter; represents the data after linear projection of the th data block of the th electricity meter; represents the data of the th data block of the electricity meter after division; th data block; represents the index value of the th data block; represents the length of the historical operation data sequence, that is, the number of vector groups; represents the data sequence set;

[0095] The position encoding of the electricity meter is added to the projection space to obtain the position vector space; the position vector space is input into the LSTM unit of the third sub-module, which is expressed by the formula:

[0096] ;

[0097] ;

[0098] ;

[0099] In the formula, represents the position vector space of the th electricity meter; Represents the positional encoding; Represents the th positional vector space of the th data block of the Represents the network unit of the LSTM cell; Represents the set of hidden layer states, i.e., the output result of the third sub-module of the th th output vector of the network unit of the LSTM cell of the th th data block of the th th output vector of the network unit of the LSTM cell of the

[0100] The encoder module normalizes the output result of the data processing module and the set of hidden layer states and then inputs them into the multi-head self-attention layer, which is expressed by the formula:

[0101] , ;

[0102] ;

[0103] ;

[0104] ;

[0105] ;

[0106] ;

[0107] ;

[0108] ;

[0109] ;

[0110] In the formula, Represents the output of the stacking module after steps of diffusion of the th electric energy meter; Represents the value vector of the th multi-head self-attention layer; Denote the query vector of the th multi-head self-attention layer; Denote the linear layer; Denote the linear transformation matrix of the th value vector; Denote the linear transformation matrix of the th key vector; Denote the linear transformation matrix of the th query vector; Denote the output of the th multi-head self-attention layer; Denote the number of heads of the multi-head attention mechanism; Denote the attention mechanism; Denote the set of query vectors of the multi-head self-attention layer; Denote the set of key vectors of the multi-head self-attention layer; Denote the set of value vectors of the multi-head self-attention layer; Denote the index value of the th multi-head self-attention layer; Denote the multi-head self-attention mechanism; Denote the concatenation function; Denote the preset linear transformation matrix;

[0111] Take the output of the said stacking module as the input of the next stacking module, and iterate times to generate the output of the encoder module ;

[0112] The inverse diffusion module obtains the output of the encoder module for sample augmentation to generate sample data, which is expressed by the formula:

[0113] ;

[0114] ;

[0115] ;

[0116] In the formula, Denote the sample data generated by the th electricity meter; Denote the posterior distribution; Denote the mean of the posterior distribution; Denote the calibration factor; Denote the predicted noise; Denote the output of the encoder module after steps of diffusion for the th electricity meter; Denote the noise accumulation coefficient after steps of diffusion;

[0117] The inverse diffusion module is trained using a loss function, which is expressed by the formula:

[0118] ;

[0119] In the formula, represents the loss function; represents the expected value; represents the norm.

[0120] Preferably, the feature extraction layer specifically extracts the feature vector of the sample data using a CNN-LSTM model, which is expressed by the formula:

[0121] ;

[0122] In the formula, represents the feature vector of the th electricity meter; represents the CNN-LSTM model;

[0123] The fault classification layer specifically calculates the fault index and importance index of the electricity meter and inputs them into a support vector machine model for fault classification. Among them, the fault index specifically calculates the fault degree of the electricity meter based on the feature vector, which is expressed by the formula:

[0124] ;

[0125] ;

[0126] In the formula, represents the fault degree of the electricity meter; represents the feature mean of the normal samples in the sample data; represents the normal samples in the sample data; represents the number of normal samples in the sample data; represents the th feature vector of the normal samples in the sample data; represents the th index value of the normal samples in the sample data; represents the th feature vector of the samples of the same category as the normal samples in the sample data; represents the th sample of the same category as the normal samples in the sample data; represents the maximum value of the feature vectors of the normal samples in the sample data; represents the minimum value of the feature vectors of the normal samples in the sample data; represents the The maximum value of the eigenvectors of samples of the same type as the normal samples; Denote the th minimum value of the eigenvectors of samples of the same type as the normal samples in the sample data; Denote the th mean value of the eigenvectors of samples of the same type as the normal samples in the sample data; Denote the preset first weight; Denote the preset second weight; Denote the activation function; Denote the th index value of samples of the same type as the normal samples in the sample data.

[0127] Preferably, the analytic hierarchy process is used to analyze the fault types to obtain the fault weights, and the fault index is obtained by combining the fault weights and the fault degrees, which is expressed by the formula:

[0128] , ;

[0129] In the formula, Denote the fault index; Denote the preset exponential decay factor; Denote the th fault weight; Denote the th index value of the fault weight;

[0130] The important index is specifically to calculate the correlation coefficient of the electric energy meter. The correlation coefficient includes the topological connection coefficient, the metering level coefficient and the influence coefficient. The important index of the electric energy meter is obtained by weighting the correlation coefficient, which is expressed by the formula:

[0131] ;

[0132] ;

[0133] ;

[0134] ;

[0135] In the formula, Denote the important index of the electric energy meter; Denote the topological connection coefficient; Denote the degree of the line measured by the electric energy meter, that is, the number of lines connected to the electric energy meter; Denote the mean value of the degrees of the lines connected to the current line; Denote the metering level coefficient; Denote the metering level; Represents the minimum value of the preset measurement level coefficient; Represents the influence coefficient; Represents the activation function; Represents the power level; Represents the weight of the preset topological connection coefficient; Represents the weight of the preset measurement level coefficient; Represents the weight of the preset influence coefficient;

[0136] The fault index and importance index are input into the support vector machine model for fault classification, specifically:

[0137] , ;

[0138] In the formula, Represents the state of the electricity meter, where Represents normal state, Represents error out of tolerance, Represents DC current open circuit, Represents DC voltage short circuit and Represents control loop short circuit; Represents the electricity meter state number; Represents the support vector machine model.

[0139] Compared with the prior art, the beneficial effects of the present invention are:

[0140] 1) The present invention provides a method and system for judging the operation and maintenance strategy of an electricity meter based on unbalanced samples. By obtaining the historical operation data of the electricity meter and using an improved diffusion model to expand the samples of the normalized data, the diversity and quantity of the sample data are increased, and the representativeness and usability of the data are improved;

[0141] 2) The present invention provides a method and system for judging the operation and maintenance strategy of an electricity meter based on unbalanced samples. Using the CNN-LSTM model to extract feature vectors and combining with the support vector machine for fault classification training not only improves the accuracy and timeliness of fault diagnosis, but also provides more comprehensive and in-depth operation and maintenance guidance and strong guarantee;

[0142] 3) The present invention provides a method and system for judging the operation and maintenance strategy of an electricity meter based on unbalanced samples. The analytic hierarchy process is introduced to conduct a detailed analysis of the fault degree; the attribute information and topological information of the electricity meter are fully considered to obtain the importance index of the electricity meter; the intelligence and scientificity of the operation and maintenance strategy formulation are improved, and the pertinence and effectiveness of the operation and maintenance work are enhanced. Brief Description of the Drawings

[0143] Figure 1 Is the method flow chart of the embodiment of the present invention;

[0144] Figure 2 It is the structural diagram of the improved diffusion model of the embodiment of the present invention. Specific implementation manners

[0145] The following describes the specific implementation manners of the present invention to facilitate those skilled in the art of the present technology to understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation manners. For those of ordinary skill in the art of the present technology, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concept of the present invention are within the scope of protection.

[0146] The present invention provides the following technical solution: A method and system for judging the operation and maintenance strategy of an electric energy meter based on unbalanced samples.

[0147] Embodiment 1

[0148] Specifically refer to Figure 1 , this embodiment provides a method for judging the operation and maintenance strategy of an electric energy meter based on unbalanced samples. The specific steps include:

[0149] S1. Obtain the historical operation data of the electric energy meter, and perform normalization processing on the historical operation data to obtain the normalized historical operation data; the normalization processing is specifically to map the historical operation data to the interval [0, 1], specifically:

[0150] , ;

[0151] ;

[0152] ;

[0153] In the formula, represents the historical operation data sequence of the th electric energy meter; represents the vector group corresponding to the th historical operation data of the th electric energy meter. The vector group includes the output voltage , output current , output power and power factor error ; represents the th output voltage of the th electric energy meter; represents the th output current of the th electric energy meter; represents the the output power of the th electric energy meter; the power factor error of the th electric energy meter; the minimum value of the vector group corresponding to the historical operation data of the th electric energy meter; the maximum value of the vector group corresponding to the historical operation data of the th historical operation data sequence after normalization of the th electric energy meter; the vector group corresponding to the historical operation after normalization of the th electric energy meter; the output voltage after normalization of the th electric energy meter; the output current after normalization of the th electric energy meter; the output power after normalization of the th electric energy meter; the power factor error after normalization of the th index value of the historical operation data sequence; indicating the length of the historical operation data sequence, i.e., the number of vector groups; th index value of the

[0154] S2. Construct an improved diffusion model, and use the improved diffusion model to perform sample augmentation on the historical operation data after normalization to obtain sample data, where the sample data includes normal samples and fault samples;

[0155] S3. Refer to Figure 2 , the improved diffusion model includes an input module, a data processing module, an encoder module, an inverse diffusion module, and an output module; the data processing module includes a first sub-module, a second sub-module, and a third sub-module; the first sub-module includes an embedding unit; the second sub-module includes a diffusion unit and an embedding unit; the third sub-module includes an embedding unit and an LSTM unit;

[0156] S31, the input module obtains the normalized historical operation data and the preset diffusion step number, inputs the preset diffusion step number into the first submodule, and inputs the normalized historical operation data into the second submodule and the third submodule;

[0157] S32: The embedding unit of the first submodule obtains a preset number of diffusion steps and outputs an embedding result. , which is the output result of the first submodule;

[0158] S33, the diffusion unit of the second submodule obtains the normalized historical operation data for diffusion, and inputs the diffusion data into the embedding unit of the second submodule, which is expressed as:

[0159] ;

[0160] ;

[0161] , ;

[0162] ;

[0163] In the formula, express The historical operation data after diffusion through the preset diffusion steps is called diffusion data; Indicates The normalized historical operation data sequence of each electric energy meter; The noise accumulation coefficient representing the preset number of diffusion steps; Indicates the noise ratio for the preset diffusion steps; The diffusion rate representing the preset number of diffusion steps; Represents the preset Gaussian noise that obeys the standard normal distribution; The index value representing the preset diffusion step number; Indicates the maximum value of the preset diffusion steps; Indicates The energy meter passes The output result of the second submodule after step diffusion; represents the embedded function;

[0164] The output results of the first submodule and the second submodule are residually fused, which can be expressed as:

[0165] ;

[0166] In the formula, Indicates The energy meter passes The output result of the data processing module after the step diffusion; Indicates residual fusion;

[0167] S34. The embedding unit of the third sub-module divides the normalized historical operation data and performs one-dimensional linear projection, which is expressed by the formula:

[0168] ;

[0169] , ;

[0170] In the formula, Indicates the number of data blocks segmented; Indicates the preset data block division size; Indicates the th projection space of the electricity meter; Indicates the th th data block of the th electricity meter after linear projection; Indicates the th data block of the th electricity meter after segmentation; Indicates the index value of the th data block; Indicates the length of the historical operation data sequence, that is, the number of vector groups;

[0171] Add the position encoding of the electricity meter to the projection space to obtain the position vector space; input the position vector space into the LSTM unit of the third sub-module, which is expressed by the formula:

[0172] ;

[0173] ;

[0174] ;

[0175] In the formula, Indicates the th position vector space of the electricity meter; Indicates the position encoding; Indicates the th th data block of the th electricity meter; Indicates the set of hidden layer states, that is, the output result of the third sub-module of the th electricity meter; Indicates the th The output vector of the network unit of the LSTM cell of a data block; Indicating the th output vector of the network unit of the LSTM cell of a data block of the th electric energy meter; Indicating the

[0176] S35. The encoder module includes stacking modules, each stacking module containing a normalization layer and a multi-head self-attention layer; The output result of the data processing module and the set of hidden layer states are normalized and then input into the multi-head self-attention layer, which is expressed by the formula:

[0177] , ;

[0178] ;

[0179] ;

[0180] ;

[0181] ;

[0182] ;

[0183] ;

[0184] ;

[0185] ;

[0186] In the formula, Indicates the output of the stacking module after steps of diffusion of the th electric energy meter; Indicates the value vector of the th multi-head self-attention layer; Indicates the key vector of the th multi-head self-attention layer; Indicates the query vector of the th multi-head self-attention layer; Indicates the linear layer; Indicates the linear transformation matrix of the th value vector; linear transformation matrix of the th key vector; Indicates the The linear transformation matrix of a query vector; Indicates the Output of the Indicates the number of heads of the multi-head self-attention mechanism; Indicates the attention mechanism; Indicates the set of query vectors of the multi-head self-attention layer; Indicates the set of key vectors of the multi-head self-attention layer; Indicates the set of value vectors of the multi-head self-attention layer; Indicates the Index value of the Indicates the multi-head self-attention mechanism; Indicates the concatenation function; Indicates a preset linear transformation matrix;

[0187] Take the output of the stacking module as the input of the next stacking module, and iterate times to generate the output of the encoder module ;

[0188] S36. The inverse diffusion module obtains the output of the encoder module for sample augmentation to generate sample data, which is expressed by the formula:

[0189] ;

[0190] ;

[0191] ;

[0192] In the formula, Indicates the Sample data generated by the Indicates the posterior distribution; Indicates the mean of the posterior distribution; Indicates the calibration factor; Indicates a preset Gaussian noise that follows a standard normal distribution, i.e., the actual noise; Indicates the predicted noise; Indicates the Output of the encoder module after steps of diffusion for the

[0193] Train the inverse diffusion module using the loss function, which is expressed by the formula:

[0194] ;

[0195] In the formula, Indicates the loss function; Indicates the expected value; Denote the norm;

[0196] S4. Construct a fault judgment model, including a feature extraction layer and a fault classification layer;

[0197] S41. The feature extraction layer is specifically to use the CNN-LSTM model to extract the feature vector of the sample data, which is expressed by the formula:

[0198] ;

[0199] In the formula, Denote the feature vector of the th electricity meter; Denote the CNN-LSTM model;

[0200] S42. The fault classification layer is specifically to calculate the fault index and the importance index, and input the fault index and the importance index into the support vector machine model for fault classification;

[0201] S421. The fault index is specifically to calculate the fault degree of the electricity meter based on the feature vector, which is expressed by the formula:

[0202] ;

[0203] ;

[0204] In the formula, Denote the fault degree of the electricity meter; Denote the feature mean of the normal samples in the sample data; Denote the normal samples in the sample data; Denote the number of normal samples in the sample data; Denote the th feature vector of the normal samples in the Denote the th index value of the normal samples in the sample data; Denote the th feature vector of the samples of the same class as the normal samples in the sample data; Denote the th sample of the same class as the normal samples in the sample data; Denote the maximum value of the feature vectors of the normal samples in the sample data; Denote the minimum value of the feature vectors of the normal samples in the sample data; Denote the th maximum value of the feature vectors of the samples of the same class as the normal samples in the sample data; Denote the The minimum value of the eigenvector of a sample of the same type as the normal sample; Indicates the th eigenmean of a sample of the same type as the normal sample in the sample data; Indicates a preset first weight; Indicates a preset second weight; Indicates the activation function; Indicates the th index value of a sample of the same type as the normal sample in the sample data;

[0205] S422. Analyze the fault types using the analytic hierarchy process to obtain the fault weights;

[0206] In this embodiment, according to the expert scoring table, for the scoring rules, please refer to Table 1. Score the importance of every two fault types to obtain the importance matrix , specifically expressed as:

[0207] , , ;

[0208] In the formula, Indicates the score value of the importance of the fault degree of every two electricity meters in the th row and th column; where and are reciprocals of each other; Indicates the row index value of the importance matrix in the th row; Indicates the column index value of the importance matrix in the th column;

[0209] Table 1 Expert Scoring Table

[0210]

[0211] Solve the fourth power of the product of each row of the matrix to obtain a 4-dimensional weight vector, expressed by the formula:

[0212] ;

[0213] In the formula, Indicates the th weight vector;

[0214] Perform normalization processing to obtain the fault weights, expressed by the formula:

[0215] ;

[0216] In the formula, Indicates the A fault weight;

[0217] The fault index is obtained by combining the fault weight and the fault degree, and is expressed by the formula:

[0218] , ;

[0219] In the formula, represents the fault index; represents a preset exponential decay factor;

[0220] S423. The importance index is specifically the calculation of the correlation coefficient of the electric energy meter. The correlation coefficient includes the topological connection coefficient, the measurement level coefficient, and the influence coefficient. The importance index of the electric energy meter is obtained by weighting the correlation coefficient, and is expressed by the formula:

[0221] ;

[0222] ;

[0223] ;

[0224] ;

[0225] In the formula, represents the importance index of the electric energy meter; represents the topological connection coefficient; represents the degree of the line measured by the electric energy meter, that is, the number of lines connected to the electric energy meter; represents the average value of the degrees of the lines connected to the current line; represents the measurement level coefficient; represents the measurement level; represents a preset minimum value of the measurement level coefficient; represents the influence coefficient; represents the activation function; represents the power level; represents a preset weight of the topological connection coefficient; represents a preset weight of the measurement level coefficient; represents a preset weight of the influence coefficient;

[0226] S43. The fault index and the importance index are input into the support vector machine model for fault classification, specifically:

[0227] , ;

[0228] In the formula, represents the state of the electric energy meter, where represents the normal state, Indicates that the error exceeds the tolerance, Indicates that the DC current is open - circuited, Indicates that the DC voltage is short - circuited and Indicates that the control loop is short - circuited; Indicates the status number of the electricity meter; Indicates the support vector machine model;

[0229] S5. Input the sample data into the fault judgment model for training to obtain the final fault judgment model;

[0230] S6. Obtain the to - be - evaluated operation data of the to - be - evaluated electricity meter, input the to - be - evaluated operation data into the final fault judgment model to obtain the fault types of the fault data in the to - be - evaluated operation data; obtain the operation and maintenance strategy of the to - be - evaluated electricity meter according to the fault types, and judge the operation and maintenance strategy to obtain the judgment result of the operation and maintenance strategy.

[0231] Embodiment 2

[0232] This embodiment provides a judgment system for the operation and maintenance strategy of an electricity meter based on unbalanced samples. The system includes a data acquisition module, a fault judgment model, a data evaluation module, and a result output module, where:

[0233] The data acquisition module is used to acquire the historical operation data of the electricity meter, perform normalization processing on the historical operation data to obtain the normalized historical operation data; construct an improved diffusion model. The improved diffusion model includes an input module, a data processing module, an encoder module, an inverse diffusion module, and an output module. The data processing module includes a first sub - module, a second sub - module, and a third sub - module; the first sub - module includes an embedding unit; the second sub - module includes a diffusion unit and an embedding unit; the third sub - module includes an embedding unit and an LSTM unit; the input module acquires the normalized historical operation data and a preset diffusion step number, inputs the preset diffusion step number into the first sub - module, and inputs the normalized historical operation data into the second sub - module and the third sub - module; the embedding unit of the first sub - module acquires the preset diffusion step number and outputs the output result of the first sub - module; the diffusion unit of the second sub - module acquires the normalized historical operation data for diffusion, inputs the diffused data into the embedding unit of the second sub - module, and outputs the output result of the second sub - module. The embedding unit of the third sub - module divides the normalized historical operation data and performs one - dimensional linear projection to obtain the projection space of the electricity meter, adds the position encoding of the electricity meter to the projection space to obtain the position vector space; inputs the position vector space into the LSTM unit of the third sub - module to obtain the output vector of the network unit of the LSTM unit; the encoder module includes A plurality of stacked modules, each stacked module comprising a normalization layer and a multi-head self-attention layer; using the improved diffusion model to perform sample augmentation on the normalized historical operation data to obtain sample data; transmitting the sample data to the fault judgment model;

[0234] The fault judgment model module is used to construct a fault judgment model, including a feature extraction layer and a fault classification layer; wherein, the feature extraction layer is specifically to use a CNN-LSTM model to extract the feature vector of the sample data; the fault classification layer is specifically to calculate the fault index and the importance index, and input the fault index and the importance index into a support vector machine model for fault classification; the fault index is specifically to calculate the fault degree of the electric energy meter based on the feature vector, and use the analytic hierarchy process to analyze the fault type to obtain the fault weight, and combine the fault weight and the fault degree to obtain the fault index; the importance index is specifically to calculate the correlation coefficient of the electric energy meter, and perform weighted processing on the correlation coefficient to obtain the importance index of the electric energy meter; input the sample data into the fault judgment model for training to obtain the final fault judgment model;

[0235] The data evaluation module is used to obtain the to-be-evaluated operation data of the to-be-evaluated electric energy meter, input the to-be-evaluated operation data into the final fault judgment model, and obtain the fault type of the fault data in the to-be-evaluated operation data; obtain the operation and maintenance strategy of the to-be-evaluated electric energy meter according to the fault type, and judge the operation and maintenance strategy to obtain the judgment result of the operation and maintenance strategy;

[0236] The result output module is used to output the judgment result of the operation and maintenance strategy.

[0237] The above are only embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A method for determining an operation and maintenance strategy of an electric energy meter based on unbalanced samples, characterized in that: The method comprises: The method comprises the steps of: obtaining historical operation data of the electric energy meter, normalizing the historical operation data, and obtaining the normalized historical operation data; constructing an improved diffusion model, wherein the improved diffusion model comprises an input module, a data processing module, an encoder module, a reverse diffusion module, and an output module, wherein the data processing module comprises a first submodule, a second submodule, and a third submodule; the first submodule comprises an embedding unit; the second submodule comprises a diffusion unit and an embedding unit; the third submodule comprises an embedding unit and an LSTM unit; the input module obtains the normalized historical operation data and a preset diffusion step number, inputs the preset diffusion step number into the first submodule, and inputs the normalized historical operation data into the second submodule; submodule and a third submodule; the embedding unit of the first submodule obtains a preset diffusion step number and outputs the output result of the first submodule; the diffusion unit of the second submodule obtains the normalized historical operation data for diffusion, inputs the diffusion data into the embedding unit of the second submodule, and outputs the output result of the second submodule; the embedding unit of the third submodule divides the normalized historical operation data, and performs a one-dimensional linear projection to obtain the projection space of the electric energy meter, and adds the position encoding of the electric energy meter to the projection space to obtain the position vector space; the position vector space is input into the LSTM unit of the third submodule to obtain the output vector of the network unit of the LSTM unit; the encoder module includes stacking modules, each stacking module comprising a normalization layer and a multi-head self-attention layer; using the improved diffusion model to perform sample expansion on the normalized historical running data to obtain sample data; Construct a fault judgment model, including a feature extraction layer and a fault classification layer; wherein the feature extraction layer specifically uses a CNN-LSTM model to extract a feature vector of sample data; the fault classification layer specifically calculates a fault index and an important index, and inputs the fault index and the important index into a support vector machine model for fault classification; the fault index specifically calculates the fault degree of the electric energy meter based on the feature vector, and uses a hierarchical analysis method to analyze the fault type to obtain a fault weight, and combines the fault weight and the fault degree to obtain a fault index; the important index specifically calculates the correlation coefficient of the electric energy meter, and performs weighted processing on the correlation coefficient to obtain an important index of the electric energy meter; the sample data is input into the fault judgment model for training to obtain a final fault judgment model; The operating data to be evaluated of the electric energy meter to be evaluated is obtained, and the operating data to be evaluated is input into a final fault judgment model to obtain the fault type of the fault data in the operating data to be evaluated; the operation and maintenance strategy of the electric energy meter to be evaluated is obtained according to the fault type, and the operation and maintenance strategy is judged to obtain a judgment result of the operation and maintenance strategy.

2. The method for determining the operation and maintenance strategy of an electric energy meter based on unbalanced samples according to claim 1, characterized in that: The normalization process is specifically to map the historical operation data to the interval [0, 1], specifically: , ; ; ; In the formula, Indicates A historical operation data sequence of an electric energy meter; Indicates The energy meter The vector group corresponding to the historical operation data includes the output voltage , output current , output power and power factor error ; Indicates The energy meter Output voltage; Indicates The energy meter Output current; Indicates The energy meter Output power; Indicates The energy meter Power factor error; Indicates The energy meter The minimum value of the vector group corresponding to the historical running data; Indicates The energy meter The maximum value of the vector group corresponding to the historical running data; Indicates The normalized historical operation data sequence of each electric energy meter; Indicates The energy meter A vector group corresponding to the normalized historical runs; Indicates The energy meter A normalized output voltage; Indicates The energy meter A normalized output current; Indicates The energy meter The normalized output power; Indicates The energy meter A normalized power factor error; Indicates The index value of a historical running data series; Indicates the length of the historical running data sequence, that is, the number of vector groups; Indicates The index value of an electric energy meter.

3. The method for determining the operation and maintenance strategy of an electric energy meter based on unbalanced samples according to claim 1, characterized in that: In the improved diffusion model: The embedding unit of the first submodule obtains a preset number of diffusion steps and outputs an embedding result , which is the output result of the first submodule; The diffusion unit of the second submodule obtains the normalized historical operation data for diffusion, and inputs the diffusion data into the embedding unit of the second submodule, which is expressed as: ; ; , ; ; In the formula, express The historical operation data after diffusion through the preset diffusion steps is called diffusion data; Indicates The normalized historical operation data sequence of each electric energy meter; The noise accumulation coefficient representing the preset number of diffusion steps; Indicates the noise ratio for the preset number of diffusion steps; The diffusion rate representing the preset number of diffusion steps; Represents the preset Gaussian noise that obeys the standard normal distribution; The index value representing the preset diffusion step number; Indicates the maximum value of the preset diffusion steps; Indicates The energy meter passes The output result of the second submodule after step diffusion; represents the embedded function; Indicates The index value of an electric energy meter; The output results of the first submodule and the second submodule are residually fused, which can be expressed as: ; In the formula, Indicates The energy meter passes The output result of the data processing module after the step diffusion; represents residual fusion; Represents the output result of the first submodule; The embedding unit of the third submodule segments the normalized historical operation data and performs a one-dimensional linear projection, which is expressed as follows: ; , ; In the formula, Indicates the number of data blocks divided; Indicates the preset data block division size; Indicates Projection space of an electric energy meter; Indicates The energy meter The data after linear projection of the data blocks; Indicates the split The energy meter Data of data blocks; Indicates The index value of a data block; Indicates the length of the historical running data sequence, that is, the number of vector groups; Represents a collection of data sequences; The position code of the electric energy meter is added to the projection space to obtain the position vector space; the position vector space is input into the LSTM unit of the third submodule, which is expressed as follows: ; ; ; In the formula, Indicates The position vector space of the electric energy meters; Indicates positional encoding; Indicates The energy meter The position vector space of data blocks; A network unit representing an LSTM unit; represents the set of hidden layer states, i.e. The output result of the third submodule of an electric energy meter; Indicates The energy meter The output vector of the network unit of the LSTM unit of the data block; Indicates The energy meter The output vector of the network unit of the LSTM unit of the data block; Indicates The energy meter The output vector of the network unit of the LSTM unit of the data block.

4. The method for determining the operation and maintenance strategy of an electric energy meter based on unbalanced samples according to claim 3, characterized in that: The encoder module normalizes the output result of the data processing module and the hidden layer state set and inputs them into the multi-head self-attention layer, which is expressed as: , ; ; ; ; ; ; ; ; ; In the formula, Indicates The energy meter passes The output of the stacked module after step diffusion; Indicates The value vector of the multi-head self-attention layer; Indicates The key vector of a multi-head self-attention layer; Indicates The query vector of the multi-head self-attention layer; represents a linear layer; Indicates The linear transformation matrix of a value vector; Indicates The linear transformation matrix of the key vectors; Indicates The linear transformation matrix of the query vector; Indicates The output of a multi-head self-attention layer; Indicates the number of heads of the multi-head attention mechanism; represents the attention mechanism; A set of query vectors representing the multi-head self-attention layer; A set of key vectors representing a multi-head self-attention layer; A set of value vectors representing a multi-head self-attention layer; Indicates The index value of the multi-head self-attention layer; Represents a multi-head self-attention mechanism; represents the connection function; Represents a preset linear transformation matrix; The output of the stacking module is used as the input of the next stacking module, iteratively Second, generate the output of the encoder module ; The inverse diffusion module obtains the output of the encoder module to perform sample expansion and generate sample data, which can be expressed as follows: ; ; ; In the formula, Indicates Sample data generated by an electric energy meter; represents the posterior distribution; represents the mean of the posterior distribution; represents the calibration factor; represents the prediction noise; Indicates The energy meter passes The output of the encoder module after step diffusion; Indicates passing Noise accumulation coefficient after step diffusion; The loss function is used to train the inverse diffusion module, which is expressed as: ; In the formula, represents the loss function; Indicates expected value; Represents the norm.

5. The method for determining the operation and maintenance strategy of an electric energy meter based on unbalanced samples according to claim 4, characterized in that: The feature extraction layer specifically uses the CNN-LSTM model to extract the feature vector of the sample data, which is expressed as follows: ; In the formula, Indicates The characteristic vector of an electric energy meter; Represents the CNN-LSTM model; The fault classification layer specifically calculates the fault index and importance index of the electric energy meter and inputs the support vector machine model for fault classification, wherein the fault index specifically calculates the fault degree of the electric energy meter based on the feature vector, and is expressed as: ; ; In the formula, Indicates the fault degree of the energy meter; Represents the characteristic mean of normal samples in sample data; Represents normal samples in sample data; Indicates the number of normal samples in the sample data; Indicates The feature vector of normal samples in the sample data; Indicates The index value of the normal sample in the sample data; Indicates the sample data The feature vectors of samples that are similar to normal samples; Indicates the sample data samples that are similar to normal samples; Represents the maximum value of the eigenvector of the normal sample in the sample data; Represents the minimum value of the eigenvector of the normal sample in the sample data; Indicates the sample data The maximum value of the feature vector of samples of the same type as the normal samples; Indicates the sample data The minimum value of the feature vector of samples of the same type as normal samples; Indicates the sample data The characteristic mean of samples of the same type as normal samples; Indicates the preset first weight; represents a preset second weight; represents the activation function; Indicates the sample data The index value of the sample that is similar to the normal sample.

6. A method for determining an operation and maintenance strategy of an electric energy meter based on unbalanced samples according to claim 5, characterized in that: The fault type is analyzed by using the hierarchical analysis method to obtain the fault weight, and the fault index is obtained by combining the fault weight and the fault degree, which is expressed as follows: , ; In the formula, represents the fault index; Represents the preset exponential decay factor; Indicates Fault weights; Indicates The index value of the fault weight; The important index is specifically calculated as the correlation coefficient of the electric energy meter, the correlation coefficient includes the topological connection coefficient, the metering level coefficient and the influence coefficient, and the important index of the electric energy meter is obtained by weighting the correlation coefficient, which is expressed as follows: ; ; ; ; In the formula, Indicates important indexes of the electric energy meter; represents the topological connectivity coefficient; Indicates the degree of the line measured by the electric energy meter, that is, the number of lines connected to the electric energy meter; Represents the mean value of the degree of the lines connected to the current line; It represents the metrological grade coefficient; Indicates the measurement level; Indicates the preset minimum value of the measurement grade coefficient; represents the influence coefficient; represents the activation function; Indicates the power level; Indicates the preset topological connection coefficient weight; Indicates the preset measurement grade coefficient weight; Indicates the preset influence coefficient weight; The fault index and importance index are input into the support vector machine model for fault classification, specifically: , ; In the formula, Indicates the status of the energy meter, where: Indicates normal status. Indicates that the error exceeds the tolerance. Indicates that the DC current is open circuit, Indicates DC voltage short circuit and Indicates that the control circuit is short-circuited; Indicates the status number of the electric energy meter; Represents a support vector machine model.

7. A judgment system for electric energy meter operation and maintenance strategy based on unbalanced samples, characterized in that: The system includes a data acquisition module, a fault judgment model module, a data evaluation module and a result output module, wherein: The data acquisition module is used to acquire the historical operation data of the electric energy meter, normalize the historical operation data, and obtain the normalized historical operation data; construct an improved diffusion model, the improved diffusion model includes an input module, a data processing module, an encoder module, a reverse diffusion module and an output module, the data processing module includes a first submodule, a second submodule and a third submodule; the first submodule includes an embedding unit; the second submodule includes a diffusion unit and an embedding unit; the third submodule includes an embedding unit and an LSTM unit; the input module acquires the normalized historical operation data and a preset diffusion step number, inputs the preset diffusion step number into the first submodule, and the normalized historical operation data is The data is input into the second submodule and the third submodule; the embedding unit of the first submodule obtains a preset diffusion step number and outputs the output result of the first submodule; the diffusion unit of the second submodule obtains the normalized historical operation data for diffusion, inputs the diffusion data into the embedding unit of the second submodule, and outputs the output result of the second submodule; the embedding unit of the third submodule divides the normalized historical operation data, and performs a one-dimensional linear projection to obtain the projection space of the electric energy meter, and adds the position encoding of the electric energy meter to the projection space to obtain the position vector space; the position vector space is input into the LSTM unit of the third submodule to obtain the output vector of the network unit of the LSTM unit; the encoder module includes stacking modules, each stacking module comprising a normalization layer and a multi-head self-attention layer; using the improved diffusion model to perform sample expansion on the normalized historical operation data to obtain sample data; transmitting the sample data to the fault judgment model; The fault judgment model module is used to construct a fault judgment model, including a feature extraction layer and a fault classification layer; wherein the feature extraction layer specifically uses the CNN-LSTM model to extract the feature vector of the sample data; the fault classification layer specifically calculates the fault index and the importance index, and inputs the fault index and the importance index into the support vector machine model for fault classification; the fault index specifically calculates the fault degree of the electric energy meter based on the feature vector, and uses the hierarchical analysis method to analyze the fault type to obtain the fault weight, and combines the fault weight and the fault degree to obtain the fault index; the importance index specifically calculates the correlation coefficient of the electric energy meter, and performs weighted processing on the correlation coefficient to obtain the importance index of the electric energy meter; the sample data is input into the fault judgment model for training to obtain the final fault judgment model; The data evaluation module is used to obtain the operating data to be evaluated of the electric energy meter to be evaluated, input the operating data to be evaluated into the final fault judgment model, and obtain the fault type of the fault data in the operating data to be evaluated; obtain the operation and maintenance strategy of the electric energy meter to be evaluated according to the fault type, judge the operation and maintenance strategy, and obtain the judgment result of the operation and maintenance strategy; The result output module is used to output the judgment result of the operation and maintenance strategy.

8. The system for determining the operation and maintenance strategy of an electric energy meter based on unbalanced samples according to claim 7, characterized in that: In the improved diffusion model: The embedding unit of the first submodule obtains a preset number of diffusion steps and outputs an embedding result , which is the output result of the first submodule; The diffusion unit of the second submodule obtains the normalized historical operation data for diffusion, and inputs the diffusion data into the embedding unit of the second submodule, which is expressed as: ; ; , ; ; In the formula, express The historical operation data after diffusion through the preset diffusion steps is called diffusion data; Indicates The normalized historical operation data sequence of each electric energy meter; The noise accumulation coefficient representing the preset number of diffusion steps; Indicates the noise ratio for the preset number of diffusion steps; The diffusion rate representing the preset number of diffusion steps; Represents the preset Gaussian noise that obeys the standard normal distribution; The index value representing the preset diffusion step number; Indicates the maximum value of the preset diffusion steps; Indicates The energy meter passes The output result of the second submodule after step diffusion; represents the embedded function; Indicates The index value of an electric energy meter; The output results of the first submodule and the second submodule are residually fused, which can be expressed as: ; In the formula, Indicates The energy meter passes The output result of the data processing module after the step diffusion; represents residual fusion; Represents the output result of the first submodule; The embedding unit of the third submodule segments the normalized historical operation data and performs a one-dimensional linear projection, which is expressed as follows: ; , ; In the formula, Indicates the number of data blocks divided; Indicates the preset data block division size; Indicates Projection space of an electric energy meter; Indicates The energy meter The data after linear projection of the data blocks; Indicates the split The energy meter Data of data blocks; Indicates The index value of a data block; Indicates the length of the historical running data sequence, that is, the number of vector groups; Represents a collection of data sequences; The position code of the electric energy meter is added to the projection space to obtain the position vector space; the position vector space is input into the LSTM unit of the third submodule, which is expressed as follows: ; ; ; In the formula, Indicates The position vector space of the electric energy meters; Indicates positional encoding; Indicates The energy meter The position vector space of data blocks; A network unit representing an LSTM unit; represents the set of hidden layer states, i.e. The output result of the third submodule of an electric energy meter; Indicates The energy meter The output vector of the network unit of the LSTM unit of the data block; Indicates The energy meter The output vector of the network unit of the LSTM unit of the data block; Indicates The energy meter The output vector of the network unit of the LSTM unit of the data block; The encoder module normalizes the output result of the data processing module and the hidden layer state set and inputs them into the multi-head self-attention layer, which is expressed as: , ; ; ; ; ; ; ; ; ; In the formula, Indicates The energy meter passes The output of the stacked module after step diffusion; Indicates The value vector of the multi-head self-attention layer; Indicates The key vector of a multi-head self-attention layer; Indicates The query vector of the multi-head self-attention layer; represents a linear layer; Indicates The linear transformation matrix of a value vector; Indicates The linear transformation matrix of the key vectors; Indicates The linear transformation matrix of the query vector; Indicates The output of a multi-head self-attention layer; Indicates the number of heads of the multi-head attention mechanism; represents the attention mechanism; A set of query vectors representing the multi-head self-attention layer; A set of key vectors representing a multi-head self-attention layer; A set of value vectors representing a multi-head self-attention layer; Indicates The index value of the multi-head self-attention layer; Represents a multi-head self-attention mechanism; represents the connection function; Represents a preset linear transformation matrix; The output of the stacking module is used as the input of the next stacking module, iteratively Second, generate the output of the encoder module ; The inverse diffusion module obtains the output of the encoder module to perform sample expansion and generate sample data, which can be expressed as follows: ; ; ; In the formula, Indicates Sample data generated by an electric energy meter; represents the posterior distribution; represents the mean of the posterior distribution; represents the calibration factor; represents the prediction noise; Indicates The energy meter passes The output of the encoder module after step diffusion; Indicates passing Noise accumulation coefficient after step diffusion; The loss function is used to train the inverse diffusion module, which is expressed as: ; In the formula, represents the loss function; Indicates expected value; Represents the norm.

9. The system for determining the operation and maintenance strategy of an electric energy meter based on unbalanced samples according to claim 8, characterized in that: The feature extraction layer specifically uses the CNN-LSTM model to extract the feature vector of the sample data, which is expressed as follows: ; In the formula, Indicates The characteristic vector of an electric energy meter; Represents the CNN-LSTM model; The fault classification layer specifically calculates the fault index and importance index of the electric energy meter and inputs the support vector machine model for fault classification, wherein the fault index specifically calculates the fault degree of the electric energy meter based on the feature vector, and is expressed as: ; ; In the formula, Indicates the fault degree of the energy meter; Represents the characteristic mean of normal samples in sample data; Represents normal samples in sample data; Indicates the number of normal samples in the sample data; Indicates The feature vector of normal samples in the sample data; Indicates The index value of the normal sample in the sample data; Indicates the sample data The feature vectors of samples that are similar to normal samples; Indicates the sample data samples that are similar to normal samples; Represents the maximum value of the eigenvector of the normal sample in the sample data; Represents the minimum value of the eigenvector of the normal sample in the sample data; Indicates the sample data The maximum value of the feature vector of samples of the same type as the normal samples; Indicates the sample data The minimum value of the feature vector of samples of the same type as normal samples; Indicates the sample data The characteristic mean of samples of the same type as normal samples; Indicates the preset first weight; represents a preset second weight; represents the activation function; Indicates the sample data The index value of the sample that is similar to the normal sample.

10. The system for determining the operation and maintenance strategy of an electric energy meter based on unbalanced samples according to claim 7, characterized in that: The fault type is analyzed by using the hierarchical analysis method to obtain the fault weight, and the fault index is obtained by combining the fault weight and the fault degree, which is expressed as follows: , ; In the formula, represents the fault index; Represents the preset exponential decay factor; Indicates Fault weights; Indicates The index value of the fault weight; The important index is specifically calculated as the correlation coefficient of the electric energy meter, the correlation coefficient includes the topological connection coefficient, the metering level coefficient and the influence coefficient, and the important index of the electric energy meter is obtained by weighting the correlation coefficient, which is expressed as follows: ; ; ; ; In the formula, Indicates important indexes of the electric energy meter; represents the topological connectivity coefficient; Indicates the degree of the line measured by the electric energy meter, that is, the number of lines connected to the electric energy meter; Represents the mean value of the degree of the lines connected to the current line; It represents the metrological grade coefficient; Indicates the measurement level; Indicates the preset minimum value of the measurement grade coefficient; represents the influence coefficient; represents the activation function; Indicates the power level; Indicates the preset topological connection coefficient weight; Indicates the preset measurement grade coefficient weight; Indicates the preset influence coefficient weight; The fault index and importance index are input into the support vector machine model for fault classification, specifically: , ; In the formula, Indicates the status of the energy meter, where: Indicates normal status. Indicates that the error exceeds the tolerance. Indicates that the DC current is open circuit, Indicates DC voltage short circuit and Indicates that the control circuit is short-circuited; Indicates the status number of the electric energy meter; Represents a support vector machine model.

Citation Information

Patent Citations

  • Small sample mechanical fault diagnosis method based on improved denoising diffusion model

    CN118885736A

  • Train control on-board equipment health state management device based on unbalanced sample enhancement

    CN116304663A

  • Enhanced soft measurement method based on time sequence diffusion probability model

    CN117371543A