Metering error evaluation method and system for intelligent electric meter
The features of smart meters are extracted by embedding encoding and timing convolutional neural networks, and the improved Transformer network is used to establish a metering error evaluation model, which solves the problem of subjectivity and insufficient data utilization of smart meter error evaluation in the prior art, and achieves a more accurate error evaluation and a more efficient maintenance process.
Patent Information
- Application Number
- CN202510196386.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-10
AI Technical Summary
The existing smart meter error evaluation system is highly subjective, unable to make full use of massive data, and it is difficult to accurately evaluate the measurement error of smart meters.
Embedded encoding is used to convert the production information of smart meter into an embedding matrix to extract category features; extract timing characteristics of running data through timing convolutional neural network; use category features and timing characteristics as inputs and measurement errors as labels, train the improved Transformer network, and establish a smart meter metering error evaluation model.
It has achieved scientific evaluation of the measurement error of smart meters, and can more accurately evaluate the error of smart meters, providing a basis for maintenance and rotation, saving the cost of manual maintenance and manpower and material resources.
Smart Images

Figure CN120123658A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of on-line monitoring of power metering equipment, and more specifically, to a method and system for evaluating the metering error of an intelligent electric meter. Background Art
[0002] Intelligent electric meters are crucial in modern power systems. They can achieve data collection and two-way communication, improve the accuracy and efficiency of power management, and support the efficient operation and optimization of smart grids. The quality of the intelligent electric meters themselves, as well as the electrical and natural environments in which they actually operate, can cause metering over-tolerance and other problems in the intelligent electric meters. Therefore, regular maintenance is required.
[0003] Existing intelligent electric meter error evaluation systems mostly comprehensively evaluate the meter error based on evaluation indicators with different weights. The selection of evaluation indicators and the determination of indicator weights are highly subjective. In addition, existing error evaluation methods cannot fully exploit the massive data in the power consumption information collection system, marketing business application system, and metering production scheduling platform. Summary of the Invention
[0004] To solve the deficiencies in the prior art, the present invention provides a method and system for evaluating the metering error of an intelligent electric meter, which can fully consider the influence of its own quality and operating environment on the metering error of the intelligent electric meter, scientifically evaluate the metering error of the intelligent electric meter, and provide a basis for the maintenance and replacement of the intelligent electric meter.
[0005] The present invention adopts the following technical solutions.
[0006] In a first aspect, the present invention provides a method for evaluating the metering error of an intelligent electric meter, including the following steps: collecting the production information, metering error, and operating data of multiple intelligent electric meters; converting the production information of the multiple intelligent electric meters into an embedding matrix through embedded coding, extracting the category features of each intelligent electric meter, and forming a category feature matrix; based on the operating data of each intelligent electric meter, extracting the time series feature sequence of each intelligent electric meter through a time series convolutional neural network, and forming a time series feature matrix; using the category feature matrix and the time series feature matrix as inputs, and the metering error as a label, training an improved Transformer network to obtain an intelligent electric meter metering error evaluation model, wherein a dimensionality reduction matrix is introduced to improve the Transformer network; evaluating the metering error of the intelligent electric meter to be evaluated based on the trained intelligent electric meter metering error evaluation model.
[0007] Preferably, collecting the production information, measurement errors, and operation data of multiple smart meters includes the following steps: collecting the production information, measurement errors, and operation data of multiple smart meters through a metering production scheduling platform, an electricity consumption information collection system, and an external system; wherein, the production information includes: the manufacturer and batch number of the smart meter; the operation data includes: voltage, current, temperature, and humidity.
[0008] Preferably, converting the production information of multiple smart meters into an embedding matrix through embedding coding, and extracting the category features of each smart meter to form a category feature matrix includes the following steps: determining the embedding vector of each smart meter according to the production information of each smart meter; constructing an embedding matrix E based on the embedding vectors of multiple smart meters; the embedding matrix E includes the embedding vectors corresponding to the category features involved in all the collected smart meters, wherein, the embedding matrix E is expressed as:
[0009]
[0010] where, E ∈ R C×H is the embedding matrix, H is the dimension of the embedding vector, C is the number of categories, e i ∈ R H represents the embedding vector of the i-th smart meter, and the corresponding embedding vector, that is, the category feature, is obtained by querying the embedding matrix E given the index i of the smart meter.
[0011] Preferably, the embedding vector e i of each smart meter is obtained through training by an embedding network, and the embedding vector is updated through backpropagation during the training process:
[0012]
[0013] where, L is the loss function of the smart meter measurement error evaluation model, and α is the learning rate.
[0014] Preferably, based on the operation data of each smart meter, extracting the time series feature sequence of each smart meter through a temporal convolutional neural network to form a time series feature matrix includes the following steps: extracting the temporal features of the smart meter at each moment through a temporal convolutional network and expressing them as the following expression:
[0015]
[0016] where, K is the size of the convolutional kernel in the temporal convolutional neural network, ω k is the k-th parameter in the convolutional kernel, t is the moment when the operation data is collected, x t is the operation data at the moment t, d is the dilation rate, which doubles with the depth of the temporal convolutional neural network, f t is xt The corresponding timing characteristics;
[0017] The timing feature matrix F is expressed as:
[0018]
[0019] The timing feature sequence of the i-th smart meter is expressed as:
[0020] F i = [f i1 , f i2 ,..., f it ,... f iT ;
[0021] Where N represents the number of smart meters, F i represents the timing feature sequence of the i-th smart meter, and f it represents the timing feature of the i-th smart meter at the t-th moment, and T is the total number of moments.
[0022] Preferably, taking the category feature matrix and the timing feature matrix as inputs, and the measurement error as a label, training the improved Transformer network to obtain a smart meter measurement error evaluation model, wherein improving the Transformer network by introducing a dimensionality reduction matrix includes the following steps:
[0023] Combining the category feature matrix E and the timing feature matrix F to form a feature matrix X = [E, F], where X = [x 1 , x 2 ,..., x i ,... x N , x i = [e i , F i , N represents the number of smart meters, x i represents the i-th feature in the feature matrix X, e i represents the embedding vector of the i-th smart meter; F i represents F i represents the timing feature sequence of the i-th smart meter; taking x i as an input;
[0024] Introducing a dimensionality reduction matrix P k for the key vector and a dimensionality reduction matrix P v for the value vector, mapping x i to a query vector q i , a key vector k i and a value vector v i , reducing the dimensionality of the input data to improve the Transformer network;
[0025] Based on the query vector q i and the key vector k j , calculate x through each Head i and x j to obtain the attention weight Attention ij , j≠i;
[0026] Based on the attention weight Attention ij weight the value vector v j and perform weighted summation to obtain the word representation of x i , which is used as the output of the Head;
[0027] Concatenate the outputs of multiple Heads, and perform a linear transformation through the weight matrix W O after the multi-head attention calculation to obtain the measurement error output of the smart meter measurement error evaluation model;
[0028] Use the measurement error output of the smart meter measurement error evaluation model and the collected actual measurement error to calculate the loss function, and update the parameters of the improved Transformer network according to the loss function. Finally, complete the model training to obtain the smart meter measurement error evaluation model.
[0029] Preferably, the dimensionality reduction matrix P k for introducing the key vector v and the dimensionality reduction matrix P i for the value vector i map x i to the query vector q i , the key vector k
[0030] q i =W Q x i
[0031] k i =P k W K x i
[0032] v i =P v W V x i
[0033] where W Q , W K and W V are learnable weight matrices, and P k and P v are dimensionality reduction matrices.
[0034] Preferably, the q-based i and k j , each Head calculates x i and x j Attention weight between ij , j≠i, expressed as the following expression:
[0035]
[0036] Among them, d k is the dimension of the key vector, used to scale the dot product.
[0037] Preferably, the attention weight based Attention ij The value vector v j Perform weighted summation to obtain x i The word representation, as the output of the Head, is expressed as the following expression:
[0038]
[0039] Preferably, the outputs of multiple Heads are spliced to obtain the measurement error output of the smart meter measurement error evaluation model through linear transformation, which is expressed as the following expression:
[0040] MultiHead(Q,K,V)=Concat(head 1 , ..., head h )W O
[0041] Among them, W O is the weight matrix after multi-head attention.
[0042] Preferably, the loss function is calculated using the metering error output of the smart meter metering error evaluation model and the collected actual metering error, which is expressed as the following expression:
[0043]
[0044] Among them, cosh is the hyperbolic cosine function, is the metering error predicted by the smart meter metering error assessment model, y i is the actual measurement error.
[0045] A second aspect of the present invention provides a smart meter measurement error assessment system, which is applied to the aforementioned smart meter measurement error assessment method, comprising:
[0046] An acquisition module, used to acquire production information, measurement errors and operation data of multiple smart meters;
[0047] An extraction module, configured to convert the production information of multiple smart meters into an embedding matrix through embedding encoding, extract the category features of each smart meter, and form a category feature matrix; and, based on the operation data of each smart meter, extract the time series feature sequence of each smart meter through a temporal convolutional neural network to form a time series feature matrix.
[0048] A training module, configured to use the category feature matrix and the time series feature matrix as inputs, and the measurement error as a label to train an improved Transformer network to obtain a smart meter measurement error evaluation model, wherein a dimensionality reduction matrix is introduced to improve the Transformer network.
[0049] An evaluation module, configured to evaluate the measurement error of a smart meter based on the trained smart meter measurement error evaluation model.
[0050] The beneficial effects of the present invention are as follows. Compared with the prior art, a smart meter measurement error evaluation method and system provided by the present invention convert the production information of smart meters into an embedding matrix through embedding encoding, and extract the category features of smart meters; extract the time series features of the operation data of smart meters through a temporal convolutional neural network; use the category features and time series features as inputs, and the measurement error as a label, introduce dimensionality reduction matrices Pk and Pv to improve the Transformer, establish a smart meter measurement error evaluation model based on the improved Transformer, and perform training; use the trained smart meter measurement error evaluation model to evaluate the measurement error of smart meters. Different from the traditional evaluation method based on indicators and weights, a smart meter error evaluation model is constructed with the category features of the production information of smart meters and the time series features of the operation data as input quantities, fully mining the massive data related to smart meters, and fully considering the influence of its own quality and operating environment on the measurement error of smart meters, and being able to more scientifically evaluate the measurement error of smart meters. The trained error evaluation model can be directly used for the error evaluation of smart meters. While being accurate and efficient, it saves the manpower and material resources consumed by manual maintenance, solves the problem that the measurement error of smart meters is affected by its own quality and operating environment and cannot be accurately evaluated, and realizes remote and convenient verification of the measurement performance of smart meters. In addition, the present invention uses a measurement production scheduling platform, a power consumption information collection system, and an external system to collect the production information, measurement errors, and operation data of multiple smart meters, and can fully mine and utilize the massive data in the measurement production scheduling platform and the power consumption information collection system. Description of the Drawings
[0051] Figure 1 It is a flowchart of a smart meter measurement error evaluation method provided by the present invention.
[0052] Figure 2 Schematic diagram for comparing the output results of an intelligent meter measurement error evaluation method based on an improved Transformer with those of a traditional recurrent neural network;
[0053] Figure 3 Schematic diagram of the structure of an intelligent meter measurement error evaluation system provided by the present invention. Detailed implementation manners
[0054] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the spirit of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0055] As Figure 1 shown, Embodiment 1 of the present invention provides an intelligent meter measurement error evaluation method, including the following steps:
[0056] Step 1, collect the production information, measurement errors, and operation data of multiple intelligent meters.
[0057] In a possible implementation manner, collect the production information such as the manufacturer and batch of the intelligent meter, the measurement error, and the operation data such as voltage, current, temperature, and humidity to construct an original data set.
[0058] In specific implementation, the above data can be collected through a metering production scheduling platform, an electricity consumption information collection system, and an external system (collecting temperature and humidity information). Among them, the operation data and the measurement error are time series data, that is, the operation data and the measurement error of the intelligent meter at different times are collected.
[0059] Step 2, convert the production information of multiple intelligent meters into an embedding matrix through embedding encoding, and extract the category features of each intelligent meter from the embedding matrix to form a category feature matrix.
[0060] In a possible implementation manner, Step 2 specifically includes:
[0061] According to the production information of each intelligent meter, determine the embedding vector of each intelligent meter, and construct an embedding matrix E based on the embedding vectors of multiple intelligent meters. Among them, the embedding matrix E includes the embedding vectors corresponding to the category features involved in all the collected intelligent meters, and the embedding matrix E is expressed as:
[0062]
[0063] where E ∈ RC×H is the embedding matrix, H is the dimension of the embedding vector, C is the number of categories, and e i ∈R H represents the embedding vector of the i-th smart meter. Given the index i of the smart meter, the corresponding embedding vector, i.e., the category feature, is obtained by querying the embedding matrix E.
[0064] Specifically, the category feature of the smart meter corresponds to the embedding vector. Through statistics, the embedding matrix E includes the embedding vectors corresponding to all the categories involved in the smart meters collected in step 1, and the embedding vector can represent the category feature of the smart meter.
[0065] Among them, the embedding vector e of each smart meter i is obtained through training the embedding network. During the training process, the embedding vector is updated through backpropagation, and its update method can be expressed as:
[0066]
[0067] Among them, L is the loss function of the smart meter measurement error evaluation model, and α is the learning rate.
[0068] Step 3: Based on the operation data of each smart meter, extract the time series feature sequence of each smart meter through a temporal convolutional neural network to form a time series feature matrix.
[0069] In a possible implementation, the temporal convolutional neural network in step 3 adopts dilated convolution and causal convolution. The time series feature of each smart grid at time t can be expressed as:
[0070]
[0071] Among them, K is the size of the convolution kernel in the temporal convolutional neural network, ω k is the k-th parameter in the convolution kernel, t is the time when the operation data is collected, x t is the operation data at time t, d is the dilation rate, which doubles with the depth of the temporal convolutional neural network, and f t is the time series feature corresponding to x t .
[0072] It can be understood that the operation data of a smart meter is time series data. x t is the operation data at time t. Convert x t into the time series feature f t , and convert the operation data at each time into the time series feature to form the time series feature sequence of each smart meter.
[0073] The time series feature matrices F of multiple smart meters are expressed as:
[0074]
[0075] The time series feature sequence of the i-th smart meter is expressed as:
[0076] F i = [f i1 , f i2 ,..., f it ,... f iT ;
[0077] Among them, N represents the number of smart meters, F i represents the time series feature sequence of the i-th smart meter, and f it represents the time series feature of the i-th smart meter at the t-th moment, and T is the total number of moments.
[0078] Step 4: Use the category feature matrix formed in Step 2 and the time series feature matrix formed in Step 3 as inputs, and use the measurement error collected in Step 1 as labels to train the improved Transformer network to obtain a smart meter measurement error evaluation model. Among them, a dimensionality reduction matrix is introduced to improve the Transformer network.
[0079] In a possible implementation manner, the Transformer network includes multiple Head heads. Step 4 specifically includes the following steps:
[0080] Step 4.1: Combine the category feature matrix E and the time series feature matrix F to form a feature matrix X = [E, F]. Among them, X = [x 1 , x 2 ,..., x i ,... x N , x i = [e i , F i , N represents the number of smart meters, x i represents the i-th feature in the feature matrix X, and e i represents the embedding vector of the i-th smart meter; F i represents F i represents the time series feature sequence of the i-th smart meter; Use x i as the input;
[0081] Step 4.2: Introduce a dimensionality reduction matrix P k for the key vector and a dimensionality reduction matrix P v for the value vector, and map x i to a query vector q i , a key vector k i and a value vector v i, reduce the dimensionality of the input data, thereby improving the Transformer network to reduce the computational complexity and memory overhead;
[0082] In a possible implementation, the query vector q in step 4.2 i , key vector k i and value vector v i are calculated as follows:
[0083] q i = W Q x i
[0084] k i = P k W K x i
[0085] v i = P v W V x i
[0086] where W Q , W K and W V are the weight matrix of the query vector, the weight vector of the key vector, and the weight matrix of the value vector respectively, and P k and P v are the dimensionality reduction matrix of the key vector and the dimensionality reduction matrix of the value vector respectively.
[0087] Step 4.3, based on the query vector q i and the key vector k j , calculate the attention weight Attention i and x j between x ij , j ≠ i, which is expressed as the following expression:
[0088]
[0089] where d k is the dimension of the key vector, which is used to scale the dot product.
[0090] Step 4.4, based on the attention weight Attention ij weighted sum the value vector v j to obtain the word representation of x i as the output of the Head head, which is expressed as the following expression:
[0091]
[0092] Step 4.5, splice the outputs of multiple Head headers, and perform a linear transformation through the weight matrix W calculated by multi-head attention to obtain the measurement error output of the smart meter measurement error evaluation model; O In a possible implementation manner, the measurement error output of the smart meter measurement error evaluation model obtained in step 4.5 can be expressed as:
[0093] MultiHead(Q, K, V) = Concat(head1,..., head
[0094] )W h )W O
[0095] where W O is the weight matrix after multi-head attention.
[0096] Step 4.6, use the measurement error output of the smart meter measurement error evaluation model obtained in step 4.5 and the actual measurement error in step 1 to calculate the loss function, and update the parameters of the Transformer according to the loss function, and finally complete the model training to obtain the smart meter measurement error evaluation model.
[0097] In a possible implementation manner, the loss function for training the smart meter measurement error evaluation model is:
[0098]
[0099] where cosh is the hyperbolic cosine function, is the measurement error predicted by the smart meter measurement error evaluation model, and y i is the actual measurement error.
[0100] Step 5, evaluate the measurement error of the smart meter based on the trained smart meter measurement error evaluation model.
[0101] It can be understood that step 5 is to train the smart meter measurement error evaluation model through step 4 to evaluate the measurement error of the smart meter, which specifically includes the following steps:
[0102] Step 5.1, obtain the production information of the smart meter to be evaluated, including: manufacturer information and batch information, input it into the embedding matrix, and extract the category features of the smart meter to be evaluated;
[0103] Step 5.2, collect the operation data of the smart meter to be evaluated, input it into the temporal convolutional neural network, and extract the temporal feature sequence of the smart meter to be evaluated.
[0104] Step 5.3: Input the category features and time series feature sequences of the smart meter to be evaluated into the trained smart meter measurement error evaluation model, and output the measurement error of the smart meter to be evaluated.
[0105] Step 5.4: Evaluate the operating status of the smart meter based on the magnitude of the measurement error.
[0106] In specific implementation, the smart meter measurement error evaluation results can be divided into three levels:
[0107] When ε ∈ (-θ 1 , θ 1 ), the smart meter measures normally.
[0108] When ε ∈ (-θ 2 , -θ 1 ∪ [θ 1 , θ 2 ), the smart meter measurement gives an alarm.
[0109] When ε ∈ (-∞, -θ 2 ), ∪ [θ 2 , +∞), the smart meter measurement is abnormal.
[0110] The method proposed in the present invention is used to construct a smart meter error evaluation model, and the evaluation results of the improved Transformer and the traditional recurrent neural network are compared and analyzed as shown in Table 1 below. Figure 2 It is a schematic diagram for comparing the evaluation errors between the improved Transformer network of the present invention and the traditional recurrent neural network.
[0111] Table 1 Comparison of evaluation errors between Transformer and traditional recurrent neural network
[0112]
[0113] Refer to Figure 3 , a smart meter measurement error evaluation system of the present invention is provided for implementing the smart meter measurement error evaluation method in Embodiment 1. The error evaluation system includes:
[0114] An acquisition module 301, configured to acquire production information, measurement errors, and operation data of multiple smart meters;
[0115] An extraction module 302, configured to convert the production information of multiple smart meters into an embedding matrix through embedding encoding, extract the category features of each smart meter, and form a category feature matrix; and, based on the operation data of each smart meter, extract the time series feature sequences of each smart meter through a time series convolutional neural network to form a time series feature matrix.
[0116] A training module 303 is configured to use the category feature matrix and the time series feature matrix as inputs, and the measurement error as a label to train an improved Transformer network to obtain an intelligent electricity meter measurement error evaluation model, where a dimensionality reduction matrix is introduced to improve the Transformer network.
[0117] An evaluation module 304 is configured to evaluate the measurement error of an intelligent electricity meter based on the trained intelligent electricity meter measurement error evaluation model.
[0118] It can be understood that an intelligent electricity meter measurement error evaluation system provided by the present invention corresponds to the intelligent electricity meter measurement error evaluation methods provided in the foregoing embodiments. The relevant technical features of the intelligent electricity meter measurement error evaluation system can refer to the relevant technical features of the intelligent electricity meter measurement error evaluation methods, which will not be elaborated herein.
[0119] The beneficial effects of the present invention are as follows. Compared with the prior art, an intelligent electricity meter measurement error evaluation method and system provided by an embodiment of the present invention collect the manufacturer, batch number, measurement error of an intelligent electricity meter, and operation data such as voltage, current, temperature, and humidity to construct an original data set; convert the manufacturer and batch number data into an embedding matrix E through embedding coding to extract the category features of the intelligent electricity meter; extract the time series features of the operation data of the intelligent electricity meter through a time series convolutional neural network to construct a time series feature matrix F; use the normalized category features and the corresponding matrices E and F of the time series features as inputs, and the measurement error as a label, introduce dimensionality reduction matrices Pk and Pv to improve the Transformer, establish an intelligent electricity meter measurement error evaluation model based on the improved Transformer, and perform training; use the trained intelligent electricity meter measurement error evaluation model to evaluate the measurement error of the intelligent electricity meter. An intelligent electricity meter measurement error evaluation model is constructed with the category features and time series features of the intelligent electricity meter as inputs, fully considering the influence of its own quality and operating environment on the measurement error of the intelligent electricity meter, scientifically evaluating the measurement error of the intelligent electricity meter, and providing a basis for the maintenance and replacement of the intelligent electricity meter. While being accurate and efficient, it saves the manpower and material resources consumed by manual maintenance, solves the problem that the measurement error of the intelligent electricity meter is affected by its own quality and operating environment and cannot be accurately evaluated, and realizes remote and convenient verification of the measurement performance of the intelligent electricity meter.
[0120] In addition, the present invention uses a metering production scheduling platform, an electricity consumption information collection system, and an external system to collect the production information, measurement errors, and operation data of multiple intelligent electricity meters, and can fully mine and utilize the massive data in the metering production scheduling platform and the electricity consumption information collection system.
[0121] It should be noted that in the above embodiments, the descriptions of the various embodiments have their own emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] Those skilled in the art will understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0123] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0124] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0126] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present invention.
[0127] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention, and any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.
Claims
1. A method for evaluating measurement error of a smart meter, characterized in that: The following steps are involved: Collect production information, measurement errors and operation data of multiple smart meters; The production information of multiple smart meters is converted into an embedding matrix through embedded coding, and the category features of each smart meter are extracted to form a category feature matrix; Based on the operating data of each smart meter, the time series feature sequence of each smart meter is extracted through the time series convolutional neural network to form a time series feature matrix; Taking the category feature matrix and the time series feature matrix as input and the metering error as a label, the improved Transformer network is trained to obtain a smart meter metering error evaluation model, wherein a dimension reduction matrix is introduced to improve the Transformer network; The metering error of the smart meter to be evaluated is evaluated based on the trained smart meter metering error evaluation model.
2. The method for evaluating the measurement error of a smart meter according to claim 1, characterized in that: The collecting of production information, metering errors and operation data of multiple smart meters comprises the following steps: Collect production information, metering errors and operation data of multiple smart meters through the metering production scheduling platform, electricity consumption information collection system, and external systems; Among them, production information includes: manufacturer and batch of smart meters; operation data includes: voltage, current, temperature and humidity.
3. The method for evaluating the measurement error of a smart meter according to claim 1, characterized in that: The method of converting the production information of multiple smart meters into an embedding matrix by embedding coding, extracting the category features of each smart meter, and forming a category feature matrix includes the following steps: Determine the embedding vector of each smart meter according to the production information of each smart meter; Based on the embedding vectors of multiple smart meters, an embedding matrix E is constructed; the embedding matrix E includes the embedding vectors corresponding to the category features involved in all the collected smart meters, wherein the embedding matrix E is expressed as: Among them, E∈R C×H is the embedding matrix, H is the dimension of the embedding vector, C is the number of categories, e i ∈R H Represents the embedding vector of the i-th smart meter. Given the index i of the smart meter, the corresponding embedding vector, i.e., the category feature, is obtained by querying the embedding matrix E.
4. The method for evaluating the measurement error of a smart meter according to claim 3, characterized in that: The embedding vector e of each smart meter is i It is obtained by embedding network training, and the embedding vector is updated by back propagation during the training process: Among them, L is the loss function of the smart meter measurement error evaluation model, and α is the learning rate.
5. The method for evaluating the measurement error of a smart meter according to claim 1, characterized in that: Based on the operation data of each smart meter, the time series feature sequence of each smart meter is extracted through the time series convolutional neural network to form a time series feature matrix, including the following steps: extracting the time series features of the smart meter at each moment through the time series convolutional network, and expressing it as the following expression: Where K is the convolution kernel size in the temporal convolutional neural network, ω k is the kth parameter in the convolution kernel, t is the time when the running data is collected, and x t is the running data at time t, d is the expansion rate, and the depth of the sequential convolutional neural network increases exponentially. t For x t The corresponding time series characteristics; The time series feature matrix F is expressed as: The time series feature sequence of the i-th smart meter is expressed as: F i =[f i1 ,f i2 ,...,f it ,...f iT ]; Where N is the number of smart meters, F i represents the time series feature sequence of the i-th smart meter, f it It represents the time series characteristics of the i-th smart meter at the t-th moment, and T is the total number of moments.
6. The method for evaluating the measurement error of a smart meter according to claim 1, characterized in that: The method uses the category feature matrix and the time series feature matrix as inputs and the measurement error as a label to train the improved Transformer network to obtain a smart meter measurement error evaluation model, wherein the dimension reduction matrix is introduced to improve the Transformer network, including the following steps: The category feature matrix E and the time series feature matrix F form a feature matrix X = [E, F], where X = [x1, x2, ..., x i ,...x N ], x i =[e i ,F i ], N represents the number of smart meters, x i represents the i-th feature in the feature matrix X, e i represents the embedding vector of the i-th smart meter; F i Indicates F i represents the time series feature sequence of the i-th smart meter; x i As input; Introduce the dimension reduction matrix P of the key vector k The dimension reduction matrix P of the sum vector v , x i Mapped to query vector q i , key vector k i Sum value vector v i , reduce the dimensionality of the input data to improve the Transformer network; Based on the query vector q i and key vector k j , calculate x through each Head i and x j Attention weight between ij , j≠i; Based on attention weight ij The value vector v j Perform weighted summation to obtain x i The word representation is used as the output of the Head; The outputs of multiple heads are concatenated, and the weight matrix W calculated by multi-head attention is O Perform linear transformation to obtain the metering error output of the smart meter metering error assessment model; The measurement error output of the smart meter measurement error evaluation model and the actual measurement error collected are used to calculate the loss function, and the parameters of the improved Transformer network are updated according to the loss function. Finally, the model training is completed to obtain the smart meter measurement error evaluation model.
7. The method for evaluating the measurement error of a smart meter according to claim 6, characterized in that: The dimension reduction matrix P introduced into the key vector k The dimension reduction matrix P of the sum vector v , x i Mapped to query vector q i , key vector k i Sum value vector v i , reduce the dimension of the input data to improve the Transformer network, which can be expressed as the following expression: q i =W Q x i k i =P k W K x i v i =P v W V x i Among them, W Q , W K and W V is the learnable weight matrix, P k and P v is a dimension reduction matrix.
8. The method for evaluating the measurement error of a smart meter according to claim 7, characterized in that: The query vector q i and key vector k j , calculate x through each Head i and x j Attention weight between ij , j≠i, expressed as the following expression: Among them, d k is the dimension of the key vector, used to scale the dot product.
9. The method for evaluating measurement error of a smart meter according to claim 6, characterized in that: Attention based on attention weight ij The value vector v j Perform weighted summation to obtain x i The word representation, as the output of the Head, is expressed as the following expression:
10. The method for evaluating measurement error of a smart meter according to claim 6, characterized in that: The outputs of multiple heads are spliced, and the measurement error output of the smart meter measurement error evaluation model is obtained through linear transformation, which is expressed as the following expression: MultiHead(Q,K,V)=Concat(head1,...,head h )W O Among them, W O is the weight matrix after multi-head attention.
11. The method for evaluating measurement error of a smart meter according to claim 6, characterized in that: The loss function is calculated using the metering error output of the smart meter metering error evaluation model and the actual metering error collected, which is expressed as the following expression: Among them, cosh is the hyperbolic cosine function, is the metering error predicted by the smart meter metering error assessment model, y i is the actual measurement error.
12. A smart meter measurement error assessment system, characterized in that: The smart meter measurement error assessment method applied to any one of claims 1 to 11 comprises: An acquisition module, used to acquire production information, measurement errors and operation data of multiple smart meters; An extraction module is used to convert the production information of multiple smart meters into an embedding matrix through embedded coding, extract the category features of each smart meter, and form a category feature matrix; and, based on the operation data of each smart meter, extract the time series feature sequence of each smart meter through a time series convolutional neural network to form a time series feature matrix; A training module is used to take the category feature matrix and the time series feature matrix as input and the measurement error as a label to train the improved Transformer network to obtain a smart meter measurement error evaluation model, wherein a dimension reduction matrix is introduced to improve the Transformer network; An evaluation module is used to evaluate the metering error of the smart meter based on the trained smart meter metering error evaluation model.