Power metering data quality evaluation method, device and equipment and storage medium

By extracting multidimensional features and performing predictive model inference on real-time data from the power metering system, and combining historical residuals and environmental feature weights, the problem of insufficient dynamic quantification in power metering data quality management is solved, achieving assessment with high accuracy and low false alarm rate.

CN122451652APending Publication Date: 2026-07-24SHENZHEN CLOU ELECTRONICS +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610924010.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-07-24

Smart Images

  • Figure CN122451652A_ABST
    Figure CN122451652A_ABST
Patent Text Reader

Abstract

The application discloses a power metering data quality evaluation method and device, equipment and a storage medium, and relates to the technical fields of power metering and artificial intelligence. The method comprises the following steps: performing multi-dimensional feature extraction on real-time power metering data of a collected power metering system to obtain a multi-dimensional feature vector; inputting the multi-dimensional feature vector into a target prediction model for reasoning to obtain a predicted power metering value; determining a current deviation degree of the power metering system based on the real-time power metering data and the predicted power metering value; determining a dynamic credibility score of the power metering system based on the current deviation degree, and performing quality evaluation on the power metering data based on the dynamic credibility score. Through the dynamic credibility evaluation mechanism, data anomalies can be more accurately identified, and the false positive rate and the false negative rate can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of power metering and artificial intelligence technology, and in particular to methods, devices, equipment and storage media for assessing the quality of power metering data. Background Technology

[0002] With the rapid development of smart grids and the energy internet, the data quality of power metering systems, as the foundation of power grid operation and management, directly affects the accuracy of power metering and the reliability of power system operation decisions.

[0003] Existing methods for managing the quality of electricity metering data primarily rely on rule-based detection based on fixed thresholds or assessment methods based on equipment condition estimation. However, rule-based methods lack adaptability to data context and dynamic changes, making them prone to false alarms or missed alarms; while condition estimation methods focus on assessing the health status of the electricity meter equipment itself, resulting in low accuracy in data quality assessment. Summary of the Invention

[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for evaluating the quality of power metering data, which aims to solve the technical problems of the lack of dynamic quantification mechanism and the high false alarm rate caused by the susceptibility of current power metering data reliability evaluation to environmental disturbances.

[0005] To achieve the above objectives, this application proposes a method for assessing the quality of electricity metering data, the method comprising: Multidimensional feature extraction is performed on the real-time power metering data collected from the power metering system to obtain a multidimensional feature vector; The multidimensional feature vector is input into the target prediction model for inference to obtain the predicted power metering value; The current deviation of the power metering system is determined based on the real-time power metering data and the predicted power metering value. The dynamic reliability score of the power metering system is determined based on the current deviation, and the quality of the power metering data is assessed based on the dynamic reliability score.

[0006] In one embodiment, the step of determining the current deviation of the power metering system based on the real-time power metering data and the predicted power metering value includes: The prediction residual is calculated based on the real-time power metering value in the real-time power metering data and the predicted power metering value. Obtain historical residual data from the power metering system; The current deviation of the power metering system is calculated based on the historical residual data and the predicted residual.

[0007] In one embodiment, the step of calculating the current deviation of the power metering system based on the historical residual data and the predicted residual includes: Calculate the historical residual mean based on the historical residual data; The current deviation of the power metering system is calculated based on the historical residual mean and the predicted residual.

[0008] In one embodiment, the step of determining the dynamic reliability score of the power metering system based on the current deviation includes: The current environmental data is obtained based on the real-time power metering data; Obtain the environmental feature weights assigned by the target prediction model to the current environmental features corresponding to the current environmental data; The dynamic reliability score of the power metering system is determined based on the current environmental data, the environmental feature weights, and the current deviation.

[0009] In one embodiment, the step of determining the dynamic reliability score of the power metering system based on the current environmental data, the environmental feature weights, and the current deviation includes: Obtain the preset environment correction offset and preset correction coefficient; Determine the degree of anomaly corresponding to the environmental factors based on the current environmental data; The environmental correction parameters are calculated based on the anomaly degree, the environmental feature weights, and the preset environmental correction offset. The dynamic reliability score of the power metering system is calculated using the preset correction coefficient, the current deviation, and the environmental correction parameter.

[0010] In one embodiment, the target prediction model includes a fully connected layer and a multi-head attention layer; The step of inputting the multidimensional feature vector into the target prediction model for inference to obtain the predicted electricity metering value includes: The multidimensional feature vector is input into the fully connected layer of the target prediction model for feature mapping to obtain the latent features; The latent features are input into the multi-head attention layer of the target prediction model for attention weighting calculation to obtain attention-weighted features; Predicted electricity metering values ​​are generated based on the attention-weighted features.

[0011] In one embodiment, the multi-head attention layer includes multiple independent attention heads; The step of inputting the latent features into the multi-head attention layer of the target prediction model for attention weighting calculation to obtain attention-weighted features includes: The latent features are input into the multi-head attention layer of the target prediction model, and the latent features are linearly projected by each attention head to obtain the corresponding query vector, key vector and value vector. Calculate the scaled dot product attention based on the query vector, the key vector, and the value vector to obtain the output features of the attention head; The output features of the attention head are concatenated and subjected to a linear transformation to obtain attention-weighted features.

[0012] Furthermore, to achieve the above objectives, this application also proposes a power metering data quality assessment device, which includes: The extraction module is used to extract multi-dimensional features from the real-time power metering data collected from the power metering system to obtain multi-dimensional feature vectors. The input module is used to input the multidimensional feature vector into the target prediction model for inference to obtain the predicted power metering value; The determination module is used to determine the current deviation of the power metering system based on the real-time power metering data and the predicted power metering value; The determining module is further configured to determine the dynamic reliability score of the power metering system based on the current deviation, and to perform a quality assessment of the power metering data based on the dynamic reliability score.

[0013] In addition, to achieve the above objectives, this application also proposes an electrical metering data quality assessment device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the electrical metering data quality assessment method as described above.

[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the power metering data quality assessment method described above.

[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the power metering data quality assessment method described above.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: 1) By constructing a target prediction model that includes an attention mechanism, while predicting real-time power metering data, the model automatically extracts the feature weights corresponding to environmental features and integrates these weights with the current deviation calculated based on historical benchmarks to generate a dynamic credibility score, thereby realizing a dynamic quantitative assessment of data credibility.

[0017] 2) By introducing the historical residual mean as a dynamic benchmark and combining it with the predicted residual to calculate the current deviation, the shortcomings of the fixed threshold method in adapting to equipment aging and changes in operating conditions are overcome, making the evaluation results more reflective of the true quality status of the data.

[0018] 3) By utilizing the attention mechanism within the deep learning model, the influence weights of environmental factors on data quality are automatically learned and incorporated as correction parameters into the credibility score calculation. This effectively distinguishes between normal fluctuations caused by environmental disturbances and real data anomalies, significantly reducing the false positive rate and false negative rate. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating an embodiment of the power metering data quality assessment method of this application. Figure 2 This application provides a schematic diagram of the overall framework of a power metering data quality assessment system, based on an embodiment of a power metering data quality assessment method. Figure 3 This is a flowchart illustrating Embodiment 2 of the power metering data quality assessment method of this application. Figure 4 This is a flowchart illustrating Embodiment 3 of the power metering data quality assessment method of this application. Figure 5 This is a flowchart illustrating Embodiment 4 of the power metering data quality assessment method of this application. Figure 6 A schematic diagram of the architecture of the target prediction model provided in an embodiment of the power metering data quality assessment method of this application; Figure 7 A time-series diagram illustrating the power metering data quality assessment provided in an embodiment of the power metering data quality assessment method of this application; Figure 8 This is a schematic diagram of the module structure of the power metering data quality assessment device according to an embodiment of this application; Figure 9 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the power metering data quality assessment method in this application embodiment.

[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0025] The main solution of this application embodiment is as follows: multi-dimensional feature extraction is performed on the real-time power metering data collected from the power metering system to obtain a multi-dimensional feature vector; the multi-dimensional feature vector is input into the target prediction model for inference to obtain the predicted power metering value; the current deviation of the power metering system is determined based on the real-time power metering data and the predicted power metering value; the dynamic reliability score of the power metering system is determined based on the current deviation, and the quality of the power metering data is evaluated based on the dynamic reliability score.

[0026] Existing technologies determine whether metering data is abnormal by setting fixed thresholds or statistical models (such as mean ± N standard deviations), or by evaluating the status of smart meters through multi-source data fusion. However, these methods primarily focus on the health status of the metering equipment itself. While they can detect abnormal data or assess equipment status, they lack a dynamic reliability assessment system for the metering data itself, failing to provide a reliable data reference for power grid operation decisions. Furthermore, existing methods do not adequately consider environmental factors that affect metering data quality (such as temperature, humidity, and electromagnetic interference), which can generate significant data disturbances during real-time operation.

[0027] This application provides a solution that utilizes a pre-defined feature extraction algorithm to extract multi-dimensional feature vectors from real-time data collected by an electricity metering system, thereby comprehensively characterizing the factors influencing metering data quality. These multi-dimensional feature vectors are then input into a trained target prediction model, which automatically identifies the weight of each feature's impact on data quality through an attention mechanism, achieving dynamic weighting of key features. Based on the deviation between the model's output prediction residuals and historical benchmark data, combined with real-time environmental impact factors, a dynamic reliability score for the metering data is calculated, enabling quantifiable assessment of data quality. When the dynamic reliability score falls below a preset threshold, the system triggers an automatic warning and uses a data tracing mechanism to locate the problematic data source, forming a complete closed-loop management process.

[0028] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as an electricity metering data quality assessment system. The following description uses an electricity metering data quality assessment system as an example to illustrate this embodiment and the subsequent embodiments. All actions involving the acquisition of signals, information, or data in this application are performed in accordance with the relevant data protection regulations of the country where the application is located and with authorization from the owner of the corresponding device.

[0029] Based on this, the embodiments of this application provide a method for assessing the quality of power metering data, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the power metering data quality assessment method of this application.

[0030] In this embodiment, the power metering data quality assessment method includes steps S10 to S40: Step S10: Extract multidimensional features from the real-time power metering data collected from the power metering system to obtain multidimensional feature vectors.

[0031] like Figure 2 As shown, Figure 2The overall framework diagram of the power metering data quality assessment system includes a power metering system, a data acquisition module, a database (DB), a model training module, an AI evaluation engine module, an AI model, and an early warning module. The power metering system includes multiple power metering devices. The data acquisition module collects real-time power metering data from these devices and stores the collected data in the database. Historical data in the database can be transmitted to the model training module for model training, generating an AI model. In this embodiment, the AI ​​model is a target prediction model used to predict the features corresponding to the power metering data. The model training module also stores model parameters in the database. The AI ​​evaluation engine module reads the data to be evaluated and the model parameters, transmits the data and parameters to the AI ​​model for prediction, and obtains the final calculation result. Based on the calculation result, the AI ​​evaluation engine module calculates an evaluation score and sends the score to the early warning module to determine whether an early warning is needed, thus completing the data quality assessment of the power metering system.

[0032] It should be noted that real-time power metering data includes not only traditional electrical quantity data, such as three-phase current, line voltage, active power, reactive power, and power factor, but also, in order to more accurately reflect the factors affecting data quality, operational status data (such as load fluctuation rate, cumulative equipment operating time, and load condition) and environmental data (such as ambient temperature, humidity, electromagnetic field strength, and vibration data).

[0033] After acquiring real-time power metering data, instead of directly using a single physical quantity for evaluation, feature extraction is used to transform it into a multi-dimensional feature vector that can comprehensively characterize the current operating conditions. The multi-dimensional feature vector is a structured numerical sequence formed by normalizing, cleaning, and splicing the aforementioned multi-source heterogeneous data. For example, it can be represented as a vector form containing current characteristics, voltage characteristics, power factor characteristics, load characteristics, environmental characteristics, harmonic distortion rate, frequency deviation, three-phase imbalance, and power direction.

[0034] For example, the constructed multidimensional feature vector is X = [x1, x2, x3, x4, x5, x6], where x1 is the current feature, x2 is the voltage feature, x3 is the power factor feature, x4 is the load fluctuation feature, x5 is the temperature feature, and x6 is the humidity feature.

[0035] As shown in Table 1, Table 1 shows the dimensions of the multidimensional feature vector and the specific calculation method.

[0036] Table 1

[0037] The final constructed 6-dimensional feature vector is: X = [0.451, 0.680, 0.920, 0.087, 0.453, 0.720].

[0038] By integrating electrical quantities, operating status, and environmental information into a unified multi-dimensional feature vector, the limitations of traditional methods that rely solely on a single threshold for judgment are overcome. This enables subsequent evaluations to comprehensively consider the coupled influence of the equipment's own status and the external environment on the metering data, laying a data foundation for high-precision evaluation.

[0039] Step S20: Input the multidimensional feature vector into the target prediction model for inference to obtain the predicted power metering value.

[0040] The target prediction model is a pre-trained deep learning inference engine.

[0041] In this embodiment, the target prediction model is regarded as a black box reasoning process. Its core function is to learn and reconstruct the data evolution law of the power metering system under normal operating conditions based on the input multi-dimensional feature vector, so as to output a theoretical expected value, that is, the predicted power metering value.

[0042] It should be understood that the target prediction model in this embodiment is not limited to one network structure, and may include: LSTM (Long Short-Term Memory Network), Transformer model, GRU (Gated Recurrent Unit), CNN (Convolutional Neural Network) or a combination of the above models.

[0043] Specifically, the model training process is as follows: (1) Training dataset construction: Multiple charging cycle operation records were collected from the historical database. Data collection, preprocessing, and feature extraction were performed on each historical record to construct a training sample set: Sample matrix: X_train ∈ R^{M×6}, where M is the total number of samples (e.g., M=50,000 samples). Label vector: Y_train ∈ R^{M×1}, corresponding to the actual charging current value (unit: A) of each sample; Dataset partitioning: Training set: Validation set: Test set = 7:2:1; (2) Model training process: Supervised learning is adopted, with mean squared error (MSE) as the loss function, and the Adam optimizer is used to iteratively update the model parameters: Loss function: L = (1 / N) Σ ( i - y i)², Optimizer: Adam (learning rate lr = 0.001, β1 = 0.9, β2 = 0.999), Batch Size: N = 64, that is, 64 samples X_batch∈ R^{64×6} are randomly selected from the training set each time for forward and backward propagation, Training Epochs: up to 200 epochs, using an early stopping strategy (terminating if the validation set loss does not decrease for 10 consecutive epochs). (3) Training iteration process: The calculation process for each training batch is as follows: ① Forward propagation: H1=ReLU(W1 · X_batch + b1)[64×32] H_att=MultiHead(Q, K, V)[64×32] H2=ReLU(W2 · H_att + b2)[64×16] _batch = W3 · H2 + b3[64×1] ② Calculate the loss: L = (1 / 64) Σ ( i - y i )²; ③ Backpropagation: Update all weight matrices W1, W2, W3 and biases b1, b2, b3 through gradient descent. After the model is evaluated, the trained weight parameters are persisted for loading during the inference phase. Here, Q, K and V are the query vector, key vector and value vector, respectively.

[0044] By introducing a target prediction model, instead of relying on fixed rules or empirical formulas set manually, a dynamic benchmark is automatically generated using a data-driven approach. This enables the predicted power metering values ​​to adaptively follow complex operating conditions such as load changes, seasonal changes, and equipment aging, significantly improving the accuracy and timeliness of the benchmark values.

[0045] Step S30: Determine the current deviation of the power metering system based on the real-time power metering data and the predicted power metering value.

[0046] The current deviation is a quantitative indicator that characterizes the degree of deviation between the real-time collected data and the model's expected data. After obtaining the predicted power metering value, the system compares and calculates it with the real-time power metering value collected in step S10.

[0047] It is important to emphasize that the current deviation reflects the degree of abnormality in the data performance at the current moment relative to the "normal pattern" perceived by the model. For example, when the difference between the real-time value and the predicted value is small, it indicates that the current data conforms to the expected pattern, and the deviation is low; conversely, if the difference significantly exceeds the normal fluctuation range, the deviation is high. By determining the current deviation, this embodiment transforms abstract data quality issues into calculable numerical differences, effectively filtering out false anomalies caused by normal load fluctuations, and allowing the evaluation focus to truly concentrate on potential data quality issues that violate operational patterns.

[0048] Step S40: Determine the dynamic reliability score of the power metering system based on the current deviation, and conduct a quality assessment of the power metering data based on the dynamic reliability score.

[0049] The dynamic reliability score is the final quantitative expression of the reliability of power metering data. The system maps the current deviation obtained in step S30 to a standardized score, which is the dynamic reliability score. The dynamic reliability score is not static, but fluctuates in real time with changes in real-time operating conditions, environmental conditions, and deviation.

[0050] For example, under the same degree of deviation, if the model's inherent uncertainty increases due to extremely harsh environments, the scoring mechanism may exhibit different response characteristics. Based on this dynamic credibility scoring, the system can perform graded quality assessments of power metering data, such as classifying it as "highly reliable," "requiring attention," or "unreliable," and transmit the assessment results to the early warning module or administrator terminal.

[0051] For example, if the calculated dynamic reliability score is 50 and the preset threshold is 70, it indicates that the reliability of the electricity metering data is low and needs attention. In this case, an early warning can be issued. The early warning methods can include: audible and visual alarms, SMS notifications, email pushes, APP pushes, and integration with third-party operation and maintenance systems.

[0052] This embodiment achieves a fundamental shift from traditional qualitative anomaly detection to quantitative reliability assessment through this mechanism, providing more refined, objective, and physically interpretable data quality references for power grid operation decisions. It also provides the necessary framework for introducing environmental weight correction and refined model architecture in subsequent embodiments.

[0053] This embodiment is not only applicable to electricity metering scenarios, but can also be extended to other metering fields with real-time data acquisition and reliability assessment requirements, such as water metering, gas metering, and heat metering.

[0054] This embodiment provides a method for assessing the quality of electricity metering data. It involves extracting multi-dimensional features from real-time electricity metering data collected from an electricity metering system to obtain a multi-dimensional feature vector; inputting the multi-dimensional feature vector into a target prediction model for inference to obtain a predicted electricity metering value; determining the current deviation of the electricity metering system based on the real-time electricity metering data and the predicted electricity metering value; determining the dynamic reliability score of the electricity metering system based on the current deviation; and assessing the quality of the electricity metering data based on the dynamic reliability score. This dynamic reliability assessment mechanism enables more accurate identification of data anomalies and reduces false alarm and false negative rates.

[0055] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S30 includes steps S301 to S303: Step S301: Calculate the prediction residual based on the real-time power metering value in the real-time power metering data and the predicted power metering value.

[0056] It should be noted that the prediction residual is the difference between the real-time electricity metering value and the predicted electricity metering value. Specifically, the electricity metering reference value y_normalized can be obtained, and the prediction residual can be calculated using the real-time electricity metering value, the predicted electricity metering value, and the electricity metering reference value from the real-time electricity metering data, as shown in the following formula:

[0057] In the above formula, For prediction parameters, This refers to the real-time electricity metering value, i.e., the actual electricity metering value. To predict electricity metering values. For example, the collected real-time electricity metering value is the three-phase average current. =450.7A, the predicted electricity metering value output by the model. =454.8A, the power metering benchmark value, i.e., the rated current y_normalized=500.0A, therefore, the prediction residual =|450.7-454.8| / 500.0=4.1 / 500.0=0.0082.

[0058] The residual directly reflects the magnitude of the absolute deviation of the actual data from the expected normal pattern of the model.

[0059] Step S302: Obtain historical residual data of the power metering system.

[0060] It should be noted that the historical parameter data refers to the residual data of each power metering device maintained in the database during its normal operation over a period of time. For example, the historical residual data of device E-2024-A037 during its normal operation over the past 30 days (the period with a confidence score ≥ 85) is [0.0052, 0.0061, 0.0048, 0.0055, 0.0059].

[0061] Step S303: Calculate the current deviation of the power metering system based on the historical residual data and the predicted residual.

[0062] In practice, the statistical standard deviation σ or the average value r_baseline of historical residual data can be used as the benchmark for normal fluctuations. The current deviation can be calculated by the ratio of the current predicted residual r to σ or r_baseline. The larger the ratio, the greater the degree to which the current residual exceeds the normal fluctuation range, and the greater the corresponding deviation.

[0063] In one feasible implementation, step S303 may include steps A11-A12: Step A11: Calculate the historical residual mean based on the historical residual data; It is understandable that the historical residual mean represents the average deviation level of the power metering equipment under normal operating conditions. For example, if the historical residual data is [0.0052, 0.0061, 0.0048, 0.0055, 0.0059], then the historical residual mean r_baseline = 0.0055.

[0064] Step A12: Calculate the current deviation of the power metering system based on the historical residual mean and the predicted residual.

[0065] In practical implementation, the current deviation of the power metering system can be calculated based on the historical residual mean and the predicted residual, as shown in the following formula:

[0066] In the above formula, d represents the current deviation. To predict residuals, The historical residual mean is used. For example, if the predicted residual is 0.0082 and the historical residual mean r_baseline=0.0055, then the current deviation d=0.0027.

[0067] This embodiment calculates the prediction residual based on the real-time power metering value and the predicted power metering value in the real-time power metering data; obtains historical residual data of the power metering system; and calculates the current deviation of the power metering system based on the historical residual data and the prediction residual. Through the above steps, the deviation of the current data can be more accurately quantified by combining the historical operating deviation patterns of the equipment itself. This avoids the evaluation bias caused by using a uniform threshold to judge different operating conditions and different equipment, further improving the rationality and accuracy of the current deviation calculation, and making the subsequent reliability assessment results more consistent with the actual operating characteristics of the corresponding equipment.

[0068] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 Step S40 includes steps S401 to S403: Step S401: Obtain the current environmental data based on the real-time power metering data.

[0069] It should be noted that current environmental data refers to a set of parameters that characterize the external environmental state of the power metering equipment, extracted or mapped from the collected real-time power metering data. For example, this data may include physical quantities such as ambient temperature, ambient humidity, electromagnetic field strength, and vibration amplitude.

[0070] It should be understood that although these data may have been input into the model as part of the multidimensional feature vector in step S10, in this step, the system identifies them separately and uses them as explicit variables for subsequent correction calculations. By decoupling environmental factors from the mixed feature space, they can participate in the dynamic adjustment of the credibility score as independent correction factors, thus providing a clear data basis for distinguishing between "normal fluctuations caused by the environment" and "abnormal fluctuations caused by equipment failure".

[0071] Step S402: Obtain the environmental feature weights assigned by the target prediction model to the current environmental features corresponding to the current environmental data.

[0072] It should be noted that the environmental feature weights are not derived from externally preset fixed experience tables or manually configured static parameters, but rather are directly derived from the dynamic weights automatically generated internally by the target prediction model when inferring from the current data. When the target prediction model receives multi-dimensional feature vectors for inference, its internal computing mechanism adaptively allocates attention weights based on the contribution or correlation strength of each feature dimension to the prediction result. For example, the environmental feature weights w1 (temperature) = 0.168, w2 (humidity) = 0.062.

[0073] This embodiment extracts weight values ​​specifically corresponding to the environmental feature dimension by analyzing the intermediate layer states or attention matrix within the model. For example, if the ambient temperature changes drastically at the current moment and the model determines that this change has a significant impact on the measurement value, the model will automatically assign a higher weight to the temperature feature; conversely, if the environment is stable, the weight will be lower. A higher environmental feature weight means that the model believes the current data performance is mainly driven by environmental factors, rather than by the degradation of the device's own measurement performance. Therefore, this weight is used to correct the confidence score, enabling the scoring mechanism to intelligently perceive the intensity of environmental interference, thereby avoiding the indiscriminate classification of all large residuals as low-confidence data.

[0074] Step S403: Determine the dynamic reliability score of the power metering system based on the current environmental data, the environmental feature weights, and the current deviation.

[0075] Specifically, this involves the deep fusion of environmental perception information and data deviation information. The obtained current environmental data, extracted environmental feature weights, and current deviation are used as input variables, and the final dynamic credibility score is calculated through a preset scoring function or mapping rule.

[0076] In one feasible implementation, step S403 may include steps B11-B14: Step B11: Obtain the preset environment correction offset and preset correction coefficient; It should be noted that the preset environment correction offset and preset correction coefficient are global hyperparameters in the scoring model, which are usually set based on historical data statistical calibration or expert experience.

[0077] The preset environmental correction offset α0 represents the adjustment amount of the baseline score under no significant environmental disturbance. Its physical meaning is to calibrate the center position of the score curve and prevent the overall score from being too high or too low due to the inherent bias of the model. For example, α0 = 0.02.

[0078] The preset correction coefficients include β and γ, where β is the kurtosis parameter and γ is the midpoint threshold parameter, both calibrated statistically from historical data. These preset correction coefficients control the sensitivity of the scoring function to changes in deviation, i.e., the steepness of the scoring curve. A larger correction coefficient means the score is more sensitive to changes in deviation; even a small deviation can cause a large fluctuation in the score. A smaller correction coefficient makes the scoring more gradual and forgiving. The introduction of these two parameters allows the evaluation system to flexibly adjust the scoring strategy according to the accuracy level of different types of energy meters or the management requirements of different distribution areas, without retraining the entire prediction model.

[0079] Step B12: Determine the anomaly degree corresponding to the environmental factors based on the current environmental data; Environmental factor anomaly is the process of converting raw environmental data with physical units into dimensionless values, aiming to unify the scale of the influence of different environmental dimensions on the score.

[0080] For example, for ambient temperature, the absolute value of the difference between the current measured temperature and the standard reference temperature (e.g., 25°C) can be calculated, and then divided by the maximum allowable deviation range (e.g., 40°C) to obtain a temperature anomaly between 0 and 1. Similarly, for ambient humidity, the deviation between the current humidity and the standard humidity (e.g., 50%RH) can be calculated and normalized. It should be understood that the calculation method for anomaly is not limited to linear normalization; piecewise functions, exponential decay functions, or confidence level transformations based on probability distributions can also be used, as long as they can characterize the degree of deviation of the current environmental state from the ideal operating condition. This embodiment eliminates dimensional differences by mapping physical quantities to standardized anomalies, making the subsequent multi-factor fusion calculation mathematically reasonable.

[0081] For example, the temperature anomaly e1 = |38.5 - 25| / 40 = 0.3375, where the standard temperature is 25°C and the allowable deviation is ±40°C; the humidity anomaly e2 = |72 - 50| / 50 = 0.4400, where the standard humidity is 50%RH and the allowable deviation is ±50%RH.

[0082] Step B13: Calculate the environment correction parameters based on the anomaly degree, the environmental feature weights, and the preset environment correction offset; It is understandable that the environment correction parameters can be calculated using anomaly degree, environmental feature weights, and a preset environment correction offset, as shown in the following formula:

[0083] In the above formula, Here, ei represents the anomaly degree of each environmental factor, and wi represents the environmental feature weight. For example, the anomalies of environmental factors include temperature anomaly e1 = 0.3375 and humidity anomaly e2 = 0.4400, with environmental factor weights of temperature w1 = 0.168 and humidity w2 = 0.062, and a preset environmental correction offset. =0.02, then the environmental correction parameter =0.02 + (0.168×0.3375 + 0.062×0.4400)=0.1040.

[0084] Step B14: Calculate the dynamic reliability score of the power metering system using the preset correction coefficient, the current deviation, and the environmental correction parameter.

[0085] It is understood that the final dynamic credibility score is calculated using a pre-defined nonlinear mapping function. In this embodiment, a variant of the Sigmoid function is preferably used, for example:

[0086] The dynamic credibility score ranges from 0 to 100. The closer to 100, the higher the data credibility, and the greater the deviation d or environmental correction parameter. As the score increases, the credibility score decreases smoothly.

[0087] In practical implementation, for example, if the preset correction coefficient β=400, which represents the sensitivity coefficient, and γ = 1.2, which represents the offset threshold, then the dynamic confidence score = 100 / (1+exp(400×0.0027-1.2+0.1040)) = 50.40 points.

[0088] In addition, dynamic credibility scoring can be calculated using various alternative methods, such as weighted summation, fuzzy logic, and evidence reasoning (e.g., DS evidence theory).

[0089] This embodiment obtains current environmental data based on the real-time power metering data; acquires the environmental feature weights assigned by the target prediction model to the current environmental features corresponding to the current environmental data; and determines the dynamic reliability score of the power metering system based on the current environmental data, the environmental feature weights, and the current deviation. Through this method, the model can automatically correct the data reliability assessment results by leveraging its dynamic attention to environmental factors: when environmental fluctuations are large and the model itself determines that the environment has a significant impact on the current metering value, it will automatically reduce the score penalty caused by deviation, avoiding misjudging normal data fluctuations caused by the environment as low-quality data; conversely, when there are no significant environmental fluctuations, the normal correction effect of deviation on the score will be retained, thereby effectively improving the adaptability and accuracy of data quality assessment under complex field conditions, making the reliability score results more consistent with the actual operating scenario of the power metering system.

[0090] Based on the first embodiment of this application, in the fourth embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 5 Step S20 includes steps S201 to S203: Step S201: Input the multidimensional feature vector into the fully connected layer of the target prediction model for feature mapping to obtain the hidden features.

[0091] In this embodiment, the target prediction model includes a fully connected layer and a multi-head attention layer; like Figure 6 As shown, Figure 6 This is a schematic diagram of the target prediction model architecture, including an input layer, a fully connected layer FC1, a multi-head attention layer, a fully connected layer FC2, and an output layer. The input layer is 6-dimensional, used to input multi-dimensional feature vectors, including temperature, voltage, SOC, SOH, time, historical current, etc., and can also be other feature vectors. After the multi-dimensional feature vectors enter the fully connected layer, feature mapping H1 = ReLU(W1·X + b1), where W1∈R 32×6 This yields the latent feature H1. For example, if the input multidimensional feature vector is 6-dimensional (including current, voltage, power factor, load volatility, temperature, and humidity), the fully connected layer can transform it into 32-dimensional or higher-dimensional latent features through linear transformations and nonlinear activation functions (such as ReLU). In this high-dimensional space, variables that appear to be physically independent (such as temperature and current) are encoded into vector representations with rich semantic relationships, making it easier for subsequent layers to capture the potential nonlinear coupling relationships between them. It should be understood that the number of layers and nodes in the fully connected layer can be flexibly adjusted according to the actual data complexity. This invention does not impose any restrictions on this; the key is to complete the transformation from the physical observation space to the abstract semantic space, providing high-quality input for the attention mechanism.

[0092] Step S202: Input the hidden features into the multi-head attention layer of the target prediction model to perform attention weighting calculation, and obtain attention weighted features.

[0093] Continue as Figure 6 As shown, after obtaining the latent features, the latent features can be input into a multi-head attention layer for attention weighting calculation to obtain attention-weighted features. Then, the attention-weighted features are input into a fully connected layer FC2 for dimensionality reduction to obtain the dimensionality-reduced features, H2=ReLU(W2·H_att+b2), W2∈R 16×32 Finally, the dimensionality-reduced features are input to the output layer to obtain... ,in, To predict electricity metering values, such as predicting charging current values.

[0094] In one feasible implementation, step S202 may include steps C11 to C13: Step C11: Input the latent features into the multi-head attention layer of the target prediction model, and perform linear projection on the latent features through each attention head to obtain the corresponding query vector, key vector and value vector; In this embodiment, the multi-head attention layer includes multiple independent attention heads.

[0095] It's important to note that each attention head has its own dedicated parameter matrix, which are not shared, and they process the same input features in parallel. For example, in a configuration with four attention heads, Head_1 might focus on learning the strong coupling relationships between electrical quantities (such as the correlation between current and power factor), Head_2 might focus on capturing the nonlinear perturbations of environmental factors on metering values ​​(such as temperature drift characteristics), while Head_3 and Head_4 might focus on long-term dependencies and short-term fluctuations in the time series, respectively. The core significance of this multi-head parallel design lies in the fact that the quality influencing factors of power metering data are extremely complex and exhibit multimodal characteristics. A single attention head often struggles to simultaneously consider feature interactions across all dimensions, easily getting trapped in local optima or ignoring certain weak but crucial environmental signals. By dividing the data into multiple independent subspaces, the model can decouple and analyze the latent features from different perspectives, ensuring that the final weight distribution is both comprehensive and refined, thereby effectively avoiding evaluation biases caused by feature omissions.

[0096] Specifically, for the i-th attention head, it internally maintains three independent sets of learnable weight matrices W_Q^i, W_K^i, and W_V^i. When the latent feature H_1 output by the fully connected layer enters this head, the system performs matrix multiplication operations respectively: Q_i = W_Q^i×H1, K_i = W_K^i×H1, V_i = W_V^i×H1, W_Q^i, W_K^i, W_V^i ∈ R^{8×32}, thereby obtaining the query vector, key vector, and value vector. The query vector represents what information is being sought in the current feature dimension, the key vector represents what index information the feature can provide, and the value vector carries the actual feature content.

[0097] It should be understood that these projection matrices are not fixed parameters preset by humans, but are automatically optimized during the model training phase using the backpropagation algorithm. This means that the model can adaptively learn how to transform raw physical features (such as temperature and current) into semantic representations suitable for correlation calculation. For example, the model may automatically learn to project temperature features into a query subspace that is highly correlated with current features under high-temperature conditions, thus laying the foundation for subsequent calculation of high-attention weights. This learning-based dynamic projection mechanism makes the generation of weights entirely data-driven, rather than relying on expert experience, significantly improving the model's generalization ability to unknown operating conditions.

[0098] Step C12: Calculate the scaled dot product attention based on the query vector, the key vector, and the value vector to obtain the output features of the attention head; The process of calculating the scaled dot product attention to obtain the output features of the attention head is as follows:

[0099] in, As the output scaling factor, d_k is the dimension of the key vector. This weight matrix is ​​multiplied by the value vector V_i to achieve weighted aggregation of the feature content, resulting in the output feature Head_i. This process not only completes feature selection but also preserves the original information of the selected features, providing dual information for subsequent score correction, which combines "importance indication" and "content representation".

[0100] Step C13: Concatenate the output features of the attention head and perform a linear transformation to obtain attention-weighted features.

[0101] Since each attention head operates independently in different low-dimensional subspaces, their outputs Head_1, Head_2, ..., Head_h represent feature representations from different perspectives. The system first concatenates these output vectors along the feature dimensions to form a joint feature vector Concat([Head_1;Head_2;Head_3;Head_4]) containing multi-view information. For example, if each head outputs 8-dimensional features, concatenating the four heads restores the feature vector to 32 dimensions. Next, a linear transformation W_o ∈ R^{32×32} is performed on this concatenated vector to obtain H_att ∈ R^{32×1}, where W_o is the output projection matrix.

[0102] The final attention-weighted feature H_att contains both the global feature interaction results and embedded refined weight distribution information.

[0103] The specific combination of scaled dot product and multi-head concatenation enables the model to accurately capture and output environmental feature weights that can be used for credibility correction while ensuring training stability. This enhances the model's ability to represent complex multidimensional features and provides a reliable source of gradient information and structured guarantee for refined environmental weight extraction.

[0104] Step S203: Generate predicted power metering values ​​based on the attention-weighted features.

[0105] The features, after being weighted by the multi-head attention layer, have incorporated contextual information and importance filtering results. They are then fed into the output layer for regression calculation, ultimately outputting the predicted power metering value. This process ensures that the prediction results are based on a full consideration of the importance distribution of features under the current operating conditions, thereby improving the accuracy of the prediction benchmark.

[0106] For example, a multi-dimensional feature vector X is input into the target prediction model. During the inference stage, a single sample vector X∈R^{6×1} corresponds to the 6-dimensional feature at a single acquisition time. Model structure: Input layer (6-dimensional) → Fully connected layer (32-dimensional, ReLU) → Attention layer (4 heads, dk=8) → Fully connected layer (16-dimensional, ReLU) → Output layer (1-dimensional, predicted current value).

[0107] In this embodiment, the multidimensional feature vector is input into the fully connected layer of the target prediction model for feature mapping to obtain latent features. These latent features are then input into the multi-head attention layer of the target prediction model for attention-weighted calculation to obtain attention-weighted features. Based on these attention-weighted features, predicted electricity metering values ​​are generated. Through these steps, the model can automatically learn the contribution of different influencing factors to the current prediction result from the multidimensional input features, automatically assign differentiated attention weights, and give higher weights to factors that have a greater impact on the current metering value. This improves the accuracy of the predicted electricity metering value, provides a more reliable benchmark for subsequent data quality assessment, and fundamentally reduces the probability of quality misjudgment caused by benchmark prediction deviations.

[0108] For example, to help understand the implementation process of the power metering data quality assessment method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 7 , Figure 7 A time-series diagram illustrating a method for assessing the quality of electricity metering data is provided. Specifically, the system includes: an administrator, an early warning module, an AI assessment engine module, an AI model, a database, a model training module, a data acquisition module, and electricity metering equipment. First, data acquisition and storage are performed: the electricity metering equipment sends metering data to the data acquisition module (step 1.1), and the data acquisition module stores the data in the database (step 1.2). Next, offline model training is performed: iterative training of the model is conducted, including: reading historical data (step 2.2), returning historical data (step 2.3), training and updating the model (step 2.4), and storing the updated model parameters to generate the target prediction model. Then, step 3... For line reliability assessment, the data acquisition module executes step 3.1 to write real-time metering data to the DB database. Then, the AI ​​evaluation engine module reads the data to be evaluated and model parameters from the DB database (step 3.2), and returns the data and parameters (step 3.3). Then, the AI ​​evaluation engine module sends the data to be evaluated and model parameters to the AI ​​model (step 3.4). The AI ​​model returns the reliability calculation result (step 3.5). The AI ​​evaluation engine module sends the evaluation score to the early warning module (step 3.6). The early warning module then completes the early warning and operation and maintenance closed loop, including (step 4.1) pushing abnormal early warning notifications to the administrator, and (step 4.2) the administrator viewing / handling the early warning events, thus completing the overall process of power metering data quality assessment.

[0109] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the power metering data quality assessment method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0110] This application also provides a power metering data quality assessment device; please refer to [reference needed]. Figure 8 The power metering data quality assessment device includes: The extraction module 10 is used to extract multi-dimensional features from the real-time power metering data collected from the power metering system to obtain multi-dimensional feature vectors.

[0111] The input module 20 is used to input the multidimensional feature vector into the target prediction model for inference to obtain the predicted power metering value.

[0112] The determination module 30 is used to determine the current deviation of the power metering system based on the real-time power metering data and the predicted power metering value.

[0113] The determining module 30 is further configured to determine the dynamic reliability score of the power metering system based on the current deviation, and to perform a quality assessment of the power metering data based on the dynamic reliability score.

[0114] The power metering data quality assessment device provided in this application, employing the power metering data quality assessment method described in the above embodiments, can solve the technical problems of current power metering data reliability assessment lacking a dynamic quantification mechanism and being susceptible to environmental disturbances, leading to a high false alarm rate. Compared with the prior art, the beneficial effects of the power metering data quality assessment device provided in this application are the same as those of the power metering data quality assessment method provided in the above embodiments, and other technical features in the power metering data quality assessment device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0115] In one embodiment, the determining module 30 is further configured to calculate the prediction residual based on the real-time power metering value and the predicted power metering value in the real-time power metering data; obtain historical residual data of the power metering system; and calculate the current deviation of the power metering system based on the historical residual data and the prediction residual.

[0116] In one embodiment, the determining module 30 is further configured to calculate the historical residual mean based on the historical residual data; and calculate the current deviation of the power metering system based on the historical residual mean and the predicted residual.

[0117] In one embodiment, the determining module 30 is further configured to obtain current environmental data based on the real-time power metering data; obtain the environmental feature weights assigned by the target prediction model to the current environmental features corresponding to the current environmental data; and determine the dynamic reliability score of the power metering system based on the current environmental data, the environmental feature weights, and the current deviation.

[0118] In one embodiment, the determining module 30 is further configured to acquire a preset environmental correction offset and a preset correction coefficient; determine the anomaly degree corresponding to the environmental factor based on the current environmental data; calculate environmental correction parameters based on the anomaly degree, the environmental feature weight, and the preset environmental correction offset; and calculate the dynamic reliability score of the power metering system using the preset correction coefficient, the current deviation, and the environmental correction parameters.

[0119] In one embodiment, the target prediction model includes a fully connected layer and a multi-head attention layer; the input module 20 is further configured to input the multi-dimensional feature vector into the fully connected layer of the target prediction model for feature mapping to obtain latent features; input the latent features into the multi-head attention layer of the target prediction model for attention weighting calculation to obtain attention weighted features; and generate predicted power metering values ​​based on the attention weighted features.

[0120] In one embodiment, the multi-head attention layer includes multiple independent attention heads; the input module 20 is further configured to input the latent features into the multi-head attention layer of the target prediction model, and to perform linear projection on the latent features through each attention head to obtain corresponding query vectors, key vectors, and value vectors; to calculate scaled dot product attention based on the query vectors, key vectors, and value vectors to obtain the output features of the attention heads; and to concatenate the output features of the attention heads and perform a linear transformation to obtain attention-weighted features.

[0121] This application provides a power metering data quality assessment device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the power metering data quality assessment method in the first embodiment described above.

[0122] The following is for reference. Figure 9The diagram illustrates a structural schematic of a power metering data quality assessment device suitable for implementing embodiments of this application. The power metering data quality assessment device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), tablets, PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The power metering data quality assessment device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0123] like Figure 9 As shown, the power metering data quality assessment device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the power metering data quality assessment device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touch screens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the power metering data quality assessment equipment to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows power metering data quality assessment equipment with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0124] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0125] The power metering data quality assessment device provided in this application, employing the power metering data quality assessment method described in the above embodiments, can solve the technical problems of current power metering data reliability assessment lacking a dynamic quantification mechanism and being susceptible to environmental disturbances, leading to a high false alarm rate. Compared with the prior art, the beneficial effects of the power metering data quality assessment device provided in this application are the same as those of the power metering data quality assessment method provided in the above embodiments, and other technical features of this power metering data quality assessment device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0126] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0127] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0128] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the power metering data quality assessment method in the above embodiments.

[0129] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0130] The aforementioned computer-readable storage medium may be included in the power metering data quality assessment equipment; or it may exist independently and not be assembled into the power metering data quality assessment equipment.

[0131] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the power metering data quality assessment device, the power metering data quality assessment device performs the following actions: extracts multi-dimensional features from the collected real-time power metering data of the power metering system to obtain a multi-dimensional feature vector; inputs the multi-dimensional feature vector into a target prediction model for inference to obtain a predicted power metering value; determines the current deviation of the power metering system based on the real-time power metering data and the predicted power metering value; determines the dynamic reliability score of the power metering system based on the current deviation; and performs a quality assessment of the power metering data based on the dynamic reliability score.

[0132] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0134] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0135] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described power metering data quality assessment method. This addresses the technical problem that current power metering data reliability assessments lack a dynamic quantification mechanism and are susceptible to environmental disturbances, leading to a high false alarm rate. Compared to existing technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the power metering data quality assessment method provided in the above embodiments, and will not be elaborated upon here.

[0136] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the power metering data quality assessment method described above.

[0137] The computer program product provided in this application can solve the technical problem that the current power metering data reliability assessment lacks a dynamic quantification mechanism and is easily affected by environmental disturbances, resulting in a high false alarm rate. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the power metering data quality assessment method provided in the above embodiments, and will not be repeated here.

[0138] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for assessing the quality of electricity metering data, characterized in that, The method for assessing the quality of electricity metering data includes: Multidimensional feature extraction is performed on the real-time power metering data collected from the power metering system to obtain a multidimensional feature vector; The multidimensional feature vector is input into the target prediction model for inference to obtain the predicted power metering value; The current deviation of the power metering system is determined based on the real-time power metering data and the predicted power metering value. The dynamic reliability score of the power metering system is determined based on the current deviation, and the quality of the power metering data is assessed based on the dynamic reliability score. The step of determining the current deviation of the power metering system based on the real-time power metering data and the predicted power metering value includes: The prediction residual is calculated based on the real-time power metering value in the real-time power metering data and the predicted power metering value. Obtain historical residual data from the power metering system; The current deviation of the power metering system is calculated based on the historical residual data and the predicted residual.

2. The method as described in claim 1, characterized in that, The step of calculating the current deviation of the power metering system based on the historical residual data and the predicted residual includes: Calculate the historical residual mean based on the historical residual data; The current deviation of the power metering system is calculated based on the historical residual mean and the predicted residual.

3. The method as described in claim 1, characterized in that, The steps for determining the dynamic reliability score of the power metering system based on the current deviation include: The current environmental data is obtained based on the real-time power metering data; Obtain the environmental feature weights assigned by the target prediction model to the current environmental features corresponding to the current environmental data; The dynamic reliability score of the power metering system is determined based on the current environmental data, the environmental feature weights, and the current deviation.

4. The method as described in claim 3, characterized in that, The step of determining the dynamic reliability score of the power metering system based on the current environmental data, the environmental feature weights, and the current deviation includes: Obtain the preset environment correction offset and preset correction coefficient; Determine the degree of anomaly corresponding to the environmental factors based on the current environmental data; The environmental correction parameters are calculated based on the anomaly degree, the environmental feature weights, and the preset environmental correction offset. The dynamic reliability score of the power metering system is calculated using the preset correction coefficient, the current deviation, and the environmental correction parameter.

5. The method as described in claim 1, characterized in that, The target prediction model includes a fully connected layer and a multi-head attention layer; The step of inputting the multidimensional feature vector into the target prediction model for inference to obtain the predicted electricity metering value includes: The multidimensional feature vector is input into the fully connected layer of the target prediction model for feature mapping to obtain the latent features; The latent features are input into the multi-head attention layer of the target prediction model for attention weighting calculation to obtain attention-weighted features; Predicted electricity metering values ​​are generated based on the attention-weighted features.

6. The method as described in claim 5, characterized in that, The multi-head attention layer includes multiple independent attention heads; The step of inputting the latent features into the multi-head attention layer of the target prediction model for attention weighting calculation to obtain attention-weighted features includes: The latent features are input into the multi-head attention layer of the target prediction model, and the latent features are linearly projected by each attention head to obtain the corresponding query vector, key vector and value vector. Calculate the scaled dot product attention based on the query vector, the key vector, and the value vector to obtain the output features of the attention head; The output features of the attention head are concatenated and subjected to a linear transformation to obtain attention-weighted features.

7. A power metering data quality assessment device, characterized in that, The device includes: The extraction module is used to extract multi-dimensional features from the real-time power metering data collected from the power metering system to obtain multi-dimensional feature vectors. The input module is used to input the multidimensional feature vector into the target prediction model for inference to obtain the predicted power metering value; The determination module is used to determine the current deviation of the power metering system based on the real-time power metering data and the predicted power metering value; The determining module is further configured to determine the dynamic reliability score of the power metering system based on the current deviation, and to perform a quality assessment of the power metering data based on the dynamic reliability score; The determining module is further configured to calculate the prediction residual based on the real-time power metering value and the predicted power metering value in the real-time power metering data; obtain historical residual data of the power metering system; and calculate the current deviation of the power metering system based on the historical residual data and the prediction residual.

8. A power metering data quality assessment device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the power metering data quality assessment method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the power metering data quality assessment method as described in any one of claims 1 to 6.