Electricity meter management module testing method, device, storage medium and computer equipment
By using simulated metering modules instead of real metering modules to test the power meter management module, the testing process is optimized, and the problems of long test cycles and high cost are solved, and more efficient and accurate testing is achieved.
Patent Information
- Application Number
- CN202211017570.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-08-23
AI Technical Summary
In the prior art, the test cycle of the power meter management module is relatively long, the testing cost is high, and the timing disorder is prone to problems.
The simulated metering module is used to replace the real metering module for testing. Through communication between the upper computer and the simulated metering module and the power metering module, a simulated test environment is generated, and the test process is optimized to shorten the response time and avoid timing disorders.
The test cycle of the power meter management module is shortened, the testing cost is reduced, and the testing efficiency and accuracy is improved.
Smart Images

Figure CN115658459B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of hardware testing, and in particular to a method, device, storage medium and computer equipment for testing an electric energy meter management module. Background Art
[0002] Currently, new smart energy meters are equipped with a unified embedded real-time operating system, a system architecture platform that decouples hardware and software, and supports online software upgrades. Manufacturers design new smart energy meters based on technical specifications, featuring hardware platformization and application-oriented software. The energy meter management module is the core of the meter, and testing its functional integrity, real-time performance, and robustness is crucial.
[0003] In existing technology, testing typically involves combining a real metering module with host computer software. However, because the metering module in the test environment is a real hardware circuit, including information collection and metering modules, the response time is relatively long. Furthermore, the test time for each test item in the meter management module must be set according to the meter's actual operating cycle. Furthermore, when the meter management module handles multiple tasks simultaneously, it can cause timing errors due to multiple simultaneous instructions sent and received from the metering module. This ultimately leads to longer test cycles and higher testing costs for the meter management module. Summary of the Invention
[0004] In view of this, the present application provides a method, device, storage medium and computer equipment for testing an electric energy meter management module, the main purpose of which is to solve the problems of long testing cycle and high testing cost in the testing work of the electric energy meter management module.
[0005] According to a first aspect of the present invention, a method for testing an electric energy meter management module is provided. The method is applied to a test device for testing an electric energy meter management module having an operating system. The test device includes: a core computer, an analog metering module, and a management module interface for connecting to the electric energy meter management module. The method includes:
[0006] The host computer determines the test case in response to the test case selection request, and sends the analog measurement value corresponding to the test case to the analog measurement module, wherein the host computer pre-stores at least one test case, and each test case corresponds to an analog measurement value;
[0007] The analog metering module receives and stores the analog metering value, and sends a confirmation message to the host computer;
[0008] The host computer sends a test execution command to the electric energy meter management module based on the confirmation information;
[0009] The electric energy meter management module receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface based on the test execution command, generates test data based on the test electrical signal, and sends the test data to the host computer through the management module interface;
[0010] The host computer generates a test result of the electric energy meter management module based on the received test data.
[0011] According to a second aspect of the present invention, there is provided an electric energy meter management module testing device, the device comprising a host computer, an analog metering module, and a management module interface for connecting to the electric energy meter management module;
[0012] The host computer is used to respond to a test case selection request, determine a test case, and send the analog measurement value corresponding to the test case to the analog measurement module, wherein at least one test case is pre-stored in the host computer, and each test case corresponds to an analog measurement value;
[0013] The analog measurement module is used to receive and store the analog measurement value and send a confirmation message to the host computer;
[0014] The host computer is further configured to send a test execution command to the electric energy meter management module based on the confirmation information, so that the electric energy meter management module receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface based on the test execution command, generates test data based on the test electrical signal, and sends the test data to the host computer through the management module interface;
[0015] The host computer is further configured to generate a test result of the electric energy meter management module based on the received test data.
[0016] According to a third aspect of the present invention, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned electric energy meter management module testing method is implemented.
[0017] 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 the processor implements the above-mentioned electric energy meter management module testing method when executing the program.
[0018] The present invention provides a method, device, storage medium, and computer equipment for testing an electric energy meter management module. In response to a user-selected test case for the electric energy meter management module, multiple simulated metering values related to the test environment for implementing the test case are sent to the simulated metering module. After receiving the simulated metering values, the simulated metering module generates test electrical signals corresponding to the simulated metering values based on the simulated metering values to implement the test environment corresponding to the test case. The electric energy meter management module extracts the test electrical signals to simulate testing in a real test environment, and generates test data and sends it to a host computer. The host computer obtains the test results of the management module test based on the received test data. The above method can generate a corresponding simulated test environment based on the user's test selection, so that when the user performs the test items of the electric energy meter management module, he does not have to be restricted by the actual operation cycle of the electric energy meter under the real metering module, and can shorten the response time. At the same time, by optimizing the test process of the electric energy meter management module, the problem of timing disorder can also be avoided, thereby effectively reducing the test cycle and reducing the testing cost.
[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] 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:
[0021] Figure 1 A schematic structural diagram of a testing device provided by an embodiment of the present invention is shown;
[0022] Figure 2 A schematic diagram showing a flow chart of a method for testing an electric energy meter management module provided by an embodiment of the present invention;
[0023] Figure 3 A schematic structural diagram of an analog metering module provided by an embodiment of the present invention is shown;
[0024] Figure 4 It shows one of the structural diagrams of an electric energy meter management module measuring device provided by an embodiment of the present invention;
[0025] Figure 5 The second structural diagram of an electric energy meter management module measurement device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0026] 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, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0027] Currently, manufacturers design new smart energy meters based on technical specifications, featuring hardware platformization and software application. The energy meter management module is the core of the energy meter, and testing its functional integrity, real-time performance, and robustness is crucial. Existing testing technologies typically employ a real metering module coupled with host computer software for testing. However, because the metering module in the test environment is a real hardware circuit, including information collection and metering modules, the response time is relatively long. Furthermore, the test time for each test item in the energy meter management module needs to be set according to the actual operating cycle of the energy meter. Furthermore, when the energy meter management module handles multiple tasks simultaneously, it will issue and receive metering module instructions multiple times, causing timing errors. This ultimately results in a longer test cycle for the energy meter management module and higher testing costs.
[0028] In order to solve the above problems, in one embodiment, a method for testing an electric energy meter management module is provided. Figure 1 The test setup shown is Figure 1 As shown, the test device is used to test the electric energy meter management module with an operating system, and the test device includes: a host computer 1, an analog metering module 2, and a management module interface 3 for connecting to the electric energy meter management module 4, wherein the electric energy meter management module is an electric energy meter management module with an operating system. Figure 2 A flow chart of a method for testing an energy meter management module is given, as shown in Figure 2 As shown, the method is applied to the above-mentioned test device as an example for description, and includes the following steps:
[0029] 101. The host computer determines a test case in response to a test case selection request, and sends an analog measurement value corresponding to the test case to the analog measurement module.
[0030] Wherein, at least one test case is pre-stored in the host computer, and each of the test cases corresponds to a simulated measurement value, which is a simulated test electrical signal required for testing the electric energy meter management module.
[0031] Specifically, the electric energy meter management module to be tested is connected to the management module interface, and when the device is powered on, the test case is selected based on the host computer. The test case refers to the description of the test task for a specific product, reflecting the test plan, method, technology and strategy, and corresponds to the configuration parameters required for the test, such as the meter address, communication baud rate, serial port and other information for executing the test plan. Each test case corresponds to the pre-set analog measurement value required for the test case, and the analog measurement value and the corresponding test case are stored in the host computer. At the same time, the communication parameters required for the test, including the meter address, baud rate, time, data identifier, data format, etc., can be input based on the host computer to realize data interaction between devices. Subsequently, the host computer can send the test case for the test and the analog measurement value corresponding to the test case to the analog metering module for identification and storage by the analog metering module.
[0032] 102. The analog metering module receives and stores the analog metering value, and sends a confirmation message to the host computer.
[0033] Specifically, after receiving the simulated metering value from the host computer, the analog metering module will store the simulated metering value locally and set test-related data such as real-time metering data or minute-freeze data based on the simulated metering value. It will then send a confirmation message to the host computer, where the confirmation message is the storage result of the simulated metering value in the analog metering module. Furthermore, during the test, the analog metering module can generate the test electrical signal required for the test based on the simulated metering value. This test electrical signal simulates the test electrical signal generated by the real metering module during operation as metering data, which is then read by the energy meter management module.
[0034] 103. The host computer sends a test execution command to the electric energy meter management module based on the confirmation information.
[0035] Specifically, the host computer can receive confirmation information from the analog metering module and, based on the confirmation information regarding the storage of the analog metering values in the analog metering module, determine whether each analog metering value deviates from the original analog metering value in the host computer. If a deviation is detected, a warning message can be issued to prompt the tester to take action or the analog metering value can be sent to the analog metering module again. If no deviation is detected, a test execution command is sent to the energy meter management module to instruct the energy meter management module to start operation.
[0036] 104. The electric energy meter management module receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface based on the test execution command, generates test data based on the test electrical signal, and sends the test data to the host computer through the management module interface.
[0037] The test electrical signal is an electrical signal emitted by the analog metering module during operation under a real hardware environment, simulated by the analog metering module based on the simulated metering value. The energy meter management module receives the electrical signal and generates relevant reading information and control information. Furthermore, the analog metering module can simulate the electrical signals emitted by the metering module under different operating conditions in a single test process based on the simulated metering value, thereby obtaining test results for the energy meter management module under different simulated environments in a single test process.
[0038] Specifically, the electricity meter management module receives a test execution command, confirms the start of the test, receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface, simulates the management of the real metering module, generates reading information and control information, generates test data, and sends the test data to the host computer.
[0039] 105. The host computer generates a test result of the electric energy meter management module based on the received test data. The test data may include parameter types and functions as shown in Table 1:
[0040]
[0041]
[0042] Table 1
[0043] Specifically, the host computer can make judgments on the parameter values in the test data, such as phase voltage, total reactive power and other parameters, and compare the parameter values with the standard parameter values corresponding to the test case to obtain the test results of the electricity meter management module.
[0044] As an example, when performing a serial peripheral interface (SPI) read / write test and a communication response efficiency test between the management module and the analog metering module, the corresponding test case is selected in the host computer, and the analog metering module is written with analog metering values corresponding to the SPI interface read / write test and the communication response efficiency test, including (current) forward active total energy, (current) reverse active total energy, and minute frozen data. The management module reads the metering real-time data and minute frozen data, so that the analog metering module generates the corresponding test environment. After confirming that the information is correct, the host computer sends a trial execution command to instruct the energy meter management module to start executing the test. The energy meter management module reads the test data based on the analog metering module and sends the test data to the host computer. The host computer records the data read by the energy meter management module and compares it with the data corresponding to the analog metering value written to the analog metering module to test the energy meter management module software processing capability, including the start and completion time of each reading, the time taken and response time of each operation of the SPI interface, etc. The test can be repeated multiple times and the test results can be recorded respectively.
[0045] In addition, invalid data can be written to the analog metering module, including data with correct content but incorrect format, data with incorrect frame format, real-time data with incorrect frame content, minute-frozen data, and other data. At the beginning of the test, the host computer records the data read by the energy meter management module to test whether the energy meter management module responds to the negative frame according to the specification. Subsequently, normal data is written to the analog metering module to determine whether the data read by the energy meter management module is normal, thereby testing the energy meter management module software processing capabilities.
[0046] The electric energy meter management module testing method provided in this embodiment can generate a corresponding simulated test environment for the simulated metering module based on the user's test selection, so that the user does not have to be restricted by the actual operation cycle of the electric energy meter under the real metering module when performing the test items of the electric energy meter management module, and can shorten the response time. At the same time, by optimizing the test process of the electric energy meter management module, the problem of timing disorder can also be avoided, thereby effectively reducing the test cycle and reducing the test cost.
[0047] In one embodiment, the structure of the analog metering module is given, such as Figure 3 As shown, the analog metrology module includes a central processing unit (CPU) 31 and a random access memory (RAM) 32. The CPU 31 has a performance no less than that of a Cortex-M4 architecture and a main frequency no less than 60 MHz. The RAM 32 has a capacity greater than or equal to 1 megabyte. The large-capacity RAM within the analog metrology module allows for rapid reading and writing of test information, while the high-performance CPU enables rapid scheduling of information.
[0048] Furthermore, the analog metering module receives and stores the analog metering value and sends a confirmation message to the host computer, including: the central processing unit stores the analog metering value in the random access memory and sends the storage result of the analog metering value to the host computer as confirmation information. Furthermore, step 103 includes: first, the host computer determines whether the analog metering value satisfies a preset comparison relationship with the test case based on the received analog metering value. The comparison relationship is a correspondence between the test case and the analog metering value required to execute the test case. Each test case has a corresponding analog metering value that satisfies the corresponding relationship. Specifically, each test case corresponds to a corresponding analog metering value, and the two can be stored in the host computer in the form of a comparison table. When the host computer sends the analog metering value corresponding to each test case to the analog metering module, the analog metering module stores the analog metering value and returns the storage result to the host computer as confirmation information. Based on the received confirmation information including the analog metering value stored by the analog metering module, the host computer determines whether the analog metering value in the confirmation information satisfies the comparison relationship with the test case. If the analog metering value and the test case satisfy the aforementioned correlation, the host computer sends a test execution command to the electricity meter management module. Specifically, if the analog metering value and the test case satisfy the aforementioned correlation, the analog metering value stored by the analog metering module is determined to be correct, and the next test step can be performed. In the embodiments of the present application, based on confirming the analog metering value stored by the analog metering module, it is possible to ensure that the analog metering module generates a correct test environment during subsequent tests, improving the accuracy of the test work.
[0049] In one embodiment, the electric energy meter management module receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface based on the test execution command, including: first, the electric energy meter management module issues a read information command in response to the test execution command, and sends the read information command to the analog metering module. The read information command can be a signal for controlling the analog metering module to generate a simulated test environment based on the analog metering value. Specifically, after receiving the test execution command, the electric energy meter management module can determine whether it is in a ready state. If the electric energy meter management module is in a ready state for testing, it can issue a read information command to the analog metering module. If the electric energy meter management module is not in a ready state, it can issue an alarm message to enable the tester to handle it. After issuing the read information command, the electric energy meter management module can enter a standby state and prepare to read the test electrical signal issued by the analog metering module. Then, in response to the read information command, the analog metering module retrieves the analog metering value from the random access memory, generates a test electrical signal corresponding to the analog metering value, and sends the test electrical signal to the electric energy meter management module. Finally, the electric energy meter management module receives the test electrical signal. In an embodiment of the present application, based on the electric energy meter management module in a ready state, an instruction to generate a test electrical signal is sent to the analog metering module to ensure that when the analog metering module is running, the electric energy meter management module can normally receive the test signal, ensure that the electric energy meter management module can fully perform the management work of the analog metering module during the test cycle, and ensure the effectiveness of the test work.
[0050] In one embodiment, the test results include normal results and abnormal results. If the values of various parameters in the test results are within a threshold range set for the parameter values, the test result is determined to be normal. If the values of various parameters in the test results are not within the threshold range set for the parameter values, the test result is determined to be abnormal. Specifically, if the test result is normal, it indicates that the electric energy meter management module is able to perform management functions normally and can be used normally. If the test result is abnormal, it indicates that the electric energy meter management module is not able to perform management functions normally and requires further testing. Furthermore, the testing device also includes an indicator light, wherein the indicator light is connected to the host computer. Furthermore, the method further includes: if the test result is normal, the host computer controlling the indicator light to display in a preset first state. The first state may be that the indicator light is constantly on. If the test result is abnormal, the host computer controlling the indicator light to display in a preset second state. The second state may be that the indicator light flashes at a specific frequency, indicating to the tester that the electric energy meter management module is not able to perform management functions normally and requires further testing. Furthermore, the test status can also be displayed based on the indicator light. Specifically, if the device is in a normal test state, the host computer controls the indicator light to display in a preset third state, such as displaying with a light of a specific color; if the device is in an abnormal test state, the host computer controls the indicator light to display in a preset fourth state, such as displaying with a light of a specific color different from the third state, so as to intuitively display the operating status of the device. In an embodiment of the present application, the test status of this test and whether the test result is normal can be displayed to the tester based on the different states of the indicator light, which can more intuitively display the test process and results.
[0051] The electric energy meter management module testing method provided in this embodiment can generate a corresponding simulated test environment for the simulated metering module based on the user's test selection, so that the user does not have to be restricted by the actual operation cycle of the electric energy meter under the real metering module when performing the test items of the electric energy meter management module, and can shorten the response time. Furthermore, by setting a status indicator light, the test status and test results are displayed to the tester, which can more intuitively display the test process and results. At the same time, by setting an indicator signal for instructing each unit to start executing the relevant steps, the test process and results are intuitively displayed. By optimizing the test process of the electric energy meter management module, the problem of timing disorder can also be avoided, thereby effectively reducing the test cycle and reducing the test cost.
[0052] Further, as Figure 2As a specific implementation of the method shown, this embodiment provides an electric energy meter management module testing device, which includes: the device includes a host computer, an analog metering module, and a management module interface for connecting to the electric energy meter management module.
[0053] The host computer is configured to determine a test case in response to a test case selection request, and send a simulated measurement value corresponding to the test case to the simulated measurement module, wherein at least one test case is pre-stored in the host computer, and each test case corresponds to a simulated measurement value;
[0054] The analog measurement module is used to receive and store the analog measurement value and send a confirmation message to the host computer;
[0055] The host computer is also used to send a test execution command to the electric energy meter management module based on the confirmation information, so that the electric energy meter management module receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface based on the test execution command, generates test data based on the test electrical signal, and sends the test data to the host computer through the management module interface.
[0056] The host computer is further configured to generate a test result of the electric energy meter management module based on the received test data.
[0057] In one embodiment, the first interface of the host computer is connected to the first interface of the management module interface via a first universal asynchronous receiver / transmitter bus, the second interface of the host computer is connected to the first interface of the analog metering module via a second universal asynchronous receiver / transmitter bus, and the second interface of the analog metering module is connected to the second interface of the management module interface via a third universal asynchronous receiver / transmitter bus or a serial peripheral interface bus. Wherein, the host computer and the electric energy meter management module adopt an asynchronous receiver / transmitter bus (UART) interface communication to realize the issuance, execution and return of test tasks, the host computer and the analog metering module adopt a UART interface communication to realize the host computer's setting of data in the random access memory, and the electric energy meter management module and the analog metering module adopt a UART or serial peripheral interface bus communication to realize the execution of the test tasks issued by the host computer software by the electric energy meter management module. Communication based on UART interface communication can realize full-duplex transmission and reception, improve data transmission efficiency, and effectively reduce the occurrence of timing disorder. In addition, when the second interface of the analog metering module is connected to the second interface of the management module interface through a serial peripheral interface bus, the device divides the analog metering module into two communication channels, communicating with the host computer and the electric energy meter management module respectively, solving the timing disorder problem caused by the simultaneous data setting and execution test of the analog metering module during communication between the electric energy meter management module and the analog metering module, and can accurately test whether there is a timing problem in the serial peripheral interface bus of the electric energy meter management module.
[0058] In one embodiment, Figure 4 As shown, the test device includes a device housing 41 having multiple sides, wherein the host computer and the analog metering module are disposed within the device housing 41, and the management module interface 42 is disposed on one of the sides of the device housing 41 for connecting to the electric energy meter management module. The test device also includes an indicator light 43 disposed on one of the sides of the device housing 41, wherein the indicator light 43 is connected to the host computer, and the number of indicator lights 43 can be one or more. Furthermore, a host computer touch screen display 46 can be disposed on one side of the device housing 41 for configuring the host computer and reading host computer-related information to track and control the test work.
[0059] In one embodiment, the device further includes a Universal Serial Bus (USB) interface, wherein the USB interface is connected to the host computer and is used to connect to an external communication terminal. This facilitates importing control software into the host computer without a network. Further, Figure 5As shown, the electric energy meter management module test device also includes a DC power supply module 5 and an AC power supply module 6, wherein the DC power supply module 5 is used to power the analog metering module 2 and the electric energy meter management module 4, and the AC power supply module 6 is used to power the host computer 1. Specifically, the DC power supply module 5 can provide 5V and 15V power supplies to power the analog metering module 2 and the electric energy meter management module 4, respectively. The AC power supply module 6 can provide 220V power supply to power the host computer. Based on the DC power supply module and AC power supply module in the electric energy meter management module test device, the components with different power supply requirements are respectively powered, thereby improving the stability of the power supply of the device.
[0060] In one embodiment, the analog metrology module includes a central processing unit (CPU) and a random access memory (RAM). The CPU's performance is comparable to that of a Cortex-M4 architecture, with a clock speed of at least 60 MHz. The RAM's capacity is greater than or equal to 1 megabyte. The large-capacity RAM within the analog metrology module allows for rapid reading and writing of test information, while the high-performance CPU enables rapid scheduling of this information.
[0061] Furthermore, the analog metering module can also be configured to receive and store the analog metering value and send a confirmation message to the host computer, including: the central processing unit storing the analog metering value in the random access memory and sending the stored analog metering value result as confirmation message to the host computer. Furthermore, the host computer can also be configured to send a test execution command to the electric energy meter management module based on the confirmation message, including: first, the host computer, based on the received analog metering value, determines whether the analog metering value satisfies a preset comparison relationship with the test case. The comparison relationship is a correspondence between the test case and the analog metering value required to execute the test case. Each test case has a corresponding analog metering value. Specifically, each test case corresponds to a corresponding analog metering value, and the two can be stored in the host computer in the form of a comparison table. When the host computer sends the analog metering value corresponding to each test case to the analog metering module, the analog metering module stores the analog metering value and returns the stored result as confirmation message to the host computer. Based on the received confirmation information including the analog metering value stored by the analog metering module, the host computer determines whether the analog metering value in the confirmation information satisfies the control relationship with the test case. If the analog metering value and the test case satisfy the control relationship, the host computer sends a test execution command to the electric energy meter management module. Specifically, when the analog metering value and the test case satisfy the control relationship, it is determined that the analog metering value stored in the analog metering module is correct, and the next test can be carried out. In an embodiment of the present application, based on the confirmation of the analog metering value stored in the analog metering module, it can be ensured that the analog metering module can generate a correct test environment in subsequent tests to improve the accuracy of the test work.
[0062] In one embodiment, the electric energy meter management module can also be used to receive a test electrical signal corresponding to the analog metering value from the analog metering module via the management module interface based on the test execution command, including: first, the electric energy meter management module issues a read information command in response to the test execution command, and sends the read information command to the analog metering module. The read information command can be a signal that controls the analog metering module to generate a simulated test environment based on the analog metering value. Specifically, after receiving the test execution command, the electric energy meter management module can determine whether it is in a ready state. If the electric energy meter management module is in a ready state for testing, it can issue a read information command to the analog metering module. If the electric energy meter management module is not in a ready state, it can issue an alarm message to enable the tester to handle it. After issuing the read information command, the electric energy meter management module can enter a standby state and prepare to read the test electrical signal issued by the analog metering module. Then, in response to the read information command, the analog metering module retrieves the analog metering value from the random access memory, generates a test electrical signal corresponding to the analog metering value, and sends the test electrical signal to the electric energy meter management module. Finally, the electric energy meter management module receives the test electrical signal. In an embodiment of the present application, based on the electric energy meter management module in a ready state, an instruction to generate a test electrical signal is sent to the analog metering module to ensure that when the analog metering module is running, the electric energy meter management module can normally receive the test signal, ensure that the electric energy meter management module can fully perform the management work of the analog metering module during the test cycle, and ensure the effectiveness of the test work.
[0063] In one embodiment, the test results generated by the host computer include normal results and abnormal results. If the values of various parameters in the test results are within a threshold range set for the parameter values, the test result is determined to be normal. If the values of various parameters in the test results are not within the threshold range set for the parameter values, the test result is determined to be abnormal. Specifically, if the test result is normal, it indicates that the electricity meter management module is able to perform management functions normally and can be used normally. If the test result is abnormal, it indicates that the electricity meter management module is not able to perform management functions normally and requires further testing. Furthermore, the testing device also includes an indicator light, which is connected to the host computer. Furthermore, the host computer is further configured to: if the test result is normal, control the indicator light to display in a preset first state. The first state may be that the indicator light is constantly on. If the test result is abnormal, the host computer controls the indicator light to display in a preset second state. The second state may be that the indicator light flashes at a specific frequency, indicating to the tester that the electricity meter management module is not able to perform management functions normally and requires further testing. Furthermore, the test status can also be displayed based on the indicator light. Specifically, if the device is in a normal test state, the host computer controls the indicator light to display in a preset third state, such as displaying with a light of a specific color; if the device is in an abnormal test state, the host computer controls the indicator light to display in a preset fourth state, such as displaying with a light of a specific color different from the third state, so as to intuitively display the operating status of the device. In an embodiment of the present application, the test status of this test and whether the test result is normal can be displayed to the tester based on the different states of the indicator light, which can more intuitively display the test process and results.
[0064] It should be noted that for other corresponding descriptions of the functional units involved in the electric energy meter management module test device provided in this embodiment, please refer to Figures 1 to 3 The corresponding description in will not be repeated here.
[0065] Based on the above Figure 2 The method shown in FIG. 1 is a method for performing the above-mentioned operation. Accordingly, this embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned Figure 2 The test method of the electric energy meter management module is shown.
[0066] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0067] Based on the above Figure 2 The method shown, and Figure 4 and Figure 5 The embodiment of the electric energy meter management module test device shown in the figure, in order to achieve the above purpose, this embodiment also provides a physical device for testing the electric energy meter management module, which can be a personal computer, server, smart phone, tablet computer, smart watch, or other network device, etc. The physical device includes a storage medium and a processor; the storage medium is used to store computer programs; the processor is used to execute the computer program to achieve the above Figure 2 The method shown.
[0068] Optionally, the physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Wi-Fi interface), etc.
[0069] Those skilled in the art will understand that the physical device structure for testing an electric energy meter management module provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0070] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the physical device hardware and the software resources to be identified, supporting the execution of the information processing program and other software and / or programs to be identified. The network communication module is used to enable communication between components within the storage medium and with other hardware and software in the physical information processing device.
[0071] Through the description of the above implementation mode, it can be clearly understood by those skilled in the art that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the technical solution of the present application, first, the host computer determines the test case in response to the test case selection request, and sends the analog metering value corresponding to the test case to the analog metering module, wherein the host computer is pre-stored with at least one test case, and each test case corresponds to an analog metering value; then, the analog metering module receives and stores the analog metering value and sends a confirmation message to the host computer; then, the host computer sends a test execution command to the electric energy meter management module based on the confirmation message; then, the electric energy meter management module receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface based on the test execution command, and generates test data based on the test electrical signal, and sends the test data to the host computer through the management module interface; finally, the host computer generates a test result of the electric energy meter management module based on the received test data. Compared with the existing technology, the analog metering module can generate a corresponding simulated test environment based on the user's test selection, so that the user does not have to be restricted by the actual operation cycle of the electric meter under the real metering module when conducting test items of the electric meter management module, and can shorten the response time. At the same time, by optimizing the test process of the electric meter management module, the problem of timing disorder can also be avoided, thereby effectively reducing the test cycle and reducing the test cost.
[0072] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0073] The serial numbers of the above application are for descriptive purposes only and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure only discloses several specific implementation scenarios of the present application, but the present application is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present application.
Claims
1. A method for testing an electric energy meter management module, characterized in that: The method is applied to a test device for testing an electric energy meter management module having an operating system. The test device includes: a host computer, an analog metering module, and a management module interface for connecting to the electric energy meter management module. The method includes: The host computer determines the test case in response to the test case selection request, and sends the analog measurement value corresponding to the test case to the analog measurement module, wherein the host computer pre-stores at least one test case, and each test case corresponds to an analog measurement value; The analog metering module receives and stores the analog metering value, and sends a confirmation message to the host computer; The host computer sends a test execution command to the electric energy meter management module based on the confirmation information; The electric energy meter management module receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface based on the test execution command, generates test data based on the test electrical signal, and sends the test data to the host computer through the management module interface; The host computer generates a test result of the electric energy meter management module based on the received test data.
2. The method according to claim 1, characterized in that The analog metering module includes a central processing unit and a random access memory; the analog metering module receives and stores the analog metering value and sends a confirmation message to the host computer, including: The central processing unit stores the analog measurement value in the random access memory, and sends the storage result of the analog measurement value as confirmation information to the host computer; The host computer sends a test execution command to the electric energy meter management module based on the confirmation information, including: The host computer determines, based on the received analog measurement value, whether the analog measurement value and the test case satisfy a preset comparison relationship, wherein the comparison relationship is a correspondence between the test case and the analog measurement value required to execute the test case; If the simulated measurement value and the test case satisfy the control relationship, the host computer sends a test execution command to the electric energy meter management module.
3. The method according to claim 1, characterized in that The electric energy meter management module receives, based on the test execution command, a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface, including: The electric energy meter management module issues an information reading command in response to the test execution command, and sends the information reading command to the analog metering module; The analog metering module retrieves the analog metering value from the random access memory in response to the information read command, generates a test electrical signal corresponding to the analog metering value, and sends the test electrical signal to the electric energy meter management module; The electric energy meter management module receives the test electrical signal.
4. The method according to claim 1, wherein The test results include normal results and abnormal results; The testing device further comprises an indicator light, wherein the indicator light is connected to the host computer; The method further comprises: If the test result is normal, the host computer controls the indicator light to display in a preset first state; If the test result is an abnormal result, the host computer controls the indicator light to display in a preset second state.
5. An electric energy meter management module testing device, characterized in that: The device includes a host computer, an analog metering module, and a management module interface for connecting to the electric energy meter management module, wherein: The host computer is configured to determine a test case in response to a test case selection request, and send a simulated measurement value corresponding to the test case to the simulated measurement module, wherein the host computer pre-stores at least one test case, and each test case corresponds to a simulated measurement value; The analog measurement module is used to receive and store the analog measurement value and send a confirmation message to the host computer; The host computer is further configured to send a test execution command to the electric energy meter management module based on the confirmation information, so that the electric energy meter management module receives a test electrical signal corresponding to the analog metering value from the analog metering module through the management module interface based on the test execution command, generates test data based on the test electrical signal, and sends the test data to the host computer through the management module interface; The host computer is further configured to generate a test result of the electric energy meter management module based on the received test data.
6. The device according to claim 5, characterized in that The first interface of the host computer is connected to the first interface of the management module interface through a first universal asynchronous receiver-transmitter bus, the second interface of the host computer is connected to the first interface of the analog metering module through a second universal asynchronous receiver-transmitter bus, and the second interface of the analog metering module is connected to the second interface of the management module interface through a third universal asynchronous receiver-transmitter bus or a serial peripheral interface bus.
7. The device according to claim 5, characterized in that The testing device includes a device housing having a plurality of sides; The host computer and the analog metering module are arranged in the device housing, and the management module interface is arranged on one side surface of the device housing for connecting to the electric energy meter management module; The testing device further comprises an indicator light arranged on one side surface of the device housing, wherein the indicator light is connected to the host computer.
8. The device according to claim 5, characterized in that The device also includes a universal serial bus interface; The universal serial bus interface is connected to the host computer and is used to connect to an external communication terminal.
9. A 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 4 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Anomaly diagnosis method and device for electric energy metering device and readable storage medium
CN112084220A
Reliability testing method and device for electric energy meter operating system and computer equipment
CN112882877A