Online simulation detection method and system for automatic calibrating device of electric energy meter

Through online simulation detection methods and systems, the problems of low detection efficiency, high error rate and inability to realize real-time monitoring of the traditional power meter automatic verification device are solved, and efficient and accurate detection and real-time monitoring are achieved to ensure the stability of the power system.

CN119556224APending Publication Date: 2025-03-04YUNNAN POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411378880.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The manual detection method of the traditional automatic power meter verification device is complex and time-consuming, and cannot meet the growing demand for device management, and there are high error rates and the inability to realize real-time online monitoring.

Method used

An online simulation detection method and system of automatic calibration device of the power meter is proposed. By collecting and preprocessing the calibration data, extracting performance characteristics, training and generating simulation detection models, and verifying them, ultimately realizing online simulation detection and real-time monitoring of the power meter calibration device.

Benefits of technology

It greatly improves detection efficiency, saves human resources, significantly reduces the error rate, can effectively handle complex situations, and realizes real-time online monitoring of the automatic calibration device of the power meter to ensure the stability and reliability of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556224A_ABST
    Figure CN119556224A_ABST
Patent Text Reader

Abstract

The invention discloses an on-line simulation detection method and system for an electric energy meter automatic calibration device, and relates to the technical field of electric power detection, and the method comprises the steps: collecting and preprocessing the calibration data of the electric energy meter automatic calibration device to be subjected to simulation detection; extracting characteristics reflecting the performance of the automatic calibrating device of the electric energy meter from the preprocessed calibrating data; training the extracted features to generate a simulation detection model, and verifying the simulation detection model; and performing online simulation detection on the electric energy meter calibrating device by using the verified simulation detection model, judging whether the calibrating device is abnormal or not according to an output result of the simulation detection model, and generating a simulation detection report. According to the invention, on-line simulation detection is carried out on the electric energy meter automatic calibrating device, so that the workload of manually carrying out device quality verification is greatly reduced, and the working efficiency and the operation reliability of the electric energy meter automatic calibrating device are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power detection, and in particular to an online simulation detection method and system for an automatic calibration device of an electric energy meter. Background Art

[0002] With the continuous development of the power system, the accuracy and reliability of the electric energy meter as a basic tool for measuring power consumption are particularly important. The automatic calibration device of the electric energy meter is one of the key devices to ensure the accuracy of the electric energy meter. However, the traditional automatic calibration device verification or detection technology of the electric energy meter is usually performed by professional technicians to detect and analyze the calibration device one by one. This method has many shortcomings.

[0003] First of all, manual verification and detection are complicated, time-consuming, and have a long detection cycle. This means that when a large number of electric energy meters need to be calibrated, the traditional method obviously cannot meet the needs of efficient processing, especially during the peak period of electricity consumption, a large number of electric energy meters need to be calibrated and verified regularly, and the manual method obviously cannot keep up with the pace of demand. Secondly, the error rate of manual detection methods is high. Since manual detection depends on the experience and skill level of the operator, it is easy to misjudge or miss detection during the detection process. Even experienced technicians cannot completely avoid misoperation due to fatigue or distraction. Moreover, traditional manual detection methods seem to be powerless in the face of complex situations. For some complex verification device failures or abnormal situations, it may be difficult to detect and handle them in time using traditional methods, thus affecting the normal operation of the power system. Finally, the traditional manual detection method does not have real-time performance, and it is impossible to achieve real-time online monitoring of the automatic verification device of the electric energy meter, and it is impossible to detect and handle problems with the verification device in time, which is undoubtedly a hidden danger for the stable operation of the power system.

[0004] Therefore, how to improve the detection efficiency of the automatic calibration device of the electric energy meter to meet the growing demand for device management has become an urgent problem to be solved in the power industry. Based on this, the present invention proposes an online simulation detection method and system for the automatic calibration device of the electric energy meter, which aims to replace the traditional manual detection method with automated means, improve the detection efficiency, reduce the error rate, enhance the ability to handle complex situations, and realize real-time online monitoring of the automatic calibration device of the electric energy meter, thereby ensuring the stability and reliability of the power system. Summary of the invention

[0005] In view of the above existing problems, the present invention is proposed.

[0006] Therefore, the present invention provides an online simulation detection method and system for an automatic calibration device of an electric energy meter to solve the problem that the prior art is complex to operate, time-consuming, and cannot meet the growing needs of device management.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In the first aspect, the present invention provides an online simulation detection method for an automatic calibration device of an electric energy meter, comprising: collecting and preprocessing calibration data of the automatic calibration device of the electric energy meter to be simulated and detected; extracting features reflecting the performance of the automatic calibration device of the electric energy meter from the preprocessed calibration data; training the extracted features to generate a simulation detection model, and verifying the simulation detection model; performing online simulation detection on the calibration device of the electric energy meter using the verified simulation detection model, judging whether the calibration device is abnormal based on the output result of the simulation detection model, and generating a simulation detection report.

[0009] As a preferred solution of the online simulation detection method of the automatic calibration device of the electric energy meter described in the present invention, wherein: the preprocessing includes data cleaning, data normalization processing and data conversion;

[0010] The data cleaning is to clean up the lost, repeated, erroneous or irrelevant data in the calibration data of the automatic calibration device of the electric energy meter to be simulated and tested;

[0011] The data normalization process is to perform normalization process on the calibration data after the data cleaning according to the mean and standard deviation of the calibration data of the automatic calibration device of the electric energy meter to be simulated and detected;

[0012] The data conversion includes simplifying the existing features of the verification data of the electric energy meter automatic verification device to be simulated and detected by reducing the number of features or lowering the dimension of the features, combining the simplified features to construct new features, and changing the distribution of the data.

[0013] As a preferred solution of the online simulation detection method of the automatic calibration device of the electric energy meter described in the present invention, wherein: using a policy gradient-based model to train the extracted features to generate a simulation detection model includes:

[0014] Initialize the parameters of the policy function and the parameters of the value function, wherein the policy function represents the probability distribution of actions in a given state and the value function represents the expected reward in a given state;

[0015] Collect a set of trajectories, which are sequences of states, actions, and rewards generated from the current policy function over a certain period of time;

[0016] For each state-action pair, calculate the policy gradient and the gradient of the value function, wherein the policy gradient represents how changing the parameters of the policy function will affect the expected future reward, and the gradient of the value function represents how changing the parameters of the value function will affect the expected policy gradient;

[0017] Update policy function parameters and value function parameters according to the policy gradient and the gradient of the value function;

[0018] The above process is repeated until the parameters of the policy function and the parameters of the value function reach the set stop condition and the prediction result is output, wherein the set stop condition includes that the number of iterations reaches a preset upper limit, or the gradient of the policy gradient and the gradient of the value function are lower than a preset threshold.

[0019] As a preferred solution of the online simulation detection method of the electric energy meter automatic verification device of the present invention, the calculation of the strategy gradient and the gradient of the value function includes:

[0020] The calculation of the policy gradient is:

[0021]

[0022] Among them, Eπ represents the expectation of sampling according to strategy π, represents the logarithmic gradient of the strategy with respect to its parameters, πθ(at|st) represents the probability strategy at time t, which refers to the probability of taking action a in state s, and Qπθ(st,at) represents the expected return after taking action a in state s;

[0023] The gradient of the value function is calculated as:

[0024] Qπ(s,a)=Eπ[R(t+1)+γQπ(s',a')]

[0025] Where R(t+1) represents the reward obtained after executing an action a in state s, γ represents the discount factor, and (s', a') represents the next state and action.

[0026] For the gradient calculation of the value function, a time-difference-based method is used to replace the expected return with the TD-error, that is:

[0027] δ(t)=R(t+1)+γVs(t+1)-Vs(t)

[0028] Wherein, V represents the value function. When solving the gradient of the value function, the goal is to minimize the TD-error. The formula for solving the gradient is:

[0029]

[0030] in, represents the gradient of J with respect to w.

[0031] As a preferred solution of the online simulation detection method of the automatic calibration device of the electric energy meter described in the present invention, wherein: verifying the simulation detection model includes:

[0032] Randomly selecting part of the verification data of the electric energy meter automatic verification device to be simulated and tested as an independent test data set, wherein the test data set does not overlap with the data set used in the training phase;

[0033] Inputting the test data set into a trained simulation detection model to calculate a simulation result, wherein the simulation result is a predicted state of the verification device;

[0034] Compare the results predicted by the simulation detection model with the actual state in the test data set, and calculate various evaluation indicators based on the comparison results;

[0035] The performance of the simulation detection model is comprehensively evaluated by analyzing the various evaluation indicators. If the performance of the simulation detection model meets the preset requirements, the simulation detection model is considered to have passed the verification. Otherwise, the simulation detection model needs to be adjusted or optimized and retrained.

[0036] As a preferred solution of the online simulation detection method of the electric energy meter automatic calibration device of the present invention, wherein: the online simulation detection of the electric energy meter calibration device using the verified simulation detection model includes:

[0037] Collect and pre-process the real-time data of the automatic calibration device of the electric energy meter, and extract the characteristic data reflecting the performance of the calibration device, such as peak value, average value, variance, and kurtosis, based on the relevant knowledge of the automatic calibration device of the electric energy meter;

[0038] The extracted features are input into the trained simulation detection model to obtain the simulation result of the state of the automatic verification device for online detection of electric energy meters;

[0039] The output result of the simulation detection model is analyzed to determine whether the automatic calibration device of the electric energy meter is normal. If the automatic calibration device of the model simulation electric energy meter is in a normal state, the calibration device can continue to be used; if the automatic calibration device of the model simulation electric energy meter is in an abnormal state, it needs to be stopped and further inspection is carried out;

[0040] The simulation test results are returned to the users and managers of the electric energy meter automatic calibration device for evaluation and decision-making by the testers or managers.

[0041] As a preferred scheme of the online simulation detection method of the automatic calibration device of the electric energy meter described in the present invention, wherein: the simulation detection report is generated, wherein the simulation detection report includes the detection time and date, detection conditions, simulation detection results, simulation detection summary, processing and improvement suggestions, detection personnel and reviewers.

[0042] In a second aspect, the present invention provides an online simulation detection system for an automatic calibration device of an electric energy meter, comprising:

[0043] A data acquisition module is used to collect various data of the automatic calibration device of the electric energy meter to be simulated and tested;

[0044] The data preprocessing and feature extraction module is used to receive the original data of the electric energy meter automatic verification device from the data acquisition module, and perform preprocessing operations such as data cleaning, normalization, and conversion, and extract the features reflecting the performance of the electric energy meter automatic verification device from the preprocessed verification data based on the relevant theoretical knowledge of the electric energy meter automatic verification device;

[0045] The model training module is used to receive feature data from the data preprocessing and feature extraction modules, select a suitable algorithm for model training, and generate a simulation detection model;

[0046] A model validation module is used to validate the trained simulation detection model using independent test data to evaluate its classification and prediction accuracy;

[0047] An online simulation detection module is used to receive the online verification device data from the data acquisition module, perform online simulation detection on the electric energy meter verification device using the verified simulation detection model, and determine whether the verification device is abnormal according to the output result of the simulation detection model;

[0048] The simulation test report generation module is used to generate a simulation test report of the electric energy meter automatic verification device according to the simulation result of the online simulation test module.

[0049] In a third aspect, the present invention provides a computing device, comprising:

[0050] Memory and processor;

[0051] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method are implemented.

[0052] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which implement the steps of the method when executed by a processor.

[0053] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention provides an online simulation detection method and system for an automatic calibration device of an electric energy meter, which greatly improves the verification and detection efficiency and saves a large amount of human resources by automatically performing online detection of a large number of calibration devices. At the same time, it uses artificial intelligence models to make accurate predictions and judgments, significantly reducing errors caused by human factors. Moreover, it can also perform effective online detection on automatic calibration devices of electric energy meters with complex working conditions. Its good real-time performance means that it can immediately discover and deal with problems in the automatic calibration device of the electric energy meter, avoiding the risk of inaccuracy of the device. Therefore, compared with traditional methods, the method of the present invention can more accurately judge the status of the calibration device, thereby more effectively ensuring the calibration quality of the electric energy meter detected by the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0055] Figure 1 It is an overall flow chart of an online simulation detection method of an electric energy meter automatic verification device according to an embodiment of the present invention;

[0056] Figure 2 A model training flow chart of an online simulation detection method for an automatic calibration device of an electric energy meter according to an embodiment of the present invention;

[0057] Figure 3 A model verification flow chart of an online simulation detection method of an electric energy meter automatic verification device according to an embodiment of the present invention;

[0058] Figure 4 A flowchart of an online simulation detection system for an automatic calibration device for an electric energy meter according to an embodiment of the present invention;

[0059] Figure 5 A schematic diagram of a confusion matrix of verification results of an online simulation detection method and system for an automatic calibration device of an electric energy meter according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0061] Example 1

[0062] Reference Figure 1 to Figure 4 According to an embodiment of the present invention, an online simulation detection method of an electric energy meter automatic calibration device is provided, which specifically comprises the following steps:

[0063] S100: Collect various verification data of a large number of automatic verification devices of electric energy meters to be simulated and tested;

[0064] Specifically, first, the automatic calibration device of the electric energy meter to be simulated and tested needs to be connected to the data acquisition device, and the operation mode of the installed standard meter or electric energy meter is planned, wherein the connection mode of data acquisition is through a wired method, such as using a USB, RS485 or other data cable, or through a wireless method, such as using Bluetooth, Wi-Fi, LoRa or other wireless communication technologies;

[0065] Specifically, according to the specific model, specification and operation mode of the calibration device and data acquisition equipment, set the corresponding parameters, such as acquisition frequency, acquisition time, acquisition data type, etc.;

[0066] Specifically, the data acquisition device is started to collect various data of the electric energy meter automatic verification device according to preset parameters, including but not limited to parameter information such as current, voltage, frequency, power and error data. It may take some time to collect data, depending on the number of electric energy meter automatic verification devices to be simulated and tested and the performance of the data acquisition device;

[0067] Specifically, the collected data is stored for subsequent processing, and can be stored on a local storage medium, such as a hard disk, flash memory, etc., or on a remote server, such as cloud storage, etc.

[0068] Specifically, after the data is stored, data verification is required to prevent errors during data collection and storage, including but not limited to data integrity check, data format check, etc.

[0069] S200: pre-processing various types of verification data of the automatic verification device of the electric energy meter to be simulated and tested by using data cleaning, normalization and transformation methods;

[0070] In the embodiment of the present application, preprocessing includes data cleaning, data normalization and data conversion;

[0071] Specifically, data cleaning is to clean up the lost, repeated, erroneous or irrelevant data in the calibration data of the automatic calibration device of the electric energy meter to be simulated and tested;

[0072] Specifically, the data normalization process is to normalize the calibration data after data cleaning according to the mean and standard deviation of the calibration data of the automatic calibration device of the electric energy meter to be simulated and detected, and the calculation formula is:

[0073] X'=(X-μ) / σ

[0074] Among them, μ represents the mean of the original data, and σ represents the standard deviation of the original data;

[0075] Specifically, the data conversion includes simplifying existing features of the verification data of the automatic verification device of the electric energy meter to be simulated and detected by reducing the number of features or reducing the dimension of the features, combining the simplified features to construct new features, and changing the distribution of the data;

[0076] It should be noted that data cleaning, normalization and transformation methods are used to pre-process various types of calibration data collected from the automatic calibration device of the electric energy meter to be simulated and tested, so as to facilitate subsequent feature extraction and machine learning. Data pre-processing is a key step that can help improve the quality of the data and make the data more suitable for further analysis or modeling. For the calibration data of the automatic calibration device of the electric energy meter, correct data processing can help improve the performance of the subsequent model, so that it can better identify the status or performance indicators of the electric energy meter.

[0077] S300: extracting characteristics reflecting the performance of the automatic calibration device of the electric energy meter from the pre-processed calibration data according to relevant knowledge of the automatic calibration device of the electric energy meter;

[0078] In the embodiment of the present application, features reflecting the performance of the automatic calibration device of the electric energy meter are extracted, such as peak value, average value, variance, and kurtosis;

[0079] Specifically, the peak value is actually the maximum value of the data in a period of time, which only involves comparison operations, namely Max(x i ), where x i Represents the values ​​of the data one by one, and the Max operation means taking the maximum value of all values;

[0080] Specifically, the average value is extracted as follows:

[0081]

[0082] Where n is the total number of data points, x i is the value of each data point, Σ represents the value of x i The sum of

[0083] Specifically, the variance is extracted as follows:

[0084]

[0085] Where μ is the mean value, xi is the value of each data point, Σ represents the sum;

[0086] Specifically, the extraction of kurtosis is:

[0087]

[0088] Among them, E represents the mathematical expectation and σ represents the standard deviation. This formula describes the statistical characteristics of kurtosis and reflects the steepness of the data distribution.

[0089] S400: Using a policy gradient-based model to train the extracted features to generate a simulated detection model;

[0090] In the embodiment of the present application, the core idea of ​​the policy gradient model is to optimize the expected cumulative reward by learning a set of parameterized policies, where the parameterized policies are controlled by parameters θ and the gradient ascent algorithm is used to gradually optimize these parameters, such as Figure 2 As shown in the figure, the model training process is as follows:

[0091] S401: Initialize the parameters of the policy function and the parameters of the value function, wherein the policy function represents the probability distribution of actions in a given state, and the value function represents the expected reward in a given state;

[0092] S402: For each round of iteration, perform the following sub-steps:

[0093] S4021: Collect a set of trajectories, which are sequences of states, actions, and rewards generated from the current policy function and over a certain period of time;

[0094] S4022: For each state-action pair, calculate the policy gradient and the gradient of the value function, where the policy gradient indicates how changing the parameters of the policy function will affect the expected future reward, and the gradient of the value function indicates how changing the parameters of the value function will affect the expected policy gradient;

[0095] S4023: Update policy function parameters and value function parameters according to the policy gradient and the gradient of the value function;

[0096] S403: Repeat S402 until the parameters of the policy function and the value function reach the set stop condition and output the prediction result, wherein the set stop condition includes that the number of iterations reaches a preset upper limit, or the gradient of the policy gradient and the gradient of the value function are lower than a preset threshold.

[0097] It should be noted that the number of iterations reaches the preset upper limit, which is generally 200 to 1000; the gradient of the policy gradient and the value function is lower than the preset threshold, which is generally 10 -3 ~10-6 .

[0098] Specifically, the calculation of the policy gradient is:

[0099]

[0100] Among them, Eπ represents the expectation of sampling according to strategy π, represents the logarithmic gradient of the strategy with respect to its parameters, πθ(at|st) represents the probability strategy at time t, which refers to the probability of taking action a in state s, and Qπθ(st,at) represents the expected return after taking action a in state s;

[0101] Specifically, the gradient of the value function is calculated as:

[0102] Qπ(s,a)=Eπ[R(t+1)+γQπ(s',a')]

[0103] Where R(t+1) represents the reward obtained after executing an action a in state s, γ represents the discount factor, and (s', a') represents the next state and action.

[0104] Specifically, for the gradient calculation of the value function, a time-difference-based method is used to replace the expected return with TD-error, that is:

[0105] δ(t)=R(t+1)+γVs(t+1)-Vs(t)

[0106] Where V represents the value function. When solving the gradient of the value function, the goal is to minimize the TD-error. The formula for solving the gradient is:

[0107]

[0108] in, represents the gradient of J with respect to w.

[0109] S500: Use an independent test data set to verify the trained simulation detection model, such as Figure 3 As shown, the specific process includes:

[0110] S501: Data preparation: Randomly select a part of the calibration data of the electric energy meter from the automatic calibration device as an independent test data set, which does not overlap with the data set used in the training phase. The samples of the test data set should cover various situations of various types of electric energy meters to ensure the comprehensiveness of the test.

[0111] S502: Model prediction: Input the test data set into the trained model and calculate the prediction result. The prediction result should be the simulated state of the electric energy meter automatic verification device, such as normal, abnormal, etc.

[0112] S503: Result comparison: Compare the model simulation results with the actual status in the test data set, and calculate various evaluation indicators such as accuracy, precision, recall, F1 value, etc. based on the comparison results.

[0113] S504: Performance evaluation: Analyze the evaluation indicators to comprehensively evaluate the performance of the simulation detection model. If the performance of the simulation detection model meets the preset requirements, the simulation detection model is considered to have passed the verification. Otherwise, the simulation detection model needs to be adjusted or optimized and retrained.

[0114] S600: Performing online simulation detection on the electric energy meter verification device using the verified simulation detection model, and judging whether the verification device is abnormal according to the output result of the simulation detection model;

[0115] In an embodiment of the present application, real-time data of an automatic calibration device of an electric energy meter is collected and preprocessed, and characteristic data reflecting the performance of the calibration device, such as peak value, mean value, variance, and kurtosis, are extracted based on relevant knowledge of the automatic calibration device of the electric energy meter; the extracted features are input into a trained simulation detection model to obtain a simulation result of the online detection state of the automatic calibration device of the electric energy meter; the output result of the simulation detection model is analyzed to determine whether the automatic calibration device of the electric energy meter is normal. If the model simulates that the automatic calibration device of the electric energy meter is in a normal state, the calibration device can continue to be used; if the model simulates that the automatic calibration device of the electric energy meter is in an abnormal state, it is necessary to stop using it and conduct further inspection; the simulation detection result is returned to the users and managers of the automatic calibration device of the electric energy meter for evaluation and decision-making by the detection personnel or managers.

[0116] S700: If the simulation result of the electric energy meter automatic verification device is normal, the simulation result is recorded and a simulation test report is generated; if the simulation result of the electric energy meter automatic verification device is abnormal, further inspection is required;

[0117] In an embodiment of the present application, a simulation test report is generated, wherein the simulation test report includes the test time and date, test conditions, simulation test results, simulation test summary, processing and improvement suggestions, test personnel and review personnel.

[0118] Specifically, the test time and date: This is the key to determining the test report date. A valid simulation test report should contain the exact time and date of the test.

[0119] Test Conditions: This section describes the environmental and equipment conditions under which the test was performed.

[0120] Simulation test results: For each test item, detailed simulation test results should be recorded. If it is numerical data, the specific numerical value should be attached; if it is a qualitative evaluation, a clear conclusion should be given.

[0121] Simulation test summary: Make a comprehensive evaluation based on the simulation test results and relevant standards.

[0122] Suggestions for handling and improvement: If there are any abnormalities in the calibration device, specific suggestions for handling and improvement should be put forward.

[0123] Testers and auditors: In order to ensure the authority of the calibration report, dedicated testers and auditors should sign and confirm it.

[0124] From the above, it can be seen that the present invention provides an online simulation detection method and system for an automatic calibration device of an electric energy meter. By automatically performing online detection of a large number of calibration devices, the verification and detection efficiency is greatly improved, and a large amount of human resources is saved. At the same time, the artificial intelligence model is used to perform accurate prediction and judgment, which significantly reduces the errors caused by human factors. Moreover, for automatic calibration devices of electric energy meters with complex working conditions, effective online detection can also be performed. Its good real-time performance means that when a problem occurs in the automatic calibration device of the electric energy meter, it can be discovered and handled immediately, avoiding the risk of inaccuracy of the device. Therefore, compared with traditional methods, the method of the present invention can more accurately judge the state of the calibration device, thereby more effectively ensuring the calibration quality of the electric energy meter inspected by the device.

[0125] The above is a schematic scheme of an online simulation detection method of an electric energy meter automatic calibration device in this embodiment. It should be noted that the technical scheme of the online simulation detection system of the electric energy meter automatic calibration device and the technical scheme of the online simulation detection method of the electric energy meter automatic calibration device described above belong to the same concept. For details not described in detail in the technical scheme of the online simulation detection system of the electric energy meter automatic calibration device in this embodiment, please refer to the description of the technical scheme of the online simulation detection method of the electric energy meter automatic calibration device described above.

[0126] like Figure 4 As shown, this embodiment also provides an online simulation detection system for an automatic calibration device of an electric energy meter, comprising:

[0127] Data acquisition module 801, used to collect various data of the automatic verification device of the electric energy meter to be simulated and tested, and this module can use the installed standard meter and data interface to collect data;

[0128] The data preprocessing and feature extraction module 802 is used to receive the original data of the electric energy meter automatic verification device from the data acquisition module 801, and perform preprocessing operations such as data cleaning, normalization, and conversion, and extract the features reflecting the performance of the electric energy meter automatic verification device from the preprocessed verification data based on the relevant theoretical knowledge of the electric energy meter automatic verification device;

[0129] The model training module 803 is used to receive the feature data from the data preprocessing and feature extraction module 802, select a suitable algorithm for model training, and generate a simulation detection model;

[0130] A model validation module 804 is used to validate the trained simulation detection model using independent test data to evaluate its classification and prediction accuracy;

[0131] The online simulation detection module 805 is used to receive the online verification device data from the data acquisition module 801, perform online simulation detection on the electric energy meter verification device using the verified simulation detection model, and determine whether the verification device is abnormal according to the output result of the simulation detection model;

[0132] The simulation detection report generating module 806 is used to generate a simulation detection report of the electric energy meter automatic verification device according to the simulation result of the online simulation detection module.

[0133] The above-mentioned unit modules may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to the above-mentioned modules.

[0134] This embodiment also provides a computing device, which includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an online simulation detection method for an automatic calibration device of an electric energy meter is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0135] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method proposed in the above embodiment is implemented.

[0136] The storage medium proposed in this embodiment and the method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0137] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.

[0138] Example 2

[0139] Reference Figure 5 Based on the previous embodiment, this embodiment provides an application example of an online simulation detection method and system for an automatic calibration device of an electric energy meter, in order to verify and illustrate the technical effects adopted in this method.

[0140] First, this embodiment uses an installed standard meter as a data acquisition module, and performs calibration on the automatic calibration device together with the electric energy meter to be tested. According to the specific model and specifications of the calibration device and the data acquisition device, the collected data types include current, voltage, frequency, power, error, etc. After starting the data acquisition device, it starts to collect various parameter information of the calibration device. After the data acquisition is completed, the device stores the data in the internal hard disk and performs data integrity and format verification.

[0141] According to the data collected at the corresponding table position of the installed standard meter in each test, 14 test data can be calculated, including basic error, phase voltage symmetry, line voltage symmetry, current symmetry, phase-to-phase phase symmetry, line-to-line phase symmetry, A-phase voltage distortion, A-phase current distortion, B-phase voltage distortion, B-phase current distortion, C-phase voltage distortion, C-phase current distortion, device output power stability, and device measurement repeatability.

[0142] Then, the data preprocessing module receives the raw data from the data acquisition module, and removes some duplicate or erroneous data entries through data cleaning. Next, the module performs data normalization and conversion, converting the raw data into a format suitable for machine learning model processing. Then, the feature extraction phase begins. The module extracts the maximum value, minimum value, mean value, standard deviation and other attributes from the 14 data of each experiment based on the relevant knowledge of the calibration device. These attributes are used as the characteristics of the performance of the calibration device. Each feature data is calculated to obtain its maximum value (Max), minimum value (Min), expectation (E), standard deviation (S), and median (M) 5 characteristic values. After the cyclic calibration of each epitope completes 10 batches of calibration, each epitope forms 10 rows and 70 columns of feature data, and finally 72 epitopes form a total of 720 rows and 70 columns of feature data. Table 1 is the experimental data of a certain epitope test.

[0143] Table 1: Sample characteristic data.

[0144]

[0145] Then, the above data are clustered and divided into 4 categories: normal class, error fault, electrical fault and reliability fault, which are counted as 1, 2, 3 and 4 respectively, for training fault detection module. A neural network is selected as the training algorithm. The weight parameters of the neural network are optimized by back propagation and gradient descent methods, so that the prediction results of the model are as close as possible to the actual state of the automatic calibration device of the electric energy meter. After the training is completed, a set of detection simulation models is obtained. 432 (60%) samples of 720 sample data are selected as model training data, and 288 (40%) samples are used for verification.

[0146] The model verification module verifies the model using independent test data. Specifically, the module uses the data of another part of the electric energy meter automatic verification device as input, obtains the simulated output, and then compares this output with the actual state of the verification device, and verifies the performance of the model by calculating evaluation indicators such as accuracy. On the verification sample, the confusion matrix of the recognition result is as follows Figure 5 ,The recognition results include 18 abnormal recognition errors with an accuracy of 93.75%, which has a high fault recognition accuracy.

[0147] Once the model is verified, it can be used for online simulation detection. The online detection module receives the real-time electric energy meter automatic calibration device data from the data acquisition module, uses the trained model to simulate, and determines whether the status of the calibration device is normal or abnormal, and classifies the abnormal types. Regardless of whether the simulation result is normal or abnormal, the simulation detection report generation module will generate a simulation detection report for the electric energy meter automatic calibration device based on the simulation results of the online simulation detection module. The report includes the detection time, the current status of the calibration device, the simulation results, and the analysis of the results.

[0148] From the above, it can be seen that the present invention provides an online simulation detection method and system for an automatic calibration device of an electric energy meter. By automatically performing online detection of a large number of calibration devices, the verification and detection efficiency is greatly improved, and a large amount of human resources is saved. At the same time, the artificial intelligence model is used to perform accurate prediction and judgment, which significantly reduces the errors caused by human factors. Moreover, for automatic calibration devices of electric energy meters with complex working conditions, effective online detection can also be performed. Its good real-time performance means that when a problem occurs in the automatic calibration device of the electric energy meter, it can be discovered and handled immediately, avoiding the risk of inaccuracy of the device. Therefore, compared with traditional methods, the method of the present invention can more accurately judge the state of the calibration device, thereby more effectively ensuring the calibration quality of the electric energy meter inspected by the device.

[0149] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

[0150] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0151] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0152] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0153] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0154] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0155] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An online simulation detection method for an automatic calibration device of an electric energy meter, characterized in that: include: Collect and pre-process the calibration data of the automatic calibration device of the electric energy meter to be simulated and tested; Extracting features reflecting the performance of the automatic calibration device of the electric energy meter from the pre-processed calibration data; Training the extracted features to generate a simulation detection model, and verifying the simulation detection model; The verified simulation detection model is used to perform online simulation detection on the electric energy meter verification device, and whether the verification device is abnormal is determined according to the output result of the simulation detection model, and a simulation detection report is generated.

2. The online simulation detection method of the electric energy meter automatic verification device according to claim 1 is characterized in that: The preprocessing includes data cleaning, data normalization and data conversion; The data cleaning is to clean up the lost, repeated, erroneous or irrelevant data in the calibration data of the automatic calibration device of the electric energy meter to be simulated and tested; The data normalization process is to perform normalization process on the calibration data after the data cleaning according to the mean and standard deviation of the calibration data of the automatic calibration device of the electric energy meter to be simulated and detected; The data conversion includes simplifying the existing features of the verification data of the electric energy meter automatic verification device to be simulated and detected by reducing the number of features or lowering the dimension of the features, combining the simplified features to construct new features, and changing the distribution of the data.

3. The online simulation detection method of the electric energy meter automatic verification device according to claim 2 is characterized in that: Using a policy gradient-based model to train the extracted features to generate a simulated detection model includes: Initialize the parameters of the policy function and the parameters of the value function, wherein the policy function represents the probability distribution of actions in a given state and the value function represents the expected reward in a given state; Collect a set of trajectories, which are sequences of states, actions, and rewards generated from the current policy function over a certain period of time; For each state-action pair, calculate the policy gradient and the gradient of the value function, wherein the policy gradient represents how changing the parameters of the policy function will affect the expected future reward, and the gradient of the value function represents how changing the parameters of the value function will affect the expected policy gradient; Update policy function parameters and value function parameters according to the policy gradient and the gradient of the value function; The above process is repeated until the parameters of the policy function and the parameters of the value function reach the set stop condition and the prediction result is output, wherein the set stop condition includes that the number of iterations reaches a preset upper limit, or the gradient of the policy gradient and the gradient of the value function are lower than a preset threshold.

4. The online simulation detection method of the electric energy meter automatic verification device according to claim 3 is characterized in that: The calculation of the policy gradient and the gradient of the value function includes: The calculation of the policy gradient is: Among them, Eπ represents the expectation of sampling according to strategy π, represents the logarithmic gradient of the strategy with respect to its parameters, πθ(at|st) represents the probability strategy at time t, which refers to the probability of taking action a in state s, and Qπθ(st,at) represents the expected return after taking action a in state s; The gradient of the value function is calculated as: Qπ(s,a)=Eπ[R(t+1)+γQπ(s',a')] Where R(t+1) represents the reward obtained after executing an action a in state s, γ represents the discount factor, and (s', a') represents the next state and action. For the gradient calculation of the value function, a time-difference-based method is used to replace the expected return with the TD-error, that is: δ(t)=R(t+1)+γVs(t+1)-Vs(t) Wherein, V represents the value function. When solving the gradient of the value function, the goal is to minimize the TD-error. The formula for solving the gradient is: in, represents the gradient of J with respect to w.

5. The online simulation detection method of the electric energy meter automatic verification device according to claim 4 is characterized in that: Verifying the simulation detection model includes: Randomly selecting part of the verification data of the electric energy meter automatic verification device to be simulated and tested as an independent test data set, wherein the test data set does not overlap with the data set used in the training phase; Inputting the test data set into a trained simulation detection model to calculate a simulation result, wherein the simulation result is a predicted state of the verification device; Compare the results predicted by the simulation detection model with the actual state in the test data set, and calculate various evaluation indicators based on the comparison results; The performance of the simulation detection model is comprehensively evaluated by analyzing the various evaluation indicators. If the performance of the simulation detection model meets the preset requirements, the simulation detection model is considered to have passed the verification. Otherwise, the simulation detection model needs to be adjusted or optimized and retrained.

6. The online simulation detection method for the automatic calibration device of an electric energy meter according to claim 5, characterized in that: The online simulation detection of the electric energy meter verification device using the verified simulation detection model includes: Collect and pre-process the real-time data of the automatic calibration device of the electric energy meter, and extract the characteristic data reflecting the performance of the calibration device, such as peak value, average value, variance, and kurtosis, based on the relevant knowledge of the automatic calibration device of the electric energy meter; The extracted features are input into the trained simulation detection model to obtain the simulation result of the state of the automatic verification device for online detection of electric energy meters; The output result of the simulation detection model is analyzed to determine whether the automatic calibration device of the electric energy meter is normal. If the automatic calibration device of the model simulation electric energy meter is in a normal state, the calibration device can continue to be used; if the automatic calibration device of the model simulation electric energy meter is in an abnormal state, it needs to be stopped and further inspection is carried out; The simulation test results are returned to the users and managers of the electric energy meter automatic calibration device for evaluation and decision-making by the testers or managers.

7. The online simulation detection method for the automatic calibration device of an electric energy meter according to claim 6, characterized in that: The simulation test report is generated, wherein the simulation test report includes the test time and date, test conditions, simulation test results, simulation test summary, processing and improvement suggestions, testers and auditors.

8. A system using the online simulation detection method of the electric energy meter automatic calibration device according to any one of claims 1 to 7, characterized in that: include: A data acquisition module is used to collect various data of the automatic calibration device of the electric energy meter to be simulated and tested; The data preprocessing and feature extraction module is used to receive the original data of the electric energy meter automatic verification device from the data acquisition module, and perform preprocessing operations such as data cleaning, normalization, and conversion, and extract the features reflecting the performance of the electric energy meter automatic verification device from the preprocessed verification data based on the relevant theoretical knowledge of the electric energy meter automatic verification device; The model training module is used to receive feature data from the data preprocessing and feature extraction modules, select a suitable algorithm for model training, and generate a simulation detection model; A model validation module is used to validate the trained simulation detection model using independent test data to evaluate its classification and prediction accuracy; An online simulation detection module is used to receive the online verification device data from the data acquisition module, perform online simulation detection on the electric energy meter verification device using the verified simulation detection model, and determine whether the verification device is abnormal according to the output result of the simulation detection model; The simulation test report generation module is used to generate a simulation test report of the electric energy meter automatic verification device according to the simulation result of the online simulation test module.

9. An electronic device, comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having computer program instructions stored thereon, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.