A smart metering error prediction method based on a Mamba model

By using multi-stress coupled temporal modeling based on the Mamba model and an adaptive chaotic particle swarm optimization algorithm, the problem of multi-stress fusion and dynamic error capture in metering error prediction of smart meters in high dry and hot environments is solved, achieving high-precision and disturbance-resistant error prediction and adapting to real-time monitoring of edge computing devices.

CN123049531APending Publication Date: 2026-11-06BEIJING ZHIYUAN NEW ENERGY ELECTRIC TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611230679.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing smart meter error prediction technologies in high-dry-hot environments suffer from insufficient multi-stress coupling and fusion, inaccurate dynamic error capture, and rigid model hyperparameter tuning. These issues result in large fluctuations in prediction accuracy and weak resistance to environmental interference, making it difficult to meet the stringent requirements of modern electricity metering systems.

Method used

A smart meter metering error prediction method based on the Mamba model is adopted. Through a multi-stress coupled temporal modeling framework, multi-scale feature extraction technology, and adaptive chaotic particle swarm optimization algorithm, a multi-stress coupled input vector is constructed. The adaptive chaotic particle swarm optimization algorithm is designed to automatically optimize the hyperparameters of the Mamba model, optimize the multi-objective error prediction strategy, and achieve dynamic error prediction and disturbance resistance robustness.

Benefits of technology

It significantly improves the accuracy and dynamic capture capability of smart meter error prediction in hot and dry environments, enhances anti-disturbance robustness and engineering adaptability, and meets the real-time monitoring needs of edge computing devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123049531A_ABST
    Figure CN123049531A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of electric energy metering, in particular to a smart metering error prediction method based on a Mamba model. The method comprises the following steps: constructing a multi-stress coupling time series modeling framework under a high dry and hot environment; extracting features of error correlation data in a time domain, a frequency domain and a time-frequency domain, and screening key features by adopting variance analysis and mutual information entropy double criteria; designing an adaptive chaotic PSO algorithm to automatically optimize state space dimensions, time steps, hidden layer neuron numbers, selective state transition coefficients, mode fusion weights, learning rates and attenuation coefficients of the Mamba model, and performing mutation operation when the group fitness variance is less than; generating a Pareto optimal solution set by adopting a non-dominated sorting genetic algorithm, and determining an optimal model configuration by adopting an ideal point method. The application can improve the prediction precision of smart metering errors under a high dry and hot environment, enhance the anti-interference robustness, and meet the lightweight deployment requirements of edge computing devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity metering technology, and more specifically to a method for predicting metering errors in smart meters based on the Mamba model. Background Technology

[0002] In the context of the energy internet, electricity metering systems are transforming from traditional manual meter reading to a digital model of intelligent sensing and real-time metering. Smart meters, as core equipment for electricity trade settlement and lean grid management, have been deployed on a large scale in complex environments such as high-temperature and high-humidity conditions. However, the combined effects of multiple stresses, including aging over time, sudden temperature increases, and low humidity fluctuations in high-temperature and high-humidity environments, cause metering errors to exhibit highly nonlinear and time-varying dynamic evolution characteristics.

[0003] Currently, most existing smart meter error prediction technologies are based on conventional time-series prediction architectures (such as statistical regression, support vector regression (SVR), or traditional recurrent neural network models). However, in extreme dry and hot environments, these existing technologies expose the following intertwined and deep-seated technical bottlenecks: First, the utilization of multi-stress features is fragmented, leading to a lack of coupled modeling mechanisms. In existing prediction architectures, even if time, temperature, and humidity are identified as core error influencing factors, the lack of effective nonlinear interactive modeling mechanisms means that models typically treat each stress as an isolated input dimension. This fragmented feature utilization directly results in the absence of a multi-factor coupling and fusion mechanism. When a sudden increase in temperature is combined with low humidity in the environment, isolated feature analysis can easily cause the model to fall into a "local optimum trap."

[0004] Second, the ability to capture dynamic non-stationary errors is limited, and existing technologies struggle to balance real-time performance with representation depth. Although the industry has begun exploring the use of selective mechanisms in multi-state space models (Mamba) to capture dynamic features, in real-world high-dry-heat scenarios, existing time-series modeling methods are largely constrained by assumptions of sequence stationarity or fixed receptive fields. Due to the lack of flexible state transition mechanisms for instantaneous abrupt changes in meter errors, existing technologies often suffer from response lag or insufficient representation accuracy when characterizing complex nonlinear dynamic evolution trends under high-dry-heat conditions, failing to overcome the bottleneck of traditional time-series modeling in capturing error abrupt changes.

[0005] Third, the model parameter configuration strategy suffers from generalization defects and weak adaptability to dynamic environments. Current mainstream deep learning architectures and their variants still heavily rely on manual trial-and-error adjustments for core hyperparameters (such as selective state transition coefficients and modal fusion weights), exhibiting significant static characteristics. While improved particle swarm optimization (PSO) and other algorithms can theoretically provide support, adaptive optimization mechanisms have not been effectively applied in the specific scenario of electricity meter error prediction. This results in the model's pre-set fixed parameter system being unable to respond to the uncertainties caused by random humidity fluctuations in hot and dry environments, leading to significant fluctuations in the prediction performance of the same set of hyperparameters under different operating conditions or seasonal transitions, and severely insufficient generalization ability.

[0006] In summary, the aforementioned problems collectively result in risks such as large fluctuations in the accuracy of metering error prediction and weak resistance to environmental interference when the existing system operates in a hot and dry environment. These issues make it difficult to meet the stringent requirements of modern electricity metering systems for smart meter health management and metering reliability in extreme environments. Summary of the Invention

[0007] In view of this, the present invention provides a smart meter metering error prediction method based on the Mamba model, which aims to solve the systematic defects of current smart meter metering error prediction methods in high dry and hot environments, such as insufficient multi-stress coupling fusion, inaccurate dynamic error capture, and rigid model hyperparameter tuning. This significantly improves the prediction accuracy of smart meter errors in high dry and hot environments and demonstrates strong strategy adaptation capabilities when dealing with complex scenarios such as sudden temperature rises and humidity fluctuations.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for predicting metering errors in smart meters based on the Mamba model, comprising the following steps: A mathematical model for predicting the metering error of smart meters under high dry and hot conditions is constructed. A multi-stress coupled temporal modeling framework is introduced to transform the problem of predicting the metering error of smart meters into a multi-stress driven temporal dynamic modeling problem. The quantitative variables of the multi-stress driving source and the temporal characteristics of the metering error of smart meters are defined. A multi-stress coupled input vector is constructed and a coupling mapping function is defined. Global temporal modeling constraints and optimization objectives are constructed. Based on multi-scale feature extraction technology, error correlation data is processed and key features are divided. The process includes preprocessing of error correlation data, multi-scale feature extraction from three dimensions: time domain, frequency domain, and time-frequency domain, as well as key feature screening and key feature priority division. An adaptive chaotic particle swarm optimization algorithm is designed. This algorithm optimizes the population distribution using chaotic mapping and incorporates a chaotic perturbation mutation mechanism to automatically optimize the hyperparameters of the Mamba model. When the population fitness variance is less than [a certain value], the algorithm achieves optimal results. Perform mutation operations at that time; Multi-objective error prediction strategy optimization is carried out, comprehensively balancing prediction accuracy, tuning efficiency, model lightweighting and disturbance robustness, and determining the optimal model configuration through Pareto optimal solution set.

[0009] In one specific feasible implementation, the mathematical model for predicting the metering error of smart meters under high dry and hot conditions includes: Define the core variables and objective function of the model, and define quantitative variables for the two types of elements: For multiple stress-driven sources, variables This represents the actual stress value at a certain moment, where time... ,temperature ,humidity ; For the time series characteristics of measurement error, variables express The actual metering error of a smart meter at any given time, and the variables Represents the model output Predicted time error value express Historical error sequence prior to time step; Constructing multi-stress coupled input vectors and define the coupling mapping function. as follows: ; in, The mapped coupled feature vector; This is the stress weighting matrix; It is a nonlinear kernel function; It is a second-order interaction term; This refers to the corresponding multi-stress coupling coefficient; Define the model objective function Used to measure overall prediction performance: Prediction accuracy metrics: minimizing the mean square error (MSE) between the predicted and actual values, and goodness of fit. Maximizing as the core, quantifying as ; in, To balance the weights for accuracy, satisfy ; Model usability metrics: Based on minimizing the number of model parameters, quantified as follows: ; in, Optimize the hyperparameter vector for PSO; This is the set of network weight parameters for the model; This is a weighting factor for practicality. For the actual number of parameters in the model, The upper limit of the preset parameter quantity; Final objective function The expression is: ; The larger the objective function value, the better the overall performance of the model in terms of "prediction accuracy and deployment usability".

[0010] In a specific feasible implementation, the construction of global temporal modeling constraints and optimization objectives includes: Multiple stress value constraints: time ,temperature ℃, humidity % Error output constraint: Prediction error ; Temporal continuity constraint: The model must satisfy Compared with historical error sequences The evolutionary continuity, that is ,in, The preset maximum change threshold; Based on the objective function and constraints, determine the global optimization objective of the model: find the optimal set of model parameters. This makes it possible to handle multiple stress inputs. Historical error Driven by, objective function It has reached its maximum value.

[0011] In a specific feasible implementation, the processing of error-related data and the segmentation of key features based on multi-scale feature extraction technology includes: Error-related data preprocessing includes defining the data collection scope, data cleaning, and data standardization. The data cleaning process focuses on handling outliers and missing values, and the data standardization adopts Z-score standardization. Based on the preprocessed error correlation data, multi-scale feature extraction is performed from three dimensions: time series domain, frequency domain, and time-frequency domain. The temporal evolution characteristics of focusing errors and multiple stresses in temporal domain feature extraction need to simultaneously cover two types of information: "short-term fluctuations" and "long-term trends". Frequency domain feature extraction addresses the periodic changes in errors with day and night and seasons under high dry and hot environments. It employs Fast Fourier Transform to convert time-domain data to the frequency domain in order to mine frequency characteristics. For the instantaneous abrupt changes in errors under high dry and hot conditions, time-frequency domain feature extraction is performed by using continuous wavelet transform (CWT) to achieve joint time-frequency domain analysis in order to capture local dynamic characteristics. Key feature screening and key feature prioritization: The key feature screening process first uses ANOVA as a linear filter to eliminate features... Linearly independent features with statistics below the critical value are identified; subsequently, the nonlinear dependency measure is performed on the feature set that passes the initial screening using mutual information entropy (MI). Key feature prioritization is based on the predictive contribution of the selected features, quantified by feature importance weights: for The characteristics are used to divide it into core feature regions; for Features within the specified range are divided into secondary feature regions; for Based on the characteristics, it is divided into auxiliary feature regions.

[0012] In one specific implementation, the use of ANOVA as a linear filter includes: Let the candidate influence characteristics be The error sequence is Construct a linear regression model ,in, The intercept is... For regression coefficients, For the residuals, calculate the variance analysis. Statistic: ; in, These are the model's predicted values. The mean of the error. For sample size; Take significance level Corresponding critical value If features of Values ​​greater than 3.84 are retained; otherwise, they are considered redundant features. The method of using mutual information entropy (MI) for nonlinear dependency measurement includes: Define candidate impact features With error sequence The formula for mutual information entropy is: ; in, Candidate impact features With error sequence The mutual information between them characterizes the measurement error uncertainty that the characteristic variables can eliminate; The Shannon entropy of the error sequence. In the formula: For error sequence The marginal probability; This represents the total number of error value categories. Given candidate influence features Time error sequence conditional entropy, In the formula: Candidate impact features; The error sequence representing the electricity meter reading; This represents the joint probability of the feature and the error. For the first Each feature can take a value. This represents the total number of categories for the feature value. For the first Each possible value This represents the total number of error value categories. To take values ​​for a given feature The error under the condition is The conditional probability; Set mutual information threshold Only retain the features that satisfy this condition.

[0013] In one specific implementation, the design of the adaptive chaotic particle swarm optimization algorithm includes: First, particle encoding and uniform initialization are performed. A Logistic chaotic mapping is used to generate an ergodic initial population sequence. Integer hyperparameters are sampled using uniform integer sampling, while continuous hyperparameters are sampled using uniform distribution sampling. The particle velocity initialization range is set to the range of values ​​for the corresponding position dimension. ; Design an adaptive parameter adjustment mechanism with inertia weights. The formula uses a dynamic change based on the cosine law: ; in, This represents the current iteration number. Maximum number of iterations; learning factor Adopting a collaborative balancing strategy, , ; A local optimum-resistant mutation mechanism based on chaotic perturbation is introduced, and the population fitness variance is calculated after each generation update. The specific calculation formula is as follows: ,in, It is the size of the particle swarm. For the first The current fitness value of each particle; This represents the average fitness value of the current population. The normalization operator is used to limit the influence of the fitness metric on mutation triggering, and its calculation method is as follows: .

[0014] In a specific feasible implementation, when the population fitness variance The mutation operation is performed at that time, and the mutation formula is: ; in, For chaotic variable operators generated by chaotic mapping, For the first The position of the current globally optimal particle at the next iteration, denoted as the mutated position. .

[0015] In a specific feasible implementation, the core Mamba hyperparameters that need to be optimized in the automatic optimization of the Mamba model include: State space dimension Time step Number of hidden layer neurons Selective state transition coefficients Modal fusion weights Learning rate attenuation coefficient The above hyperparameters together constitute the PSO optimization hyperparameter vector. ; Among them, the state space dimension Time step Number of hidden layer neurons Integer variables; selective state transition coefficients Learning rate attenuation coefficient For continuous scalar variables; modal fusion weights The formula is defined as ,in, Represents the time-series feature vector. Represents the frequency domain eigenvector. Represents the time-frequency domain eigenvectors. Let be the modality fusion weight vector, and let its values ​​satisfy... ; These are the time-domain feature weights, frequency-domain feature weights, and time-frequency-domain feature weights, respectively.

[0016] In one specific implementation scheme, the optimization of the multi-objective error prediction strategy includes: Based on the optimized Mamba model, construct a multi-objective optimization vector. , The components of the objective function vector are defined as follows: Accuracy target: It must be superior to the metering regulations for Class 0.5 smart meters; Efficiency goals: , ; Robust Objective: This reflects the robustness against disturbances; among them This represents the relative increase in the mean square error of the model under noise interference. This is the preset maximum allowable error increase threshold; Lightweighting goals: ,in, These are the actual parameters of the model; This is the preset upper limit for the number of parameters. ; The NSGA-II algorithm is used to perform Pareto front search and generate a Pareto optimal solution set. The ideal point method is used to select the final optimal configuration from the Pareto optimal solution set. For each Pareto optimal solution, its standardized Euclidean distance to the ideal point is calculated. : ; in, The solution is the first One target value, For Pareto concentration The maximum and minimum values ​​of each target; For the first The optimal value of the ideal point of each objective function; Choose standardized Euclidean distance The minimum solution is taken as the final optimal model configuration.

[0017] In a specific feasible implementation, the optimization of the multi-objective error prediction strategy needs to satisfy the following constraint space. : .

[0018] Compared with existing technologies, the smart meter metering error prediction method based on the Mamba model described in this invention is used for predicting smart meter metering errors in high-dry-heat environments. It fully exploits multi-stress coupling information through multi-scale feature extraction technology and automatically optimizes the hyperparameters of the Mamba model using an adaptive chaotic particle swarm optimization algorithm, achieving dynamic error prediction under multi-stress driving. This effectively improves prediction accuracy, disturbance resistance robustness, and engineering adaptability, and has the following beneficial effects: 1. In terms of error prediction accuracy and dynamic capture capability, this invention constructs multi-stress coupled feature vectors through a multi-stress coupled time-series modeling framework, and combines multi-scale feature extraction technology in the time-series domain, frequency domain, and time-frequency domain to comprehensively cover the short-term surge, periodic evolution, and long-term drift characteristics of errors under high dry and hot conditions, effectively improving the accuracy of error prediction and dynamic capture capability under high dry and hot conditions.

[0019] 2. In terms of robustness against disturbances, this invention, through multi-objective optimization robustness constraint design based on NSGA-II and selective scanning mechanism of Mamba model, can maintain stable error prediction capability under sensor noise interference in high dry and hot environment, which is significantly better than the control baseline model.

[0020] 3. In terms of engineering adaptability and resource efficiency, this invention uses an adaptive chaotic particle swarm optimization algorithm to automatically optimize the hyperparameters of the Mamba model, and relies on multi-objective lightweight constraints to control the number of model parameters, adapting to the resource limitations of embedded hardware in smart meters and meeting the real-time monitoring and deployment requirements of edge computing devices. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0022] Figure 1 This is an overall flowchart of the smart meter metering error prediction method based on the Mamba model described in this invention.

[0023] Figure 2 This is a flowchart illustrating the implementation of the adaptive chaotic PSO algorithm. Detailed Implementation

[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] The present invention discloses a smart meter metering error prediction method based on the Mamba model, which fully integrates multi-scale feature extraction, adaptive improved PSO algorithm and Mamba dynamic modeling capability, and breaks through the technical bottlenecks of traditional methods in multi-stress fusion, dynamic error capture and hyperparameter optimization. Finally, it forms a metering error evaluation system with accurate prediction, efficient optimization and robust anti-disturbance capability under high dry and hot environment, and provides support for smart meter health management and improvement of metering reliability in extreme environment.

[0026] The core idea of ​​this invention is as follows: First, a mathematical model for predicting the metering error of smart meters under high dry and hot conditions is constructed. Combining the coupled influence of time, temperature, and humidity on the metering error of smart meters, the error prediction problem is transformed into a time-series dynamic modeling problem driven by multiple stresses. Then, based on multi-scale feature extraction technology, error-related data is analyzed to mine multi-dimensional features to capture the error change pattern and achieve the screening and classification of key influencing features. Next, an adaptive chaotic particle swarm optimization (PSO) algorithm is designed to optimize the population distribution using chaotic mapping and combined with the chaotic perturbation mutation mechanism to solve the hyperparameter optimization problem of the multi-state space model (Mamba). Finally, a multi-objective error prediction strategy is optimized to comprehensively balance prediction accuracy, tuning efficiency, model lightweighting, and disturbance resistance robustness. The optimal model configuration and prediction scheme that takes into account the edge deployment requirements is determined through the Pareto optimal solution set.

[0027] The present invention discloses a method for predicting metering errors in smart meters based on the Mamba model. The flowchart of the overall technical solution is as follows: Figure 1 As shown, it includes the following steps: Step 1: Construct a mathematical model for predicting metering errors in smart meters under high dry and hot conditions. This invention first introduces a multi-stress coupled temporal modeling framework, transforming the problem of predicting smart meter metering errors under high dry and hot conditions into a quantifiable multi-stress driven temporal dynamic modeling problem. The core elements of the system are divided into two categories: first, the multi-stress driving sources; and second, the temporal characteristics of smart meter metering errors (historical error evolution patterns and future error prediction values). Quantitative variables are defined for these two categories of elements: Step 1.1: Define the core variables and objective function of the model This invention first introduces a multi-stress coupled temporal modeling framework, transforming the problem of predicting metering errors in smart meters under high dry and hot conditions into a quantifiable multi-stress driven temporal dynamic modeling problem. The core elements of the system are divided into two categories: one is the multi-stress driving source (time aging...). Ambient temperature Ambient humidity The second is the time-series characteristics of smart meter metering errors (historical error evolution patterns and future error prediction values). Quantitative variables are defined for these two types of elements: For multiple stress-driven sources, variables ( (corresponding to time, temperature, and humidity respectively) represents the actual stress value at a given moment, where time... (Unit: month, reflecting the cumulative effect of equipment aging), temperature (Unit: °C, covering a typical range of -20 to 60 °C in hot and dry environments), humidity (Unit: %, covering a humidity range of 5-40% in hot and dry environments); For the time series characteristics of measurement error, variables express Actual metering error of smart meters at any time (unit: %), variables Represents the model output Predicted time error (unit: %) express Historical error sequence prior to the specified time.

[0028] Based on the above variables, construct a multi-stress coupling input vector. and define the coupling mapping function. In this embodiment, the construction rule of the coupling mapping function follows the nonlinear mapping mechanism of "independent stress contribution + interactive coupling interference", and its specific mathematical expression is defined as follows: in, The mapped coupled feature vector serves as the input feature for Mamba model sequence modeling in subsequent step 3, driving the changes in the state space model. This is a stress weighting matrix used to quantify the basic contribution of different environmental factors to measurement error; These are nonlinear kernel functions (such as the Sigmoid or Tanh function) used to capture saturated nonlinear characteristics under single stress; This is a second-order interaction term used to characterize the nonlinear coupling effect between stresses such as "temperature-humidity" or "temperature-time". is the corresponding multi-stress coupling coefficient.

[0029] Define the model objective function Used to measure overall prediction performance: 1. Prediction accuracy metrics: Minimizing the mean squared error (MSE) between the predicted and actual values, and the goodness of fit (…). Maximizing is the core principle, and quantification is the key. This prediction accuracy index This will serve as a core component of the fitness function in the adaptive chaotic PSO algorithm in subsequent step 3.3, guiding the evolution direction of the model's hyperparameters. To balance the weights for accuracy, satisfy In this embodiment, the PSO optimization stage uses 0.7 and 0.3 respectively to highlight the constraint effect of the mean square error. In the subsequent final optimal configuration verification stage (step 4.3.2), the weight values ​​can be adjusted according to actual needs, ensuring that both satisfy the following conditions. Constraints.

[0030] 2. Model usability index: Based on minimizing the number of model parameters, it is quantified as follows: , in, Optimize the hyperparameter vector for PSO; This is the set of network weight parameters for the model; This is the practicality weighting coefficient, and its value range is... The typical value is 0.1; For the actual number of parameters in the model, This is the upper limit for the preset number of parameters.

[0031] Final objective function The expression is: , The larger the objective function value, the better the overall performance of the model in terms of "prediction accuracy and deployment usability".

[0032] Step 1.2: Construct global temporal modeling constraints and optimization objectives Based on the multi-stress time-series evolution law, global constraints are constructed for this prediction model to ensure that the model output conforms to the characteristics of high dry and hot environment and the operation procedures of smart meters: 1. Multiple stress value constraints: time (Covering a typical 5-year operating cycle for smart meters), temperature ℃ (extreme temperature range of high dry and hot environment), humidity % (High dry and hot environment with low humidity characteristics); 2. Error Output Constraint: Prediction Error ; 3. Temporal continuity constraint: The model must satisfy... Compared with historical error sequences The evolutionary continuity, that is ,in, This is the preset maximum change threshold, with a reference value of 0.1%.

[0033] Based on the aforementioned objective function and constraints, the global optimization objective of the model is determined as follows: finding the optimal set of model parameters. This makes it possible to handle multiple stress inputs. Historical error Driven by, objective function Reaching the maximum value, that is: The solution to the optimization objective These are the core parameters of the smart meter metering error prediction model adapted to hot and dry environments, providing a foundation for subsequent feature extraction and hyperparameter optimization.

[0034] Step 2: Error correlation data processing and key feature segmentation based on multi-scale feature extraction technology Step 2.1: Error Correlation Data Preprocessing To address the noise interference and dimensional differences in error-related data of smart meters under hot and dry conditions, it is necessary to build a high-quality data foundation through preprocessing. The core of error-related data preprocessing includes three parts: defining the data collection scope, data cleaning, and data standardization.

[0035] First, define the data collection scope: the data to be collected is the multi-stress driving source data (time) defined in step 1. Unit: month, representing cumulative runtime; temperature Unit: °C, covering hot and dry environments ℃ range; humidity Unit: %, Coverage (low humidity range) and time series data of measurement error (actual error) Unit: %, conforming to Class 0.5 smart meter % threshold; historical error sequence The data collection cycle is set to 1 hour per instance, generating 24 data points per day, and continuous collection for 30 months to cover seasonal operating conditions. A mapping relationship is also defined between the data collection timestamp and the cumulative number of months the meter has been in operation. To ensure the integrity of time-series information, during the data acquisition process, temperature, humidity, cumulative operating time, and measurement error are synchronized and aligned in time using timestamps as a reference, and a multi-dimensional correlated feature vector is constructed. This establishes a coupling relationship between stress and error at the underlying data level.

[0036] The data cleaning process focuses on handling outliers and missing values: outlier identification employs a stratified approach. Temperature and error data conform to an approximately normal distribution. The rule is to first calculate the mean of the entire dataset. with standard deviation If the data satisfies If it is an outlier, it will be removed.

[0037] Due to the skewed distribution of humidity data in low humidity zones, the median absolute deviation method is used to first calculate the median humidity. , then calculate If the humidity meets It is then determined to be an outlier.

[0038] Missing value imputation selects a strategy based on the duration of the missing value. For short-term missing values ​​(≤2 sampling points), linear interpolation is used. Let the missing point be... The valid data before and after are and ,but .

[0039] Long-term missing data (>2 sampling points) were filled using the historical average of the same operating conditions, and operating condition groups were formed by season and time period. Take from the group The average of historical data is calculated using the following formula: .

[0040] Data standardization aims to eliminate dimensional differences. Z-score standardization is used for multi-stress data. ( Calculate the mean of the entire set of raw data. with standard deviation The standardized formula is , Among them, time data It needs to be converted to the cumulative number of months of operation before calculation. and After standardization, the original time-series data is retained for subsequent feature extraction, ensuring that the data scale is consistent without losing temporal correlation information. After standardization, the mean of each data column is verified. ,variance If the deviation exceeds 0.1, the outlier removal effect will be re-verified.

[0041] Step 2.2: Multi-scale feature extraction Based on the preprocessed error correlation data, multi-scale feature extraction is carried out from three dimensions: time domain, frequency domain, and time-frequency domain. The aim is to comprehensively capture the short-term fluctuation, periodic evolution, and instantaneous change characteristics of smart meter errors under high dry and hot conditions, and at the same time quantify the influence of multi-stress coupling on errors.

[0042] The temporal domain feature extraction focuses on the temporal evolution characteristics of errors and multiple stresses, requiring simultaneous coverage of two types of information: "short-term fluctuations" and "long-term trends." For short-term fluctuation features, a fixed sliding window of one day is used to calculate the statistical characteristics of the error data within the window to reflect the intraday fluctuation intensity of errors under high dry and hot conditions. Specifically, the mean error within the window... The formula representing the average level of error during this period is: ; In-window error variance The formula reflects the fluctuation range as follows: A larger variance indicates a more significant impact of intraday temperature and humidity fluctuations on the error; in-window error skewness The asymmetry of the error distribution is characterized by the following formula: In hot and dry environments, a sudden rise in midday temperature often leads to a positive error skewness (i.e., positive error fluctuations are more significant). Long-term trend characteristics are extracted by linearly fitting a 30-month time series of error, temperature, and humidity data. Let the fitting function be... ( This represents the cumulative number of months of operation. Representing errors respectively ,temperature ,humidity Then the trend slope is: , , Among them, the error drift slope A positive result indicates that long-term aging leads to increased error drift, and the temperature slope... This reflects the seasonal temperature change trend.

[0043] Frequency domain feature extraction addresses the periodic variations of errors with diurnal and seasonal changes under high-dryness and heat environments. It employs Fast Fourier Transform (FFT) to convert time-domain data to the frequency domain to extract frequency characteristics. Firstly, for data of length... Error time series data ( Perform an FFT, the transformation formula is as follows: ( For frequency, The sampling interval is... (where the imaginary unit is used) to obtain the frequency domain spectrum of the error. (Amplitude spectrum). Based on the spectrum, three core features are extracted: dominant frequency position. The frequency corresponding to the maximum amplitude in the spectrum, i.e. In hot and dry environments, errors often exhibit diurnal cyclical characteristics, therefore Usually close to (Corresponding to the diurnal temperature variation cycle); Harmonic intensity For the first Frequency multiplier ( , The proportion of the spectrum energy of ) to the total energy is calculated using the following formula: ( For frequency bandwidth, (Nyquist frequency), during the hot summer months. The significant increase reflects the enhancing effect of temperature on the error periodicity characteristics; frequency domain energy The integral of the spectral energy over the entire frequency range is given by the formula: The overall intensity of the periodic fluctuations in quantification error. The larger the value, the stronger the influence of multi-stress periodic coupling on the error.

[0044] For the instantaneous abrupt changes in errors under high dry and hot environments, time-frequency domain feature extraction employs continuous wavelet transform (CWT) to achieve joint time-frequency domain analysis and capture local dynamic characteristics: CWT extracts features from the mother wavelet... Scale scaling (scale parameters) , It is inversely proportional to frequency. The smaller the value, the higher the frequency) and time shift (time shift parameter) (corresponding to the time axis), for error data The transformation is performed, and the formula is: ( for (conjugate function); in, This is a scale parameter, inversely proportional to frequency; For time shift parameters; Mother wavelet The conjugate function; These are the wavelet transform coefficients.

[0045] Construct a time-frequency energy matrix based on CWT results. Each element in the matrix Represents "scale" -time In this invention, the "time-frequency energy peak value" is explicitly defined as the energy density corresponding to a specific time-frequency point. The maximum modulus of this energy matrix over the global domain is calculated using the following formula: , in, For signal In scale Translation parameters The continuous wavelet transform coefficients at the location. By positioning... The peak position can be accurately identified, pinpointing the time window and corresponding frequency range of error abrupt changes, and thus relating them to specific stress events such as sudden temperature rises. To quantify the uniformity of energy distribution in the time-frequency domain, the time-frequency entropy is further calculated. Using the information entropy formula In the formula, This represents the normalized time-frequency energy probability distribution. The smaller the value, the more concentrated the energy is at a specific time and frequency point. The larger the value, the more dispersed the energy.

[0046] Step 2.3: Key Feature Segmentation specifically includes: key feature selection and key feature priority allocation. The key feature screening process employs a combined "analysis of variance (ANOVA) - mutual information entropy (MI)" dual-criteria screening logic: firstly, ANOVA is used as a linear filter to eliminate... Features with statistics below the critical value are linearly independent. Subsequently, the feature set that passes the initial screening is measured for nonlinear dependence using mutual information entropy (MI) to ensure that the final retained features include both strongly linearly correlated key influencing factors and implicit features with deep nonlinear mapping relationships. This ensures that the screening results consider both the linear correlation and nonlinear dependence between features and errors. First, ANOVA is used to quantify the variance contribution of each feature to the error prediction target, assuming candidate influencing features are... The error sequence is Construct a linear regression model ( The intercept is... For regression coefficients, (for residuals), calculate the variance analysis. Statistic: , in, These are the model's predicted values. The mean of the error. Sample size; significance level. (This is a well-known and commonly used significance criterion in statistical hypothesis testing, used to ensure the validity of a feature at a 95% confidence interval.) critical value If features of A value greater than 3.84 indicates that the feature has a significant explanatory power for the error variance and should be retained; otherwise, it is considered a redundant feature. For example, frequency domain features for humidity levels between 15% and 40% are redundant because humidity has a negligible impact on the error within this range. Values ​​less than 2.5 should be discarded directly.

[0047] Building upon this, mutual information entropy (MI) is used to further filter the nonlinear correlation strength between features and errors. Candidate influencing features are defined based on the dependency between time-series features and error sequences. With error sequence The formula for mutual information entropy is: , in, Candidate impact features With error sequence The mutual information between them characterizes the measurement error uncertainty that the characteristic variables can eliminate; The Shannon entropy of the error sequence. In the formula: For error sequence The marginal probability; This represents the total number of error value categories. Given candidate influence features Time error sequence conditional entropy, In the formula: Candidate impact features; The error sequence representing the electricity meter reading; This represents the joint probability of the feature and the error. For the first Each feature can take a value. This represents the total number of categories for the feature value. For the first Each possible value This represents the total number of error value categories. To take values ​​for a given feature The error under the condition is The conditional probability. Set a mutual information threshold. The threshold was determined by grid optimization through multiple comparative experiments on historical error datasets, aiming to eliminate weakly correlated features with extremely low contribution and retain only features that meet the condition.

[0048] Key feature prioritization is based on the predictive contribution of the selected features, quantified by feature importance weights: Let the selected feature set be... Construct a linear weighted model for error prediction. ( (These are the feature weights). After solving for the weights using the least squares method, the importance percentage of each feature is obtained through normalization. .for The features are divided into core feature regions, and these features contribute more than half to the accuracy of error prediction. Specifically, this includes: temperature Time-frequency energy peak Running time Monthly error drift slope Error daily periodic harmonic intensity .in The first corresponding to the 24-hour daily cycle The intensity of the second harmonic represents The proportion of spectral energy of the dominant frequency (double the day cycle) to the total energy. For Features within the specified range are divided into secondary feature regions and used as accuracy compensation inputs for the model when operating conditions fluctuate drastically; for The features are classified as auxiliary feature regions, and their contribution is less than that of the features mentioned above. Typical example is humidity Time series variance , where subscript Represents humidity. The in-window variance of humidity data and temperature Time-frequency entropy (See step 2.2 for its definition). These features can be selectively retained based on the lightweight requirements of edge-deployed models; if strict parameter control is required, they can be directly removed. The 70% and 30% dividing line and weighting coefficients are also relevant. The thresholds of 0.2 and 0.1 are typical empirical values ​​derived from the statistical distribution characteristics of smart meter operating data under high dry and hot conditions, through sensitivity analysis of the model prediction residuals.

[0049] Step 3: Adaptive Chaotic Particle Swarm Optimization (PSO) Algorithm Design and Mamba Hyperparameter Optimization Step 3.1: Determine the key hyperparameters and optimization range of the Mamba model. To ensure the feasibility of the solution, the core structure of the Mamba model used in this invention is first defined: it is based on a multi-state space model, using state-space equations as its foundation, and discretizing the step size parameters. Continuous system ( Convert to discrete system and Specifically, the selective scan mechanism of the Mamba model uses the coupled feature vector generated in step 1.1. As a design input sequence. Internal to the Mamba model. , Matrix and Discretization Step Size All in real time according to The dynamic changes are linearly mapped and adjusted, thus mathematically realizing the direct influence of multi-stress coupling information on the internal state shift of the prediction model. Combining the need for lightweight capture of temporal dynamic features in multi-state space models, and the characteristics of smart meter metering errors under high-dry-heat environments affected by time, temperature, and humidity multi-stress coupling, the core Mamba hyperparameters that need optimization are identified to ensure that the hyperparameters both adapt to the selective modeling capabilities of multi-state space and accurately characterize the dynamic evolution of errors. State space dimension The characterization model should represent the dimensions of multi-stress coupling relationships, covering three core stress types: time aging, temperature fluctuation, and humidity change, with a range of values. Excessive dimensionality can lead to model overfitting, while insufficient dimensionality fails to adequately capture multi-stress interactions. The actual values ​​should be controlled by the number of model parameters. Constrained by internal factors, it adapts to edge deployment requirements; Time step The window determining the model's dependence on historical error sequences needs to match the intraday and weekly error fluctuation cycles of a hot and dry environment, with a value range of... A window that is too short will fail to capture the continuous evolution of errors after a sudden temperature rise, while a window that is too long will easily introduce redundant information. It can simultaneously take into account both short-term error mutations and long-term aging trends; Number of hidden layer neurons The control model's ability to fit the nonlinearity of the error needs to balance prediction accuracy and lightweight requirements; the range of values... A neuron count that is too low cannot accommodate the nonlinear increase in error when the temperature exceeds 45°C, while a count that is too high increases computational overhead. The optimal balance between the two can be achieved at the right time; Selective state transition coefficients Corresponding matrix The initial attenuation factor is used to adjust the response weights of the selective scanning mechanism to different stress characteristics. Value range: . This can enhance the temperature response. Sensitivity of features to avoid interference from secondary stresses such as humidity; Modal fusion weights : Refers to the proportional coefficient vector when fusing features from the time domain, frequency domain, and time-frequency domain. = Modal fusion weights The formula used to balance the fusion ratio of the time-domain, frequency-domain, and time-frequency-domain feature vectors extracted in step 2.2, and to adapt to the dual characteristics of errors in high-dry-heat environments, is defined as follows: ,in, Represents the time-series feature vector. Represents the frequency domain eigenvector. Represents the time-frequency domain eigenvectors. Let be the modality fusion weight vector, and let its values ​​satisfy... . These are the time-domain feature weights, frequency-domain feature weights, and time-frequency-domain feature weights, respectively. In this embodiment, , ,constraint Depend on Automatically determine; Learning rate To affect the model's convergence stability, it's necessary to adapt to the non-stationarity of the error data. A logarithmic uniform distribution should be used to avoid convergence oscillations. The range of values... ; Attenuation coefficient : Control the memory decay intensity of model state updates. In hot and dry environments, frequent error abrupt changes require the retention of short-term memory. Value range , It can effectively memorize the error evolution trend after a sudden increase in temperature.

[0050] The above hyperparameters together constitute the PSO optimization hyperparameter vector. .

[0051] In this vector space: 1) State space dimension Time step Number of hidden layer neurons For integer variables, due to the discrete nature of the model structure, a nearest-neighbor rounding constraint is applied during the evolutionary optimization process, specifically through a rounding operator. The continuously updated values ​​of particle positions are mapped to the nearest integers to ensure that the generated hyperparameters meet the physical structure requirements of the Mamba model. 2) Selective state transition coefficients Learning rate attenuation coefficient These are continuous scalar variables, representing state transition initialization, learning rate, and memory decay intensity, respectively. 3) These are time-domain feature weights, frequency-domain feature weights, and time-frequency-domain feature weights, which together constitute the modality fusion weight vector. .in, For continuous weighted component variables, Through constraints Automatically determine to ensure This maintains the numerical stability and physical rationality of the feature fusion process.

[0052] Step 3.2: Design of Adaptive Chaotic PSO Algorithm Based on the standard particle swarm optimization algorithm, and combined with the "dynamic adjustment-anti-local optimum" collaborative strategy in intelligent optimization algorithms, an adaptive chaotic PSO algorithm is designed to improve the global optimization capability and convergence efficiency, taking into account the nonlinear characteristics of the Mamba hyperparameter space under high dry heat environment. First, particle encoding and uniform initialization are performed: each particle corresponds to a set of Mamba hyperparameter combinations, and the particle position directly corresponds to the PSO optimization hyperparameter vector defined earlier. Logistic chaotic mapping is used to generate an ergodic initial population sequence, thereby ensuring a more widespread uniform distribution of the population within the hyperparameter value space. Integer hyperparameters are sampled using uniform integer sampling, while continuous hyperparameters are sampled using uniform distribution sampling. The particle velocity initialization range is set to a value within the range of the corresponding position dimension. This ensures that the initial search step size is appropriate for the hyperparameter sensitivity, avoiding excessively large step sizes that could cause hyperparameters to go out of bounds.

[0053] Secondly, an adaptive parameter adjustment mechanism (conventional PSO update channel) is designed: inertia weight. The formula uses a dynamic change based on the cosine law: , in, This represents the current iteration number. This represents the maximum number of iterations. , A smooth transition between exploration and convergence is achieved through the cosine law; learning factor Adopting a collaborative balancing strategy, , In the process of this invention, the position update logic based on inertia weight and learning factor constitutes the conventional PSO update channel.

[0054] Finally, a local optimum mutation mechanism based on chaotic perturbation is introduced: this mechanism uses chaotic operators generated by the Logistic chaotic map. right The algorithm applies a nonlinear perturbation, forcing the particle swarm to jump away from its current local optimum. After each generation update, the algorithm calculates the population fitness variance. The specific calculation formula is as follows: ,in, It is the size of the particle swarm. For the first The current fitness value of each particle; This represents the average fitness value of the current population. The normalization operator is used to limit the influence of the fitness metric on mutation triggering, and its calculation method is as follows: When the population fitness variance The mutation operation is performed at that time, and the mutation formula is: , in, For the first The position of the current globally optimal particle at the next iteration, denoted as the mutated position. ; The chaotic variable operator is generated by the chaotic mapping. In this embodiment, the chaotic mapping is specifically the Logistic chaotic mapping, and its iterative generation formula is: Among them, control parameters Initial mapping parameters . Let be the chaotic variable operator generated by the Logistic chaotic mapping, with a range of values. Chaotic operators and chaotic variable operators in this invention These are the same concept, all corresponding to the nonlinear perturbation term generated by the aforementioned Logistic chaotic mapping. After each iteration of the algorithm, the system monitors the population fitness variance in real time. When satisfied When the optimal position is reached, adaptive evolution is triggered, and chaotic perturbation mutation is performed on the globally optimal particle; otherwise, the system maintains the normal optimization state. After performing velocity and position updates, the algorithm performs a position selection operation: calculating the particle's fitness value at the current position and comparing it with the previous generation's position. It determines whether the new solution is better than the original solution (i.e., whether the fitness value has increased). If the result is "yes", the new position and current fitness are accepted, and the individual's optimal position is updated; if the result is "no", a backtracking operation is performed, retaining the original position information. Through the above "adaptive PSO loop" mechanism, the algorithm ensures that while jumping away from local optima, it maintains the stability and convergence of the search.

[0055] Step 3.3: Optimization of Hyperparameter Objective Function and Implementation Process 3.3.1 Optimization of Objective Function Construction Based on the core objective of balancing "accuracy, efficiency, robustness, and lightweight" in error prediction of the Mamba model in high-temperature and hot environments, a fitness function is defined. To maintain logical consistency, this function calls the prediction accuracy metric defined in step 1.1. The model is then constructed. To balance computational cost and robustness during the evolutionary process, model complexity, optimization time, and noise sensitivity are used as performance penalties, with the specific mathematical expressions as follows: in, 1) To substitute the current hyperparameter set The overall accuracy score of the post-model on the validation set; 2) This is the model usability penalty term (parameter constraint) defined in step 1.1. 3) In this embodiment, the total time spent on PSO hyperparameter tuning is [not specified]. (Parallel training is used to accelerate the process, with 30 particles iterating simultaneously.) The maximum allowed training time is preset as a baseline (300s in this embodiment), and this ratio is used to measure the optimization efficiency. 4) , The mean squared error of the model on the validation set (without noise); The mean square error of the model output after adding 30dB Gaussian white noise to the validation set input data; the ratio term formed by the two. Used to quantify the relative increase of the mean square error of the model under noise interference, and to characterize the model's robustness against disturbances.

[0056] In the above formula, The preset importance weight coefficients satisfy... The weighting method is based on the engineering preferences of the power metering industry (i.e., accuracy and robustness are weighted higher than resource consumption). In this embodiment, typical values ​​are: (Precision weight) (Parameter weights) (Efficiency weight) (Disturbance resistance weights). The adaptive chaotic PSO algorithm is used to search for... Maximizing the combination of hyperparameters This ensures that the model has optimal overall performance under complex working conditions.

[0057] 3.3.2 Implementation Process 1. Data Input: Import the key feature set filtered in step 2.3, and divide it into training and validation sets in a 7:3 ratio; 2. Algorithm initialization: Setting the particle swarm size Maximum number of iterations Iteration termination threshold Initialize particle positions With speed Set the upper and lower limits for the values ​​of each hyperparameter; 3. Iterative optimization: For each particle, a Mamba model is constructed based on its hyperparameter combination, trained on the training set, and then the fitness of the validation set is calculated. Update the individual's optimal position. Update particle velocity according to adaptive parameter adjustment mechanism With position Boundary constraints are applied to the hyperparameters; where, and These are mutually independent random numbers, with a value range of [value range missing]. ; 4. Resistance to local optima: If the population fitness variance ,right Perform a mutation operation, retrain the model, and calculate the fitness. If the fitness is better after mutation, update the model. ; 5. Output Results: After the iteration terminates, output the global optimal position. Corresponding hyperparameter combinations .in: The training time for a single particle in a single iteration. ; The total time spent on PSO hyperparameter tuning (Parallel training is employed, with 30 particles iterating synchronously, not sequentially accumulating.) This hyperparameter combination ensures the Mamba model can be implemented under high-temperature and dry conditions. Parameter quantity Total optimization time MSE increase under 30dB noise This provides a foundational model for optimizing subsequent multi-objective error prediction strategies to achieve satisfactory performance.

[0058] The specific implementation flowchart is as follows: Figure 2 As shown, the chaotic perturbation mutation corresponds to the anti-local optimum processing operation in this step.

[0059] Step 4: Optimization of Multi-Objective Error Prediction Strategy and Determination of Optimal Model Configuration Based on the optimized Mamba model obtained in step 3, and considering the comprehensive requirements of "accuracy, efficiency, robustness, and lightweight" for smart meter error prediction under high dry and hot conditions, a multi-objective optimization function is constructed to quantify and balance the four core indicators. Simultaneously, constraints are clearly defined to ensure that the optimization results conform to engineering realities. Step 4.1: Construct the multi-objective optimization function and constraints Based on the optimized Mamba model from step 3, construct a multi-objective optimization vector. , The aim is to resolve conflicts between various metrics through multi-dimensional parallel optimization, where T represents the transpose of a matrix or vector. The components of the multi-objective optimization vector are defined as follows: Accuracy target: It must be superior to the metering regulations for Class 0.5 smart meters; Efficiency goals: , ; Robust Objective: This reflects the robustness against disturbances; among them This represents the relative increase in the mean square error of the model under noise interference. This is the preset maximum allowable error increase threshold; Lightweighting goals: , To reduce the objective function value, this is used to quantify the deployment overhead of the model on edge computing devices; where, These are the actual parameters of the model; The preset upper limit of the parameter quantity (in this embodiment, the value is taken as) ).

[0060] The optimization process must satisfy the following space constraints. : , The goal of optimization is to find the optimal parameter set. , so that: .

[0061] Step 4.2: Selection and Parameter Setting of Multi-Objective Optimization Algorithm For the target vector To address the inverse conflict characteristics between components, this embodiment employs a non-dominated sorting genetic algorithm with an elitist strategy (NSGA-II algorithm) to perform Pareto front search and generate a Pareto optimal solution set. Specific operating parameters are set as follows: Population Size and Evolutionary Strategy: Population Size Maximum number of generations .

[0062] Operator parameters: crossover probability Probability of mutation .

[0063] Multidimensional sorting criteria: based on the vector defined in step 4.1 Non-dominated stratification is performed by comparing the Pareto Dominance among individuals. Within the same non-dominated stratum, a crowding degree calculation formula is introduced: in, For individuals The degree of crowding. The algorithm preserves... Larger individuals ensure the diversity of Pareto optimal solution sets in dimensions such as prediction accuracy and model lightweighting.

[0064] Step 4.3: Multi-objective optimization implementation process and optimal configuration determination 4.3.1 Implementation Process 1. Input data preparation: Import the key feature set filtered in step 2.3, and divide it into training set, validation set, and independent test set in an 8:1:1 ratio; 2. Initial population generation: Based on the optimal parameter set output in step 3. Fifty initial population individuals are generated, and each individual adopts a mixed binary and real number encoding method. The "hyperparameter combination" part uses real number encoding to map to the physical value space defined in step 3.1, and the "feature input selection" part uses binary bit string encoding with a length equal to the total number of features (1 indicates that the feature is selected, and 0 indicates that it is removed), thereby constructing a joint search space that integrates "model structure-input dimension". 3. Non-dominated ranking and crowding calculation: For each individual in the population, based on the multi-objective optimization vector in step 4.1 Calculate the target components, perform non-dominated sorting, and calculate the crowding degree of individuals within the same layer to screen for optimal solution individuals that are evenly distributed and have excellent performance; 4. Genetic Operations: The next generation population is generated through roulette wheel selection, simulated binary crossover and integer crossover, and polynomial mutation. The technical operators involved in the above genetic operations are all well-known techniques in the field of evolutionary computation, and their specific definitions are as follows: Roulette wheel selection is a probabilistic selection mechanism based on individual fitness. The higher an individual's fitness, the greater the probability of it being selected to be passed on to the next generation.

[0065] Simulated binary crossover: Simulates the search characteristics of binary-coded crossover operators to handle continuous optimization variables, generating offspring near the parent generation through a probability distribution function.

[0066] Integer Crossing: A crossover operator specifically designed for integer variables such as model structure. It ensures the validity of the child solution by performing linear transformations and rounding constraints on the parent parameters.

[0067] Multinomial mutation: Perturbation of parent individuals using multinomial probability distribution increases population diversity and helps the algorithm escape local extremum traps.

[0068] 5. Iterative convergence: Repeat the above non-dominated sorting, crowding calculation and genetic operations until the number of iterations reaches 100 or the Pareto optimal solution set has not been updated for 10 consecutive generations, and output the final Pareto optimal solution set.

[0069] 4.3.2 Determining the Optimal Model Configuration The ideal point method is used to select the final optimal configuration from the Pareto optimal solution set: 1. Determine the ideal point: Extract the optimal values ​​of each objective from the Pareto optimal solution set to construct the ideal objective vector. Their components correspond in sequence: Precision target Efficiency goals Robust objectives Lightweighting goals The optimal values ​​for the four indicators are: Among them, the goal of lightweighting Corresponding to the number of model parameters in this instance With preset upper limit The ratio (i.e.) / =0.6, The optimal number of model parameters is preset for this embodiment; 2. Calculate the standardized Euclidean distance: For each Pareto optimal solution, calculate its standardized Euclidean distance to the ideal point. : in, The solution is the first One target value, For Pareto concentration The maximum and minimum values ​​of each target; For the first The optimal value of the ideal point of each objective function; 3. Filter the optimal configuration: Select the standardized Euclidean distance. The minimum solution is taken as the final optimal model configuration. (Typical configuration) For example, the calculation process for each performance indicator is as follows: Prediction accuracy index Calculation: In the final optimal configuration verification phase, a precision balance weight is taken. , the measured value Substituting into the objective function formula in step 1.1, we get: Model usability indicators Calculation: Take the practicality weight The actual number of model parameters With upper limit Substituting into the formula, we get: Overall fitness score calculation: based on the objective function described above. Substituting the accuracy and practicality indicators into the calculation process is as follows: This result indicates that the model achieves a high score in the prediction accuracy dimension. Meanwhile, the number of parameters is controlled within the constraints, and the lightweight penalty term is only [amount missing]. The combined fitness after subtracting the two is achieved This demonstrates that the model achieves an optimal trade-off between prediction accuracy and lightweight deployment, satisfying the dual requirements of lightweight deployment and high-precision prediction for edge computing devices in high-dry-heat environments. This aligns perfectly with the optimization direction of the objective function constructed in step 1.1, and the calculation process and conclusions are logically consistent, reproducible, and verifiable. The optimal hyperparameter configuration is as follows: In this embodiment, A value of 0 indicates that the information has been fully represented by other features under this configuration, and is a reasonable optimal result under specific dataset and constraints. It does not mean that the time-frequency domain feature itself is invalid. Feature input: Three core features, including temperature Time-frequency energy peak Running time Monthly error drift slope Error daily periodic harmonic intensity ; Performance metrics: , , , It satisfies all constraints and achieves optimal multi-objective equilibrium; where 0.00021 is... It is a reasonable measured value within the range of 0.00025, which is the constraint of the 0.5-level smart meter regulations.

[0070] The above performance index values ​​( The results (etc.) were obtained through independent test set evaluation on the typical dataset of high dry and hot environment described in this invention (containing 30 months of measured data with a sample size of 21,600). Its calculation logic strictly follows the multi-objective function and constraints defined in step 4.1.

[0071] Step 4.4: Validation and Output of the Optimal Prediction Scheme For the optimal model configuration determined in step 4.3, performance verification under high dry and hot conditions is carried out to ensure the feasibility of the solution: 1. Accuracy Validation: Run the model on an independent test set to validate accuracy. The prediction errors all fall within Within the range, and with an accuracy rate of over 98% in capturing error mutations caused by sudden temperature rises, this data was obtained by statistically analyzing the mean of prediction residuals for all temperature mutation moments (temperature change rate > 5℃ / h) in the independent test set. 2. Robustness verification: After superimposing 20~40dB Gaussian white noise, It remains stable at 12%~18% (this range is the confidence interval obtained after 50 repeated experiments with superimposed Gaussian noise), with no significant performance degradation, and is compatible with sensor noise interference in high dry and hot environments. 3. Efficiency and Lightweight Validation: The total time for model hyperparameter tuning was 220 seconds, and the actual number of model parameters was [not specified]. Real-time prediction can be achieved on edge computing devices for smart meters, with a single sample prediction time of [time missing]. The time consumption figure is based on actual measurements on a typical smart meter embedded hardware platform, ARM Cortex-M4. The test dataset consists of 21,600 data entries from 30 months of testing in a hot and dry environment. The sampling period is 1 hour. Under the embedded operating environment with standard clock frequency and memory constraints, the average value is obtained by repeated inference 10 times. The calculation process is realistic and reproducible, meeting the online real-time monitoring requirements of smart meters.

[0072] The final output is the optimal prediction scheme, which includes: Model configuration: Mamba model hyperparameters Feature input selection; Deployment parameters: edge computing device hardware requirements, data sampling period; Prediction process: multi-stress data preprocessing → core feature extraction → Mamba model inference → error prediction result output, providing a complete and engineering-feasible solution for predicting metering errors of smart meters in hot and dry environments.

[0073] This invention achieves a breakthrough in technology by constructing a dual-innovative architecture of "multi-stress coupled temporal modeling - engineering optimization configuration." Addressing the two core shortcomings of traditional smart meter metering error prediction—fragmented modeling of multi-stress influences and lack of engineering practicality in model optimization—it pioneeringly establishes a solution that deeply integrates theoretical methods with engineering practice. To address the "influence factor island" problem in traditional error modeling, which often focuses on a single stress and neglects the time-temperature-humidity multi-stress coupling effect under high dry and hot conditions, this invention introduces and quantifies multi-stress coupling coefficients into the mathematical model. (i.e., a set of parameters used to characterize the intensity of the nonlinear interaction between temperature, humidity, and time-related aging factors) to construct a multi-stress-driven time-series dynamic mathematical model. This multi-stress coupling coefficient, as the core variable to be optimized in the model, is integrated throughout the subsequent adaptive optimization process, transforming the error prediction problem into a dynamic evolution problem under the interaction of multiple stresses. By designing a multi-dimensional error representation system that includes short-term fluctuation intensity, periodic evolution, and instantaneous mutations, the model accurately characterizes the influence of multi-stress coupling on the short-term surge and long-term drift of errors, mapping discrete error data to a unified multi-stress evolution space. This explicit quantification of environmental stress interactions through multi-stress coupling coefficients, combined with the automatic calibration of the Mamba model hyperparameters in subsequent steps, successfully solves the core problem of traditional single-factor modeling's "difficulty in covering complex coupling effects," laying a theoretical foundation for accurate error prediction under high-dry-heat environments.

[0074] On the other hand, addressing the pain point of traditional models focusing on single prediction accuracy while neglecting the tuning efficiency, robustness, and lightweight requirements for edge deployment, resulting in poor engineering adaptability, an innovative integrated technical system of "multi-scale feature extraction - adaptive chaotic PSO hyperparameter optimization - multi-objective strategy configuration" is constructed. Through multi-dimensional feature extraction in the time domain, frequency domain, and time-frequency domain, the dynamic characteristics of errors are comprehensively captured. An adaptive chaotic particle swarm optimization (PSO) algorithm is introduced, using cosine law to adjust inertia weights and collaboratively balance learning factors to achieve adaptive search strategy. Combined with chaotic perturbation mutation to break local optima, the core hyperparameters of the Mamba model, such as state space dimension and time step, are efficiently solved. Furthermore, a comprehensive optimization function is constructed around "prediction accuracy - tuning efficiency - robustness - lightweight," engineering constraints are set, and the NSGA-II algorithm is used to generate a Pareto optimal solution set. The optimal configuration for smart meter embedded hardware is selected using the ideal point method. This system can simultaneously consider both theoretical model accuracy and practical engineering needs. Especially when dealing with real-world scenarios such as sensor noise and edge resource constraints in high-dry-heat environments, it demonstrates adaptability that traditional optimization methods struggle to match, providing a precise technical benchmark for the engineering implementation of error prediction solutions. This invention, through a dual innovative architecture of "multi-stress coupled temporal modeling - engineering optimization configuration," achieves a dual effect of "theoretical accuracy breakthrough - practical engineering implementation" in the scenario of smart meter metering error prediction in high-dry-heat environments. This is specifically reflected in the following four aspects: In terms of error prediction accuracy and dynamic capture capability, compared with traditional single-factor modeling represented by conventional LSTM, this invention, through a multi-stress coupled temporal modeling framework and multi-scale feature extraction technology, can comprehensively cover the short-term surge, periodic evolution, and long-term drift characteristics of errors under high dry and hot environments. Validated on a typical dataset of high dry and hot regions (such as Turpan) containing 21,600 sets of measured samples, the model's mean square error (MSE) on the independent test set decreased to 0.00021, a 42% reduction compared to traditional single-factor linear regression prediction models. The prediction error was stably controlled within the range of [-0.5, 0.5]%, fully complying with the 0.5-level smart meter metering regulations. In particular, the accuracy rate for capturing instantaneous error changes caused by sudden temperature rises reached over 98.5%, a 10.7% improvement compared to traditional frequency domain single-feature models, effectively solving the problem of "difficult to predict and easy to miss" errors under high dry and hot environments.

[0075] Regarding robustness against disturbances, this invention addresses sensor noise interference in high-dry-heat environments by employing a multi-objective optimization robustness constraint design and a selective scanning mechanism of the Mamba model. Verified through 50 independent noise injection repetition experiments, the model shows that after adding 30dB of noise, the MSE increase is only 15%, far lower than traditional models, and the prediction error fluctuation is controlled within ±0.08%. Even under extreme 40dB noise interference, the MSE increase remains ≤18%, maintaining stable error prediction capability, significantly superior to traditional models, ensuring reliable operation under harsh sensing conditions in high-dry-heat environments.

[0076] In terms of engineering adaptability and resource efficiency, this invention reduces tuning time through adaptive chaotic PSO hyperparameter optimization and controls the number of Mamba model parameters to 2.1 × 10 through model lightweight constraints. 6 Within this timeframe, the computation time is reduced by 59.4% compared to the traditional Transformer model, adapting to the hardware resource constraints of embedded PLCs in smart meters; the total time for model hyperparameter tuning is ≤220s, which is 51.1% shorter than standard PSO optimization, and the single-sample prediction time is ≤10ms, meeting the real-time monitoring requirements of smart meters every hour; at the same time, by adopting an input strategy that only uses core features, the data transmission and computation overhead are further reduced, and the inference efficiency is improved by 32% compared to the model with "core + auxiliary" feature input, perfectly adapting to the resource constraints of edge computing devices.

[0077] In practical applications, this invention can effectively reduce the metering error risk and maintenance costs of smart meters in hot and dry environments. By accurately predicting the error evolution trend, it can provide early warnings of error deviations caused by temperature aging, avoiding user disputes and economic losses to the power grid due to metering errors. Compared to the traditional "periodic manual verification" mode, it can identify error deviation conditions in advance. Furthermore, the model's engineering deployment scheme can be directly integrated into existing smart meter edge computing devices without additional hardware installation, significantly reducing upgrade costs. Large-scale deployment can significantly improve the intelligence level and economic benefits of power grid metering management in hot and dry areas.

[0078] The various embodiments described in this specification are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for predicting metering errors in smart meters based on the Mamba model, characterized in that, Includes the following steps: A mathematical model for predicting the metering error of smart meters under high dry and hot conditions is constructed. A multi-stress coupled temporal modeling framework is introduced to transform the problem of predicting the metering error of smart meters into a multi-stress driven temporal dynamic modeling problem. The quantitative variables of the multi-stress driving source and the temporal characteristics of the metering error of smart meters are defined. A multi-stress coupled input vector is constructed and a coupling mapping function is defined. Global temporal modeling constraints and optimization objectives are constructed. Based on multi-scale feature extraction technology, error correlation data is processed and key features are divided. The process includes preprocessing of error correlation data, multi-scale feature extraction from three dimensions: time domain, frequency domain, and time-frequency domain, as well as key feature screening and key feature priority division. An adaptive chaotic particle swarm optimization algorithm is designed. This algorithm optimizes the population distribution using chaotic mapping and incorporates a chaotic perturbation mutation mechanism to automatically optimize the hyperparameters of the Mamba model. When the population fitness variance is less than [a certain value], the algorithm achieves optimal results. Perform mutation operations at that time; Multi-objective error prediction strategy optimization is carried out, comprehensively balancing prediction accuracy, tuning efficiency, model lightweighting and disturbance robustness, and determining the optimal model configuration through Pareto optimal solution set.

2. The method for predicting metering errors of smart meters based on the Mamba model according to claim 1, characterized in that, The mathematical model for predicting the metering error of smart meters under high dry and hot conditions includes: Define the core variables and objective function of the model, and define quantitative variables for the two types of elements: For multiple stress-driven sources, variables This represents the actual stress value at a certain moment, where time... ,temperature ,humidity ; For the time series characteristics of measurement error, variables express The actual metering error of a smart meter at any given time, and the variables Represents the model output Predicted time error value express Historical error sequence prior to time step; Constructing multi-stress coupled input vectors and define the coupling mapping function. as follows: ; in, The mapped coupled feature vector; This is the stress weighting matrix; It is a nonlinear kernel function; It is a second-order interaction term; This refers to the corresponding multi-stress coupling coefficient; Define the model objective function Used to measure overall prediction performance: Prediction accuracy metrics: minimizing the mean square error (MSE) between the predicted and actual values, and goodness of fit. Maximizing as the core, quantifying as ; in, To balance the weights for accuracy, satisfy ; Model usability metrics: Based on minimizing the number of model parameters, quantified as follows: ; in, Optimize the hyperparameter vector for PSO; This is the set of network weight parameters for the model; This is a weighting factor for practicality. For the actual number of parameters in the model, The upper limit of the preset parameter quantity; Final objective function The expression is: ; The larger the objective function value, the better the overall performance of the model in terms of "prediction accuracy and deployment usability".

3. The method for predicting metering errors of smart meters based on the Mamba model according to claim 2, characterized in that, The constraints and optimization objectives for constructing global temporal modeling include: Multiple stress value constraints: time ,temperature ℃, humidity % Error output constraint: Prediction error ; Temporal continuity constraint: The model must satisfy Compared with historical error sequences The evolutionary continuity, that is ,in, The preset maximum change threshold; Based on the objective function and constraints, determine the global optimization objective of the model: find the optimal set of model parameters. This makes it possible to handle multiple stress inputs. Historical error Driven by, objective function It has reached its maximum value.

4. The method for predicting metering errors of smart meters based on the Mamba model according to claim 1, characterized in that, The process of processing error-correlated data and segmenting key features based on multi-scale feature extraction technology includes: Error-related data preprocessing includes defining the data collection scope, data cleaning, and data standardization. The data cleaning process focuses on handling outliers and missing values, and the data standardization adopts Z-score standardization. Based on the preprocessed error correlation data, multi-scale feature extraction is performed from three dimensions: time series domain, frequency domain, and time-frequency domain. The temporal evolution characteristics of focusing errors and multiple stresses in time-series feature extraction need to simultaneously cover two types of information: "short-term fluctuations" and "long-term trends". Frequency domain feature extraction addresses the periodic changes in errors with day and night and seasons under high dry and hot environments. It employs Fast Fourier Transform to convert time-domain data to the frequency domain in order to mine frequency characteristics. For the instantaneous abrupt changes in errors under high dry and hot conditions, time-frequency domain feature extraction is performed by using continuous wavelet transform (CWT) to achieve joint time-frequency domain analysis in order to capture local dynamic characteristics. Key feature screening and key feature prioritization: The key feature screening process first uses ANOVA as a linear filter to eliminate features... Linearly independent features with statistics below the critical value are identified; subsequently, the nonlinear dependency measure is performed on the feature set that passes the initial screening using mutual information entropy (MI). Key feature prioritization is based on the predictive contribution of the selected features, quantified by feature importance weights: for The characteristics are used to divide it into core feature regions; for Features within the specified range are divided into secondary feature regions; for Based on the characteristics, it is divided into auxiliary feature regions.

5. The method for predicting metering errors of smart meters based on the Mamba model according to claim 4, characterized in that, The use of ANOVA as a linear filter includes: Let the candidate influence characteristics be The error sequence is Construct a linear regression model ,in, The intercept is... For regression coefficients, For the residuals, calculate the variance analysis. Statistic: ; in, These are the model's predicted values. The mean of the error. For sample size; Take significance level Corresponding critical value If features of Values ​​greater than 3.84 are retained; otherwise, they are considered redundant features. The method of using mutual information entropy (MI) for nonlinear dependency measurement includes: Define candidate impact features With error sequence The formula for mutual information entropy is: ; in, Candidate impact features With error sequence The mutual information between them characterizes the measurement error uncertainty that the characteristic variables can eliminate; The Shannon entropy of the error sequence. In the formula: For error sequence The marginal probability; This represents the total number of error value categories. Given candidate influence features Time error sequence conditional entropy, In the formula: Candidate impact features; The error sequence representing the electricity meter reading; This represents the joint probability of the feature and the error. For the first Each feature can take a value. This represents the total number of categories for the feature value. For the first Each possible value This represents the total number of error value categories. To take values ​​for a given feature The error under the condition is The conditional probability; Set mutual information threshold Only retain the features that satisfy this condition.

6. The method for predicting metering errors of smart meters based on the Mamba model according to claim 1, characterized in that, The adaptive chaotic particle swarm optimization algorithm for design includes: First, particle encoding and uniform initialization are performed. A Logistic chaotic mapping is used to generate an ergodic initial population sequence. Integer hyperparameters are sampled using uniform integer sampling, while continuous hyperparameters are sampled using uniform distribution sampling. The particle velocity initialization range is set to the range of values ​​for the corresponding position dimension. ; Design an adaptive parameter adjustment mechanism with inertia weights. The formula uses a dynamic change based on the cosine law: ; in, This represents the current iteration number. Maximum number of iterations; learning factor Adopting a collaborative balancing strategy, , ; A local optimum-resistant mutation mechanism based on chaotic perturbation is introduced, and the population fitness variance is calculated after each generation update. The specific calculation formula is as follows: ,in, It is the size of the particle swarm. For the first The current fitness value of each particle; This represents the average fitness value of the current population. The normalization operator is used to limit the influence of the fitness metric on mutation triggering, and its calculation method is as follows: .

7. The method for predicting metering errors of smart meters based on the Mamba model according to claim 6, characterized in that, When the population fitness variance The mutation operation is performed at that time, and the mutation formula is: ; in, For chaotic variable operators generated by chaotic mapping, For the first The position of the current globally optimal particle at the next iteration, denoted as the mutated position. .

8. The method for predicting metering errors of smart meters based on the Mamba model according to claim 1, characterized in that, In the automatic optimization of the hyperparameters of the Mamba model, the core Mamba hyperparameters that need to be optimized include: State space dimension Time step Number of hidden layer neurons Selective state transition coefficients Modal fusion weights Learning rate attenuation coefficient The above hyperparameters together constitute the PSO optimization hyperparameter vector. ; Among them, the state space dimension Time step Number of hidden layer neurons Integer variables; selective state transition coefficients Learning rate attenuation coefficient For continuous scalar variables; modal fusion weights The formula is defined as ,in, Represents the time-series feature vector. Represents the frequency domain eigenvector. Represents the time-frequency domain eigenvectors. Let be the modality fusion weight vector, and let its values ​​satisfy... ; These are the time-domain feature weights, frequency-domain feature weights, and time-frequency-domain feature weights, respectively.

9. The method for predicting metering errors of smart meters based on the Mamba model according to claim 1, characterized in that, The optimization of the multi-objective error prediction strategy includes: Based on the optimized Mamba model, construct a multi-objective optimization vector. , The components of the objective function vector are defined as follows: Accuracy target: It must be superior to the metering regulations for Class 0.5 smart meters; Efficiency goals: , ; Robust Objective: This reflects the robustness against disturbances; among them This represents the relative increase in the mean square error of the model under noise interference. This is the preset maximum allowable error increase threshold; Lightweighting goals: ,in, These are the actual parameters of the model; This is the preset upper limit for the number of parameters. ; The NSGA-II algorithm is used to perform Pareto front search and generate a Pareto optimal solution set. The ideal point method is used to select the final optimal configuration from the Pareto optimal solution set. For each Pareto optimal solution, its standardized Euclidean distance to the ideal point is calculated. : ; in, The solution is the first One target value, For Pareto concentration The maximum and minimum values ​​of each target; For the first The optimal value of the ideal point of each objective function; Choose standardized Euclidean distance The minimum solution is taken as the final optimal model configuration.

10. The method for predicting metering errors of smart meters based on the Mamba model according to claim 9, characterized in that, The optimization of the multi-objective error prediction strategy needs to satisfy the following constraints: : 。