Operation state detection method and device for electric energy meter, medium and equipment
By calculating the covariance matrix eigenvalue of the electric energy meter and using the neural network model, the problem of inaccurate detection of the electric energy meter is solved, and more accurate and reliable state evaluation is achieved, reducing resource waste.
Patent Information
- Application Number
- CN202311573075.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-23
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, the operating status detection of the electricity meter is not accurate and reliable enough, resulting in some good electricity meters being wrongly judged as unqualified, and some defective electricity meters not being discovered in time, resulting in waste of manpower and material resources.
By obtaining the target power data of the power meter, calculating the covariance matrix eigenvalue, obtaining the target eigenvalue, and using a pre-trained neural network model to perform state detection, it realizes accurate evaluation of the operating status of the power meter.
It improves the accuracy and reliability of the state detection of the electricity meter, reduces the waste of manpower and material resources, and ensures the accurate operating status evaluation of the electricity meter.
Smart Images

Figure CN119165432A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power metering device detection, and in particular to a method, device, medium and equipment for detecting the operating status of an electric energy meter. Background Art
[0002] In recent years, with the construction of smart grids and user electricity information collection systems, the number of smart energy meters has exploded. The good operating status of smart energy meters is crucial to the accuracy, stability and reliability of measurement. The status of smart energy meters depends largely on the accuracy of their measurement. If the error in energy measurement is large, it will cause economic losses to users or power grid companies. It may even cause social problems. Therefore, the measurement accuracy assessment of smart energy meters has become a key issue to ensure the good status of energy meters.
[0003] At present, the accuracy detection of electricity meter measurement still mainly relies on the sampling detection method, that is, the level of operation quality of a batch of electricity meters is determined by the random inspection method.
[0004] Although the traditional evaluation method can detect defects in smart energy meter devices during random inspections and effectively maintain the normal operation of smart energy meter devices, the random inspection method has the problem of random inspection data, and the long-term blind practice of random inspections of smart energy meters may lead to a huge waste of manpower and material resources. Because the results of sampling inspections are not very representative, some energy meters in good operating conditions may be forced to rotate due to unqualified samples in the same batch. On the contrary, some defective energy meters may not be discovered in time because the regular inspection time has not arrived or there are a certain number of qualified samples in the same batch.
[0005] Therefore, there is an urgent need for a method for detecting the operating status of an electric energy meter to solve the problem that the detection of the operating status of the electric energy meter in the prior art is not accurate and reliable enough. Summary of the invention
[0006] In view of this, the present invention provides a method, device, medium and equipment for detecting the operating status of an electric energy meter, the main purpose of which is to solve the current problem that the detection of the operating status of an electric energy meter is not accurate and reliable enough.
[0007] In order to solve the above problems, the present application provides a method for detecting the operating status of an electric energy meter, comprising: Obtaining a number of target power data measured by the electric energy meter to be tested at each sampling time; Calculate the eigenvalues of the covariance matrix based on each of the target power data to obtain a number of target eigenvalues corresponding to the electric energy meter to be tested; Based on each of the target characteristic values, a pre-trained target neural network model is used to perform operating status detection to obtain a status detection result of the electric energy meter to be tested.
[0008] Optionally, the calculating of the covariance matrix eigenvalues based on each of the target power data to obtain a plurality of target eigenvalues corresponding to the electric energy meter to be tested specifically includes: Constructing and obtaining a first covariance matrix based on each of the target power data; Eigenvalue calculations are performed based on the first covariance matrix to obtain first eigenvalues corresponding to the first covariance matrix, so as to obtain target eigenvalues corresponding to the electric energy meter to be tested.
[0009] Optionally, the calculating of the covariance matrix eigenvalues based on each of the target power data to obtain a plurality of target eigenvalues corresponding to the electric energy meter to be tested specifically includes: Dividing each of the target power data according to predetermined data categories to obtain sub-data sets corresponding to each data category; Constructing and obtaining a second covariance matrix corresponding to each sub-data set based on each of the sub-data sets to obtain a plurality of second covariance matrices corresponding to the electric energy meter to be tested; Eigenvalue calculations are performed based on each of the second covariance matrices to obtain second eigenvalues corresponding to each of the second covariance matrices, so as to obtain a plurality of target eigenvalues corresponding to the electric energy meter to be tested.
[0010] Optionally, the data category includes one or more of the following: current data, voltage data, power data, and electric energy data.
[0011] Optionally, before performing the running state detection based on each of the target feature values using the pre-trained target neural network model, the method further includes: Respectively obtain historical power data of several sample power meters and current power data currently measured by each sample power meter; Based on the historical power data and current power data corresponding to each sample power meter, a sample data set including a plurality of sample power data corresponding to each sample power meter is constructed; For each of the sample data sets, a number of sample covariance matrices corresponding to each of the sample data sets are calculated and obtained respectively; Based on each of the sample covariance matrices, eigenvalue calculations are performed to obtain sample eigenvalues corresponding to each sample covariance matrix, so as to obtain a number of sample eigenvalues corresponding to each sample electric energy meter; Based on a number of sample characteristic values of each of the sample electric energy meters and label data of each of the sample electric energy meters, the initial neural network model is trained to obtain a target neural network model.
[0012] Optionally, for each of the data sets, a plurality of sample covariance matrices corresponding to each of the data sets are calculated and obtained, specifically including: Based on each sample power data in each data set, respectively construct a first sample covariance matrix corresponding to each data set to obtain a sample covariance matrix corresponding to each data set; Alternatively, for each sample power data in the same data set, based on the data category to which each sample power data belongs, a second sample covariance matrix corresponding to each data category is constructed respectively to obtain a plurality of sample covariance matrices corresponding to each data set.
[0013] Optionally, the training of the initial neural network model based on the sample characteristic values of each of the sample electric energy meters and the label data of each of the sample electric energy meters to obtain the target neural network model specifically includes: Using the initial neural network model, a state detection is performed on several sample characteristic values of each sample electric energy meter to obtain an initial state detection result corresponding to each sample electric energy meter; Based on the initial state detection results corresponding to each of the sample electric energy meters and the label data corresponding to each of the sample electric energy meters, the initial model parameters in the initial neural network model are adjusted to obtain the current neural network model, until the error value between the current initial state detection result output by the adjusted current neural network model and the corresponding electric energy meter label data meets a predetermined condition, the current neural network model is used as the target neural network model.
[0014] In order to solve the above problems, the present application provides an operating status detection device for an electric energy meter, comprising: An acquisition module is used to acquire a number of target power data measured by the electric energy meter to be tested at each sampling time; A calculation module, used for calculating the eigenvalues of the covariance matrix based on each of the target power data, and obtaining a plurality of target eigenvalues corresponding to the electric energy meter to be tested; The detection module is used to perform operating status detection based on each of the target feature values using a pre-trained target neural network model to obtain a status detection result of the electric energy meter to be tested.
[0015] To solve the above problems, the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods for detecting the operating status of an electric energy meter are implemented.
[0016] To solve the above problems, the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program on the memory, the steps of any of the above-mentioned methods for detecting the operating status of an electric energy meter are implemented.
[0017] The present application discloses a method, device, medium and equipment for detecting the operating status of an electric energy meter. By collecting the electric power data of the electric energy meter, the covariance matrix eigenvalue calculation is performed on the collected electric power data to obtain the target eigenvalue, thereby realizing the transformation of the high-dimensional electric energy meter data into a low-dimensional data space. The method also has good electric energy meter feature characterization capability, that is, the target eigenvalue obtained by calculation can be made more reasonable and accurate. Subsequently, the operating status of the electric energy meter can be accurately detected by using a pre-trained target neural network model based on the target eigenvalue.
[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 This is a flow chart for detecting the operating status of an electric energy meter according to an embodiment of the present application; Figure 2 A training flowchart of a target neural network model in another embodiment of the present application; Figure 3 The RMT feature of the power data of the energy meter in another embodiment of the present application; Figure 4 This is a loss function curve diagram in another embodiment of the present application; Figure 5 This is a confusion matrix diagram in another embodiment of the present application; Figure 6 This is a block diagram of a device for detecting the operating status of an electric energy meter according to another embodiment of the present application; Figure 7 This is a structural block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION
[0020] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0021] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0022] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0023] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0024] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.
[0025] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0026] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0027] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0028] The present application embodiment provides a method for detecting the operating status of an electric energy meter, which can be specifically applied to electronic devices such as terminals and servers, such as Figure 1 As shown, the method in this embodiment includes the following steps: Step S101, obtaining a number of target power data measured by the electric energy meter to be tested at each sampling time; In the specific implementation process of this step, the target power data specifically refers to the data measured by the electric energy meter during operation, that is, the data measured by the electric energy meter at each sampling time. The target power data can also be called the time series data of the electric energy meter. Specifically, the power data can include any one or more of the following: voltage data, current data, power data, electric energy data, etc. After obtaining each target power data, each power data can also be described. Specifically, considering single-phase / three-phase power supply mode, electric energy meter level, data collection season, historical error and other factors as important influencing factors, the power data of the electric energy meter is represented by a specific numerical sequence for characteristic values, and the above-mentioned influencing factors are represented by single-value numerical values for characteristic values.
[0029] Step S102, calculating the eigenvalues of the covariance matrix based on each of the target power data to obtain a number of target eigenvalues corresponding to the electric energy meter to be tested; In the specific implementation process of this step, a covariance matrix can be constructed for each target power data based on random matrix theory, or multiple covariance matrices can be constructed. Thus, eigenvalue calculation can be performed for each covariance matrix to obtain the target eigenvalue corresponding to the covariance matrix. In this step, the power data of the electric energy meter is extracted by using random matrix theory RMT extraction, which realizes the transformation of high-dimensional electric energy meter data into low-dimensional data space, and has good electric energy meter feature characterization capabilities, that is, the calculated target eigenvalue is more reasonable and accurate.
[0030] Step S103, based on each of the target feature values, using a pre-trained target neural network model to perform operating status detection to obtain a status detection result of the electric energy meter to be tested.
[0031] In the specific implementation process of this step, the sample power data of several sample electric energy meters can be used for feature extraction to obtain sample feature values, and then the neural network model is trained based on the sample feature values of each sample electric energy meter and the operating status label of each sample electric energy meter, so as to train and obtain the target neural network model. In this step, the state label can include 5 labels from 0 to 5, where 0 represents a completely accurate operating state, 1 represents a high-precision operating state, 2 represents a relatively high-precision operating state, 3 represents a general-precision operating state, 4 represents a relatively poor-precision operating state, and 5 represents a completely inaccurate operating state. That is, after the state detection is performed, the above 5 operating states can be obtained. Specifically, the probability value of each operating state can be obtained, and then the operating state with the largest probability value is used as the final detection result.
[0032] In this embodiment, the target neural network model can be a long short-term memory neural network model; the long short-term memory neural network model includes several single-layer LSTM layers, that is, a multi-layer structure constructed by connecting multiple single-layer LSTM layers.
[0033] A method for detecting the operating status of an electric energy meter in the present embodiment collects power data of the electric energy meter, and then calculates the eigenvalues of the covariance matrix of the collected power data to obtain target eigenvalues, thereby realizing the transformation of high-dimensional electric energy meter data into a low-dimensional data space, and has good electric energy meter feature characterization capability, that is, it can make the calculated target eigenvalues more reasonable and accurate, and subsequently the target neural network model obtained by pre-training can be used based on the target eigenvalues to accurately detect the operating status of the electric energy meter.
[0034] Another embodiment of the present application provides a method for detecting the operating status of an electric energy meter. In this example, before calculating the covariance matrix eigenvalues of each target power data, each target power data can be preprocessed, that is, all data are vectorized and fused, such as (x1, x2, ..., xk), where xt is the power data value (time series data value) at a certain moment. Then, the covariance matrix eigenvalue calculation is performed to obtain several target eigenvalues corresponding to the electric energy meter to be tested. The following two methods can be used when calculating the covariance matrix eigenvalues: Method 1: constructing a first covariance matrix based on each of the target power data; performing eigenvalue calculations based on the first covariance matrix to obtain first eigenvalues corresponding to the first covariance matrix, so as to obtain target eigenvalues corresponding to the electric energy meter to be tested.
[0035] Since the target power data can include any one or more of the following data: current data, voltage data, power data, and electric energy data, that is, the target power data collected can specifically include multiple current data, multiple voltage data, multiple power data, and multiple electric energy data. Therefore, when constructing the covariance matrix, the category of the data can be ignored, and the covariance matrix can be directly calculated for each target power data using random matrix correlation theory. , that is, a first covariance matrix is obtained, and then eigenvalue calculation is performed on the first covariance matrix to obtain an eigenvalue λ, which can be called the RMT feature of the power data, so that the eigenvalue λ can be used as the target eigenvalue.
[0036]
[0037] Where H represents the conjugate transpose, n represents the capacity matrix of the target power data, express The jth column of .
[0038] Method 2: Divide the target power data according to predetermined data categories to obtain sub-data sets corresponding to each data category; construct a second covariance matrix corresponding to each sub-data set based on each sub-data set to obtain several second covariance matrices corresponding to the electric energy meter to be tested; perform eigenvalue calculation based on each second covariance matrix to obtain second eigenvalues corresponding to each second covariance matrix to obtain several target eigenvalues corresponding to the electric energy meter to be tested.
[0039] In this method, the category of target power data may include any one or more of the following data: current data, voltage data, power data, and electric energy data. That is, the collected target power data may specifically include multiple current data, multiple voltage data, multiple power data, and multiple electric energy data. Therefore, when constructing the covariance matrix, the category of the data may be considered. First, the data is grouped based on the data category to which each target power data belongs, and a group of target power data corresponding to each data category is obtained, that is, a sub-data set corresponding to each data category is obtained, and then the random matrix correlation theory is used for each group of power data / sub-data set to calculate the covariance matrix separately. , obtain the covariance matrix corresponding to each sub-data set, that is, obtain the second covariance matrix corresponding to each data category. Finally, perform eigenvalue calculation on each second covariance matrix to obtain the eigenvalue λ corresponding to each second covariance matrix, so that each eigenvalue λ can be used as the target eigenvalue, that is, obtain several target eigenvalues. The principle and method of the method are the same as the principle and formula of the method, so I will not repeat them here.
[0040] The covariance matrix involved in the above two methods of this embodiment is one of the commonly used random matrices. The random matrix constructed for the electric energy meter time series data (target power data) obtains the covariance matrix and its eigenvalues by utilizing various linear algebraic transformation methods. Through the transformation, the high-dimensional electric energy meter data can be transformed into a low-dimensional space and have good electric energy meter feature characterization capabilities.
[0041] Another embodiment of the present application provides an operating state detection method for an electric energy meter. In this embodiment, before performing operating state detection using a pre-trained target neural network model based on each of the target feature values, a pre-training can be performed to obtain a target neural network model. The specific training process includes: Step 1: respectively obtain historical power data of several sample power meters and current power data currently measured by each sample power meter; In this step, the electric energy meter time series data / electricity data can be collected and then described. The electric energy meter time series data includes the electric energy meter historical data, current voltage time series, current current time series, current power time series, current electric energy time series, meteorological data, installation information, etc. That is, both the historical electric power data and the current electric power data can include current data, voltage data, power data, electric energy data, etc., and can also specifically include meteorological data and installation information, etc.
[0042] In this step, when describing the time series data / power data, factors such as single-phase / three-phase power supply mode, electric energy meter level, data collection season, historical error, etc. can be considered as important influencing factors. The time series data of the electric energy meter is represented by a specific numerical sequence as a characteristic value, and the above-mentioned influencing factors are represented by a single value as a characteristic value. Step 2: Based on the historical power data and current power data corresponding to each sample power meter, a sample data set including a plurality of sample power data corresponding to each sample power meter is constructed; After obtaining the sample data set, the power data in each sample data set can be preprocessed, and all the data in the above step one can be vectorized and fused, such as (x1, x2,…, xk), where xt is the time series data value at a certain moment. Collect the label data corresponding to the electric energy meter data, and further integrate them to form an electric energy meter sample database. The electric energy meter sample database contains electric energy meter sample data of dimensions (N, T, S) and label data of dimensions (N, C); wherein N represents the number of samples; T represents the time of the time dimension; S represents the feature data of the sample data set; C represents the category label of the operating status of the electric energy meter, specifically including completely accurate operating status 0, high-precision operating status 1, relatively high-precision operating status 2, general-precision operating status 3, poor-precision operating status 4, and completely inaccurate operating status 5.
[0043] Step 3: for each of the sample data sets, respectively calculate and obtain a number of sample covariance matrices corresponding to each of the sample data sets; In this step, based on each sample power data in each data set, a first sample covariance matrix corresponding to each data set can be constructed to obtain a sample covariance matrix corresponding to each data set. That is, for the same sample data set, the data category of each sample data can be ignored, and the covariance matrix can be directly calculated for each sample power data using random matrix correlation theory to obtain a sample covariance matrix corresponding to each sample data set.
[0044] Alternatively, for each sample power data in the same data set, based on the data category to which each sample power data belongs, a second sample covariance matrix corresponding to each data category is constructed respectively to obtain several sample covariance matrices corresponding to each data set. That is, for the same sample data set, the data category of each sample data can also be considered, that is, the sample power data in the same sample data set are classified to obtain sub-sample data sets corresponding to each data category, that is, to obtain multiple sub-sample data sets corresponding to the sample data set, and then for each sub-sample data set, the random matrix correlation theory is used to calculate the covariance matrix to obtain a sample covariance matrix corresponding to each sub-sample data set, thereby obtaining multiple sample covariance matrices corresponding to each sample data set.
[0045] This step mainly extracts the covariance matrix eigenvalues reflecting the accuracy of the electric energy meter from the time series data / sample power data. Perform matrix transformation on the electric energy meter sample database in step 2 above to construct a random matrix X. Each column of the matrix X is a zero-mean, independent and identically distributed Gaussian vector, and the covariance matrix is .
[0046] According to the random matrix correlation theory, calculate the sample covariance matrix B n ':
[0047] Among them, H represents the conjugate transpose, n represents the capacity matrix of the sample, express The jth column of .
[0048] Step 4: Calculate the eigenvalues based on the sample covariance matrices to obtain the sample eigenvalues corresponding to the sample covariance matrices, so as to obtain a number of sample eigenvalues corresponding to the sample electric energy meters; After obtaining the sample covariance matrix, the sample covariance matrix B can be calculated for each sample covariance matrix n The eigenvalue λ' of ' is called the RMT feature of time series sample data / sample power data. The covariance matrix is a commonly used random matrix. The random matrix constructed for the time series data of the electric energy meter is obtained by using various linear algebraic transformation methods to obtain the covariance matrix and its eigenvalues. Through the transformation, the high-dimensional electric energy meter data can be transformed into a low-dimensional space and have good electric energy meter feature characterization capabilities.
[0049] Step 5: Based on a number of sample feature values of each of the sample electric energy meters and label data of each of the sample electric energy meters, the initial neural network model is trained to obtain a target neural network model.
[0050] In this step, when performing model training, the initial neural network model can be used to perform state detection on several sample characteristic values of each sample electric energy meter to obtain initial state detection results corresponding to each sample electric energy meter; based on the initial state detection results corresponding to each of the sample electric energy meters and the label data corresponding to each of the sample electric energy meters, the initial model parameters in the initial neural network model are adjusted to obtain the current neural network model, until the error value between the current initial state detection result output by the adjusted current neural network model and the corresponding electric energy meter label data meets a predetermined condition, and the current neural network model is used as the target neural network model.
[0051] In this step, the initial neural network model can be an LSTM (Long Short Term Memory) network model, and the LSTM network includes a multi-layer structure constructed by connecting multiple single-layer LSTM Layers. The number of network layers can be set and adjusted according to the number of features of the electric energy meter time series data samples / sample power data and the nature of the features. Specifically, when training the model, the input data can be divided into training set, test set and validation set according to 70%, 20% and 10%. The calculation process of the LSTM network is as follows: Forget Gate:
[0052] Alternative status information:
[0053] Input Gate:
[0054] Updated cell state formula:
[0055] Output Gate:
[0056] Hidden layer output at the current moment:
[0057] in, , , and represents the weight matrix; , , and represents the bias term; is the hidden state of the previous moment; is the current input, that is, the sample feature value input to the LSTM model, Represents the output of the forget gate; Indicates the cell state at the previous moment; Represents the input gate value; represents the candidate value, Indicates the current cell state. represents the hyperbolic tangent function, represents the sigmoid function, represents the hyperbolic tangent function.
[0058] The cross entropy is used to define the loss function, and L2 regularization is added to the loss function.
[0059]
[0060] in, For the conventional loss function part, is the regularization parameter.
[0061] That is, after obtaining the sample characteristic values of each sample electricity meter, the sample characteristic values can be input into the above-mentioned LSTM network, and the corresponding state detection results can be output through the LSTM network. Then, the state detection results are compared with the label data corresponding to the sample characteristic values, and the errors are calculated. According to the errors, it is judged whether the training stop requirements are met; if the training stop requirements are not met, the LSTM network parameters can be optimized and adjusted, and then the sample characteristic values can be re-input for state detection; if the training stop requirements are met, the model training can be stopped and the target neural network model can be obtained.
[0062] Furthermore, another embodiment of the present application provides an operating status detection for an electric energy meter. In this embodiment, a preferred architecture LSTM model is specifically provided, which may include an input layer, an LSTM layer, a Dropout layer, a fully connected layer 1, a fully connected layer 2, a Softmax layer, and a classification layer connected in sequence. Among them: (1) Input layer, used to receive input RMT features (i.e., receive sample feature values). The parameter is 9, which means that this layer has 9 neurons and the received input is 9-dimensional. (2) LSTM layer, used to learn the implicit information in the input sequence, with a parameter of 128, indicating that this layer has 128 neurons; (3) Dropout layer, used to prevent network overfitting, with a parameter of 0.5, indicating that each neuron is temporarily removed with a probability of 0.5; (4) Fully connected layer 1, which is used to receive the output of the LSTM layer and share and fuse the information it contains. The parameter is 90, indicating that this layer consists of 90 neurons; (5) Fully connected layer 2, used to specify the number of output categories and map the upper layer output to each category. The parameter is 6, indicating that this layer has 6 neurons and the number of classification results is 6; (6) Softmax layer, which receives the output of the upper layer and calculates the probability of each classification category, that is, calculates the probability value of the 5 operating states; (7) The classification layer outputs the final classification result based on probabilistic competitive voting.
[0063] In this embodiment, when training the target neural network model, the following can be done: Figure 2 As shown, the process includes the following: Step 1: Collect the time series data of the electricity meter and describe the data, that is, collect 990 sets of time series data of the electricity meter (i.e., sample power data) and labels, of which 792 are training sets and 198 are test sets.
[0064] Step 2: Preprocess the time series data and integrate them to form an electric energy meter sample database.
[0065] Step 3: Use RMT to extract the features of the time series sample database. Figure 3 shown.
[0066] Step 4: Establish a long short-term memory neural network and pass the time series sample database features generated in step 3 to the LSTM model; Step 5: Set relevant parameters and train the network; Step 6: Calculate the error based on the output state detection result and the label data corresponding to the input feature value; Step 7: Determine whether the error meets the requirements; if so, end and obtain the target neural network model; if not, return to step 5.
[0067] Step 8: Establish an energy meter measurement accuracy evaluation method based on machine learning. The loss function curve obtained is as follows: Figure 4 As shown in the figure, after about 4700 trainings, the loss value change has been reduced to a very small level, and the model accuracy is close to 100%. Figure 5 Shown is the confusion matrix, indicating that the overall accuracy of the model evaluation reached 98.5%.
[0068] By adopting the operation status detection method for electric energy meters in this application, the time series data of electric energy meters are collected and detected and checked for the procurement system and the marketing system. When checking the electric energy meter data, it is found that the metering data of a certain electric energy meter fluctuates greatly. The metering accuracy of the electric energy meter is evaluated using the long short-term memory neural network model trained in this application. The evaluation category is 4. The evaluation result shows that the metering of the meter is less accurate, that is, the operation status of the electric energy meter is a less accurate operation status. Through the on-site instrument inspection and investigation, it is found that the metering error of the electric energy meter is large, exceeding 3%. Using the electric energy meter measurement accuracy evaluation method of this application, the electric energy meter to be analyzed can be evaluated, and the metering accuracy information of the electric energy meter can be accurately obtained, thereby accurately detecting the operation status of the electric energy meter.
[0069] Another embodiment of the present application provides an operating status detection device for an electric energy meter, such as Figure 6 As shown, including: The acquisition module 11 is used to acquire a number of target power data measured by the electric energy meter to be tested at each sampling time; A calculation module 12, configured to calculate the eigenvalues of the covariance matrix based on each of the target power data, and obtain a plurality of target eigenvalues corresponding to the electric energy meter to be tested; The detection module 13 is used to perform operation status detection based on each of the target feature values using a pre-trained target neural network model to obtain a status detection result of the electric energy meter to be tested.
[0070] In the specific implementation process of this embodiment, the calculation module is specifically used to: construct a first covariance matrix based on each of the target power data; perform eigenvalue calculations based on the first covariance matrix to obtain first eigenvalues corresponding to the first covariance matrix, so as to obtain target eigenvalues corresponding to the electric energy meter to be tested.
[0071] In the specific implementation process of this embodiment, the calculation module is specifically used to: divide each of the target power data according to predetermined data categories to obtain sub-data sets corresponding to each data category; construct a second covariance matrix corresponding to each sub-data set based on each of the sub-data sets to obtain several second covariance matrices corresponding to the electric energy meter to be tested; perform eigenvalue calculations based on each of the second covariance matrices to obtain second eigenvalues corresponding to each of the second covariance matrices to obtain several target eigenvalues corresponding to the electric energy meter to be tested.
[0072] In the specific implementation process of this embodiment, the data category includes one or more of the following: current data, voltage data, power data and electric energy data.
[0073] In the specific implementation process of this embodiment, the operating state detection device for the electric energy meter further includes a training module, and the training module is used to: Respectively obtain historical power data of several sample power meters and current power data currently measured by each sample power meter; Based on the historical power data and current power data corresponding to each sample power meter, a sample data set including a plurality of sample power data corresponding to each sample power meter is constructed; For each of the sample data sets, a number of sample covariance matrices corresponding to each of the sample data sets are calculated and obtained respectively; Based on each of the sample covariance matrices, eigenvalue calculations are performed to obtain sample eigenvalues corresponding to each sample covariance matrix, so as to obtain a number of sample eigenvalues corresponding to each sample electric energy meter; Based on a number of sample characteristic values of each of the sample electric energy meters and label data of each of the sample electric energy meters, the initial neural network model is trained to obtain a target neural network model.
[0074] In the specific implementation process of this embodiment, the training module is specifically used to: construct a first sample covariance matrix corresponding to each data set based on each sample power data in each data set to obtain a sample covariance matrix corresponding to each data set; or, for each sample power data in the same data set, based on the data category to which each sample power data belongs, construct a second sample covariance matrix corresponding to each data category to obtain several sample covariance matrices corresponding to each data set.
[0075] In the specific implementation process of this embodiment, the training module is specifically used to: use the initial neural network model to perform state detection on several sample characteristic values of each sample electric energy meter to obtain an initial state detection result corresponding to each sample electric energy meter; based on the initial state detection result corresponding to each of the sample electric energy meters and the label data corresponding to each of the sample electric energy meters, adjust the initial model parameters in the initial neural network model to obtain the current neural network model, until the error value between the current initial state detection result output by the adjusted current neural network model and the corresponding electric energy meter label data meets a predetermined condition, and then use the current neural network model as the target neural network model.
[0076] In the present embodiment, an operating status detection device for an electric energy meter collects power data of the electric energy meter, and then calculates the eigenvalues of the covariance matrix of the collected power data to obtain target eigenvalues, thereby realizing the transformation of high-dimensional electric energy meter data into a low-dimensional data space, and has good electric energy meter feature characterization capability, that is, it can make the calculated target eigenvalues more reasonable and accurate, and subsequently the operating status of the electric energy meter can be accurately detected by using a pre-trained target neural network model based on the target eigenvalues.
[0077] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented: Step 1: obtaining a number of target power data measured by the electric energy meter to be tested at each sampling time; Step 2: Calculate the eigenvalues of the covariance matrix based on each of the target power data to obtain a number of target eigenvalues corresponding to the electric energy meter to be tested; Step three: Based on each of the target feature values, use the pre-trained target neural network model to perform operating status detection to obtain a status detection result of the electric energy meter to be tested.
[0078] The specific implementation process of the above method steps can refer to any of the above embodiments of the method for detecting the operating status of the electric energy meter, and this embodiment will not be repeated here.
[0079] In the present application, the power data of the electric energy meter is collected, and then the covariance matrix eigenvalues of the collected power data are calculated to obtain the target eigenvalues, thereby realizing the transformation of the high-dimensional electric energy meter data into a low-dimensional data space, and having a good electric energy meter feature characterization capability, that is, being able to make the calculated target eigenvalues more reasonable and accurate, and subsequently the target neural network model obtained by pre-training can be used based on the target eigenvalues to accurately detect the operating status of the electric energy meter.
[0080] Another embodiment of the present application provides an electronic device, such as Figure 7 As shown, at least a memory 1 and a processor 2 are included, the memory 1 stores a computer program, and the processor 2 implements the following method steps when executing the computer program on the memory 1: Step 1: obtaining a number of target power data measured by the electric energy meter to be tested at each sampling time; Step 2: Calculate the eigenvalues of the covariance matrix based on each of the target power data to obtain a number of target eigenvalues corresponding to the electric energy meter to be tested; Step three: Based on each of the target feature values, use the pre-trained target neural network model to perform operating status detection to obtain a status detection result of the electric energy meter to be tested.
[0081] The specific implementation process of the above method steps can refer to any of the above embodiments of the method for detecting the operating status of the electric energy meter, and this embodiment will not be repeated here.
[0082] In the present application, the power data of the electric energy meter is collected, and then the covariance matrix eigenvalues of the collected power data are calculated to obtain the target eigenvalues, thereby realizing the transformation of the high-dimensional electric energy meter data into a low-dimensional data space, and having a good electric energy meter feature characterization capability, that is, being able to make the calculated target eigenvalues more reasonable and accurate, and subsequently the target neural network model obtained by pre-training can be used based on the target eigenvalues to accurately detect the operating status of the electric energy meter.
[0083] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A method for detecting the operating status of an electric energy meter, characterized in that: include: Obtaining a number of target power data measured by the electric energy meter to be tested at each sampling time; Calculate the eigenvalues of the covariance matrix based on each of the target power data to obtain a number of target eigenvalues corresponding to the electric energy meter to be tested; Based on each of the target characteristic values, a pre-trained target neural network model is used to perform operating status detection to obtain a status detection result of the electric energy meter to be tested.
2. The method according to claim 1, characterized in that The calculating of the covariance matrix eigenvalues based on each of the target power data to obtain a plurality of target eigenvalues corresponding to the electric energy meter to be tested specifically includes: Constructing and obtaining a first covariance matrix based on each of the target power data; Eigenvalue calculations are performed based on the first covariance matrix to obtain first eigenvalues corresponding to the first covariance matrix, so as to obtain target eigenvalues corresponding to the electric energy meter to be tested.
3. The method according to claim 1, characterized in that The calculating of the covariance matrix eigenvalues based on each of the target power data to obtain a plurality of target eigenvalues corresponding to the electric energy meter to be tested specifically includes: Dividing each of the target power data according to predetermined data categories to obtain sub-data sets corresponding to each data category; Constructing and obtaining a second covariance matrix corresponding to each sub-data set based on each of the sub-data sets to obtain a plurality of second covariance matrices corresponding to the electric energy meter to be tested; Eigenvalue calculations are performed based on each of the second covariance matrices to obtain second eigenvalues corresponding to each of the second covariance matrices, so as to obtain a plurality of target eigenvalues corresponding to the electric energy meter to be tested.
4. The method according to claim 3, characterized in that The data categories include one or more of the following: current data, voltage data, power data, and electric energy data.
5. The method according to claim 1, characterized in that Before performing running state detection based on each of the target feature values using a pre-trained target neural network model, the method further includes: Respectively obtain historical power data of several sample power meters and current power data currently measured by each sample power meter; Based on the historical power data and current power data corresponding to each sample power meter, a sample data set including a plurality of sample power data corresponding to each sample power meter is constructed; For each of the sample data sets, a number of sample covariance matrices corresponding to each of the sample data sets are calculated and obtained respectively; Based on each of the sample covariance matrices, eigenvalue calculations are performed to obtain sample eigenvalues corresponding to each sample covariance matrix, so as to obtain a number of sample eigenvalues corresponding to each sample electric energy meter; Based on a number of sample characteristic values of each of the sample electric energy meters and label data of each of the sample electric energy meters, the initial neural network model is trained to obtain a target neural network model.
6. The method according to claim 5, characterized in that For each of the data sets, a number of sample covariance matrices corresponding to each of the data sets are calculated and obtained, specifically including: Based on each sample power data in each data set, respectively construct a first sample covariance matrix corresponding to each data set to obtain a sample covariance matrix corresponding to each data set; Alternatively, for each sample power data in the same data set, based on the data category to which each sample power data belongs, a second sample covariance matrix corresponding to each data category is constructed respectively to obtain a plurality of sample covariance matrices corresponding to each data set.
7. The method according to claim 5, characterized in that The training of the initial neural network model based on the sample characteristic values of each of the sample electric energy meters and the label data of each of the sample electric energy meters to obtain the target neural network model specifically includes: Using the initial neural network model, a state detection is performed on several sample characteristic values of each sample electric energy meter to obtain an initial state detection result corresponding to each sample electric energy meter; Based on the initial state detection results corresponding to each of the sample electric energy meters and the label data corresponding to each of the sample electric energy meters, the initial model parameters in the initial neural network model are adjusted to obtain the current neural network model, until the error value between the current initial state detection result output by the adjusted current neural network model and the corresponding electric energy meter label data meets a predetermined condition, the current neural network model is used as the target neural network model.
8. A device for detecting the operating status of an electric energy meter, characterized in that: include: An acquisition module is used to acquire a number of target power data measured by the electric energy meter to be tested at each sampling time; A calculation module, used for calculating the eigenvalues of the covariance matrix based on each of the target power data, and obtaining a plurality of target eigenvalues corresponding to the electric energy meter to be tested; The detection module is used to perform operating status detection based on each of the target feature values using a pre-trained target neural network model to obtain a status detection result of the electric energy meter to be tested.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for detecting the operating status of an electric energy meter as described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: The device at least comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for detecting the operating status of an electric energy meter as described in any one of claims 1 to 7 when executing the computer program on the memory.
