Automated testing system for the gateway under test
By simulating an automated testing system and using simulated power sources and terminal nodes for testing, the problems of low testing efficiency and poor accuracy of distribution smart gateways have been solved, improving testing efficiency and accuracy and ensuring the safety and reliability of the distribution network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
- Filing Date
- 2023-05-16
- Publication Date
- 2026-05-26
Smart Images

Figure CN116436835B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power distribution network technology, and more specifically, to a simulated automated testing system for a gateway under test. Background Technology
[0002] An edge gateway / smart gateway is an intelligent device that utilizes container technology, possesses edge computing capabilities, and employs a hardware platform, software-defined functionality, modular structure, hardware-software decoupling, and self-adaptive communication protocol design. It meets the requirements of high-performance concurrency, large-capacity storage, and multiple data collection objects, integrating functions such as power supply and consumption information collection, data collection from various terminals, equipment status monitoring and communication networking, localized analysis and decision-making, and collaborative computing. The edge gateway / smart gateway is a completely new device with a novel architecture, powerful functionality, and software-defined hardware capabilities.
[0003] To achieve lean management of distribution networks, promote lean operation and maintenance control, and standardize low-voltage management, and comprehensively improve the informatization and intelligence level of the power grid, existing technologies have constructed the Distribution Internet of Things (IoT). Among these, the distribution smart gateway, as the access unit connecting "things" to the "network" in the distribution IoT, is responsible for providing upstream basic data such as the operating status, equipment status, environmental status, and other auxiliary information of the distribution network, and downstream terminals that execute decision commands or local control, collecting data from each terminal and transmitting it upstream. Therefore, the distribution smart gateway is of great significance to the entire distribution network, and its performance directly affects the safety and reliability of the distribution network. However, currently, there is a lack of efficient testing methods for the functions and performance of distribution smart gateways, leading to problems of low testing efficiency and accuracy due to the poor overall performance of the distribution smart gateways. To avoid the impact of poor overall performance (low testing efficiency and accuracy) on the safety and reliability of the entire distribution network, a testing system for the comprehensive performance of distribution smart gateways is urgently needed. Summary of the Invention
[0004] The main objective of this application is to provide a simulated automated testing system for gateways under test, so as to at least solve the problems of low testing efficiency and poor accuracy of gateways under test in the prior art.
[0005] To achieve the above objectives, according to one aspect of this application, a simulated automated testing system for a gateway under test is provided, comprising: a test bench having target parameters, the target parameters including at least voltage or current; a simulation power source electrically connected to the test bench for acquiring the target parameters and outputting simulated parameters from the target parameters; a simulation terminal electrically connected to the simulation power source and the test bench for receiving the simulated parameters, performing simulation tests based on the simulated parameters, and outputting simulation test results to the test bench, so that the test bench can determine whether the target parameters match the gateway under test based on the simulation test results; and a terminal node electrically connected to the simulation power source and the test bench for receiving the simulated parameters, generating terminal node operating information based on the simulated parameters, and outputting the terminal node operating information to the test bench when the test bench determines that the target parameters match the gateway under test, so that the test bench can determine whether the test results of the gateway under test in the terminal node are accurate based on the terminal node operating information.
[0006] Furthermore, the test bench includes a calibration test module, which is used to receive simulation test results and determine whether the gateway under test matches the target parameters based on the simulation test results and target parameters. If the gateway under test matches the target parameters, it receives terminal node operation information and determines whether the test results of the gateway under test are accurate based on the terminal node operation information and target parameters.
[0007] Furthermore, the terminal node includes: an intelligent terminal electrically connected to the simulated power source, used to receive simulated parameters and generate first operating information based on the simulated parameters, and output the first operating information, when the test bench determines that the terminal node and target parameters match; and a power distribution gateway electrically connected to the simulated power source, the intelligent terminal, and the test bench, used to receive simulated parameters, generate second operating information based on the simulated parameters, receive the first operating information, and send the first and second operating information to the test bench. The terminal node operating information includes the first and second operating information.
[0008] Furthermore, there are multiple power distribution gateways, and these multiple power distribution gateways are connected in parallel.
[0009] Furthermore, the power distribution gateway includes a first interface unit and a second interface unit. The power distribution gateway is electrically connected to the smart terminal through the first interface unit and electrically connected to the test bench through the second interface unit. The first interface unit is used to receive first operating information, and the second interface unit is used to send the first operating information and the second operating information.
[0010] Furthermore, the first interface unit includes multiple first interfaces, and the second interface unit includes multiple second interfaces, with each of the multiple first interfaces and multiple second interfaces corresponding one-to-one.
[0011] Furthermore, the calibration test module includes: a test request unit, electrically connected to the power distribution gateway via a second interface unit, used to obtain parameter information of the power distribution gateway when the test results of the power distribution gateway are determined to be accurate, and generate a test request packet according to the parameter information and the protocol corresponding to the second interface unit. The parameter information includes at least the address information of the power distribution gateway. A protocol conformance unit, electrically connected to the test request unit, used to obtain the test request packet from the test request unit, collect the original data of the power distribution gateway according to the test request packet, and send the test request packet to the power distribution gateway so that the power distribution gateway can parse the test request packet to obtain parsed data. The original data includes at least the collected data of the power distribution gateway. A data detection unit, electrically connected to the protocol conformance unit, used to obtain the original data and parsed data from the protocol conformance unit, detect the original data to obtain first detection data, and detect the parsed data to obtain second detection data, and determine whether the communication protocol of the power distribution gateway is consistent based on the first detection data and the second detection data.
[0012] Furthermore, the simulation terminal has simulation elements corresponding to the concentrator, temperature and humidity sensor, smoke sensor and current sensor included in the smart terminal, and the concentrator, temperature and humidity sensor, smoke sensor, current sensor and simulation elements are electrically connected to the output terminal of the simulation power source, and the concentrator, temperature and humidity sensor, smoke sensor and current sensor are electrically connected to the power distribution gateway through different first interfaces.
[0013] Furthermore, the protocol conformance unit includes: a first data acquisition unit electrically connected to the test request unit, used to obtain a test request packet from the test request unit and collect raw data of the power distribution gateway according to the test request packet, the raw data including at least the collected data of the power distribution gateway; and a second data acquisition unit electrically connected to the first data acquisition unit, used to obtain a test request packet from the first data acquisition unit and send the test request packet to the power distribution gateway so that the power distribution gateway can parse the test request packet and obtain parsed data.
[0014] Furthermore, the data detection unit also includes: a communication link unit, electrically connected to the protocol conformance unit and the test bench, used to obtain a test request packet from the protocol conformance unit and send a communication command to the test bench according to the test request packet, so that the test bench outputs a first feedback signal to the communication link unit according to the communication command, the first feedback signal being used to instruct the communication link unit to execute a communication establishment command or a communication disconnect command; a reset unit, electrically connected to the power distribution gateway, used to receive a reset command and reset the power distribution gateway to its initial state according to the reset command; a synchronization unit, electrically connected to the power distribution gateway, used to obtain the current standard clock and synchronize the clock of the power distribution gateway to the current standard clock according to the current standard clock; and an abnormal event testing unit, electrically connected to the power distribution gateway, used to output an abnormal event to the power distribution gateway, so that the power distribution gateway outputs a second feedback signal to the abnormal event testing unit according to the abnormal event, the second feedback signal being used to determine whether there is an abnormality in the power distribution gateway.
[0015] Furthermore, the calibration test module also includes: an interactive operation test unit electrically connected to the power distribution gateway, used to acquire multiple first interactive data, calculate multiple first weight values of the multiple first interactive data according to a first preset weight coefficient, to obtain a first summation, wherein the first summation is the sum of multiple first weight values, and the first interactive data is the interactive data between the power distribution gateway and the test bench; and an interactive operation test unit used to acquire multiple second interactive data, calculate multiple second weight values of the second interactive data according to a second preset weight coefficient, to obtain a second summation, wherein the second summation is the sum of multiple second weight values, and the second interactive data is the interactive data between the power distribution gateway and the smart terminal; and the interactive operation test unit is also used to determine whether the first summation is greater than the first preset weight and threshold, to obtain a first judgment result, and to determine whether the second summation is greater than the second preset weight and threshold, to obtain a second judgment result, and, if both the first judgment result and the second judgment result are yes, to determine that the multiple first interactive data and the multiple second interactive data meet preset requirements.
[0016] Furthermore, the interactive operation test unit includes: a data acquisition unit, electrically connected to the power distribution gateway, for acquiring the following data: multiple first interactive data and multiple second interactive data, wherein the first interactive data is interactive data between the power distribution gateway and the test bench, and the second interactive data is interactive data between the power distribution gateway and the smart terminal; a calculation unit, electrically connected to the data acquisition unit, for acquiring the first interactive data and the second interactive data from the data acquisition unit, and determining multiple first weight values based on a first preset weight coefficient and the multiple first interactive data, and determining multiple second weight values based on a second preset weight coefficient and the second interactive data; and an analysis unit, electrically connected to the data acquisition unit, for acquiring the multiple first weight values and the multiple second weight values from the calculation unit, and determining whether the multiple first interactive data and the multiple second interactive data meet preset requirements based on a first judgment result and a second judgment result.
[0017] Applying the technical solution of this application, since the simulated automated testing system of this application includes a simulation terminal and a terminal node both electrically connected to the simulation power source, and the simulation power source and the test bench are electrically connected, when the test bench outputs the target parameters to the simulation power source, the simulation power source can first output the simulation parameters corresponding to the target parameters to the simulation terminal. This allows the simulation terminal to first perform a preliminary simulation test based on the simulation parameters and output the simulation test results to the test bench. The test bench can then determine whether the target parameters output by the test bench are suitable for testing the gateway under test based on the simulation test results. Furthermore, if the simulation test result indicates that the simulation test has passed... In this case, the simulated parameters corresponding to the target parameters are output to the terminal node again through the aforementioned simulation power source, thereby testing the terminal node. After the terminal node outputs its operating information to the test bench, the test bench can determine whether the test results are accurate based on the terminal node's operating information. That is, this application achieves the purpose of testing the comprehensive performance of the gateway under test through the terminal node's operating information. Only when the terminal node's operating information indicates that it meets the preset requirements (i.e., the comprehensive performance of the gateway under test is good) can subsequent accurate tests be performed on the gateway under test, thereby improving the testing efficiency and accuracy of the gateway under test. Attached Figure Description
[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0019] Figure 1 A structural block diagram of a simulated automated testing system for a power distribution gateway provided in an embodiment of this application is shown;
[0020] Figure 2A structural block diagram of a calibration test module in a simulated automated test system for a power distribution gateway, according to an embodiment of this application, is shown.
[0021] Figure 3 A flowchart illustrating a simulated automated testing method for a power distribution gateway according to an embodiment of this application is shown.
[0022] The above figures include the following reference numerals:
[0023] 10. Intelligent terminal; 20. Power distribution gateway; 201. First interface unit; 202. Second interface unit; 203. Acquisition terminal; 204. Switching interface; 30. Simulated power source; 40. Test bench; 50. Simulation terminal; 60. Calibration test module; 601. Test request unit; 602. Data detection unit; 603. Protocol consistency unit; 604. First data acquisition unit; 605. Second data acquisition unit; 606. Communication link unit; 607. Reset unit; 608. Synchronization unit; 609. Abnormal event test unit; 610. Interactive operation test unit; 611. Data acquisition unit; 612. Calculation unit; 613. Analysis unit. Detailed Implementation
[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] As described in the background section, there is currently a lack of efficient testing methods for the functions and performance of distribution smart gateways in the existing technology. Therefore, when the overall performance of the distribution smart gateway is poor (low testing efficiency and poor accuracy), it will affect the safety and reliability of the entire distribution network. In order to solve the problems of low testing efficiency and poor accuracy of distribution smart gateways, the embodiments of this application provide a simulated automated testing system for distribution gateways.
[0028] This embodiment provides a simulated automated testing system for a gateway under test, the system comprising:
[0029] The test bench has target parameters, which include at least voltage or current.
[0030] Specifically, the aforementioned test bench generates target parameters for testing. Optionally, these target parameters can be externally input or pre-set. For example, the target parameters can be temperature, humidity, voltage, or current, etc.
[0031] The simulation power source is electrically connected to the test bench and is used to acquire target parameters and output simulated parameters from the target parameters.
[0032] Specifically, the test bench is electrically connected to the simulated power source. After the test bench generates the target parameters, in order to ensure that the simulated power source outputs analog parameters consistent with the target parameters, the target parameters are input to the simulated power source. Since the simulated power source can act as a controllable power supply, the target parameters can configure the simulated power source to output analog parameters, which are then output by the simulated power source after being configured by the target parameters. Optionally, the analog quantity output by the simulated power source device includes at least voltage or current. For example, when the target parameter is 100V, the analog quantity output by the simulated power source is also 100V.
[0033] The simulation terminal is electrically connected to the simulation power source and the test bench. It is used to receive simulation parameters, perform simulation tests based on the simulation parameters, and output simulation test results to the test bench so that the test bench can determine whether the target parameters match the gateway under test based on the simulation test results.
[0034] Specifically, to confirm whether the target parameters input to the simulated power source on the test bench can be used to test the gateway under test, the simulated terminal is first tested according to the target parameters. Since the simulated parameters are consistent with the target parameters, the simulated parameters in the power simulation source can be input to the simulated terminal through the electrically connected power simulation source, so that the simulated terminal receives the simulated parameters and performs simulation tests based on the simulated parameters, and then outputs the simulation test results to the test bench. Here, the simulation test serves as a preliminary test. When the test bench receives the simulation test results, it can determine whether the target parameters output to the simulated power source on the test bench can be used to test the terminal node. It should be noted that the terminal node includes the gateway under test.
[0035] The terminal node is electrically connected to the simulation power source and the test bench. It is used to receive simulation parameters and generate terminal node operation information based on the simulation parameters when the test bench determines that the target parameters match the gateway under test. It also outputs the terminal node operation information to the test bench so that the test bench can determine whether the test results of the gateway under test in the terminal node are accurate based on the terminal node operation information.
[0036] Specifically, if the test bench determines that the test results of the simulated terminal meet the requirements, optionally, if the simulated terminal can operate normally based on the simulated parameters, it indicates that the current target parameters are suitable for testing the terminal node. Then, the simulated parameters configured by the target parameters are output to the terminal node so that the terminal node receives the simulated parameters and tests the terminal node according to the simulated parameters to generate terminal node operation information. The terminal node operation information can be transmitted to the test bench, so that the test bench can determine whether the terminal node is working normally based on the terminal node operation information. If the terminal node is determined to be not working normally, it indicates that the test results of the gateway under test are inaccurate. If the terminal node operation information indicates that the terminal node is working normally, it indicates that the test results of the gateway under test are accurate.
[0037] In the above embodiments, since the simulated automated testing system of this application includes a simulation terminal and a terminal node, both electrically connected to the simulation power source, and the simulation power source and the test bench are electrically connected, when the test bench outputs the target parameters to the simulation power source, the simulation power source can first output the simulation parameters corresponding to the target parameters to the simulation terminal. This allows the simulation terminal to first perform a preliminary simulation test based on the simulation parameters and output the simulation test results to the test bench. The test bench can then determine whether the target parameters output by the test bench are suitable for testing the gateway under test based on the simulation test results. Furthermore, if the simulation test result indicates that the simulation test has passed... In this case, the simulated parameters corresponding to the target parameters are output to the terminal node again through the aforementioned simulation power source, thereby testing the terminal node. After the terminal node outputs its operating information to the test bench, the test bench can determine whether the test results are accurate based on the terminal node's operating information. That is, this application achieves the purpose of testing the comprehensive performance of the gateway under test through the terminal node's operating information. Only when the terminal node's operating information indicates that it meets the preset requirements (i.e., the comprehensive performance of the gateway under test is good) can subsequent accurate tests be performed on the gateway under test, thereby improving the testing efficiency and accuracy of the gateway under test.
[0038] In some optional implementations, the test bench includes a calibration test module, which is used to receive simulation test results, determine whether the gateway under test matches the target parameters based on the simulation test results and the target parameters, and if the gateway under test matches the target parameters, receive terminal node operation information, and determine whether the test results of the gateway under test are accurate based on the terminal node operation information and the target parameters.
[0039] In the above embodiment, after the test bench outputs the target parameters to the simulation terminal via a simulation power source, a calibration test module is provided in the test bench to receive the simulation test results from the simulation terminal and determine whether the output target parameters meet the test requirements based on the simulation test results. This calibration test module receives the simulation test results input to the test bench and then judges the simulation test results to determine whether the simulation terminal is operating normally with the simulated parameters. If the simulation terminal is operating normally with the simulated parameters, the calibration test module of the test bench can determine that the target parameters output by the test bench meet the test requirements of the gateway under test. Therefore, it can output the simulated parameters corresponding to the target parameters to the terminal node, allowing the terminal node to perform tests based on the simulated parameters and obtain terminal node operating information. This allows for a preliminary determination of the accuracy of the test results for the gateway under test. Optionally, the simulation terminal can be located within the test bench.
[0040] Optionally, when the simulated parameters corresponding to the target parameters are input to the simulation terminal for simulation testing, the calibration test module can detect the simulation test results and obtain the detection results. If the data indicators in the simulation test results meet the standard requirements corresponding to the simulated parameters, it can be determined that the simulated parameters corresponding to the target parameters output by the test bench to the simulation power source can be used to test the terminal node, thereby avoiding inaccurate detection results due to simulation parameter mismatch (i.e., mismatch between the target parameters of the gateway under test and the test bench).
[0041] In some optional implementations, the terminal node includes: a smart terminal electrically connected to the simulated power source, used to receive simulated parameters and generate and output first operating information based on the simulated parameters when the test bench determines that the terminal node and target parameters match; and a power distribution gateway electrically connected to the simulated power source, the smart terminal, and the test bench, used to receive simulated parameters, generate second operating information based on the simulated parameters, receive the first operating information, and send the first and second operating information to the test bench. The terminal node operating information includes the first and second operating information.
[0042] In the above embodiments, in order to determine whether the working condition of the gateway under test in the terminal node is normal based on the terminal node operation information of the terminal node, that is, whether the test efficiency and test accuracy of the gateway under test meet the preset standards, the terminal node is equipped with a smart terminal and a power distribution gateway, wherein the power distribution gateway is the gateway under test. By outputting the simulated parameters corresponding to the target parameters to the smart terminal and the power distribution gateway respectively, the smart terminal and the power distribution gateway are combined for testing. After the smart terminal and the power distribution gateway run the simulated parameters respectively, the smart terminal can generate first operation information based on the simulated parameters, and the power distribution gateway can generate second operation information based on the simulated parameters. Furthermore, since the simulated parameters are confirmed to be the simulated parameters matching the gateway under test, the first operation information can be used as a preset standard. Then, after sending the first operation information and the second operation information to the test bench, the test bench can determine whether the power distribution gateway is working properly by judging the first operation information and the second operation information. Specifically, if the first and second operating information are consistent, it indicates that the power distribution gateway is working normally, thereby improving testing efficiency and accuracy when conducting subsequent precise tests through the power distribution gateway.
[0043] Furthermore, the aforementioned test bench includes a standard test module. Since the smart terminal is electrically connected to the test bench via a power distribution gateway, after the smart terminal generates the first operating information, it first sends the first operating information to the power distribution gateway. Then, the power distribution gateway inputs the first operating information and the second operating information to the standard test module, enabling the standard test module to analyze the first operating information and the second operating information to determine whether the first operating information and the second operating information are consistent. If they are consistent, the standard test module determines that the power distribution gateway is functioning normally.
[0044] In some alternative implementations, there may be multiple power distribution gateways connected in parallel.
[0045] In cases where multiple power distribution gateways are involved, to enable the simulated automated testing system to test these gateways efficiently, the above embodiment connects them in parallel. This allows for a one-to-many testing relationship between the simulated automated testing system and the multiple gateways, thereby quickly completing the testing of multiple gateways and significantly improving the efficiency of testing their overall performance. Optionally, when connecting the multiple gateways in parallel to the simulated automated testing system, the gateways under test can be selectively connected to the entire simulated automated testing system sequentially.
[0046] In some alternative implementations, the power distribution gateway also includes acquisition terminals and digital input interfaces. The analog parameters include digital inputs and analog inputs. The simulated power source injects digital inputs into the digital input interfaces and analog inputs into the smart terminals and acquisition terminals, respectively.
[0047] In this embodiment, after the simulated power source configures the corresponding simulated parameters according to the target parameters, the simulated parameters are input to the smart terminal and the power distribution gateway respectively. Specifically, the simulated power source injects switch signals into the switch interface of the power distribution gateway, and injects the analog signals from the simulated parameters into the acquisition terminals of the smart terminal and the power distribution gateway, so that the parameters corresponding to the analog signals can be input to the smart gateway and the power distribution gateway respectively for testing.
[0048] In some optional implementations, the power distribution gateway includes a first interface unit and a second interface unit. The power distribution gateway is electrically connected to the smart terminal through the first interface unit and electrically connected to the test bench through the second interface unit. The first interface unit is used to receive first operating information, and the second interface unit is used to send the first operating information and the second operating information.
[0049] In the above embodiment, by setting a first interface unit to the power distribution gateway, the power distribution gateway can obtain the first operating information of the smart terminal through the first interface unit. By setting a second interface unit to the power distribution gateway, the power distribution gateway can send the obtained first operating information and the generated second operating information to the test bench through the second interface unit. Further, the calibration test module in the test bench receives the first operating information and the second operating information. That is, during the test, the first operating information generated by the smart terminal running the analog signal is transmitted sequentially to the calibration test module of the test bench through the first interface unit and the second interface unit. The second operating information generated by the power distribution gateway running the analog signal is directly transmitted to the calibration test module of the test bench through the second interface unit. Then, the calibration test module can compare the first operating information and the second operating information, and if the comparison shows that the two operating information correspond, it determines that the preliminary test of the power distribution gateway has passed, that is, the accuracy of the power distribution gateway in the preliminary test meets the standard conditions corresponding to the analog signal.
[0050] Optionally, the first interface unit includes at least one of a 1376.1 protocol interface, a Modbus interface, and a Bluetooth interface, and the second interface unit includes at least one of an IEC104 protocol interface, a 698.45 protocol interface, and an MQTT protocol interface.
[0051] In some optional implementations, the first interface unit includes a plurality of first interfaces, and the second interface unit includes a plurality of second interfaces, with the plurality of first interfaces and the plurality of second interfaces corresponding one-to-one.
[0052] In the above embodiments, to avoid information transmission errors during data transmission between the first interface unit and the second interface unit, multiple interfaces are provided in both units. Specifically, the first interface unit includes multiple first interfaces, and the second interface unit includes multiple second interfaces. Different data from the first operating information of the smart terminal are obtained through different first interfaces, and different data from the first operating information and the second operating information of the power distribution gateway are sent to the test bench through different second interfaces. Furthermore, since each first interface corresponds to each second interface, different data are transmitted through different interfaces, thereby improving data transmission efficiency while avoiding information transmission errors.
[0053] Optionally, the first interface unit includes three first interfaces. Wherein, if the first interface in the first interface unit is a 1376.1 protocol interface, the second interface in the second interface unit is an IEC104 protocol interface; if the first interface in the first interface unit is a Modbus interface, the second interface in the second interface unit is a 698.45 protocol interface; if the first interface in the first interface unit is a Bluetooth interface, the second interface in the second interface unit is an MQTT protocol interface. That is, the first and second interface units form three pairs of interfaces, and in each pair, the first and second interfaces transmit the same type of data from the first and second operating information each time, thereby making data transmission more accurate. It should be noted that since the first and second operating information are both generated based on the same analog quantity, the data types in the first and second operating information are the same. Optionally, the second interface unit mainly transmits information via Ethernet, wireless network, or fiber optic cable, thereby further improving data transmission efficiency.
[0054] In some optional implementations, the calibration test module includes: a test request unit electrically connected to the power distribution gateway via a second interface unit, used to acquire parameter information of the power distribution gateway when the test results of the power distribution gateway are determined to be accurate, and generate a test request packet according to the parameter information and the protocol corresponding to the second interface unit, wherein the parameter information includes at least the address information of the power distribution gateway; a protocol conformance unit electrically connected to the test request unit, used to acquire the test request packet from the test request unit, collect the original data of the power distribution gateway according to the test request packet, and send the test request packet to the power distribution gateway so that the power distribution gateway parses the test request packet to obtain parsed data, wherein the original data includes at least the collected data of the power distribution gateway; and a data detection unit electrically connected to the protocol conformance unit, used to acquire the original data and parsed data from the protocol conformance unit, detect the original data to obtain first detection data, and detect the parsed data to obtain second detection data, and determine whether the communication protocol of the power distribution gateway is consistent based on the first detection data and the second detection data;
[0055] In the above embodiments, after determining that the first operating information and the second operating information correspond, i.e., the preliminary test of the power distribution gateway has passed (i.e., the test result of the power distribution gateway is accurate), in order to further test the comprehensive performance of the power distribution gateway and improve the test accuracy, a protocol comprehensive test is performed on the power distribution gateway. This protocol comprehensive test includes at least one of protocol conformance testing and interactive operation testing. Specifically, during the protocol conformance testing, the calibration test module is further equipped with a test request unit, a protocol conformance unit, and a data detection unit to perform protocol conformance testing on the power distribution gateway. When the protocol conformance test of the power distribution gateway passes, it indicates that the comprehensive performance of the power distribution gateway is good, thus helping to improve the test accuracy.
[0056] Specifically, the test request unit first obtains the parameter information of the distribution gateway and generates a test request packet based on the parameter information. Since the test request unit is electrically connected to the protocol consistency unit, the protocol consistency unit can obtain the original data of the distribution gateway from the test request packet. This original data corresponds to the test data of the distribution gateway to be tested, and the data detection unit detects this original data to obtain first detection data. Then, the protocol consistency unit can send the test request packet to the distribution gateway, allowing the distribution gateway to parse the test request packet and obtain parsed data. The parsed data is then sent to the data detection unit, which detects this parsed data to obtain second detection data. Since the parsed data is obtained from the distribution gateway and the original data is collected by the protocol consistency unit from the distribution gateway, if the data detection unit determines that the first and second detection data are consistent, it can determine that the protocol consistency of the distribution gateway has passed; if the data detection unit determines that the first and second detection data are inconsistent, it determines that the protocol consistency of the distribution gateway has failed.
[0057] To detect humidity, smoke opacity, and current values of the smart terminal, in some optional embodiments, the simulation terminal has simulation elements corresponding to the concentrator, temperature and humidity sensor, smoke sensor, and current sensor included in the smart terminal. The concentrator, temperature and humidity sensor, smoke sensor, current sensor, and simulation elements are each electrically connected to the output terminal of the simulation power source. The concentrator, temperature and humidity sensor, smoke sensor, and current sensor are each electrically connected to the power distribution gateway through different first interfaces. Therefore, as can be seen from this embodiment, operational information such as humidity, smoke opacity, and current values from the smart terminal can be output to the power distribution gateway through the aforementioned first interfaces.
[0058] In some optional implementations, the protocol conformance unit includes: a first data acquisition unit electrically connected to the test request unit, used to obtain a test request packet from the test request unit and collect raw data of the power distribution gateway according to the test request packet, the raw data including at least the collected data of the power distribution gateway; and a second data acquisition unit electrically connected to the first data acquisition unit, used to obtain a test request packet from the first data acquisition unit and send the test request packet to the power distribution gateway so that the power distribution gateway can parse the test request packet and obtain parsed data.
[0059] In the above embodiments, since the protocol conformance unit includes a first data acquisition unit, the first data acquisition unit can acquire the original data of the power distribution gateway in the test request packet after acquiring the test request packet, and send the original data to the data detection unit so that the data detection unit can detect the original data to obtain the first detection data. Furthermore, since the protocol conformance unit also includes a second data acquisition unit, when the first and second data acquisition units are electrically connected, the second data acquisition unit can also acquire the test request packet through the first data acquisition unit, and then send the test request packet to the power distribution gateway so that the power distribution gateway can parse the test request packet to obtain parsed data. After sending the parsed data to the data detection unit, the data detection unit can detect the parsed data to obtain the second detection data.
[0060] In some optional implementations, the data detection unit further includes: a communication link unit electrically connected to the protocol conformance unit and the test bench, used to obtain a test request packet from the protocol conformance unit and send a communication instruction to the test bench according to the test request packet, so that the test bench outputs a first feedback signal to the communication link unit according to the communication instruction, the first feedback signal being used to instruct the communication link unit to execute a communication establishment instruction or a communication disconnection instruction; a reset unit electrically connected to the power distribution gateway, used to receive a reset instruction and reset the power distribution gateway to its initial state according to the reset instruction; a synchronization unit electrically connected to the power distribution gateway, used to obtain the current standard clock and synchronize the clock of the power distribution gateway to the current standard clock according to the current standard clock; and an abnormal event testing unit electrically connected to the power distribution gateway, used to output an abnormal event to the power distribution gateway, so that the power distribution gateway outputs a second feedback signal to the abnormal event testing unit according to the abnormal event, the second feedback signal being used to determine whether there is an abnormality in the power distribution gateway.
[0061] In the above embodiments, after the data detection unit acquires the first detection data and the second detection data, in order to enable the data detection unit to determine whether the first detection data and the second detection data are consistent, this embodiment sets up the above-mentioned communication link unit, reset unit, synchronization unit and abnormal event test unit, so as to perform communication detection, reset detection, clock synchronization detection and abnormal event detection on the first detection data and the second detection data respectively, so as to determine whether the reactions to different situations are the same.
[0062] Specifically, the communication link unit sends communication commands to the test bench to establish or disconnect communication with the test bench within a preset time, thereby completing the entire communication process detection and obtaining corresponding feedback data; the reset unit detects whether the power distribution gateway can accurately complete the reset; the synchronization unit synchronizes the clock of the power distribution gateway and obtains the synchronization result to determine whether the clock synchronization result of the power distribution gateway is accurate; the abnormal event test unit tests the power distribution gateway's feedback to abnormal events. In other words, four sets of data are obtained through tests conducted by the communication link unit, reset unit, synchronization unit, and abnormal event test unit respectively. Subsequent comparison of these four sets of data determines whether the first and second detection data are consistent. Only when at least three of the four sets of data are consistent can the protocol consistency requirements of the power distribution gateway be determined.
[0063] In some optional implementations, when performing interactive operation tests on the power distribution gateway, the calibration test module further includes: an interactive operation test unit electrically connected to the power distribution gateway, used to acquire multiple first interactive data, calculate multiple first weight values of the multiple first interactive data according to a first preset weight coefficient to obtain a first summation, wherein the first summation is the sum of multiple first weight values, and the first interactive data is the interactive data between the power distribution gateway and the test bench; and an interactive operation test unit used to acquire multiple second interactive data, calculate multiple second weight values of the second interactive data according to a second preset weight coefficient to obtain a second summation, wherein the second summation is the sum of multiple second weight values, and the second interactive data is the interactive data between the power distribution gateway and the smart terminal; and the interactive operation test unit is also used to determine whether the first summation is greater than the first preset weight and threshold to obtain a first judgment result, and to determine whether the second summation is greater than the second preset weight and threshold to obtain a second judgment result, and if both the first judgment result and the second judgment result are yes, to determine that the multiple first interactive data and the multiple second interactive data meet preset requirements.
[0064] For example, in the above embodiments, during the interaction between the power distribution gateway, the test bench, and the smart terminal, the interaction operation test unit can acquire the corresponding interaction data and calculate the weight value of each group of interaction data according to the weight coefficient of each interaction data. The weight coefficient of each interaction data is a preset value (i.e., a first preset weight coefficient and a second preset weight coefficient), so that the sum of the final interaction data weight values (i.e., a first sum and a second sum) can be used to determine whether the interaction of the power distribution gateway meets the requirements. For example, the interaction data between the power distribution gateway and the test bench is in two sets. The sum of the weight values of all data in one set of interaction data is the first sum, and the sum of the weight values of all data in the other set of interaction data is the second sum. Only when the first sum is greater than the first preset weight and threshold, and the second sum is greater than the second preset weight and threshold, can it be determined that the current interaction data meets the requirements; otherwise, the interaction of the power distribution gateway does not meet the requirements.
[0065] In some optional implementations, the interactive operation test unit includes: a data acquisition unit electrically connected to the power distribution gateway, used to acquire the following data: multiple first interactive data and multiple second interactive data, wherein the first interactive data is interactive data between the power distribution gateway and the test bench, and the second interactive data is interactive data between the power distribution gateway and the smart terminal; a calculation unit electrically connected to the data acquisition unit, used to acquire the first interactive data and the second interactive data from the data acquisition unit, and determine multiple first weight values according to a first preset weight coefficient and the multiple first interactive data, and determine multiple second weight values according to a second preset weight coefficient and the second interactive data; and an analysis unit electrically connected to the data acquisition unit, used to acquire the multiple first weight values and the multiple second weight values from the calculation unit, and determine whether the multiple first interactive data and the multiple second interactive data meet preset requirements according to a first judgment result and a second judgment result.
[0066] In the above implementation, specifically, the corresponding interactive data is acquired by the data acquisition unit, and the weight value of each group of interactive data is calculated by the calculation unit based on the weight coefficient of each interactive data. The weight coefficient of each interactive data is a preset value (i.e., the first preset weight coefficient and the second preset weight coefficient), so that the analysis unit can determine whether the interaction of the power distribution gateway meets the requirements based on the sum of the weight values of the final interactive data.
[0067] like Figure 1As shown, this invention discloses a structural block diagram of a power distribution gateway 20 simulation automated testing system. The power distribution gateway 20 simulation automated testing system includes a simulation power source 30, a power distribution gateway 20, a smart terminal 10, and a test bench 40. The test bench 40 is equipped with a standard testing module and a simulation terminal 50. The simulation power source 30 is electrically connected to the test bench 40, the power distribution gateway 20, and the smart terminal 10. The power distribution gateway 20 is electrically connected to the smart terminal 10 and the test bench 40. The smart terminal 10 is equipped with a concentrator, a temperature and humidity sensor, a smoke sensor, and a current sensor. The simulation terminal 50 has simulation modules corresponding to the concentrator, temperature and humidity sensor, etc., in the smart terminal 10. Furthermore, the aforementioned power distribution gateway 20 is equipped with a first interface unit 201, a second interface unit 202, a data acquisition terminal 203, and a digital input interface 204. The first interface unit 201 includes multiple first interfaces, optionally including a 1376.1 protocol interface, a Modbus interface, and a Bluetooth interface. The second interface unit 202 includes multiple second interfaces, optionally including an IEC104 protocol interface, a 698.45 protocol interface, and an MQTT protocol interface. The data acquisition terminal 203 is used to inject analog signals output from the simulated power source 30 (analog signal injection). The digital input interface 204... Interface 204 is used to inject switching quantities in the analog parameters (analog switching quantity injection). Furthermore, in order to enable the test bench 40 to form a communication connection with the power distribution gateway 20 to receive the second operating information from the power distribution gateway 20 and the first operating information from the smart terminal 10, the test bench 40 is provided with an interface consistent with the second interface. In addition, the interface in the test bench 40 consistent with the first interface is also connected to the calibration test module 60, so that the first and second operating information are transmitted to the calibration test module 60, thereby enabling the calibration test module 60 to output test results based on the first and second operating information.
[0068] like Figure 2As shown, this invention discloses a structural block diagram of a calibration test module 60 in a power distribution gateway simulation automation test system. The calibration test module includes a test request unit 601, a protocol conformance unit 603, a data detection unit 602, and an interactive operation test unit 610. The test request unit 601, protocol conformance unit 603, and data detection unit 602 are connected sequentially, and the test request unit 601 is also electrically connected to the power distribution gateway, thereby enabling communication protocol conformance testing of the power distribution gateway. Specifically, the test request unit 601 is electrically connected to the protocol conformance unit 603, and the protocol conformance unit 603 is electrically connected to the data detection unit 602. The protocol conformance unit 603 includes a first data acquisition unit 604 and a second data acquisition unit 605, which are electrically connected. The data detection unit 602 includes a communication link unit 606, a reset unit 607, a synchronization unit 608, and an abnormal event test unit 609. Furthermore, the aforementioned interactive operation test unit 610 is used to determine whether the interactive data between the power distribution gateway, the smart terminal, and the test bench meets the preset requirements. Specifically, the aforementioned interactive operation test unit 610 includes a data acquisition unit 611, a calculation unit 612, and an analysis unit 613. The aforementioned data acquisition unit 611 is electrically connected to the calculation unit 612, the calculation unit 612 is electrically connected to the analysis unit 613, and the aforementioned data acquisition unit 611 is also electrically connected to the power distribution gateway.
[0069] like Figure 3 As shown, the present invention also discloses a method based on... Figure 1 The diagram shows a flowchart of a test method for a power distribution gateway simulation automation test system. This test method includes:
[0070] Step S301: Send the target parameters to the simulation power source so that the simulation power source outputs the simulation parameters in the target parameters to the simulation terminal;
[0071] Step S302: Receive the simulation test results output by the simulation terminal. The simulation test results are obtained by simulation test based on the above simulation parameters. Based on the simulation test results, determine whether the above target parameters match the power distribution gateway and obtain the first judgment result.
[0072] Step S303: If the first judgment result is a match, the target parameters are sent so that the simulated power source outputs the simulation parameters to the smart terminal and the power distribution gateway, so that the smart terminal generates the first operating information based on the simulation parameters, and the power distribution gateway generates the second operating information based on the simulation parameters.
[0073] Step S304: Obtain first operating information and second operating information, and determine whether the test results of the power distribution gateway are accurate based on the first operating information and second operating information, and obtain the second judgment result;
[0074] Step S305: If the second judgment result is accurate, perform a protocol integration test on the power distribution gateway. The protocol integration test includes at least one of protocol consistency test and interoperability test.
[0075] As can be seen from the above description, the embodiments of this application achieve the following technical effects:
[0076] Since the simulated automated testing system of this application includes a simulation terminal and a terminal node, both electrically connected to the simulation power source, and the simulation power source is electrically connected to the test bench, when the test bench outputs the target parameters to the simulation power source, the simulation power source can first output the simulation parameters corresponding to the target parameters to the simulation terminal. This allows the simulation terminal to perform a preliminary simulation test based on the simulation parameters and output the simulation test results to the test bench. The test bench can then determine whether the target parameters output by the test bench are suitable for testing the gateway under test based on the simulation test results. If the simulation test results indicate that the simulation test has passed, the simulation power source will again output the simulation parameters corresponding to the target parameters to the terminal node to test the terminal node. After the terminal node outputs its operating information to the test bench, the test bench can determine whether the test results are accurate based on the terminal node's operating information. In other words, this application achieves the purpose of testing the comprehensive performance of the gateway under test through the terminal node's operating information. Only when the terminal node's operating information indicates that it meets the preset requirements (i.e., the comprehensive performance of the gateway under test is good) can subsequent precise testing be performed on the gateway under test, thereby improving the testing efficiency and accuracy of the gateway under test.
[0077] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A simulated automated testing system for a gateway under test, characterized in that, include: A test bench, the test bench having target parameters, the target parameters including at least voltage or current; A simulated power source, electrically connected to the test bench, is used to acquire the target parameters and output the simulated parameters in the target parameters; A simulation terminal is electrically connected to the simulation power source and the test bench. It is used to receive the simulation parameters, perform simulation tests based on the simulation parameters, and output simulation test results to the test bench, so that the test bench can determine whether the target parameters match the gateway under test based on the simulation test results. A terminal node, electrically connected to the simulation power source and the test bench, is configured to receive the simulation parameters, generate terminal node operation information based on the simulation parameters, and output the terminal node operation information to the test bench when the test bench determines that the target parameters match the gateway under test. This allows the test bench to determine the accuracy of the test results for the gateway under test within the terminal node based on the terminal node operation information. The test bench includes a calibration test module. This module receives the simulation test results and, based on the simulation test results and the target parameters, determines whether the gateway under test matches the target parameters. If the gateway under test matches the target parameters, it receives the terminal node operating information and, based on the terminal node operating information and the target parameters, determines whether the test results of the gateway under test are accurate. The terminal nodes include: The intelligent terminal is electrically connected to the simulated power source and is used to receive the simulation parameters and generate first operating information based on the simulation parameters when the test bench determines that the terminal node and the target parameters match, and output the first operating information. A power distribution gateway, electrically connected to the simulated power source, the intelligent terminal, and the test bench, is used to receive the simulation parameters, generate second operating information based on the simulation parameters, receive the first operating information, and send the first and second operating information to the test bench. The terminal node operating information includes the first and second operating information. The calibration test module also includes: An interactive operation test unit, electrically connected to the power distribution gateway, is used to acquire multiple first interactive data sets, calculate multiple first weight values for the multiple first interactive data sets according to a first preset weight coefficient, and obtain a first summation, wherein the first summation is the sum of the multiple first weight values, and the first interactive data sets are the interactive data between the power distribution gateway and the test bench; and The interactive operation test unit is used to acquire multiple second interactive data, calculate multiple second weight values of the second interactive data according to a second preset weight coefficient, and obtain a second summation, wherein the second summation is the sum of the multiple second weight values, and the second interactive data is the interactive data between the power distribution gateway and the smart terminal; and The interactive operation testing unit is further configured to determine whether the first summation is greater than the first preset weight and threshold to obtain a first judgment result, and to determine whether the second summation is greater than the second preset weight and threshold to obtain a second judgment result. If both the first judgment result and the second judgment result are yes, the unit determines that the plurality of first interactive data and the plurality of second interactive data meet the preset requirements.
2. The testing system according to claim 1, characterized in that, The power distribution gateway includes multiple gateways, and the multiple power distribution gateways are connected in parallel.
3. The testing system according to claim 1, characterized in that, The power distribution gateway includes a first interface unit and a second interface unit. The power distribution gateway is electrically connected to the smart terminal through the first interface unit and to the test bench through the second interface unit. The first interface unit is used to receive the first operating information, and the second interface unit is used to send the first operating information and the second operating information.
4. The testing system according to claim 3, characterized in that, The first interface unit includes multiple first interfaces, and the second interface unit includes multiple second interfaces, with each of the multiple first interfaces and the multiple second interfaces corresponding one-to-one.
5. The testing system according to claim 3 or 4, characterized in that, The calibration test module includes: A test request unit, which is electrically connected to the power distribution gateway through the second interface unit, is used to obtain the parameter information of the power distribution gateway when it is determined that the test result of the power distribution gateway is accurate, and generate a test request packet according to the parameter information and the protocol corresponding to the second interface unit. The parameter information includes at least the address information of the power distribution gateway. A protocol conformance unit, electrically connected to the test request unit, is used to obtain the test request packet from the test request unit, collect the raw data of the power distribution gateway according to the test request packet, and send the test request packet to the power distribution gateway so that the power distribution gateway can parse the test request packet to obtain parsed data. The raw data includes at least the data collected by the power distribution gateway. A data detection unit, electrically connected to the protocol consistency unit, is used to obtain the original data and the parsed data from the protocol consistency unit, detect the original data to obtain first detection data, and detect the parsed data to obtain second detection data, and determine whether the communication protocol of the power distribution gateway is consistent based on the first detection data and the second detection data.
6. The testing system according to claim 4, characterized in that, The simulation terminal has simulation elements corresponding to the concentrator, temperature and humidity sensor, smoke sensor and current sensor included in the smart terminal. The concentrator, temperature and humidity sensor, smoke sensor, current sensor and simulation elements are respectively electrically connected to the output terminal of the simulation power source. The concentrator, temperature and humidity sensor, smoke sensor and current sensor are respectively electrically connected to the power distribution gateway through different first interfaces.
7. The testing system according to claim 5, characterized in that, The protocol conformance unit includes: The first data acquisition unit is electrically connected to the test request unit and is used to obtain the test request packet from the test request unit and collect the raw data of the power distribution gateway according to the test request packet. The raw data includes at least the collected data of the power distribution gateway. The second data acquisition unit is electrically connected to the first data acquisition unit and is used to obtain the test request packet from the first data acquisition unit and send the test request packet to the power distribution gateway so that the power distribution gateway can parse the test request packet and obtain parsed data.
8. The testing system according to claim 5, characterized in that, The data detection unit further includes: A communication link unit, electrically connected to the protocol conformance unit and the test bench, is used to obtain the test request packet from the protocol conformance unit and send a communication instruction to the test bench according to the test request packet, so that the test bench outputs a first feedback signal to the communication link unit according to the communication instruction. The first feedback signal is used to instruct the communication link unit to execute a communication establishment instruction or a communication disconnection instruction. A reset unit, electrically connected to the power distribution gateway, is used to receive a reset command and reset the power distribution gateway to its initial state according to the reset command; A synchronization unit, electrically connected to the power distribution gateway, is used to acquire the current standard clock and synchronize the clock of the power distribution gateway to the current standard clock according to the current standard clock; An abnormal event testing unit is electrically connected to the power distribution gateway and is used to output abnormal events to the power distribution gateway, so that the power distribution gateway outputs a second feedback signal to the abnormal event testing unit based on the abnormal event. The second feedback signal is used to determine whether there is an abnormality in the power distribution gateway.
9. The testing system according to claim 1, characterized in that, The interactive operation test unit includes: The data acquisition unit is electrically connected to the power distribution gateway and is used to acquire the following data: multiple first interaction data and multiple second interaction data, wherein the first interaction data is the interaction data between the power distribution gateway and the test bench, and the second interaction data is the interaction data between the power distribution gateway and the smart terminal; A calculation unit, electrically connected to the data acquisition unit, is used to acquire the first interactive data and the second interactive data from the data acquisition unit, and to determine the plurality of first weight values according to the first preset weight coefficient and the plurality of first interactive data, and to determine the plurality of second weight values according to the second preset weight coefficient and the second interactive data; An analysis unit, electrically connected to the calculation unit, is used to obtain the plurality of first weight values and the plurality of second weight values from the calculation unit, and to determine whether the plurality of first interactive data and the plurality of second interactive data meet preset requirements based on the first judgment result and the second judgment result.