Intelligent electric energy meter service life prediction method and device and readable storage medium
By combining multi-scale deep convolutional neural networks and the Informer model, the nonlinear dynamic correlation problem of traditional methods in predicting the life of smart electricity meters in complex environments is solved, and efficient and reliable life prediction is achieved, which adapts to complex environments and reduces computational complexity.
Patent Information
- Application Number
- CN202511121375.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Traditional life prediction methods are difficult to effectively capture the nonlinear dynamic correlations of smart electricity meters in complex environments, and the computational complexity is high, making it difficult to meet lightweight deployment requirements.
A multi-scale deep convolutional neural network is used for feature extraction, combined with the informer model and self-attention distillation layer, to perform time series prediction through adaptive feature fusion and sparse attention mechanism, screen key time node features, shield future information interference, and achieve efficient prediction of error evolution.
It improves the comprehensiveness and reliability of smart electricity meter life prediction, reduces calculation complexity, and provides a reliable basis for preventive maintenance.
Smart Images

Figure CN120633476A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method, a device and a readable storage medium for predicting the life of an intelligent electric energy meter, and belongs to the technical field of device life prediction. Background Art
[0002] With the rapid development of smart grids, smart energy meters, as core devices for power metering and user-side data collection, are becoming increasingly important for grid security management and economic regulation. However, under complex environmental stresses such as high humidity and heat in coastal areas, the internal components of energy meters are susceptible to the coupling of multiple factors, including temperature, humidity, and salt spray. This can lead to frequent problems such as accelerated performance degradation and metering error drift. Traditional life prediction methods often rely on single physical models or shallow statistical laws, making it difficult to effectively capture the nonlinear dynamic relationship between complex environments and device states. Furthermore, they lack the ability to model multi-scale time series characteristics from multiple sources, making it difficult to achieve the required prediction accuracy.
[0003] Given the challenges faced by traditional life prediction methods in complex environments, data-driven life prediction methods are currently offering new insights into smart meter life prediction. Some studies have combined convolutional neural networks (CNNs) with long short-term memory (LSTM) networks to construct hybrid models, balancing local feature extraction with temporal dependency modeling. For example, Chinese invention patent application publication number CN114219118B discloses a smart meter life prediction method based on the DS evidence theory. This method normalizes a sample set of smart meters to obtain a normalized smart meter sample set. The life interval range of the smart meters is then defined, and kernel-Fisher discriminant analysis is used to extract features from the normalized smart meter sample set to obtain a feature vector. Furthermore, the feature vector is fed into a convolutional neural network model and a long short-term memory neural network model, respectively, to predict the life interval of the smart meters. Using the DS evidence theory, the life intervals predicted by the two network models are fused to obtain the final smart meter life prediction result. The method disclosed in the aforementioned patent normalizes smart meter data, simplifying the data processing process. It also incorporates DS evidence theory to fuse the outputs of two network models, resulting in more accurate predictions. However, the screening of environmental stress factors in the aforementioned patent relies heavily on general dimensionality reduction algorithms (such as kernel-Fisher discriminant analysis), failing to target key damage-causing factors in specific scenarios such as high humidity and heat. This results in redundant input features and insufficient correlation with device degradation mechanisms. Furthermore, traditional CNNs extract features using fixed-size convolutional kernels, making it difficult to simultaneously capture the instantaneous fluctuations, cyclical trends, and macroscopic degradation patterns of meter error evolution. LSTMs, on the other hand, have high computational complexity for long sequences and lack a dynamic attention allocation mechanism for critical time segments. Furthermore, while multi-model fusion solutions can improve prediction stability, their complex model structure and high computational resource consumption make them difficult to meet the lightweight deployment requirements of actual power systems.
[0004] In summary, there is an urgent need for a smart electricity meter life prediction method that can reduce the computational complexity while improving the adaptability to complex environments through collaborative optimization of directional feature screening and multi-scale time series modeling. Summary of the Invention
[0005] In order to solve the above problems in the prior art, the present invention proposes a method, device and readable storage medium for predicting the life of a smart electric energy meter.
[0006] The technical solutions of the present invention are as follows: In one aspect, the present invention provides a method for predicting the life of a smart electric energy meter, the method comprising: Obtain the operating error data, environmental stress data, and operating time series of the smart electricity meter, perform dimensionality reduction on the environmental stress data based on the operating error data, and combine the operating time series with the reduced environmental stress data set to generate a multidimensional data set. Construct a multi-scale deep convolutional neural network to extract features from multi-dimensional data sets and obtain multi-scale features; A time series prediction model is constructed based on the Informer model, including an encoder and a decoder. Multi-scale features are used as encoder input. A convolutional attention module is embedded in the encoder's self-attention distillation layer to dynamically adjust feature weights under the channel attention mechanism and spatial attention. The decoder predicts the sequence based on the error evolution of the adjusted feature output. Based on the error evolution prediction sequence, the time point corresponding to the failure threshold of the smart electricity meter is determined, and the remaining service life of the smart electricity meter is calculated.
[0007] Preferably, the dimension reduction of the environmental stress data is performed based on the operation error data as follows: Calculating the product of the difference between each environmental stress data and its mean value and the difference between the operating error data and the mean value of the operating error data, and averaging the products; Calculate the standard deviation of environmental stress data and operational error data respectively; Dividing the mean by the product of two standard deviations to obtain the Pearson correlation coefficient of the environmental stress data based on the operational error data; A Pearson correlation coefficient threshold is preset to filter out environmental stress data whose Pearson correlation coefficient is within the Pearson correlation coefficient threshold.
[0008] Preferably, the multi-scale deep convolutional neural network includes three parallel feature extraction branches and an adaptive feature fusion module, wherein: The first branch of the three-way parallel feature extraction branch is a local feature extraction module composed of a single convolution kernel, which is used to extract microscopic features between adjacent time points of data in a multidimensional dataset; the second branch is an intermediate-scale feature extraction module comprising two levels of cascaded convolutional layers, which is used to extract periodic time series variation features of data in a multidimensional dataset, wherein the first level of cascaded convolutional layer adopts non-interval sampling convolution and the second level of cascaded convolutional layer adopts interval sampling convolution; the third branch is a macroscopic feature extraction module composed of three levels of cascaded convolutional layers, which is used to extract long-term dependency features of data across time periods in a multidimensional dataset, wherein the interval sampling rate of each level of cascaded convolutional layer is doubled step by step; The adaptive feature fusion module is used to dynamically fuse the output features of the three parallel feature extraction branches through weighted summation to obtain multi-scale features. The fusion weight is automatically adjusted according to the contribution of each branch feature to the target task.
[0009] Preferably, the encoder comprises an input layer, a sparse attention block and a self-attention convolutional distillation layer, wherein: The input layer includes an embedding layer and a one-dimensional convolution layer. The embedding layer is used to perform dimension mapping on the multi-scale features, and the one-dimensional convolution layer is used to perform preliminary temporal feature extraction on the multi-scale features. The output results of the embedding layer and the one-dimensional convolution layer are fused to obtain fused features. The sparse attention block has Among them, ; The fusion features are sequentially A sparse attention block, wherein the sparse attention block uses a multi-head probabilistic sparse self-attention mechanism to filter key time node features in the features input into the sparse attention block; The self-attention convolution distillation layer has Each self-attention convolution distillation layer is located between two adjacent sparse attention blocks and is used to perform a distillation operation on the key time node features output by the previous sparse attention block to obtain distilled features.
[0010] Preferably, the convolutional attention module embedded in the self-attention convolution distillation layer is used to perform a one-dimensional convolution operation on the distilled features, and use the channel attention mechanism to calculate the channel weights of the distilled features after the one-dimensional convolution calculation, and adjust the channel dimension features in the distilled features based on the channel weights; calculate the spatial weights of the distilled features after adjusting the channel dimension features through the spatial attention mechanism, and adjust the time dimension features in the distilled features based on the spatial weights; perform a maximum pooling operation on the weighted distilled features and output them to the next sparse attention block; Will The features output by the sparse attention blocks are concatenated along the channel dimension to generate a concatenated feature map.
[0011] Preferably, the decoder comprises a masked multi-head probabilistic sparse self-attention layer, a multi-head attention layer and a fully connected layer, wherein: The spliced feature map and the generated historical prediction sequence are spliced in the channel dimension to obtain the decoder input features, which are used as the input of the masked multi-head probabilistic sparse self-attention layer. The masked multi-head probabilistic sparse self-attention layer is used to filter out the interference of future time nodes in the splicing result to obtain sparse attention features. The sparse attention features are used as the input of the multi-head attention layer, and the global feature map that fuses the encoder global information and the decoder context features is output; The high-dimensional features in the global feature map are mapped to single-step prediction values through the fully connected layer to obtain the error prediction value of the current time step. The error prediction value of the current time step is incorporated into the end of the historical prediction sequence as the input of the next time step until the preset iterative prediction step length is reached, and the error evolution prediction sequence is output.
[0012] Preferably, the historical prediction sequence generation step is specifically as follows: The decoder uses the concatenated feature map output by the encoder as the input of the initial time step, generates the first prediction value based on the input of the initial time step, uses the generated prediction value as the decoder input of the next time step, and gradually expands the prediction sequence length through iterative prediction to generate a historical prediction sequence.
[0013] Preferably, the multi-head attention layer uses the concatenated feature map as the key matrix and the value matrix, uses the features of the current time step of the decoder as the query matrix, calculates the similarity between the query matrix and the key matrix, performs a softmax operation on the similarity to obtain an attention weight matrix, performs a weighted summation on the attention weight matrix and the value matrix, and obtains a feature map that fuses the global information of the encoder and the context features of the decoder.
[0014] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for predicting the life of a smart electricity meter as described in the present invention is implemented.
[0015] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for predicting the life of a smart electricity meter as described in the present invention.
[0016] The present invention has the following beneficial effects: 1. The present invention provides a method for predicting the life of smart electricity meters. Through a three-way parallel branch design of a multi-scale deep convolutional neural network, the first branch uses a local convolution kernel to extract microscopic features of adjacent time points, the second branch captures periodic time series changes through interval sampling convolution, and the third branch uses a step-by-step doubling of the sampling rate to capture long-term dependent features. Combined with an adaptive weighted fusion module to dynamically integrate multi-scale features, this method achieves comprehensive modeling of complex time series data, can analyze short-term fluctuations and periodic patterns, and can also explore potential correlations across time periods, thereby improving the comprehensiveness of feature expression and prediction reliability. 2. This invention provides a method for predicting the life of smart electricity meters. The convolutional attention module embedded in the encoder is combined with a sparse attention distillation mechanism. Specifically, channel attention is used to dynamically adjust the weights of feature dimensions, spatial attention is used to focus on key time nodes, and probabilistic sparse self-attention is combined to screen core time series features. Convolutional distillation is also used to compress redundant information. This design enables the time series prediction model to adaptively enhance the contribution of key features and suppress noise interference. While reducing the computational complexity of long sequences, it avoids prediction bias caused by insufficient feature importance differentiation, thereby improving the recognition accuracy of key fault signs. 3. The present invention provides a method for predicting the life of smart electricity meters. The decoder adopts masked multi-head probabilistic sparse self-attention and an iterative prediction mechanism. The masking mechanism is used to shield future information interference, and the global features output by the encoder are used as key-value pairs. The error evolution trend is gradually generated in combination with the historical prediction sequence, and the remaining life is finally determined by the failure threshold. The above design achieves efficient prediction of long-term error sequences and precise positioning of the end of life, overcoming the problem of prediction inaccuracy caused by error accumulation and difficulty in modeling long-range dependencies. While ensuring computational efficiency, it provides a reliable basis for preventive maintenance of smart meters. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Flow chart of the method of the present invention; Figure 2 This is a specific architecture diagram of a multi-scale deep convolutional neural network in an embodiment of the present invention; Figure 3 This is a specific architecture diagram of a time series prediction model in an embodiment of the present invention; Figure 4 This is a life prediction curve diagram of an example electric energy meter in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0019] It should be understood that the step numbers used herein are only for convenience of description and are not intended to limit the order in which the steps are to be executed.
[0020] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0022] The term "and / or" refers to and includes any and all possible combinations of one or more of the associated listed items.
[0023] Example 1: See also Figure 1 This embodiment provides a method for predicting the life of a smart energy meter, comprising the following steps: S1. In this embodiment, the operation error data of the smart energy meter is collected through the metering automation system, and the environmental stress data of the smart energy meter is obtained using a distributed sensor network. The operation time series is collected by the Beidou timing module for time synchronization, and the timestamp accuracy reaches millisecond level. It is worth noting that this embodiment does not limit the equipment used to obtain the above data. The above equipment is only used as an example. Furthermore, any related equipment that can ensure that the acquired data is accurate, reliable and timely to meet the needs of subsequent smart electricity meter performance evaluation, fault diagnosis and other related work can be used as the equipment for obtaining data in this embodiment.
[0024] The environmental stress data is reduced in dimension based on the operational error data, and the operational time series is combined with the reduced-dimensional environmental stress data set to generate a multidimensional data set. S11, the environmental stress data includes different types of data such as ambient temperature, humidity, air pressure, salt spray concentration, altitude, etc.; S12. Using the operational error data as a benchmark, the environmental stress data is subjected to dimensionality reduction as follows: Calculating the product of the difference between each environmental stress data and its mean and the difference between the operation error data and the mean of the operation error data, and averaging the products to obtain the covariance of the environmental stress data and the operation error data; Calculate the standard deviation of environmental stress data and operational error data respectively; The Pearson correlation coefficient of the environmental stress data based on the operating error data is obtained by dividing the mean value by the product of two standard deviations, which is expressed as follows: ; Where, For the Environmental stress data and operational error data Pearson correlation coefficient between ; For the Environmental stress data and operational error data covariance of For the Environmental stress data The mean of all data of the corresponding type; Operation error data The mean of For the Environmental stress data The standard deviation of Operation error data The standard deviation of Indicates the operation of calculating the average value; A Pearson correlation coefficient threshold is preset to filter out environmental stress data whose Pearson correlation coefficient is within the Pearson correlation coefficient threshold; S13. Normalize the environmental stress data after dimensionality reduction to reduce the scale influence of different features; S2. Construct a multi-scale deep convolutional neural network MsDCNN to extract features from multi-dimensional data sets and obtain multi-scale features; S21, the multi-scale deep convolutional neural network includes three parallel feature extraction branches and an adaptive feature fusion module. In order to overcome the problem of the surge in parameters and low computational efficiency caused by the traditional convolutional neural network relying on the stacking of layers to expand the receptive field, this embodiment introduces a dilated convolution mechanism, which adjusts the dilation rate to Inserting intervals between convolution kernel elements can achieve exponential expansion of the receptive field. The receptive field calculation formula of a single-layer dilated convolution is: ; Where, is the convolution kernel size; is the receptive field; When stacking When performing dilated convolution, the total receptive field is further expanded, which can be expressed as: ; Where, Indicates the The stacking ratio of the dilated convolutional layers, Indicates the The stride of the atrous convolutional layer; The above design allows long-term timing dependency features to be captured with a lightweight architecture.
[0025] Furthermore, the three-way parallel feature extraction branch is designed as follows: The first branch is the local feature extraction module, which is used to extract the microscopic features between adjacent time points of the data in the multidimensional dataset. The conventional convolution kernel (i.e., no interval sampling) has a receptive field (set up ), directly acting on the microscopic interactions at adjacent time points, accurately capturing high-resolution details such as voltage transient fluctuations and noise pulses; The second branch is the intermediate-scale feature extraction module, which is used to extract the periodic time series change characteristics of data in the multidimensional dataset. It is composed of two levels of cascade convolution. The first level of cascade convolution layer adopts non-interval sampling convolution. The original sampling granularity is retained, and the second-level cascade convolution layer adopts interval sampling convolution. Expand the receptive field to , through progressive void rate design, modeling daily / weekly periodic patterns (such as diurnal temperature cycles and weekday load peaks and valleys) while suppressing long-term trend interference; The third branch is the macro feature extraction module, which is used to extract the long-term dependency features of data across time periods in a multidimensional dataset. Specifically, it uses a three-level cascaded dilated convolution, with the dilation rate calculated as Multiplying step by step, the total receptive field is calculated as , covering long-term dependencies across quarters and even years (such as seasonal humidity accumulation and component aging drift), and its stacked hole convolution reflects the nonlinear coupling effect across time periods; The adaptive feature fusion module is used to dynamically fuse the output features of the three parallel feature extraction branches through weighted summation to obtain multi-scale features. The fusion weights are automatically adjusted according to the contribution of each branch feature to the target task. Specifically: first, global average pooling and full connection mapping are performed on micro features, periodic time series change features, and long-term dependency features respectively to generate normalized weights. (satisfy ), according to the above normalized weighted fusion, it can be expressed as: ; Where, It is a multi-scale feature; For microscopic features; It is a periodic time series variation feature; It is a long-term dependent feature; This design enables the multi-scale deep neural convolutional network to autonomously adjust the contribution of each scale based on the characteristics of the input data (such as noise intensity, period significance, and trend slope). For example, it automatically increases the weight in scenarios with strong periodic loads or enhances the contribution in degradation processes dominated by long-term drift, thereby achieving robust modeling of complex time series patterns. S3. Build a time series prediction model CAformer based on the Informer model. The time series prediction model includes an encoder and a decoder. The encoder takes multi-scale features as input. By embedding a convolutional attention module in the self-attention distillation layer of the encoder, dynamic adjustment of feature weights under the channel attention mechanism and spatial attention is achieved. The decoder predicts the sequence based on the error evolution of the adjusted feature output. S31. The encoder includes an input layer, a sparse attention block, and a self-attention convolutional distillation layer, wherein: The input layer includes an embedding layer and a one-dimensional convolution layer. The embedding layer is used to perform dimensional mapping on the multi-scale features, and the one-dimensional convolution layer is used to perform preliminary temporal feature extraction on the multi-scale features. The output results of the embedding layer and the one-dimensional convolution layer are added and fused element by element to obtain the fused features. The sparse attention block has Among them, ;like Figure 3 As shown, in this embodiment, , then the fusion features pass through three sparse attention blocks in sequence. The sparse attention blocks use a multi-head probabilistic sparse self-attention mechanism to filter the key time node features in the features of the input sparse attention blocks. Its core is the query sparsity measurement formula, which only calculates the most important query matrix ( ) and the bond matrix ( ), which avoids calculating all possible keys, thereby improving the calculation efficiency. Furthermore, the query sparsity measurement formula is: ; Where, For the query vector for time steps and bond matrix The corresponding query sparsity; is the key sequence length; For the The key vector of time steps Perform a transpose operation, That is to perform a transpose operation; The feature dimension corresponding to the feature of the input sparse attention block; Furthermore, for example, the feature shape of the input sparse attention block is ,in, is the batch size, is the sequence length, for example, the past 96 hours of data , generated by linear transformation ,So ( is a real number set), aligned with the input feature sequence, Hour (current focus) query , calculate its difference with all Sparsity ; Design a query sparsity threshold, select query sparsity within the query sparsity threshold range, set other query elements to zero, and obtain a sparse query matrix; calculate the sparse attention weight for the sparse query matrix, which can be expressed as: ; Where, is the sparse attention weight, is the sparse query matrix, is the dimension of the bond matrix, is the value matrix; for function; The self-attention convolution distillation layer has In this embodiment, there are 2 self-attention convolutional distillation layers, each of which is located between two adjacent sparse attention blocks, that is, the first self-attention convolutional distillation layer is located between the first sparse attention block and the second sparse attention block, and the second self-attention convolutional distillation layer is located between the second sparse attention block and the third sparse attention block, and is used to perform a distillation operation on the key time node features output by the previous sparse attention block to obtain distilled features.
[0026] Preferably, the convolutional attention module embedded in the self-attention convolution distillation layer is used to perform a one-dimensional convolution operation on the distilled features, and use the channel attention mechanism to calculate the channel weights of the distilled features after the one-dimensional convolution calculation, and adjust the channel dimension features in the distilled features based on the channel weights. Furthermore, the channel attention mechanism generates channel weights through global average pooling and a fully connected layer to enhance the discriminative channel features, and multiplies the channel weights by the channel dimension features element by element to obtain the channel-weighted distilled features; The spatial weights of the distilled features after adjusting the channel dimension features are calculated through the spatial attention mechanism. The temporal dimension features in the distilled features are weighted and adjusted based on the spatial weights. Furthermore, the channel-weighted distilled features are subjected to cross-channel maximum / average pooling operations. The spatial weights are generated through the convolutional layer, focusing on key time nodes. The spatial weights are then element-wise multiplied with the enhanced discriminative channel features to obtain the spatially weighted distilled features. The distilled features after channel and spatial dual weighting, that is, the key time nodes, are subjected to maximum pooling operation to reduce the dimension and output to the next sparse attention block; Concatenate the features output by the three sparse attention blocks corresponding to this embodiment along the channel dimension to generate a concatenated feature map; S32, the decoder includes a masked multi-head probabilistic sparse self-attention layer, a multi-head attention layer and a fully connected layer, wherein: The concatenated feature map and the generated historical prediction sequence are concatenated in the channel dimension to obtain decoder input features, which are used as the input of the masked multi-head probabilistic sparse self-attention layer. The masking mechanism of the masked multi-head probabilistic sparse self-attention layer can block interference from future time nodes. Therefore, it is used to filter out interference from future time nodes in the concatenation result, preserve causal constraints, and obtain sparse attention features. Furthermore, the steps for generating the historical prediction sequence are as follows: The decoder uses the concatenated feature map output by the encoder as the input of the initial time step, generates the first prediction value based on the input of the initial time step, uses the generated prediction value as the decoder input of the next time step, and gradually expands the prediction sequence length through iterative prediction to generate a historical prediction sequence; The sparse attention features are used as input to the multi-head attention layer, and a global feature map that fuses the encoder's global information and the decoder's contextual features is output; further, the multi-head attention layer uses the concatenated feature map as a key matrix and a value matrix, and uses the decoder's current time step features as a query matrix, calculates the similarity between the query matrix and the key matrix, performs a softmax operation on the similarity to obtain an attention weight matrix, and performs a weighted summation of the attention weight matrix and the value matrix to obtain a feature map that fuses the encoder's global information and the decoder's contextual features; The high-dimensional features in the global feature map are mapped to single-step prediction values through the fully connected layer to obtain the error prediction value of the current time step. The error prediction value of the current time step is incorporated into the end of the historical prediction sequence as the input of the next time step until the preset iterative prediction step length is reached, and the error evolution prediction sequence is output; S4. Determine the time point corresponding to the failure threshold of the smart electric energy meter based on the error evolution prediction sequence, and calculate the remaining service life of the smart electric energy meter; S41. In this embodiment, the failure threshold is a dynamic threshold set in combination with the influence of environmental stress, and is expressed as: ; Where, is the dynamic threshold, It is a preset basic threshold, defined according to industry standards or historical failure data (for example, failure is determined when the absolute value of the operating error exceeds ±0.5% continuously). is the environmental compensation coefficient, is the normalized environmental stress impact factor; Going a step further, Reflects the impact of different environmental conditions on the failure judgment of smart energy meters. For example, when the ambient temperature is too high or too low, the performance of the smart energy meter may be greatly affected. In a high temperature environment (such as the outdoor temperature exceeds 40°C in summer), the performance of electronic components may decline, and the energy meter is more likely to have errors. In this case, the environmental compensation coefficient is set. , which means that in high temperature environments, the failure threshold needs to be appropriately lowered in order to detect possible problems with the energy meter more promptly; This reflects the comprehensive impact of the current environmental stress on the performance of the smart electricity meter. Assuming that the environmental stress data considered in this embodiment includes temperature, humidity, and salt spray concentration, an environmental stress impact weight of the environmental stress data on the performance of the electricity meter is obtained through experiments or experience. The environmental stress data is normalized, and a normalized environmental stress impact factor is obtained by element-by-element multiplication and addition of the environmental stress impact weight and the normalized environmental stress data. S42. Failure determination is performed on the error evolution prediction sequence using a sliding window detection algorithm. Specifically, the mean and variance of the error in each window are calculated. When the mean error of a preset number of consecutive windows is greater than a dynamic threshold and the variance is less than a preset variance threshold, the sequence is determined to be failed, triggering a failure alarm. Preferably, after the sliding window detection triggers a failure alarm, it is necessary to perform trend extrapolation verification on the sequence after the alarm point to confirm the persistence of the trend. Specifically, a linear regression is performed on the sequence after the alarm point to obtain a regression equation. If the slope of the regression equation is greater than zero, it indicates that the error is on an upward trend. At the same time, if the residual sum of squares corresponding to the regression equation is less than the residual sum of squares threshold, it indicates that the regression effect is good, the error prediction sequence conforms to the upward trend, and the trend persistence is confirmed. S43. After the failure alarm is triggered, the time point when the error first exceeds the failure threshold is found by the time travel method, which can be expressed as: ; Where, is the time point when the failure threshold is first exceeded, is the error prediction sequence The value of the moment; Represents finding the error prediction sequence The value of the moment Greater than or equal to the dynamic threshold Minimum independent variable value for this to hold ; S44. Calculate the remaining service life based on the time point when the failure threshold is first exceeded, and express it as follows: ; Where, is the remaining useful life, For the current moment; S5. To verify the feasibility of the method described in this embodiment, a company's three-phase cost-controlled smart electricity meter was selected as the test object. Its operating data covered the period from April 2018 to February 2024, with a sampling frequency of once per minute. The original environmental stress data included six parameters: temperature, humidity, air pressure, salt spray concentration, altitude, and wind speed. After Pearson correlation coefficient analysis (with a threshold set at |0.5|), temperature, humidity, and salt spray concentration were retained as key influencing factors. The correlation coefficients between these key influencing factors and the operating error were 0.74, 0.60, and 0.52, respectively. The basic threshold corresponding to the failure threshold was set at ±2%.
[0027] To evaluate the generalization ability of the model, this embodiment uses five-fold cross-validation, dividing the dataset into five subsets. Four subsets are selected each time as training sets, and the remaining one is used as a validation set. The average mean square error (MSE) of the prediction obtained by the five-fold cross-validation test is 0.0271% (standard deviation ±0.002%), the coefficient of determination (R²) is 0.7506, and the adjusted coefficient of determination (Adjusted R²) is 0.9534. It can be seen that the model provided by the method described in this embodiment exhibits strong fitting ability and high accuracy.
[0028] The results of the first thousand days of the test are selected for analysis, such as Figure 4 As shown in the figure, the Y-axis represents the normalized lifespan, ranging from 0.3 to 1; the X-axis represents the number of operating days, ranging from 0 to 1000 days. The curved solid line in the figure represents the trend of the predicted lifespan of smart meters as the number of operating days increases. As the number of operating days increases, the smart meters are affected by environmental stress, and the predicted lifespan gradually decreases. The data points below the curve are actually observed. In reality, the difference between the lifespan of smart meters and the predicted lifespan is small, indicating that the prediction results are accurate.
[0029] In summary, the smart electricity meter life prediction method provided in this embodiment effectively integrates the environmental stress coupling effect and error evolution trend through multi-scale feature extraction (micro-time series fluctuations, periodic changes and long-term dependencies) and adaptive attention mechanism (channel-space dynamic weighting), providing a highly reliable prediction tool for the condition inspection and life management of smart electricity meters. It can be extended to the field of health status assessment of other power metering equipment.
[0030] Example 2: This embodiment provides a method for predicting the life of a smart electricity meter. Based on Example 1, when the sparse attention block adopts a multi-head probabilistic sparse self-attention mechanism, only the top-u high-activation query-key pairs are selected for calculation, which can be expressed as follows: ; Where, is a constant, the default value is 5; when =96, then , then the 23 queries with the highest sparsity are retained and their attention weights are calculated, which significantly reduces the complexity.
[0031] Example 3: This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for predicting the life of a smart electricity meter as described in any embodiment of the present invention is implemented.
[0032] Example 4: This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, a method for predicting the life of a smart electric energy meter as described in any embodiment of the present invention is implemented.
[0033] In the embodiment of the present invention, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
[0034] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0035] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0036] In the several embodiments provided by the present invention, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), magnetic disk or optical disk, and other media that can store program code.
[0037] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention's description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for predicting the life of a smart electric energy meter, characterized in that: The method comprises: Obtain the operating error data, environmental stress data, and operating time series of the smart electricity meter, perform dimensionality reduction on the environmental stress data based on the operating error data, and combine the operating time series with the reduced environmental stress data set to generate a multidimensional data set. Construct a multi-scale deep convolutional neural network to extract features from multi-dimensional data sets and obtain multi-scale features; A time series prediction model is constructed based on the Informer model, including an encoder and a decoder. Multi-scale features are used as encoder input. A convolutional attention module is embedded in the encoder's self-attention distillation layer to dynamically adjust feature weights under the channel attention mechanism and spatial attention. The decoder predicts the sequence based on the error evolution of the adjusted feature output. Based on the error evolution prediction sequence, the time point corresponding to the failure threshold of the smart electricity meter is determined, and the remaining service life of the smart electricity meter is calculated.
2. The method for predicting the life of a smart electric energy meter according to claim 1, characterized in that: The dimensionality reduction of environmental stress data based on the operating error data is as follows: Calculating the product of the difference between each environmental stress data and its mean value and the difference between the operating error data and the mean value of the operating error data, and averaging the products; Calculate the standard deviation of environmental stress data and operational error data respectively; Dividing the mean by the product of two standard deviations to obtain the Pearson correlation coefficient of the environmental stress data based on the operational error data; A Pearson correlation coefficient threshold is preset to filter out environmental stress data whose Pearson correlation coefficient is within the Pearson correlation coefficient threshold.
3. The method for predicting the life of a smart electric energy meter according to claim 1, characterized in that: The multi-scale deep convolutional neural network includes three parallel feature extraction branches and an adaptive feature fusion module, wherein: The first branch of the three-way parallel feature extraction branch is a local feature extraction module composed of a single convolution kernel, which is used to extract microscopic features between adjacent time points of data in the multidimensional dataset; the second branch is an intermediate-scale feature extraction module comprising two levels of cascaded convolutional layers, which is used to extract periodic time series variation features of data in the multidimensional dataset, wherein the first level of cascaded convolutional layer adopts non-interval sampling convolution and the second level of cascaded convolutional layer adopts interval sampling convolution; the third branch is a macroscopic feature extraction module composed of three levels of cascaded convolutional layers, which is used to extract long-term dependency features of data across time periods in the multidimensional dataset, wherein the interval sampling rate of each level of cascaded convolutional layer is doubled step by step; The adaptive feature fusion module is used to dynamically fuse the output features of the three parallel feature extraction branches through weighted summation to obtain multi-scale features. The fusion weight is automatically adjusted according to the contribution of each branch feature to the target task.
4. The method for predicting the life of a smart electric energy meter according to claim 1, characterized in that: The encoder consists of an input layer, a sparse attention block, and a self-attention convolutional distillation layer, where: The input layer includes an embedding layer and a one-dimensional convolution layer. The embedding layer is used to perform dimension mapping on the multi-scale features, and the one-dimensional convolution layer is used to perform preliminary temporal feature extraction on the multi-scale features. The output results of the embedding layer and the one-dimensional convolution layer are fused to obtain fused features. The sparse attention block has Among them, ; The fusion features are sequentially A sparse attention block, wherein the sparse attention block uses a multi-head probabilistic sparse self-attention mechanism to filter key time node features in the features input into the sparse attention block; The self-attention convolution distillation layer has Each self-attention convolution distillation layer is located between two adjacent sparse attention blocks and is used to perform a distillation operation on the key time node features output by the previous sparse attention block to obtain distilled features.
5. The method for predicting the life of a smart electric energy meter according to claim 4, characterized in that: The convolutional attention module embedded in the self-attention convolution distillation layer is used to perform one-dimensional convolution operations on the distilled features, and uses the channel attention mechanism to calculate the channel weights of the distilled features after the one-dimensional convolution calculation, and adjusts the channel dimension features in the distilled features based on the channel weights; the spatial attention mechanism calculates the spatial weights of the distilled features after adjusting the channel dimension features, and adjusts the time dimension features in the distilled features based on the spatial weights; the weighted distilled features are max-pooled and output to the next sparse attention block; Will The features output by the sparse attention blocks are concatenated along the channel dimension to generate a concatenated feature map.
6. The method for predicting the life of a smart electric energy meter according to claim 5, characterized in that: The decoder includes a masked multi-head probabilistic sparse self-attention layer, a multi-head attention layer, and a fully connected layer, where: The spliced feature map and the generated historical prediction sequence are spliced in the channel dimension to obtain the decoder input features, which are used as the input of the masked multi-head probabilistic sparse self-attention layer. The masked multi-head probabilistic sparse self-attention layer is used to filter out the interference of future time nodes in the splicing result to obtain sparse attention features. The sparse attention features are used as the input of the multi-head attention layer, and the global feature map that fuses the encoder global information and the decoder context features is output; The high-dimensional features in the global feature map are mapped to single-step prediction values through the fully connected layer to obtain the error prediction value of the current time step. The error prediction value of the current time step is incorporated into the end of the historical prediction sequence as the input of the next time step until the preset iterative prediction step length is reached, and the error evolution prediction sequence is output.
7. The method for predicting the life of a smart electric energy meter according to claim 6, characterized in that: The specific steps for generating historical prediction sequences are as follows: The decoder uses the concatenated feature map output by the encoder as the input of the initial time step, generates the first prediction value based on the input of the initial time step, uses the generated prediction value as the decoder input of the next time step, and gradually expands the prediction sequence length through iterative prediction to generate a historical prediction sequence.
8. The method for predicting the life of a smart electric energy meter according to claim 7, characterized in that: The multi-head attention layer uses the concatenated feature map as the key matrix and the value matrix, and the features of the decoder at the current time step as the query matrix, calculates the similarity between the query matrix and the key matrix, performs a softmax operation on the similarity, obtains the attention weight matrix, and performs a weighted summation on the attention weight matrix and the value matrix to obtain a feature map that fuses the encoder global information and the decoder context features.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for predicting the life of a smart electric energy meter according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for predicting the life of a smart electric energy meter as claimed in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
A method and system for predicting the life of smart meters based on DS evidence theory
CN114219118B
Intelligent electric meter service life prediction method and system based on D-S evidence theory
CN114219118A
Intelligent prediction and early warning method for life cycle of electric energy meter
CN119959853A
Electric energy meter verification and signal detection system and method
CN120009806A
Arc risk management system and method using artificial intelligence network
US20240106222A1
Cited By
Coagulant addition prediction method based on fusion of sparse coding and graph space-time attention
CN120911711A
Compression method and system for multi-source heterogeneous time series data, and motor fault prediction method and system
CN121036770A
Method and system for predicting residual life of battery cell
CN121636965A