A method and system for predicting the remaining service life of smart meters

Through the multi-scale and cross-attention mechanism of the smart meter life prediction model, combined with the LSTM model, the problem of low prediction accuracy in the existing technology is solved, and accurate prediction of the remaining service life of the smart meter is achieved.

CN117892259BActive Publication Date: 2024-08-30国网山东省电力公司泗水县供电公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410288539.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-14
Publication Date
2024-08-30
Estimated Expiration
2044-03-14

Smart Images

  • Figure CN117892259B
    Figure CN117892259B
Patent Text Reader

Abstract

This invention belongs to the field of equipment remaining service life prediction technology, and particularly relates to a method and system for predicting the remaining service life of smart meters. The method involves: acquiring real-time monitoring data and environmental data from the smart meter; inputting the acquired data into a meter life prediction model, which includes an input embedding module, a first feature extraction branch, a second feature extraction branch, and a fusion output module. The input embedding module linearly maps the collected sequence data to a high dimension and embeds location information; the first feature extraction branch extracts multi-scale features from the sequence data; the second feature extraction branch extracts correlation features between multiple sequence data; and the fusion output module fuses the multi-scale features and correlation features to predict the remaining service life of the smart meter. This invention considers the different impacts of various parameters on the service life of smart meters and employs a two-channel fusion method to achieve accurate and effective prediction of the remaining service life of the meter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of equipment remaining service life prediction, and in particular relates to a method and system for predicting the remaining service life of a smart meter. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Electricity meters are important instruments for power grid operation and billing. Ensuring the normal use and extending the life of electricity meters is an important basis for ensuring the safety of power grid operation and the accuracy of user electricity billing. The life of electricity meters is mainly affected by factors such as power supply quality and user usage.

[0004] (1) Abnormal fluctuations in the voltage, current, frequency and other parameters in the power grid will affect the metering accuracy and life of the meter. For example, problems such as unstable voltage and excessive current that often occur in the power grid will shorten the life of the meter.

[0005] (2) The installation environment and usage environment of the meter also have a great impact on the service life of the meter. For example, if the meter is installed in a narrow or humid location or is directly exposed to extreme environments such as sunlight or rain, the aging and damage of the meter will be accelerated.

[0006] The remaining useful life (RUL) prediction of equipment can obtain operating status information and warn maintenance personnel to take maintenance measures before equipment failure occurs, effectively helping maintenance personnel to develop flexible and reliable maintenance plans and avoid the harm and economic losses caused by equipment downtime.

[0007] At present, the RUL prediction methods based on deep learning are mainly based on RNN (Recurrent neural network) and CNN (Convolution neural network) architectures and their variants and hybrid networks. They extract information by directly acting on the monitoring sequence data to achieve RUL prediction. However, the existing prediction methods are affected by the defects of the single algorithm model itself, and phenomena such as gradient disappearance and gradient explosion will occur. In addition, the correlation characteristics between sequences cannot be effectively learned, resulting in low prediction accuracy and inaccurate prediction results. Summary of the invention

[0008] In order to overcome the above-mentioned deficiencies in the prior art, the present invention provides a method and system for predicting the remaining useful life of a smart meter.

[0009] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0010] A first aspect of the present invention provides a method for predicting the remaining useful life of a smart meter, comprising:

[0011] Obtain real-time monitoring data and environmental data from smart meters;

[0012] The acquired data is input into the smart meter life prediction model to obtain the remaining service life of the smart meter;

[0013] The smart meter life prediction model includes an input embedding module, a first feature extraction branch, a second feature extraction branch and a fusion output module;

[0014] The input embedding module is used to linearly map the collected sequence data to a high dimension and embed the position information; the first feature extraction branch is used to extract the multi-scale features of the sequence data, the second feature extraction branch is used to extract the correlation features between multiple sequence data, and the fusion output module is used to fuse the multi-scale features and the correlation features to obtain the remaining service life of the smart meter.

[0015] A second aspect of the present invention provides a system for predicting the remaining useful life of a smart meter, comprising:

[0016] The data acquisition module is configured to: acquire real-time monitoring data and environmental data of the smart meter;

[0017] The remaining service life prediction module is configured to: input the acquired data into the smart meter life prediction model to obtain the remaining service life of the smart meter;

[0018] The smart meter life prediction model includes an input embedding module, a first feature extraction branch, a second feature extraction branch and a fusion output module;

[0019] The input embedding module is used to linearly map the collected sequence data to a high dimension and embed the position information; the first feature extraction branch is used to extract the multi-scale features of the sequence data, the second feature extraction branch is used to extract the correlation features between multiple sequence data, and the fusion output module is used to fuse the multi-scale features and the correlation features to obtain the remaining service life of the smart meter.

[0020] One or more of the above technical solutions have the following beneficial effects:

[0021] (1) The present invention takes into account that although different electrical parameters and environmental parameters have different effects on the service life of smart meters, they will all cause loss of internal components of the meter and thus cause metering errors. Therefore, the metering error and multiple environmental factors are selected as the main influencing factors of the remaining service life of the meter, and a two-channel fusion method is used to achieve accurate and effective prediction of the remaining service life of the meter.

[0022] (2) While utilizing LSTM to have good prediction capabilities for time series data, the present invention adds multi-scale and cross-attention mechanisms to realize the attention to features at different scales and the attention to the correlation between different time series, thereby better extracting key features in time series data, being able to fully consider the time correlation of multi-dimensional feature sequences, and improving prediction accuracy.

[0023] (3) Considering that the importance of time series features of time series data in the time dimension is usually not consistent, and multiple time series data influence each other, the present invention uses the first feature extraction branch to extract key features at different time scales, and uses the second feature extraction branch to focus on the correlation features between different time series, which can effectively extract richer sequence features.

[0024] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0026] Figure 1 This is a flow chart of the method of the first embodiment. DETAILED DESCRIPTION

[0027] Embodiment 1

[0028] like Figure 1 As shown, this embodiment discloses a method for predicting the remaining service life of a smart meter, including: step 1: obtaining real-time monitoring data and environmental data of the smart meter;

[0029] Step 2: Input the acquired data into the smart meter life prediction model to obtain the remaining service life of the smart meter;

[0030] In step 1, the real-time monitoring data of the smart meter is the measurement error; the environmental data includes: temperature data, humidity data and air pressure data.

[0031] There are many factors that affect the service life of smart meters, among which climate environment and electrical environment factors are the main influencing indicators. The climate environment mainly includes temperature data, humidity data and air pressure data, and the electrical environment factors mainly include voltage data and current data.

[0032] During the operation of smart meters, changes in the climate and electrical environment will lead to the degradation of some internal device performance parameters of smart meters during their use cycle. Therefore, the relationship between the daily operation data of smart meters and their remaining life should be analyzed. Among them, the measurement error refers to the error between the measured value and the standard value of the metering module of the meter, which is mainly caused by the loss of some components inside the meter. The degradation of the measurement error during the use cycle of the smart meter is a continuous degradation process. Therefore, the life of the smart meter is characterized by collecting and calculating the daily measurement error of the meter.

[0033] After the data is acquired, the method further includes: normalizing the acquired data;

[0034] Data normalization is to scale the extracted data to a smaller range to eliminate the impact of different dimensions between data. The present invention uses the minimum-maximum normalization method to make the extracted feature value range fall between [0,1]. The normalization method will increase the convergence speed of the model and improve the accuracy of model prediction.

[0035] The formula for the minimum-maximum normalization method is:

[0036]

[0037] In the formula, and They represent the data collected by the sensor and the data obtained after normalization, respectively. max(·) and max(·) represent the maximum value function and the minimum value function, respectively.

[0038] In step 2, the smart meter life prediction model is obtained after training based on sample data of the meter and the life label of the meter; the smart meter life prediction model includes an input embedding module, a first feature extraction branch, a second feature extraction branch and a fusion output module;

[0039] The input embedding module is a sequentially connected convolution layer and encoder, which is used to linearly map the collected long-time series data to a high-dimensional feature space to achieve distributed expression and then embed the position information, so as to facilitate the feature extraction branch to process the input features; at the same time, since the self-attention module in the feature extraction branch does not consider the position information of the data during calculation, a position encoder is used to add the position information to the sequence, and the temporal characteristics of the sequence are retained for subsequent modeling; the convolution layer is a one-dimensional convolutional neural network, the number of convolution kernels is set to 32, the convolution kernel size is set to 8×8, and the step size is set to 8; the position encoder uses positiona lencoding.

[0040] Specifically, the input embedding module collects multiple time series from k dimensional linear mapping to high-dimensional time series To get the representation of different time step information in high dimensional space, represents the length of the time series, Indicates the data dimension, Represents high dimension after mapping, After mapping dimensional time series, k represents the number of time series data;

[0041] The input embedding module is represented as:

[0042]

[0043] In the formula, A parameter matrix representing a linear map.

[0044] The first feature extraction branch is used to extract multi-scale features of long time series data from multiple different time scales, the second feature extraction branch is used to extract correlation features between multiple long time series data, and the fusion output module is used to obtain the remaining service life of the smart meter after fusion prediction based on the multi-scale features and the correlation features.

[0045] The present invention processes time series data by introducing a multi-head self-attention mechanism in the feature extraction branch. The self-attention mechanism can dynamically adjust the attention of the model according to the importance of the input data, which enables the model to better focus on different information in the sequence; specifically, it includes:

[0046] Step 201: The first feature extraction branch includes a multi-scale self-attention module and a first splicing and normalization module; the multi-scale self-attention module performs parallel calculation of multiple multi-head self-attention mechanisms based on the input sequence to extract features from different time scales, and outputs them to the second feature extraction branch after passing through the first splicing and normalization module.

[0047] The multi-scale self-attention module proposed in the present invention includes multiple multi-head self-attention modules of different scales working in parallel, and the high-dimensional time series after position embedding is used as the input of the multi-scale self-attention module; a multi-scale variable M in the multi-scale self-attention module is defined, which is based on the time series length n and the number of multi-head self-attention modules of different scales. It is calculated by the ratio of , which is used to control the attention time scale of each multi-head self-attention module.

[0048] For example, there are 3 multi-head self-attention modules of different sizes, and the attention time scales corresponding to each multi-head self-attention module are:

[0049]

[0050] The difference between multiple multi-head self-attention modules of different sizes lies in the different temporal receptive fields of attention, but the internal structure is the same, that is, each multi-head self-attention module includes a multi-head self-attention mechanism and a fully connected layer, and a layer normalization is set after each fully connected layer to splice features to accelerate the training process and make the model converge faster.

[0051] The present invention uses a multi-head attention mechanism to extract the autocorrelation features of time series data, and then uses multiple multi-head self-attention modules of different sizes to realize feature extraction at different time scales; the calculation process of each multi-head self-attention mechanism can be expressed as:

[0052]

[0053] In the formula, is the calculation result of each head’s self-attention; is the output of the multi-head self-attention mechanism; is the number of heads of the multi-head self-attention mechanism; is the matrix parameter.

[0054] First Take the calculation process of the multi-head self-attention mechanism in a scale as an example:

[0055] Record The features extracted by the multi-head self-attention mechanism in the large-scale multi-head self-attention module are , then The features extracted by the large-scale multi-head self-attention module are:

[0056]

[0057] Where Norm represents the layer normalization operation.

[0058] After the outputs of multiple self-attention modules of different sizes are first concatenated and normalized, the multi-scale features of the final output are for:

[0059]

[0060] In the formula, Concat represents the concatenation operation. , , They respectively represent the output of the first-scale multi-head self-attention module, the output of the second-scale multi-head self-attention module, and the output of the G-th-scale multi-head self-attention module.

[0061] Step 202: The second feature extraction branch includes a cross-attention module and a second splicing and normalization module. The cross-attention module is used to realize the attention of correlation features between different sequences. The correlation features extracted in the cross-attention module and the multi-scale features extracted by the multi-scale self-attention module are output to the fusion output module after passing through the second splicing and normalization module.

[0062] Environmental parameters such as temperature and humidity are also important factors affecting the remaining service life of the equipment. Therefore, it is necessary to consider not only the relationship between the metering error and the remaining service life of the smart meter, but also the aging of the internal components of the meter due to meteorological factors. It is also necessary to pay attention to the correlation between environmental variables and the metering error. The present invention uses cross attention to extract correlation features between the two to better capture the impact of environmental variables on the metering error, thereby more accurately characterizing the correlation between the metering error and the remaining service life and improving the accuracy of the prediction.

[0063] Specifically, when cross attention is used to extract correlation features from the measurement error sequence and the multi-element environment sequence, the query matrix (Q) is obtained by transforming the measurement error sequence in the multi-head self-attention module of different scales, and the key matrix (K) and value matrix (V) are obtained by transforming the multi-element environment sequence. The specific process is as follows:

[0064]

[0065] Where: is the multivariate environmental sequence that affects the variation of the measurement error sequence, and m is the number of environmental variables; , , , is the parameter matrix; , , They are the corresponding query matrix, key matrix and value matrix between sequences respectively; is the output of the cross attention mechanism; , ,… It is the calculation result of each cross attention head; is the final multidimensional correlation feature sequence ( is the dimension of the sequence); the correlation feature sequence is a high-level correlation feature representation after effective reconstruction of the measurement error and environmental factors, which can reflect the coupling relationship between the measurement error and environmental factors.

[0066] Step 203: The output features of the above two feature extraction branches are fused into an output module to obtain the final prediction result. The fusion output module includes a sequentially connected LSTM model (Long Short-Term Memory) and a fully connected layer; the LSTM model is a deep learning model specifically used for processing sequence data prediction tasks. LSTM has memory units and various gate structures, which can effectively capture long-term dependencies in time series data; its basic principle is to decide whether to retain past information and how to update the current state by learning the weights of the internal gate structure.

[0067] The feature fusion branch is an LSTM layer, including a forget gate, an input gate, a state update layer and an output gate connected in sequence;

[0068] The forget gate is used to process data after receiving the output of the previous moment and the input of the current moment, and delete some invalid information in the memory unit to reduce the load;

[0069] The input gate is used to filter meaningless input information and selectively add valid information to the memory unit;

[0070] The state update layer is used to forget or retain the information in the state update layer, and scale the update value determined by each state in proportion;

[0071] The output gate is used to output the updated data in the state update layer;

[0072] The fully connected layer is used to output the final remaining useful life prediction result of the electric meter.

[0073] As a further technical solution, in the training process of the model, the mean square error is used as a loss function, and the Adam algorithm is used to update the model parameters. The Adam algorithm can set different learning rates at different stages according to the convergence and approximation conditions during the entire program operation to improve the algorithm fitting degree and performance. The Adam algorithm is realized by calculating the first-order moment estimation and second-order moment estimation of the gradient in each direction of the time series. In the present invention, the initial learning rate is set to 0.006. After learning 500 times, the learning rate is reduced to 0.001, thereby improving the program operation efficiency.

[0074] Embodiment 2

[0075] This embodiment discloses a system for predicting the remaining useful life of a smart meter, including:

[0076] The data acquisition module is configured to: acquire real-time monitoring data and environmental data of the smart meter;

[0077] The remaining service life prediction module is configured to: input the acquired data into the smart meter life prediction model to obtain the remaining service life of the smart meter;

[0078] The smart meter life prediction model includes an input embedding module, a first feature extraction branch, a second feature extraction branch and a fusion output module;

[0079] The input embedding module is used to linearly map the collected sequence data to a high dimension and embed the position information; the first feature extraction branch is used to extract the multi-scale features of the sequence data, the second feature extraction branch is used to extract the correlation features between multiple sequence data, and the fusion output module is used to fuse the multi-scale features and the correlation features to obtain the remaining service life of the smart meter.

[0080] Furthermore, the real-time monitoring data of the smart meter includes a metering error, and the environmental data includes: temperature data, humidity data and air pressure data.

[0081] Furthermore, the first feature extraction branch includes a multi-scale self-attention module and a first splicing and normalization module; the multi-scale self-attention module is used to extract features from different time scales and output them after passing through the first splicing and normalization module.

[0082] Embodiment 3

[0083] The purpose of this embodiment is to provide a computer-readable storage medium.

[0084] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps in a method for predicting the remaining useful life of a smart meter as described in Example 1 of the present disclosure.

[0085] Embodiment 4

[0086] The purpose of this embodiment is to provide an electronic device.

[0087] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in a method for predicting the remaining useful life of a smart meter as described in Example 1 of the present disclosure are implemented.

[0088] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0089] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0090] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for predicting the remaining useful life of a smart meter. It is characterized in that include: Obtain real-time monitoring data and environmental data from smart meters; The acquired data is input into the smart meter life prediction model to obtain the remaining service life of the smart meter; The smart meter life prediction model includes an input embedding module, a first feature extraction branch, a second feature extraction branch and a fusion output module; The input embedding module is used to linearly map the collected sequence data to a high dimension and embed the position information; the first feature extraction branch is used to extract multi-scale features of the sequence data, the second feature extraction branch is used to extract correlation features between multiple sequence data, and the fusion output module is used to fuse and predict the multi-scale features and the correlation features to obtain the remaining service life of the smart meter; The real-time monitoring data of the smart meter includes measurement error, and the environmental data includes: temperature data, humidity data and air pressure data; The first feature extraction branch includes a multi-scale self-attention module and a first splicing and normalization module; the multi-scale self-attention module performs parallel calculation of multiple multi-head self-attention mechanisms based on the input sequence to extract features from different time scales, and outputs them to the second feature extraction branch after passing through the first splicing and normalization module; The second feature extraction branch includes a cross attention module and a second splicing and normalization module, wherein the cross attention module is used to extract correlation features between different time series; the correlation features extracted in the cross attention module and the multi-scale features extracted by the multi-scale self-attention module are output to the fusion output module after passing through the second splicing and normalization module; The cross attention module is used to extract correlation features between different time series, including: when using cross attention to extract correlation features from measurement error sequences and multivariate environment sequences, the query matrix Q is obtained based on the measurement error sequence transformation in multi-head self-attention modules of different scales, and the key matrix K and value matrix V are obtained based on the multivariate environment sequence transformation. The specific process is as follows: Where: is the multivariate environmental sequence that affects the variation of the measurement error sequence, and m is the number of environmental variables; , , , is the parameter matrix; , , They are the corresponding query matrix, key matrix and value matrix between sequences respectively; is the output of the cross attention mechanism; , ,… It is the calculation result of each cross attention head; is the final multi-dimensional correlation feature sequence, is the dimension of the sequence; The correlation feature sequence is a high-level correlation feature representation after effective reconstruction of the measurement error and the environmental factors, and is used to reflect the coupling relationship between the measurement error and the environmental factors; The fusion output module includes a sequentially connected LSTM network and a fully connected layer, and the LSTM network includes a sequentially connected forget gate, an input gate, a state update layer and an output gate; The forget gate is used to process data after receiving the output of the previous moment and the input of the current moment, and delete some invalid information in the memory unit to reduce the load; The input gate is used to filter meaningless input information and selectively add valid information to the memory unit; The state update layer is used to forget or retain the information in the state update layer, and scale the update value determined by each state in proportion; The output gate is used to output the updated data in the state update layer; The fully connected layer is used to output the final prediction result of the remaining service life of the electricity meter.

2. A method for predicting the remaining useful life of a smart meter as claimed in claim 1, It is characterized in that The input embedding module is a sequentially connected convolutional layer and encoder; The convolution layer is used to linearly map time series data from low dimension to high dimension, and the encoder is used to embed position information into the high-dimensional sequence.

3. A method for predicting the remaining useful life of a smart meter as claimed in claim 1, It is characterized in that During the model training process, the mean square error is used as the loss function, and the Adam algorithm is used to update the model parameters.

4. A system for predicting the remaining useful life of a smart meter. It is characterized in that include: The data acquisition module is configured to: acquire real-time monitoring data and environmental data of the smart meter; The remaining service life prediction module is configured to: input the acquired data into the smart meter life prediction model to obtain the remaining service life of the smart meter; The smart meter life prediction model includes an input embedding module, a first feature extraction branch, a second feature extraction branch and a fusion output module; The input embedding module is used to linearly map the collected sequence data to a high dimension and embed the position information; the first feature extraction branch is used to extract multi-scale features of the sequence data, the second feature extraction branch is used to extract correlation features between multiple sequence data, and the fusion output module is used to fuse and predict the multi-scale features and the correlation features to obtain the remaining service life of the smart meter; The real-time monitoring data of the smart meter includes measurement error, and the environmental data includes: temperature data, humidity data and air pressure data; The first feature extraction branch includes a multi-scale self-attention module and a first splicing and normalization module; the multi-scale self-attention module performs parallel calculation of multiple multi-head self-attention mechanisms based on the input sequence to extract features from different time scales, and outputs them to the second feature extraction branch after passing through the first splicing and normalization module; The second feature extraction branch includes a cross attention module and a second splicing and normalization module, wherein the cross attention module is used to extract correlation features between different time series; the correlation features extracted in the cross attention module and the multi-scale features extracted by the multi-scale self-attention module are output to the fusion output module after passing through the second splicing and normalization module; The cross attention module is used to extract correlation features between different time series, including: when using cross attention to extract correlation features from measurement error sequences and multivariate environment sequences, the query matrix Q is obtained based on the measurement error sequence transformation in multi-head self-attention modules of different scales, and the key matrix K and value matrix V are obtained based on the multivariate environment sequence transformation. The specific process is as follows: Where: is the multivariate environmental sequence that affects the variation of the measurement error sequence, and m is the number of environmental variables; , , , is the parameter matrix; , , They are the corresponding query matrix, key matrix and value matrix between sequences respectively; is the output of the cross attention mechanism; , ,… It is the calculation result of each cross attention head; is the final multi-dimensional correlation feature sequence, is the dimension of the sequence; The correlation feature sequence is a high-level correlation feature representation after effective reconstruction of the measurement error and the environmental factors, and is used to reflect the coupling relationship between the measurement error and the environmental factors; The fusion output module includes a sequentially connected LSTM network and a fully connected layer, and the LSTM network includes a sequentially connected forget gate, an input gate, a state update layer and an output gate; The forget gate is used to process data after receiving the output of the previous moment and the input of the current moment, and delete some invalid information in the memory unit to reduce the load; The input gate is used to filter meaningless input information and selectively add valid information to the memory unit; The state update layer is used to forget or retain the information in the state update layer, and scale the update value determined by each state in proportion; The output gate is used to output the updated data in the state update layer; The fully connected layer is used to output the final prediction result of the remaining service life of the electricity meter.

Citation Information

Patent Citations

  • Voice-to-text translation method from Vietnamese to English based on multi-feature fusion

    CN115273829A

  • Method and system for predicting residual service life of equipment based on multi-scale self-attention

    CN115994630A