Electric energy meter error verification method and device based on low power factor, and storage medium
Through federated training, the preset detection point prediction model analyzes various information of the electric energy meter, predicts the target detection point and performs error verification, which solves the accuracy and efficiency problems of the existing electric energy meter error verification method under low power factor conditions, and achieves for more efficient and accurate error detection.
Patent Information
- Application Number
- CN202411449680.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-21
AI Technical Summary
The existing electrical energy meter error verification methods are greatly affected by human subjective factors, resulting in low accuracy and low efficiency. Especially under low power factor conditions, the measurement error is significant.
The preset detection point prediction model based on federated training is used to predict the target detection point and its prediction error interval by comprehensively analyzing the pre-application scenario information of the measured electric energy meter, the electric energy meter attribute information, the calibration demand information and the equipment attribute information of the detection equipment. , and carry out error verification.
It improves the accuracy and efficiency of error calibration of electric energy meters, ensures that the error calibration results under low power factor conditions are more representative, and reduces the time of manual data review.
Smart Images

Figure CN119335465A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electric energy meter calibration, and in particular to an electric energy meter error calibration method, device and storage medium based on low power factor. Background Art
[0002] With the development of smart grid, the performance and accuracy of energy meter as the core equipment of energy measurement are directly related to the economic benefits of the power system and the electricity rights of users. With the use of various new energy equipment, the proportion of low power factor power consumption environment in the power grid has gradually increased, which puts forward new requirements for the metering ability of energy meter. Under different power factor conditions, the accuracy of energy meter may be affected, especially under low power factor conditions, the measurement error of energy meter is more significant.
[0003] At present, error calibration of electric energy meters is usually performed by manually selecting detection points. However, this error calibration method is greatly affected by human subjective factors, which may cause the selected detection points to not truly reflect the error of the electric energy meter, resulting in low accuracy of error calibration of the electric energy meter. At the same time, before manually determining the detection points, it is necessary to query previous experience data, resulting in low efficiency of error calibration. Summary of the invention
[0004] The present invention provides an electric energy meter error verification method, device and storage medium based on low power factor, which are mainly capable of improving the verification accuracy and verification efficiency of the electric energy meter error.
[0005] According to a first aspect of the present invention, there is provided an electric energy meter error detection method based on low power factor, comprising:
[0006] In response to an error detection signal of the electric energy meter under test at a low power factor, obtaining pre-application scenario information, electric energy meter attribute information, detection requirement information, and device attribute information of the electric energy meter under test;
[0007] Input the pre-application scenario information, electric energy meter attribute information, verification requirement information, and device attribute information into a preset detection point prediction model obtained through federated training to perform detection point prediction, and obtain a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point;
[0008] Control the electric energy meter under test to measure the electric energy data for the target detection point on the detection device to obtain the electric energy data to be detected, and control the standard electric energy meter to measure the electric energy data for the target detection point on the detection device to obtain the standard electric energy data;
[0009] Based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval, an error verification result of the electric energy meter under low power factor conditions is determined.
[0010] Optionally, before inputting the pre-application scenario information, the electric energy meter attribute information, the verification requirement information, and the device attribute information into a preset detection point prediction model to perform detection point prediction, and obtaining a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point, the method further includes:
[0011] Construct multiple preset initial detection point prediction models with the same model structure;
[0012] Acquire a sample data set, wherein the sample data set includes sample application scenario information of a sample electric energy meter, sample electric energy meter attribute information, sample calibration requirement information, sample device attribute information corresponding to a sample detection device, and an actual detection point of the sample electric energy meter for the sample detection device and an actual error interval corresponding to the actual detection point, wherein a detection error of the sample electric energy meter at the actual detection point is greater than detection errors of other detection points among the sample candidate detection points;
[0013] Based on the sample data set, each of the preset initial detection point prediction models is federated trained, and based on the training result, the preset detection point prediction model is determined.
[0014] Optionally, the performing federated training on each of the preset initial detection point prediction models based on the sample data set includes:
[0015] The sample data set is divided into multiple groups of training data, and the parameters of each of the preset initial detection point prediction models are optimized using the multiple groups of training data, wherein after each round of training, the federated model parameters of this round are determined as the model parameters of the next round based on the model parameters of each of the preset initial detection point prediction models after the current round of training, and the federated model parameters of this round determined after the last round of training are used as the ultimate federated model parameters; the preset initial detection point prediction model includes multiple parameter items, and the method of determining the federated model parameters includes:
[0016] Determine the weight coefficient corresponding to each parameter item, and based on each weight coefficient, perform weighted averaging on the model parameters corresponding to the same parameter item in each preset initial detection point prediction model after this round of training to obtain the current round federal model parameters corresponding to each parameter item.
[0017] Optionally, before performing federated training on each of the preset initial detection point prediction models based on the sample data set, the method further includes:
[0018] Determining the total number of model parameter items in the preset initial detection point prediction model, and determining the optimization ratio of the model parameter items of each of the preset initial detection point prediction models based on the prediction complexity of the target detection point;
[0019] Determine the model parameter item sequences corresponding to each of the preset initial detection point prediction models, and randomly generate the model parameter item update factor sequences corresponding to each of the preset initial detection point prediction models based on the model parameter item optimization ratio and the total number of model parameter items, wherein the number of elements in the model parameter item update factor sequence is the same as the number of parameter items in the model parameter item sequence, and each element in the model parameter item update factor sequence represents whether the parameters under the parameter item at the same position in the model parameter item sequence need to be optimized;
[0020] Based on the model parameter item sequence and its corresponding model parameter item update factor sequence, determining the target parameter item that needs to be optimized among the parameter items corresponding to each of the preset initial detection point prediction models;
[0021] The step of performing federated training on each of the preset initial detection point prediction models based on the sample data set includes:
[0022] Based on the sample data set and the target parameter items corresponding to each of the preset initial detection point prediction models, each of the preset initial detection point prediction models is federated trained to achieve parameter optimization of the preset initial detection point prediction model based on the target parameter items.
[0023] Optionally, determining the error verification result of the electric energy meter under the low power factor condition based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval includes:
[0024] Subtracting the electric energy data to be detected from the standard electric energy data to obtain an electric energy data difference;
[0025] Dividing the electric energy data difference by the standard electric energy data to obtain the electric energy data measurement error of the tested electric energy meter for the target detection point;
[0026] Determining whether the electric energy data measurement error is within the prediction error interval;
[0027] If the electric energy data measurement error is within the predicted error interval, it is determined that the error verification of the electric energy meter under the low power factor condition is qualified; otherwise, it is determined that the error verification of the electric energy meter under the low power factor condition is unqualified.
[0028] Optionally, the target detection point is a low power factor detection point, or a combination of the low power factor detection point and at least one of a current detection point, a voltage detection point, and a frequency detection point;
[0029] The step of determining the error verification result of the electric energy meter under the low power factor condition based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval includes:
[0030] In the case where the target detection point is a low power factor detection point, the electric energy data to be detected includes a current value to be detected, a voltage value to be detected, and a frequency value to be detected obtained by measuring the electric energy data of the low power factor detection point by the electric energy meter under test, the standard electric energy data includes a standard current value, a standard voltage value, and a standard frequency value obtained by measuring the electric energy data of the low power factor detection point by the standard electric energy meter, and the predicted error interval includes a predicted current error interval, a predicted voltage error interval, and a predicted frequency error interval;
[0031] Based on the current value to be detected and the standard current value, determine the current measurement error corresponding to the electric energy meter under test; if the current measurement error is within the predicted current error interval, determine that the current error verification of the electric energy meter under test under the low power factor condition is qualified; otherwise, determine that the current error verification of the electric energy meter under test under the low power factor condition is unqualified;
[0032] Based on the voltage value to be detected and the standard voltage value, determine the voltage measurement error corresponding to the electric energy meter under test; if the voltage measurement error is within the predicted voltage error interval, determine that the voltage error verification of the electric energy meter under test under the low power factor condition is qualified; otherwise, determine that the voltage error verification of the electric energy meter under test under the low power factor condition is unqualified;
[0033] Based on the frequency value to be detected and the standard frequency value, the frequency measurement error corresponding to the electric energy meter under test is determined. If the frequency measurement error is within the predicted frequency error interval, it is determined that the frequency error verification of the electric energy meter under test under low power factor conditions is qualified; otherwise, it is determined that the frequency error verification of the electric energy meter under test under low power factor conditions is unqualified.
[0034] Optionally, the pre-application scenario information, the electric energy meter attribute information, the calibration requirement information, and the device attribute information are input into a preset detection point prediction model to perform detection point prediction, and obtain a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point, including:
[0035] Determine a scenario feature vector corresponding to the pre-application scenario information, an attribute feature vector corresponding to the electric energy meter attribute information, a verification feature vector corresponding to the verification requirement information, and a device feature vector corresponding to the device attribute information;
[0036] Cross-processing the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a detection cross feature vector;
[0037] Inputting the detection cross feature vector into a preset detection point prediction model to perform detection point prediction, and obtaining a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point;
[0038] The cross-processing of the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a detection cross feature vector includes:
[0039] Performing feature-level cross processing on the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a feature cross vector;
[0040] Performing element-level cross processing on the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain an element cross vector;
[0041] Performing low-order cross processing on the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a low-order cross vector;
[0042] The feature cross vector, the element cross vector, and the low-order cross vector are horizontally spliced to obtain the detection cross feature vector.
[0043] According to a second aspect of the present invention, there is provided an electric energy meter error detection device based on low power factor, comprising:
[0044] An acquisition unit, configured to acquire, in response to an error detection signal of the electric energy meter under low power factor, pre-application scenario information of the electric energy meter under test, electric energy meter attribute information, detection requirement information, and device attribute information of a detection device;
[0045] A prediction unit, used for inputting the pre-application scenario information, the electric energy meter attribute information, the calibration requirement information, and the device attribute information into a preset detection point prediction model obtained through federated training to perform detection point prediction, and obtain a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point;
[0046] a measuring unit, configured to control the electric energy meter under test to measure electric energy data for the target detection point on the detection device to obtain the electric energy data to be detected, and to control the standard electric energy meter to measure electric energy data for the target detection point on the detection device to obtain standard electric energy data;
[0047] A determination unit is used to determine the error verification result of the electric energy meter under low power factor conditions based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval.
[0048] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for error detection of an electric energy meter with a low power factor.
[0049] According to a fourth aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the error detection method for an electric energy meter with a low power factor is implemented.
[0050] According to a method, device and storage medium for error calibration of electric energy meters based on low power factor provided by the present invention, compared with the current method of performing error calibration on electric energy meters by manually selecting detection points, the present invention uses a preset detection point prediction model obtained by federal training to comprehensively analyze the pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detected electric energy meter to predict the target detection point and the predicted error interval corresponding to the target detection point, so that the error calibration of the detected electric energy meter at the target detection point is more representative, and then the standard electric energy meter and the detected electric energy meter are used to measure the electric energy data on the detection device for the target detection point respectively, and finally the standard electric energy data measured by the standard electric energy meter and the detected electric energy meter are used to measure the electric energy data. The electric energy data to be tested and the predicted error interval obtained by the energy meter are used to perform error calibration on the tested electric energy meter under low power factor conditions. Therefore, a representative target detection point is determined by comprehensively analyzing all influencing factors that affect the selection of the target detection point (including pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detection equipment). This can improve the accuracy of determining the target detection point and ensure that the error calibration of the tested electric energy meter for the target detection point is more representative, that is, the error calibration result is more accurate. At the same time, using the model to predict the detection point can save the time of manually consulting the data to determine the detection point, thereby improving the efficiency of determining the target detection point, and then improving the efficiency of the error calibration of the electric energy meter. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0052] Figure 1 A flow chart of an electric energy meter error detection method based on low power factor provided by an embodiment of the present invention is shown;
[0053] Figure 2 Another flow chart of an electric energy meter error detection method based on low power factor provided by an embodiment of the present invention is shown;
[0054] Figure 3 A schematic structural diagram of an electric energy meter error detection device based on low power factor provided by an embodiment of the present invention is shown;
[0055] Figure 4 A schematic structural diagram of another electric energy meter error detection device based on low power factor provided by an embodiment of the present invention is shown;
[0056] Figure 5 A schematic diagram of the physical structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0057] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0058] At present, the method of manually selecting detection points to perform error calibration on electric energy meters is greatly affected by human subjective factors, resulting in low accuracy of error calibration of electric energy meters. At the same time, before manually determining the detection points, it is necessary to query previous experience data, resulting in low efficiency of error calibration.
[0059] In order to solve the above problems, an embodiment of the present invention provides an electric energy meter error detection method based on low power factor, such as Figure 1 As shown, the method includes:
[0060] 101. In response to an error calibration signal of a measured electric energy meter under a low power factor, obtain pre-application scenario information of the measured electric energy meter, electric energy meter attribute information, calibration requirement information, and device attribute information of a detection device.
[0061] Among them, low power factor means that the power factor is less than a preset threshold (the preset threshold is set according to actual needs), such as a power factor between 0-0.5; pre-application scenario information refers to the ambient temperature, humidity, rated current and rated voltage, electrical equipment attributes, electricity usage habits and other information around the expected installation location of the electric energy meter under test; electric energy meter attribute information refers to the basic specifications and type of the electric energy meter under test, such as the rated current, rated voltage, electric energy meter type, error characteristics (such as error changes under different load points, etc.) of the electric energy meter under test; calibration requirement information refers to the accuracy requirements, measurement range, and selected detection points of the electric energy meter under test, which should be representative and able to cover most of the measurement range and calibration specifications of the electric energy meter in actual use; equipment attribute information refers to the equipment type, specification parameters, etc. of the calibration equipment, and the calibration equipment refers to the equipment measured by the electric energy meter under test during error calibration.
[0062] For the embodiment of the present invention, when it is necessary to perform error calibration on the electric energy meter under low power factor, it is first necessary to obtain the pre-application scenario information, electric energy meter attribute information, calibration requirement information, device attribute information of the detection device, etc. of the electric energy meter under test, and then use the preset detection point prediction model to comprehensively analyze the pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detection device to determine the best detection point (target detection point) and its corresponding prediction error interval. The target detection point predicted by the preset detection point prediction model has the following characteristics: under low power factor, the electric energy meter error of the target detection point is not less than the error of other detection points under low power factor, and then the electric energy meter under test is error-calibrated at the target detection point to obtain the error calibration result of the electric energy meter under test. Therefore, using the preset detection point prediction model to comprehensively analyze the pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detection device to determine the best detection point can make the determined detection point more accurate and improve the efficiency of determining the best detection point, thereby improving the error calibration accuracy and error calibration efficiency of the electric energy meter.
[0063] 102. Input the pre-application scenario information, the electric energy meter attribute information, the calibration requirement information, and the equipment attribute information into the preset detection point prediction model obtained through federated training to perform detection point prediction, and obtain the target detection point of the electric energy meter under low power factor, and the prediction error interval corresponding to the target detection point.
[0064] The target detection point refers to the point where the error of the electric energy meter under test is greater than the calibration error of any other point. The target detection point can be any one of the current detection point, voltage detection point, power factor detection point, and frequency detection point.
[0065] For the embodiment of the present invention, a preset detection point prediction model is pre-trained by a federated training method, and then the preset detection point prediction model is used to perform a comprehensive analysis on the pre-application scenario information, the electric energy meter attribute information, the calibration requirement information, and the equipment attribute information to obtain the best detection point for error calibration of the electric energy meter, that is, the target detection point, and the predicted error interval corresponding to the target detection point. Finally, the electric energy meter under test is controlled to perform error calibration at the target detection point. Thus, a representative target detection point is determined by performing a comprehensive analysis on all influencing factors that affect the selection of the target detection point, which can improve the accuracy of determining the target detection point and ensure that the error calibration of the electric energy meter under test for the target detection point is more representative, that is, the error calibration result is more accurate. At the same time, using the model to predict the detection point can save the time of manually consulting the data to determine the detection point, thereby improving the efficiency of determining the target detection point, and further improving the efficiency of the error calibration of the electric energy meter.
[0066] 103. Control the electric energy meter under test to measure the electric energy data at the target detection point on the detection equipment to obtain the electric energy data to be detected, and control the standard electric energy meter to measure the electric energy data at the target detection point on the detection equipment to obtain the standard electric energy data.
[0067] Among them, standard electric energy meters refer to electric energy meters that meet the measurement accuracy requirements, can maintain stable measurement accuracy in long-term use, are not affected by environmental changes and the passage of time, and are designed and manufactured in accordance with relevant national or international standards and have been strictly calibrated; the electric energy data to be tested refers to
[0068] For the embodiments of the present invention, before performing error calibration on the electric energy meter under test, it is first necessary to ensure that the environmental conditions meet the temperature, humidity and other requirements required by the calibration procedures or calibration specifications, avoid the influence of external factors such as electromagnetic interference and vibration on the calibration results, and correctly connect the wires according to the diagram or instructions to ensure that the connection between the electric energy meter under test, the standard electric energy meter and the detection equipment is correct, set the low power factor of the detection equipment, and adjust the output voltage of the standard power source to the rated voltage of the electric energy meter under test according to the measurement limit of the electric energy meter under test. Under low power factor, if the target detection point is the current detection point under low power factor, the electric energy data to be detected is the predicted voltage and predicted frequency, the standard electric energy data is the predicted voltage and predicted frequency, and the predicted error interval corresponding to the current detection point is the predicted voltage error interval and the predicted frequency error interval. Then, the standard power source outputs voltage and frequency, so that the energy meter under test and the standard energy meter are measured at the same time. The energy data to be tested measured by the energy meter under test is the voltage to be tested and the frequency to be tested, and the standard energy data measured by the standard energy meter is the standard voltage and standard frequency. Then, according to the standard voltage, the voltage to be tested, and the voltage error interval, the voltage error of the energy meter under test is verified, and according to the standard frequency, the frequency to be tested, and the frequency error interval, the frequency error of the energy meter under test is verified. Therefore, by using the measurement data of the standard energy meter to verify the error of the energy meter under test, the reliability and accuracy of the verification results of the energy meter under test can be ensured.
[0069] 104. Based on the electric energy data to be tested, the standard electric energy data and the predicted error range, determine the error verification result of the electric energy meter under the condition of low power factor.
[0070] For an embodiment of the present invention, under a low power factor, after the electric energy meter under test and the standard electric energy meter are respectively controlled to measure the target detection point on the detection equipment to obtain the electric energy data to be detected and the standard electric energy data, it is necessary to determine the error verification result of the electric energy meter under the low power factor condition based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval. Based on this, step 104 specifically includes: subtracting the electric energy data to be detected from the standard electric energy data to obtain the electric energy data difference; dividing the electric energy data difference by the standard electric energy data to obtain the electric energy data measurement error of the electric energy meter under test for the target detection point; judging whether the electric energy data measurement error is within the predicted error interval; if the electric energy data measurement error is within the predicted error interval, it is determined that the error verification of the electric energy meter under test under the low power factor condition is qualified, otherwise, it is determined that the error verification of the electric energy meter under test under the low power factor condition is unqualified.
[0071] Specifically, the electric energy data measurement error is calculated according to the following formula:
[0072]
[0073] Where w is the measurement error of electric energy data, d j is the electric energy data to be detected, d b is standard electric energy data, and the electric energy data measurement error can be calculated according to the above formula. If the predicted error interval is 0A-0.9A, and the calculated electric energy data measurement error is 1.2A, then the error verification result of the electric energy meter under the low power factor condition is determined to be unqualified. If the electric energy data measurement error is 0.8A, then the error verification result of the electric energy meter under the low power factor condition is determined to be qualified. If the electric energy data measurement error is 0.9A, then the error verification result of the electric energy meter under the low power factor condition can also be determined to be qualified.
[0074] Therefore, by comprehensively analyzing all influencing factors that affect the selection of target detection points (including pre-application scenario information, electric energy meter attribute information, calibration requirement information, and equipment attribute information of the detection equipment) to determine representative target detection points, the accuracy of determining the target detection points can be improved, ensuring that the error calibration of the electric energy meter under test for the target detection point is more representative, that is, the error calibration result is more accurate. At the same time, using the model to predict the detection points can save time for manually consulting data to determine the detection points, thereby improving the efficiency of determining the target detection points, and then improving the efficiency of the error calibration of the electric energy meter.
[0075] According to a method for error calibration of electric energy meters based on low power factor provided by the present invention, compared with the current method of performing error calibration on electric energy meters by artificially selecting detection points, the present invention uses a preset detection point prediction model obtained by federal training to comprehensively analyze the pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detected electric energy meter, so as to predict the target detection point and the predicted error interval corresponding to the target detection point, so that the error calibration of the detected electric energy meter at the target detection point is more representative, and then the standard electric energy meter and the detected electric energy meter are used to measure the electric energy data on the detection device for the target detection point respectively, and finally the standard electric energy data measured by the standard electric energy meter and the measured electric energy meter are used to measure the electric energy data. The electric energy data to be tested and the predicted error interval are used to perform error calibration on the electric energy meter under low power factor conditions. Representative target detection points are determined by comprehensively analyzing all influencing factors that affect the selection of target detection points (including pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detection equipment). This can improve the accuracy of determining the target detection points and ensure that the error calibration of the electric energy meter under test for the target detection points is more representative, that is, the error calibration results are more accurate. At the same time, using the model to predict the detection points can save time for manually consulting data to determine the detection points, thereby improving the efficiency of determining the target detection points, and then improving the efficiency of the error calibration of the electric energy meter.
[0076] Further, in order to better illustrate the above process of detecting the error of the electric energy meter under low power factor, as a refinement and extension of the above embodiment, the embodiment of the present invention provides another method for detecting the error of the electric energy meter based on low power factor, such as Figure 2 As shown, the method includes:
[0077] 201. In response to an error calibration signal of a measured electric energy meter under a low power factor, obtain pre-application scenario information of the measured electric energy meter, electric energy meter attribute information, calibration requirement information, and device attribute information of a detection device.
[0078] Specifically, all information that affects the optimal detection point, such as pre-application scenario information of the tested electric energy meter, electric energy meter attribute information, calibration requirement information, and device attribute information of the detection device, can be obtained in the database or on-site measurement.
[0079] 202. Construct multiple preset initial detection point prediction models with the same model structure.
[0080] Specifically, the preset initial detection point prediction model can be constructed based on the neural network model. Different preset initial detection point prediction models are assigned to different clients. The server first sets the initial model parameters for the preset initial detection point prediction models under different clients. Each preset initial detection point prediction model contains multiple parameters.
[0081] 203. Obtain a sample data set, wherein the sample data set includes sample application scenario information of the sample electric energy meter, sample electric energy meter attribute information, sample calibration requirement information, sample device attribute information corresponding to the sample detection device, and the sample electric energy meter's actual detection point for the sample detection device and the actual error range corresponding to the actual detection point, wherein the detection error of the sample electric energy meter at the actual detection point is greater than the detection errors of other detection points among the sample selected detection points.
[0082] Among them, the sample pre-application scenario information refers to the ambient temperature, humidity, rated current and rated voltage, electrical equipment attributes, electricity usage habits and other information around the installation location of the sample electricity meter; the sample electricity meter attribute information refers to the basic specifications and types of the sample electricity meter, such as the rated current, rated voltage, meter type, error characteristics (such as error changes under different load points, etc.) of the sample electricity meter; the sample calibration requirement information refers to the accuracy requirements, measurement range, and selected detection points of the sample electricity meter, which should be representative and able to cover most of the measurement range and calibration specifications of the electricity meter in actual use; the sample equipment attribute information refers to the equipment type, specification parameters, etc. of the sample calibration equipment.
[0083] 204. Based on the sample data set, each preset initial detection point prediction model is federated trained, and based on the training result, a preset detection point prediction model is determined.
[0084] For the embodiment of the present invention, after obtaining the sample data set, it is necessary to use the sample data set to perform federated training on each preset initial detection point prediction model. Since each preset initial detection point prediction model contains multiple parameter items, model training is to optimize the model parameters. Therefore, before model training, it is first necessary to determine the target parameter items that need to be optimized in each preset initial detection point prediction model. Based on this, the method includes: determining the total number of model parameter items in the preset initial detection point prediction model, and based on the prediction complexity of the target detection point, determining the model parameter item optimization ratio of each preset initial detection point prediction model; determining each preset initial detection point prediction model The model parameter item sequences corresponding to the preset initial detection point prediction models are respectively generated, and based on the model parameter item optimization ratio and the total number of model parameter items, the model parameter item update factor sequences corresponding to the preset initial detection point prediction models are randomly generated, wherein the number of elements in the model parameter item update factor sequence is the same as the number of parameter items in the model parameter item sequence, and each element in the model parameter item update factor sequence represents whether the parameters under the parameter items at the same position in the model parameter item sequence need to be optimized; based on the model parameter item sequence and its corresponding model parameter item update factor sequence, the target parameter items that need to be optimized are determined in the parameter items corresponding to the preset initial detection point prediction models.
[0085] Specifically, first, according to the prediction complexity of the target detection point, the server sets the model parameter item optimization ratio of each preset initial detection point prediction model. For example, if the prediction complexity of the target detection point is high, the model parameter item optimization ratio needs to be set higher. If the prediction complexity of the target detection point is low, the model parameter item optimization ratio can be set lower. Then, the server randomly generates a set of random sequences (model parameter item update factor sequence) for each client according to the set model parameter item optimization ratio. The model parameter item update factor sequence corresponding to each client may be the same or different. The update factor sequence can be made to consist of only 0 and 1 (0 represents that the parameters under the corresponding model parameter item do not need to be updated, and 1 represents that the parameters under the corresponding model parameter item need to be updated). At the same time, the model parameter item sequences corresponding to the respective preset initial detection point prediction models are determined. The shape of the model parameter item update factor sequence is exactly the same as the model parameter item sequence, that is, the number of elements in the model parameter item update factor sequence is the same as the number of parameter items in the model parameter item sequence. Each element in the model parameter item update factor sequence represents whether the parameters under the parameter items at the same position in the model parameter item sequence need to be optimized. For example, the first element 0 in the model parameter item update factor sequence corresponds to the first parameter item W1 in the model parameter item update factor sequence. It means that the model parameters under parameter item W1 do not need to be optimized, and the second element 1 in the model parameter item update factor sequence corresponds to the second parameter item W2 in the model parameter item update factor sequence, which means that the model parameters under parameter item W2 need to be optimized. Therefore, according to the model parameter item sequence and its corresponding model parameter item update factor sequence, the target parameter items that need to be optimized can be determined in each parameter item corresponding to each preset initial detection point prediction model. Then, based on the sample data set and the target parameter items corresponding to each preset initial detection point prediction model, each preset initial detection point prediction model is federally trained to achieve parameter optimization of the preset initial detection point prediction model based on the target parameter items, thereby obtaining the preset detection point prediction model. Among them, the specific method of optimizing the model parameters under the target parameter items by using the federated training method includes: dividing the sample data set into multiple groups of training data, and using the multiple groups of training data to optimize the parameters of each of the preset initial detection point prediction models respectively, wherein after each round of training, the federal model parameters of this round are determined as the model parameters of the next round based on the model parameters of each of the preset initial detection point prediction models after the current round of training, and the federal model parameters of this round determined after the last round of training are used as the ultimate federal model parameters; the preset initial detection point prediction model includes multiple parameter items, and the method of determining the federal model parameters includes: determining the weight coefficient corresponding to each of the parameter items, and based on each of the weight coefficients, weighted averaging the model parameters corresponding to the same parameter item in each of the preset initial detection point prediction models after the current round of training to obtain the federal model parameters of this round corresponding to each of the parameter items.
[0086] Among them, the preset detection point prediction model is obtained through cooperation between the server and the client for training. When training the model, the client trains the model and updates the model parameters according to the parameters to be updated specified in the model parameter item update factor sequence. The server uses the weighted federal average formula to calculate the model parameters of each client to obtain the final model parameters, which are then configured as the preset detection point prediction model. Specifically, the number of models of the preset initial detection point prediction model can be set according to actual needs, and can also be set in the following manner: for example, the server randomly generates a random number of 0.5-1, the server obtains the total number of detections N, and obtains the total number to be extracted this time by calculating N×M and rounding up. The server then randomly extracts k numbers from all the total numbers, and the server establishes k clients so that each client corresponds to a preset initial detection point prediction model. The client initializes the local preset initial detection point prediction model using the default configuration, and at the same time determines which part of the client's own model parameter items needs to be updated (that is, the model parameters under the target parameter items need to be optimized and updated) according to the model parameter item update factor sequence issued by the server, that is, the parameters under the model parameter items corresponding to the character 1 in the model parameter item update factor sequence need to be updated and optimized, and the model parameters under the model parameter items corresponding to the character 0 in the model parameter item update factor sequence do not need to be updated and optimized. When the client optimizes the parameters that need to be optimized in the preset initial detection point prediction model, the sample data set is first divided into multiple groups of training data, and then the multiple groups of training data are used to optimize the model parameters under the target parameter items in the preset initial detection point prediction model corresponding to the client. For example, there are 3 preset initial detection point prediction models, which are respectively assigned to 3 clients, that is, client 1 corresponds to model 1, client 2 corresponds to model 2, and client 3 corresponds to model 3. The target parameter items that need to be updated in model 1 are parameter item a and parameter item b, and the target parameter items that need to be updated in model 2 are parameter item a and parameter item c. The target parameter items that need to be updated in model 3 are parameter items c and parameter items d. The training data is used to optimize the model parameters under parameter items a and b in model 1, and the training data is used to optimize the model parameters under parameter items a and c in model 2. The training data is used to optimize the model parameters under parameter items c and d in model 3. After this round of training, each client uploads the model parameters under each parameter item obtained in this round of training to the server. The server calculates the federated model parameters of this round based on the model parameters of each preset initial detection point prediction model obtained in this round of training using the following formula:
[0087]
[0088] Among them, w t+1is the federated model parameter of this round (t is 0, 1....n, representing the number of training rounds), k t is the total number of clients, or the total number of models of each preset initial detection point prediction model, k is the kth client, or the kth preset initial detection point prediction model, It is the model parameters under each parameter item in the preset initial detection point prediction model after this round of training uploaded by the client, n k is the weight coefficient corresponding to each parameter item, and n is the total number of parameter items. Thus, according to the above method, the federated model parameters under each parameter item calculated after the end of this round of training can be obtained. Then, the server re-sends the calculated federated model parameters under each parameter item to each client. Each client reconfigures the model parameters in the corresponding preset initial detection point prediction model using the federated model parameters under each parameter item, and continues to train and optimize the model parameters under the target parameter item in the preset initial detection point prediction model after the configuration parameters using the remaining training data to obtain the model parameters after this round of optimization, and uploads the model parameters after this round of optimization to the server. The server recalculates the federated model parameters of this round according to the calculation method of the above formula, and sends the model parameters of this round as the model parameters of the next round to the client to continue parameter optimization until all training data have parameterized the model training, and takes the federated model parameters of this round determined in the last round as the ultimate federated model parameters, and configures the preset initial detection point prediction model according to the ultimate federated model parameters, thereby obtaining the preset detection point prediction model. The advantages of training the model through federated training are as follows: the federated training method distributes the model training process on local devices, reduces the amount of data transmission between participants, and thus reduces communication overhead, which is particularly important for scenarios with limited network bandwidth, and can significantly reduce energy consumption and resource consumption; at the same time, the federated training method can use data on multiple local devices for model training, thereby expanding the data scale and improving the quality and accuracy of the model; the federated training method can also avoid model overfitting caused by problems such as data imbalance and data bias; federated learning distributes the model training process on multiple local devices, and even if a local device is attacked or stolen, the attacker cannot obtain the global model or the data of other participants, thereby enhancing the security of the data and ensuring the stable progress of model training. Furthermore, the embodiment of the present invention determines the model parameter update ratio according to the prediction complexity of the target detection point, which can avoid wasting resources by optimizing too many parameter items, and can also avoid the problem of low model accuracy caused by optimizing too few parameter items.
[0089] 205. Input the pre-application scenario information, the electric energy meter attribute information, the calibration requirement information, and the equipment attribute information into the preset detection point prediction model obtained through the federated training to perform detection point prediction, and obtain the target detection point of the electric energy meter under low power factor, and the prediction error interval corresponding to the target detection point.
[0090] For the embodiment of the present invention, after constructing a preset detection point prediction model with high accuracy, it is necessary to use the preset detection point prediction model to predict the target detection point of the measured electric energy meter under low power factor, and the prediction error interval corresponding to the target detection point. Based on this, step 205 specifically includes: determining the scene feature vector corresponding to the pre-application scenario information, the attribute feature vector corresponding to the electric energy meter attribute information, the verification feature vector corresponding to the verification requirement information, and the device feature vector corresponding to the device attribute information; cross-processing the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a detection cross feature vector; inputting the detection cross feature vector into the preset detection point prediction model to perform detection point prediction, and obtaining the target detection point of the measured electric energy meter under low power factor. A target detection point and a prediction error interval corresponding to the target detection point; wherein, the cross-processing of the scene feature vector, the attribute feature vector, the verification feature vector and the device feature vector to obtain a detection cross-feature vector comprises: performing feature-level cross-processing on the scene feature vector, the attribute feature vector, the verification feature vector and the device feature vector to obtain a feature cross-feature vector; performing element-level cross-processing on the scene feature vector, the attribute feature vector, the verification feature vector and the device feature vector to obtain an element cross-feature vector; performing low-order cross-processing on the scene feature vector, the attribute feature vector, the verification feature vector and the device feature vector to obtain a low-order cross-feature vector; horizontally splicing the feature cross-feature vector, the element cross-feature vector and the low-order cross-feature vector to obtain the detection cross-feature vector.
[0091] Specifically, word embedding and other methods are used to respectively determine the scene feature vector corresponding to the pre-application scenario information, the attribute feature vector corresponding to the electric energy meter attribute information, the verification feature vector corresponding to the verification requirement information, and the device feature vector corresponding to the device attribute information. Then, in order to make full use of the relationship between the data, extract more implicit features, and take into account both high-order and low-order processing, so that the data can be used more fully and the prediction results obtained later are more accurate to meet the needs of the actual application scenarios, it is necessary to cross-process the scene feature vector, attribute feature vector, verification feature vector, and device feature vector. The specific cross-processing method is as follows: if the scene feature vector is (a1, a2), the attribute feature vector is (b1, b2), the verification feature vector is (c1, c2), and the device feature vector is (d1, d2), the specific cross-processing method includes: feature-level crossover between different feature vectors, that is, after taking the Hadamard product of all elements between the vectors, under certain weights Then perform convolution transformation again to obtain the feature cross vector f(w*(a1*b1*c1*d1,a2*b2*c2*d2,a3*b3*c3*d3)); at the same time, perform element-level crossover on all feature vector data, that is, after performing Hadamard product on each element between vectors, assign different weight values to the results after each product, and then perform linear transformation, and the obtained element cross vector is f(w1*a1*b1*c1*d1,w2*a2*b2*c2*d2,w3*a3*b3*c3*d3); in addition, perform low-order cross processing on all feature vectors, assign weight coefficients to the results after cross processing, and then perform linear transformation, and the obtained low-order cross vector is f(w2(a1,a2,b1,b2,c1,c2,d1,d2)); finally, combine the above feature cross vectors, element cross vectors, and low-order cross vectors together, such as horizontal splicing, to obtain the detection cross feature vector. It should be noted that the above examples are only illustrative and do not limit the embodiments of the present application. Thus, by cross-processing the scene feature vector, attribute feature vector, verification feature vector, and device feature vector, different features can be automatically or explicitly combined to generate new feature combinations. These combined features may contain complex nonlinear relationships between the original features, so that the model can capture more detailed and rich information in the data, that is, it can make full use of the relationship between various data, extract more implicit features, and take into account both high-order and low-order processing, so that data utilization is more sufficient, and the error verification results of the electric energy meter obtained later are more accurate, meeting the needs of actual application scenarios.
[0092] 206. Control the electric energy meter under test to measure the electric energy data at the target detection point on the detection equipment to obtain the electric energy data to be detected, and control the standard electric energy meter to measure the electric energy data at the target detection point on the detection equipment to obtain the standard electric energy data.
[0093] 207. Based on the electric energy data to be tested, the standard electric energy data and the predicted error range, the error verification result of the electric energy meter under the condition of low power factor is determined.
[0094] The target detection point is a low power factor detection point, or a combination of a low power factor detection point and at least one of a current detection point, a voltage detection point, and a frequency detection point.
[0095] For the embodiment of the present invention, in order to determine the error verification result of the electric energy meter under the condition of low power factor, step 207 specifically includes: when the target detection point is a low power factor detection point, the electric energy data to be detected includes the current value to be detected, the voltage value to be detected, and the frequency value to be detected obtained by measuring the electric energy data of the electric energy meter under test for the low power factor detection point, the standard electric energy data includes the standard current value, standard voltage value, and standard frequency value obtained by measuring the electric energy data of the standard electric energy meter for the low power factor detection point, and the predicted error interval includes the predicted current error interval, the predicted voltage error interval, and the predicted frequency error interval; based on the current value to be detected and the standard current value, determine the current measurement error corresponding to the electric energy meter under test; if the current measurement error is within the predicted current error interval, determine the electric energy under test. The current error verification of the measured electric energy meter under low power factor conditions is qualified, otherwise, the current error verification of the measured electric energy meter under low power factor conditions is determined to be unqualified; based on the voltage value to be detected and the standard voltage value, the voltage measurement error corresponding to the measured electric energy meter is determined, if the voltage measurement error is within the predicted voltage error interval, the voltage error verification of the measured electric energy meter under low power factor conditions is determined to be qualified, otherwise, the voltage error verification of the measured electric energy meter under low power factor conditions is determined to be unqualified; based on the frequency value to be detected and the standard frequency value, the frequency measurement error corresponding to the measured electric energy meter is determined, if the frequency measurement error is within the predicted frequency error interval, the frequency error verification of the measured electric energy meter under low power factor conditions is determined to be qualified, otherwise, the frequency error verification of the measured electric energy meter under low power factor conditions is determined to be unqualified.
[0096] Specifically, for example, the current level I tr 、10I tr ,I maxThere are 3 gears in total, including low power factor 1.0, 0.5L, and 0.8C. The current gear and the low power factor gear are combined in pairs, totaling 9 calibration points. The model can determine the target detection point among these 9 detection points, and then use the tested electric energy meter and the standard electric energy meter to measure the voltage, frequency and other electric energy data at the target detection point respectively. Based on the measured data, the measurement error of the tested electric energy meter is calculated, and the measurement error is compared with the error range predicted by the model to determine the error calibration result of the tested electric energy meter. For another example, the target detection point predicted by the preset detection point prediction model is the target detection point with a low power factor of 0.22L, that is, the error of the measured electric energy meter is the largest under the low power factor. The preset detection point prediction model also predicts that the current error interval under the target detection point is ±2.7%, the voltage error interval is ±2.5%, and the frequency error interval is ±2.0%. Then, the measured electric energy meter and the standard electric energy meter are respectively controlled to perform voltage measurement, current measurement and frequency measurement on the detection equipment for the target detection point. According to the voltage values respectively measured by the measured electric energy meter and the standard electric energy meter, the voltage measurement error of the measured electric energy meter is calculated. Based on the current values respectively measured by the measured electric energy meter and the standard electric energy meter, the current measurement error of the measured electric energy meter is calculated. Based on the frequency values respectively measured by the measured electric energy meter and the standard electric energy meter, the frequency measurement error of the measured electric energy meter is calculated. Then, the voltage measurement error, the current measurement error and the frequency measurement error are respectively compared with their corresponding error intervals. If they are within the error interval, the error verification result is determined to be qualified. Otherwise, the error verification result is determined to be unqualified.
[0097] Therefore, by comprehensively analyzing all influencing factors that affect the selection of target detection points (including pre-application scenario information, electric energy meter attribute information, calibration requirement information, and equipment attribute information of the detection equipment) to determine representative target detection points, the accuracy of determining the target detection points can be improved, ensuring that the error calibration of the electric energy meter under test for the target detection point is more representative, that is, the error calibration result is more accurate. At the same time, using the model to predict the detection points can save time for manually consulting data to determine the detection points, thereby improving the efficiency of determining the target detection points, and then improving the efficiency of the error calibration of the electric energy meter.
[0098] According to another method for error calibration of electric energy meters based on low power factor provided by the present invention, compared with the current method of performing error calibration on electric energy meters by artificially selecting detection points, the present invention uses a preset detection point prediction model obtained by federal training to comprehensively analyze the pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detected electric energy meter to predict the target detection point and the predicted error interval corresponding to the target detection point, so that the error calibration of the detected electric energy meter at the target detection point is more representative, and then the standard electric energy meter and the detected electric energy meter are used to measure the electric energy data on the detection device for the target detection point respectively, and finally the standard electric energy data measured by the standard electric energy meter and the measured electric energy meter are used to measure the electric energy data. The electric energy data to be tested and the predicted error interval are used to perform error calibration on the electric energy meter under low power factor conditions. Representative target detection points are determined by comprehensively analyzing all influencing factors that affect the selection of target detection points (including pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detection equipment). This can improve the accuracy of determining the target detection points and ensure that the error calibration of the electric energy meter under test for the target detection points is more representative, that is, the error calibration results are more accurate. At the same time, using the model to predict the detection points can save time for manually consulting data to determine the detection points, thereby improving the efficiency of determining the target detection points, and then improving the efficiency of the error calibration of the electric energy meter.
[0099] Further, as Figure 1 In the specific implementation of the present invention, an embodiment of the present invention provides an electric energy meter error detection device based on low power factor, such as Figure 3 As shown, the device includes: an acquisition unit 31, a prediction unit 32, a measurement unit 33, and a determination unit 34.
[0100] The acquisition unit 31 can be used to obtain pre-application scenario information, meter attribute information, calibration requirement information, and device attribute information of the tested electric energy meter in response to an error detection signal of the tested electric energy meter under low power factor.
[0101] The prediction unit 32 can be used to input the pre-application scenario information, electric energy meter attribute information, calibration requirement information, and equipment attribute information into a preset detection point prediction model obtained through federal training to perform detection point prediction, and obtain the target detection point of the tested electric energy meter under low power factor, and the prediction error interval corresponding to the target detection point.
[0102] The measuring unit 33 can be used to control the electric energy meter under test to measure the electric energy data for the target detection point on the detection device to obtain the electric energy data to be detected, and control the standard electric energy meter to measure the electric energy data for the target detection point on the detection device to obtain the standard electric energy data.
[0103] The determination unit 34 may be configured to determine an error verification result of the electric energy meter under low power factor conditions based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval.
[0104] In specific application scenarios, in order to build a preset detection point prediction model, such as Figure 4 As shown, the device further includes: a construction unit 35 and a training unit 36.
[0105] The construction unit 35 may be used to construct a plurality of preset initial detection point prediction models having the same model structure.
[0106] The acquisition unit 31 can also be used to acquire a sample data set, wherein the sample data set includes sample application scenario information of the sample electric energy meter, sample electric energy meter attribute information, sample calibration requirement information, sample device attribute information corresponding to the sample detection device, and the sample electric energy meter for the actual detection point of the sample detection device and the actual error interval corresponding to the actual detection point, and the detection error of the sample electric energy meter at the actual detection point is greater than the detection errors of the remaining detection points among the sample selected detection points.
[0107] The training unit 36 may be configured to perform federated training on each of the preset initial detection point prediction models based on the sample data set, and determine the preset detection point prediction model based on the training result.
[0108] In a specific application scenario, in order to perform federal training on each preset initial detection point prediction model, the training unit 36 includes a parameter optimization module 361 and a weighted average module 362 .
[0109] The parameter optimization module 361 can be used to divide the sample data set into multiple groups of training data, and use the multiple groups of training data to optimize the parameters of each of the preset initial detection point prediction models, wherein after each round of training, the federal model parameters of this round are determined as the model parameters of the next round based on the model parameters of each of the preset initial detection point prediction models after the current round of training, and the federal model parameters of this round determined after the last round of training are used as the ultimate federal model parameters; the preset initial detection point prediction model includes multiple parameter items.
[0110] The weighted average module 362 can be used to determine the federal model parameters, wherein the method of determining the federal model parameters includes: determining the weight coefficient corresponding to each of the parameter items, and based on each of the weight coefficients, weighted averaging the model parameters corresponding to the same parameter item in each of the preset initial detection point prediction models after this round of training to obtain the federal model parameters of this round corresponding to each of the parameter items.
[0111] In a specific application scenario, in order to determine the target parameter items that need to be optimized among the parameter items corresponding to each preset initial detection point prediction model, the determination unit 34 can also be used to determine the total number of model parameter items in the preset initial detection point prediction model, and based on the prediction complexity of the target detection point, determine the optimization ratio of the model parameter items of each preset initial detection point prediction model.
[0112] The determination unit 34 can also be used to determine the model parameter item sequences corresponding to each of the preset initial detection point prediction models, and randomly generate the model parameter item update factor sequences corresponding to each of the preset initial detection point prediction models based on the model parameter item optimization ratio and the total number of model parameter items, wherein the number of elements in the model parameter item update factor sequence is the same as the number of parameter items in the model parameter item sequence, and each element in the model parameter item update factor sequence represents whether the parameters under the parameter items at the same position in the model parameter item sequence need to be optimized.
[0113] The determination unit 34 may also be configured to determine a target parameter item that needs to be optimized among the parameter items corresponding to each of the preset initial detection point prediction models based on the model parameter item sequence and its corresponding model parameter item update factor sequence.
[0114] The training unit 36 can also be used to perform federal training on each of the preset initial detection point prediction models based on the sample data set and the target parameter items corresponding to each of the preset initial detection point prediction models, so as to achieve parameter optimization of the preset initial detection point prediction models based on the target parameter items.
[0115] In a specific application scenario, in order to determine the error verification result of the electric energy meter under the condition of low power factor, the determination unit 34 includes a subtraction module 341 , a division module 342 , a judgment module 343 , and a determination module 344 .
[0116] The subtraction module 341 may be used to subtract the electric energy data to be detected from the standard electric energy data to obtain an electric energy data difference.
[0117] The division module 342 may be used to divide the electric energy data difference value by the standard electric energy data to obtain the electric energy data measurement error of the tested electric energy meter for the target detection point.
[0118] The determination module 343 may be used to determine whether the electric energy data measurement error is within the prediction error interval.
[0119] The determination module 344 may be used to determine that the error verification of the electric energy meter under low power factor conditions is qualified if the electric energy data measurement error is within the predicted error interval; otherwise, determine that the error verification of the electric energy meter under low power factor conditions is unqualified.
[0120] In a specific application scenario, the target detection point is a low power factor detection point, or a combination of the low power factor detection point and at least one of a current detection point, a voltage detection point, and a frequency detection point; in order to determine the error verification result of the electric energy meter under test under low power factor conditions, the determination unit 34 can be specifically used for the case where the target detection point is a low power factor detection point, the electric energy data to be detected includes the current value to be detected, the voltage value to be detected, and the frequency value to be detected obtained by measuring the electric energy data of the electric energy meter under test for the low power factor detection point, the standard electric energy data includes the standard current value, the standard voltage value, and the standard frequency value obtained by measuring the electric energy data of the standard electric energy meter for the low power factor detection point, and the predicted error interval includes the predicted current error interval, the predicted voltage error interval, and the predicted frequency error interval; based on the current value to be detected and the standard current value, determine the current measurement error corresponding to the electric energy meter under test If the current measurement error is within the predicted current error interval, the current error verification of the measured electric energy meter under low power factor conditions is determined to be qualified; otherwise, the current error verification of the measured electric energy meter under low power factor conditions is determined to be unqualified; based on the voltage value to be detected and the standard voltage value, the voltage measurement error corresponding to the measured electric energy meter is determined; if the voltage measurement error is within the predicted voltage error interval, the voltage error verification of the measured electric energy meter under low power factor conditions is determined to be qualified; otherwise, the voltage error verification of the measured electric energy meter under low power factor conditions is determined to be unqualified; based on the frequency value to be detected and the standard frequency value, the frequency measurement error corresponding to the measured electric energy meter is determined; if the frequency measurement error is within the predicted frequency error interval, the frequency error verification of the measured electric energy meter under low power factor conditions is determined to be qualified; otherwise, the frequency error verification of the measured electric energy meter under low power factor conditions is determined to be unqualified.
[0121] In a specific application scenario, in order to determine the target detection point of the electric energy meter under test at a low power factor and its corresponding prediction error interval, the prediction unit 32 includes a determination module 321 , a feature intersection module 322 , and a prediction module 323 .
[0122] The determination module 321 can be used to determine the scenario feature vector corresponding to the pre-application scenario information, the attribute feature vector corresponding to the electric energy meter attribute information, the verification feature vector corresponding to the verification requirement information, and the device feature vector corresponding to the device attribute information.
[0123] The feature cross module 322 may be used to perform cross processing on the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a detection cross feature vector.
[0124] The prediction module 323 can be used to input the detection cross feature vector into a preset detection point prediction model to perform detection point prediction, thereby obtaining the target detection point of the tested electric energy meter under low power factor and the prediction error interval corresponding to the target detection point.
[0125] In a specific application scenario, in order to cross-process the scene feature vector, attribute feature vector, verification feature vector, and device feature vector, the feature cross module 322 can be specifically used to perform feature-level cross-processing on the scene feature vector, attribute feature vector, verification feature vector, and device feature vector to obtain a feature cross-vector; perform element-level cross-processing on the scene feature vector, attribute feature vector, verification feature vector, and device feature vector to obtain an element cross-vector; perform low-order cross-processing on the scene feature vector, attribute feature vector, verification feature vector, and device feature vector to obtain a low-order cross-vector; horizontally splice the feature cross-vector, element cross-vector, and low-order cross-vector to obtain the detection cross-feature vector.
[0126] It should be noted that for other corresponding descriptions of the functional modules involved in the low power factor based electric energy meter error detection device provided in the embodiment of the present invention, reference can be made to Figure 1 The corresponding description of the method shown will not be repeated here.
[0127] Based on the above Figure 1The method shown, accordingly, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented: in response to an error verification signal of a tested electric energy meter under a low power factor, pre-application scenario information, electric energy meter attribute information, verification requirement information, and device attribute information of the tested electric energy meter are obtained; the pre-application scenario information, electric energy meter attribute information, verification requirement information, and device attribute information are input into a preset detection point prediction model obtained through federated training to perform detection point prediction, and obtain a target detection point of the tested electric energy meter under a low power factor, and a prediction error interval corresponding to the target detection point; the tested electric energy meter is controlled to measure electric energy data on the detection device for the target detection point to obtain electric energy data to be detected, and the standard electric energy meter is controlled to measure electric energy data on the detection device for the target detection point to obtain standard electric energy data; based on the electric energy data to be detected, the standard electric energy data, and the prediction error interval, the error verification result of the tested electric energy meter under low power factor conditions is determined.
[0128] Based on the above Figure 1 The method shown and Figure 3 The embodiment of the device shown in the figure, the embodiment of the present invention also provides a physical structure diagram of a computer device, such as Figure 5 As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43 and the processor 41 implements the following steps when executing the program: in response to an error detection signal of the electric energy meter under low power factor, obtaining pre-application scenario information, electric energy meter attribute information, detection requirement information, and device attribute information of the electric energy meter under test; inputting the pre-application scenario information, electric energy meter attribute information, detection requirement information, and device attribute information of the detection device into the error detection signal of the electric energy meter under low power factor; and Detection point prediction is performed in a preset detection point prediction model to obtain the target detection point of the tested electric energy meter under low power factor and the prediction error interval corresponding to the target detection point; the tested electric energy meter is controlled to measure electric energy data on the detection device for the target detection point to obtain the electric energy data to be detected, and the standard electric energy meter is controlled to measure electric energy data on the detection device for the target detection point to obtain the standard electric energy data; based on the electric energy data to be detected, the standard electric energy data and the prediction error interval, the error verification result of the tested electric energy meter under low power factor conditions is determined.
[0129] Through the technical solution of the present invention, the present invention uses a preset detection point prediction model obtained through federated training to comprehensively analyze the pre-application scenario information of the tested electric energy meter, the electric energy meter attribute information, the calibration requirement information, and the equipment attribute information of the detection equipment to predict the target detection point and the prediction error interval corresponding to the target detection point, so that the error calibration of the tested electric energy meter at the target detection point is more representative, and then the standard electric energy meter and the tested electric energy meter are used to measure the electric energy data on the detection equipment for the target detection point respectively, and finally the tested electric energy meter is measured according to the standard electric energy data measured by the standard electric energy meter and the electric energy data to be detected measured by the tested electric energy meter and the prediction error interval. The electric energy meter performs error calibration under low power factor conditions, thereby determining representative target detection points through a comprehensive analysis of all influencing factors that affect the selection of target detection points (including pre-application scenario information, electric energy meter attribute information, calibration requirement information, and device attribute information of the detection equipment). This can improve the accuracy of determining the target detection points and ensure that the error calibration of the electric energy meter under test for the target detection point is more representative, that is, the error calibration result is more accurate. At the same time, using the model to predict the detection point can save the time of manually consulting the data to determine the detection point, thereby improving the efficiency of determining the target detection point, and then improving the efficiency of the error calibration of the electric energy meter.
[0130] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0131] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for error verification of electric energy meter based on low power factor, characterized in that: include: In response to an error detection signal of the electric energy meter under test at a low power factor, obtaining pre-application scenario information, electric energy meter attribute information, detection requirement information, and device attribute information of the electric energy meter under test; Input the pre-application scenario information, electric energy meter attribute information, verification requirement information, and device attribute information into a preset detection point prediction model obtained through federated training to perform detection point prediction, and obtain a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point; Control the electric energy meter under test to measure the electric energy data for the target detection point on the detection device to obtain the electric energy data to be detected, and control the standard electric energy meter to measure the electric energy data for the target detection point on the detection device to obtain the standard electric energy data; Based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval, an error verification result of the electric energy meter under low power factor conditions is determined.
2. The method according to claim 1, characterized in that Before inputting the pre-application scenario information, the electric energy meter attribute information, the verification requirement information, and the device attribute information into a preset detection point prediction model to perform detection point prediction, and obtaining a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point, the method further includes: Construct multiple preset initial detection point prediction models with the same model structure; Acquire a sample data set, wherein the sample data set includes sample application scenario information of a sample electric energy meter, sample electric energy meter attribute information, sample calibration requirement information, sample device attribute information corresponding to a sample detection device, and an actual detection point of the sample electric energy meter for the sample detection device and an actual error interval corresponding to the actual detection point, wherein a detection error of the sample electric energy meter at the actual detection point is greater than detection errors of other detection points among the sample candidate detection points; Based on the sample data set, each of the preset initial detection point prediction models is federated trained, and based on the training result, the preset detection point prediction model is determined.
3. The method according to claim 2, characterized in that The step of performing federated training on each of the preset initial detection point prediction models based on the sample data set includes: The sample data set is divided into multiple groups of training data, and the parameters of each of the preset initial detection point prediction models are optimized using the multiple groups of training data, wherein after each round of training, the federated model parameters of this round are determined as the model parameters of the next round based on the model parameters of each of the preset initial detection point prediction models after the current round of training, and the federated model parameters of this round determined after the last round of training are used as the ultimate federated model parameters; the preset initial detection point prediction model includes multiple parameter items, and the method of determining the federated model parameters includes: Determine the weight coefficient corresponding to each parameter item, and based on each weight coefficient, perform weighted averaging on the model parameters corresponding to the same parameter item in each preset initial detection point prediction model after this round of training to obtain the current round federal model parameters corresponding to each parameter item.
4. The method according to claim 2, characterized in that: Before performing federated training on each of the preset initial detection point prediction models based on the sample data set, the method further includes: Determining the total number of model parameter items in the preset initial detection point prediction model, and determining the optimization ratio of the model parameter items of each of the preset initial detection point prediction models based on the prediction complexity of the target detection point; Determine the model parameter item sequences corresponding to each of the preset initial detection point prediction models, and randomly generate the model parameter item update factor sequences corresponding to each of the preset initial detection point prediction models based on the model parameter item optimization ratio and the total number of model parameter items, wherein the number of elements in the model parameter item update factor sequence is the same as the number of parameter items in the model parameter item sequence, and each element in the model parameter item update factor sequence represents whether the parameters under the parameter item at the same position in the model parameter item sequence need to be optimized; Based on the model parameter item sequence and its corresponding model parameter item update factor sequence, determining the target parameter item that needs to be optimized among the parameter items corresponding to each of the preset initial detection point prediction models; The step of performing federated training on each of the preset initial detection point prediction models based on the sample data set includes: Based on the sample data set and the target parameter items corresponding to each of the preset initial detection point prediction models, each of the preset initial detection point prediction models is federated trained to achieve parameter optimization of the preset initial detection point prediction model based on the target parameter items.
5. The method according to claim 1, characterized in that: The step of determining the error verification result of the electric energy meter under the low power factor condition based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval includes: Subtracting the electric energy data to be detected from the standard electric energy data to obtain an electric energy data difference; Dividing the electric energy data difference by the standard electric energy data to obtain the electric energy data measurement error of the tested electric energy meter for the target detection point; Determining whether the electric energy data measurement error is within the prediction error interval; If the electric energy data measurement error is within the predicted error interval, it is determined that the error verification of the electric energy meter under the low power factor condition is qualified; otherwise, it is determined that the error verification of the electric energy meter under the low power factor condition is unqualified.
6. The method according to claim 1, characterized in that The target detection point is a low power factor detection point, or a combination of the low power factor detection point and at least one of a current detection point, a voltage detection point, and a frequency detection point; The step of determining the error verification result of the electric energy meter under the low power factor condition based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval includes: In the case where the target detection point is a low power factor detection point, the electric energy data to be detected includes a current value to be detected, a voltage value to be detected, and a frequency value to be detected obtained by measuring the electric energy data of the low power factor detection point by the electric energy meter under test, the standard electric energy data includes a standard current value, a standard voltage value, and a standard frequency value obtained by measuring the electric energy data of the low power factor detection point by the standard electric energy meter, and the predicted error interval includes a predicted current error interval, a predicted voltage error interval, and a predicted frequency error interval; Based on the current value to be detected and the standard current value, determine the current measurement error corresponding to the electric energy meter under test; if the current measurement error is within the predicted current error interval, determine that the current error verification of the electric energy meter under test under the low power factor condition is qualified; otherwise, determine that the current error verification of the electric energy meter under test under the low power factor condition is unqualified; Based on the voltage value to be detected and the standard voltage value, determine the voltage measurement error corresponding to the electric energy meter under test; if the voltage measurement error is within the predicted voltage error interval, determine that the voltage error verification of the electric energy meter under test under the low power factor condition is qualified; otherwise, determine that the voltage error verification of the electric energy meter under test under the low power factor condition is unqualified; Based on the frequency value to be detected and the standard frequency value, the frequency measurement error corresponding to the electric energy meter under test is determined. If the frequency measurement error is within the predicted frequency error interval, it is determined that the frequency error verification of the electric energy meter under test under low power factor conditions is qualified; otherwise, it is determined that the frequency error verification of the electric energy meter under test under low power factor conditions is unqualified.
7. The method according to claim 1, characterized in that The pre-application scenario information, the electric energy meter attribute information, the verification requirement information, and the device attribute information are input into a preset detection point prediction model to perform detection point prediction, and obtain the target detection point of the electric energy meter under low power factor, and the prediction error interval corresponding to the target detection point, including: Determine a scenario feature vector corresponding to the pre-application scenario information, an attribute feature vector corresponding to the electric energy meter attribute information, a verification feature vector corresponding to the verification requirement information, and a device feature vector corresponding to the device attribute information; Cross-processing the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a detection cross feature vector; Inputting the detection cross feature vector into a preset detection point prediction model to perform detection point prediction, and obtaining a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point; The cross-processing of the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a detection cross feature vector includes: Performing feature-level cross processing on the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a feature cross vector; Performing element-level cross processing on the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain an element cross vector; Performing low-order cross processing on the scene feature vector, the attribute feature vector, the verification feature vector, and the device feature vector to obtain a low-order cross vector; The feature cross vector, the element cross vector, and the low-order cross vector are horizontally spliced to obtain the detection cross feature vector.
8. An electric energy meter error detection device based on low power factor, characterized in that: include: An acquisition unit, configured to acquire, in response to an error detection signal of the electric energy meter under low power factor, pre-application scenario information of the electric energy meter under test, electric energy meter attribute information, detection requirement information, and device attribute information of a detection device; A prediction unit, used for inputting the pre-application scenario information, the electric energy meter attribute information, the calibration requirement information, and the device attribute information into a preset detection point prediction model obtained through federated training to perform detection point prediction, and obtain a target detection point of the electric energy meter under low power factor, and a prediction error interval corresponding to the target detection point; a measuring unit, configured to control the electric energy meter under test to measure electric energy data for the target detection point on the detection device to obtain the electric energy data to be detected, and to control the standard electric energy meter to measure electric energy data for the target detection point on the detection device to obtain standard electric energy data; A determination unit is used to determine the error verification result of the electric energy meter under low power factor conditions based on the electric energy data to be detected, the standard electric energy data, and the predicted error interval.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.