[go: up one dir, main page]

CN117061371A - Testing method and system for energy products - Google Patents

Testing method and system for energy products Download PDF

Info

Publication number
CN117061371A
CN117061371A CN202310975620.6A CN202310975620A CN117061371A CN 117061371 A CN117061371 A CN 117061371A CN 202310975620 A CN202310975620 A CN 202310975620A CN 117061371 A CN117061371 A CN 117061371A
Authority
CN
China
Prior art keywords
data
test
protocol
configuration file
test data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310975620.6A
Other languages
Chinese (zh)
Inventor
陆渴
王卓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Yixing Energy Co ltd
Original Assignee
Hangzhou Yixing Energy Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Yixing Energy Co ltd filed Critical Hangzhou Yixing Energy Co ltd
Priority to CN202310975620.6A priority Critical patent/CN117061371A/en
Publication of CN117061371A publication Critical patent/CN117061371A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The application discloses a testing method and a system for an energy product, wherein the method comprises the following steps: determining a protocol of a product to be tested; generating a configuration file according to a protocol document corresponding to the protocol of the product to be tested, wherein the configuration file comprises register addresses and test data corresponding to each register address; receiving an instruction for collecting test data from data collecting equipment; determining test data corresponding to a target register address according to the target register address contained in the instruction and the configuration file; transmitting the test data to the data acquisition equipment; and comparing the result data fed back by the data display equipment with the test data to obtain a test result. According to the scheme of the application, in the process of testing the energy product, each tested object such as the data acquisition equipment, the panel, the EMS and the like can be directly verified, the full link of the energy product data is opened, the testing flow is simplified, the testing accuracy is improved, and the time and the resources are saved.

Description

Testing method and system for energy products
Technical Field
The application relates to the technical field of energy product testing, in particular to a testing method and system for an energy product.
Background
As shown in fig. 1, the energy product data link includes a product entity such as an inverter/energy storage cabinet, a data acquisition device (including a communication bar or a communication bar firmware, for example), a cloud server, and a panel/EMS (Energy Management System ), and the data acquisition device, the cloud server, and the panel/EMS need to be tested. Currently, embedded test methods for energy products are tested only for a single product, including, for example, firmware tests, panel tests, saas (Software as a Service ) platform tests, and the like.
Fig. 2 is a schematic diagram of a prior art test of a data acquisition device. As shown in FIG. 2, the real product is simulated by the open source standard MODBUS protocol upper computer software, wherein the MODBUS protocol is a serial communication protocol, the sample is seen through a log and the feedback of the data acquisition equipment is sent, and the test is seen through a physical phenomenon. In the test mode of fig. 2, a tester is required to disassemble the firmware request register information manually, and a reply request is made in the upper computer software in the form of a manual combination command frame. However, doing so has the following problems:
(1) The upper computer of the open source standard MODBUS protocol can only simulate a standard protocol, and can not simulate data with service attributes, but many manufacturers have nonstandard protocol contents, so that the applicability of a test mode is not universal;
(2) The manual disassembly of command frames is prone to errors, resulting in failure of recovery;
(3) The register information requested by the communication bar firmware at one time is very large, the register reply period is required to be within 5 seconds, and the manual combination command frame overtime causes the reply overtime;
(4) Manually combining command frame errors, resulting in data errors;
(5) When an error occurs, if the reason of the non-firmware is detected, the reason of the upper computer is repaired and compared passively.
Fig. 3 is another schematic diagram of a prior art test of a data acquisition device. As shown in fig. 3, the actual register data is created by the manufacturer inverter/energy storage cabinet finished product, and the data acquisition device waits for acquisition and conversion to DP (data point) point. However, such a manner has the following problems:
(1) The finished product operation has a certain danger;
(2) The finished product deployment has strict requirements on site environment and is inconvenient to deploy;
(3) The data created by the operation of the finished product are relatively common, and the test coverage rate is insufficient;
(4) The data errors occur, the finished product does not have log capability, and the problem is inconvenient to check.
Fig. 4 is a schematic diagram of a prior art test performed on a panel/EMS. As shown in fig. 4, the panel is rendered by combining the actual data with the manual operation of the manufacturer inverter/energy storage cabinet actual product, and the panel data is verified. However, verification in this manner can have the following problems:
(1) The finished product operation has hardware uncertainty, and causes data errors;
(2) Data resulting from the finishing operation generally cannot traverse all data or cover extreme values, resulting in problems with the panel when rendering extreme values;
(3) Finished product operation is generally unclear with respect to MCU (Micro Controller Unit, microcontroller) logic, and uncertainty exists for operations such as panel data refreshing;
(4) The data created by the finishing operation does not have the possibility of historical data and future data.
In addition to the problems with the single-product testing approach described above, other problems with the single-product testing approach also exist. For example, for testing of the data acquisition device, only the data acquisition device is guaranteed to be correct for the function of data acquisition and conversion to DP in the inverter register; whether the analysis of the cloud server on the object model is correct or not can not be ensured, the error/failure condition of the analysis data of the cloud server exists, the display data of the panel/cloud server is wrong/any data is not displayed, whether the interface provided by the cloud server for the panel/Saas is correct or not can not be ensured, and the error condition of the acquisition interface of the panel/Saas exists, so that the panel/cloud server reports the error or does not display any data; for the panel/Saas test, only the interface configuration provided by the cloud server is ensured to be correct, and the interface data provided by the cloud server is not ensured to be correct.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a testing scheme aiming at the full product form of energy, which directly and efficiently simulates real inverter data by means of a developed simulation register upper computer, and performs autonomous and direct verification on data acquisition equipment (for example, comprising a communication bar), a panel and an EMS, thereby simplifying the testing flow, improving the testing accuracy, saving time and resources.
According to a first aspect of the present application, there is provided a testing method for an energy product, applied to an upper computer, comprising:
determining a protocol of a product to be tested;
generating a configuration file according to a protocol document corresponding to the protocol of the product to be tested, wherein the configuration file comprises register addresses and test data corresponding to each register address;
receiving an instruction for collecting test data from data collecting equipment;
determining test data corresponding to a target register address according to the target register address contained in the instruction and the configuration file;
transmitting the test data to the data acquisition equipment; and
and comparing the result data fed back by the data display equipment with the test data to obtain a test result.
According to a second aspect of the present application, there is provided a test system for energy products, comprising a host computer, a data acquisition device, a cloud server and a data display device, wherein:
the upper computer is used for generating a configuration file according to a protocol document corresponding to a protocol of a product to be tested, the configuration file comprises register addresses and test data corresponding to each register address, receiving an instruction for collecting the test data from the data collection device, determining the test data corresponding to the target register addresses according to the target register addresses and the configuration file contained in the instruction, sending the test data to the data collection device, and comparing the result data fed back by the data display device with the test data to obtain a test result;
the data acquisition equipment sends the instruction to the upper computer, receives the test data and sends the test data to the cloud server;
the cloud server sends the data to the data display equipment;
and the data display equipment forms result data according to the test data and feeds the result data back to the upper computer.
According to a third aspect of the present application there is provided an electronic device comprising at least a memory having a computer program stored thereon and a processor which when executing the computer program on the memory implements the steps of the method of the first aspect.
According to a fourth aspect of the present application there is provided a computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the steps of the method of the first aspect.
According to the testing method and the testing system for the energy product, disclosed by the application, the developed upper computer can be compatible with standard protocol data and nonstandard protocol data, so that the testing method and the testing system can be compatible with business data of different manufacturers, and can solve the problems that in the prior art, testing data is incomplete, the finished product deployment of the real product of the inverter/energy storage cabinet is inconvenient and the like when the equipment such as a power cabinet, an inverter and the like is docked by simulation energy data acquisition equipment, and the developed upper computer can autonomously combine and send a request of a MODBUS, so that the real inverter data can be directly and efficiently simulated. In addition, in the process of testing the energy product, each tested object such as the data acquisition equipment, the data display equipment and the like can be directly verified, the full link of the energy product data is opened, the testing flow is simplified, the testing accuracy is improved, and the time and the resources are saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it will be apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings by those skilled in the art without departing from the scope of the claimed application.
Fig. 1 is a schematic diagram of an energy product data link.
Fig. 2 is a schematic diagram of a prior art test of a data acquisition device.
Fig. 3 is another schematic diagram of a prior art test of a data acquisition device.
Fig. 4 is a schematic diagram of a prior art test performed on a panel/EMS.
Fig. 5 is a schematic diagram of a test system for energy products according to an embodiment of the application.
FIG. 6 is a schematic diagram of a selection protocol during a test according to an embodiment of the application.
Fig. 7 is a schematic diagram of serial port setup during testing according to an embodiment of the present application.
FIG. 8 is a schematic diagram of a protocol document during a test according to an embodiment of the application.
FIG. 9 is a schematic diagram of a document after converting the protocol document shown in FIG. 8 according to a preset format, according to an embodiment of the present application.
FIG. 10 is a schematic diagram of a document generation configuration file shown in FIG. 9, according to an embodiment of the application.
FIG. 11 is a diagram illustrating a configuration file displayed by an upper computer during a test according to an embodiment of the present application.
FIG. 12 is a schematic diagram of modifying test data in a configuration file during a test according to an embodiment of the application.
Fig. 13 is a schematic diagram of testing a data presentation device according to an embodiment of the present application.
Fig. 14 is a schematic diagram of testing a data acquisition device according to an embodiment of the application.
Fig. 15 is a flow chart of a test method for an energy product according to one embodiment of the application.
Fig. 16 is a flow chart of a test method for an energy product according to another embodiment of the present application.
Fig. 17 is a block diagram of an electronic device provided by the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Aiming at the problems of manual disassembly command frame, data error, inconvenient deployment, isolation of each end and the like caused by single test of an energy product in the prior art, the application provides a test scheme aiming at the form of the whole energy product, and the test scheme is characterized in that the data of real products such as an inverter and the like are directly and efficiently simulated by means of a newly developed simulation register upper computer, so that the test scheme is compatible with business data of different manufacturers, autonomously combines and sends MODBUS protocol requests, displays the data received by a data acquisition device and the test result of the data display device through a data display device (comprising a panel and/or an EMS) and opens the whole link of the energy product to autonomously and directly verify the data acquisition device and the data display device, thereby simplifying the test flow, improving the test accuracy, saving time and resources.
Fig. 5 is a schematic diagram of a test system for energy products according to an embodiment of the application. As shown in fig. 5, the test system includes a host computer, a data acquisition device, a cloud server, and a data display device, wherein the data acquisition device may include or operate with a communication stick or communication stick firmware, and the data display device may include a panel and/or an EMS. In the test process, the upper computer converts the documents based on various protocols into configuration files in a unified format after acquiring the documents, the data acquisition equipment sends an instruction to the upper computer, the upper computer requests to acquire data in one or more registers, the upper computer acquires related data from the configuration files according to the instruction and sends the data to the data acquisition equipment, the data acquisition equipment sends the data to the cloud server, and the data display equipment acquires the data of the cloud server. In the embodiment shown in fig. 5, the upper computer and the data acquisition device communicate with each other through a standard MODBUS protocol or a custom protocol of a manufacturer, the data acquisition device and the cloud server communicate with each other through an MQTT (Message Queuing Telemetry Transport, message queue telemetry transport protocol) mechanism, and the cloud server and the data display device interact with each other through an atom interface.
In fig. 5, the host computer may be based on the MODBUS protocol communication data simulation software under box python ttkbootstrap ui according to some embodiments.
According to some embodiments, the basic flow of testing includes protocol selection, serial port configuration, protocol configuration, opening communication, and ending communication. Before the host computer establishes communication with the data acquisition device, the protocols used by the host computer and the data acquisition device need to be determined. FIG. 6 is a schematic diagram of a selection protocol during a test according to an embodiment of the application. Fig. 6 shows alternative protocols in fig. 4, each corresponding to a product, after the protocol is selected, determining a data acquisition device matched with the protocol, and performing communication between the upper computer and the data acquisition device according to the selected protocol, wherein the upper computer simulates the product of the selected protocol for testing.
After the protocol is selected, the serial port of the data acquisition device is also required to be configured. Fig. 7 is a schematic diagram of serial port setup during testing according to an embodiment of the present application. The serial port setting items include setting serial port numbers, baud rates, stop bits, data bits, check bits, and the like. According to some embodiments, the serial number automatically identifies that the PC supports serial ports, the baud rate supports 4800-115200, 13 baud rates, the stop bits include 1, 1.5, and 2, the data bits include 5, 6, 7, and 8, and the check bits include odd check (O), even check (E), 1 check (M), 0 check (S), and no check (N). As shown in fig. 7, the serial number is COM3, the baud rate is 9600, the stop bit is 1, the data bit is 8, and the check bit is N. According to some embodiments, the setting of the serial port may be modified according to actual needs.
According to some embodiments, the protocol documents provided by the respective vendors are based on respective protocols, which are likely to be different from each other. The open source upper computer adopted in the prior art only supports the generated general data according to the standard protocol, and for non-standard protocol content, the open source upper computer in the prior art cannot support, the applicability of a test mode is not universal, and command frames need to be manually combined and disassembled. In the present application, for protocol documents provided by respective manufacturers, they are first converted into documents of a preset format, respectively. FIG. 8 is a schematic diagram of protocol documents from vendors during testing, which may vary from vendor to vendor, and which may be provided differently. FIG. 9 is a schematic diagram of the protocol document shown in FIG. 8 converted according to a preset format. According to some embodiments, the type of information to be extracted may be predetermined, as shown in fig. 9, and information such as a protocol register address, a conversion coefficient, a chinese name, a default value, etc. may be extracted from the protocol document of fig. 8 to form an Excel document. After obtaining the document in the predetermined format, a configuration file is generated. FIG. 10 is a schematic diagram of a document generation configuration file shown in FIG. 9. According to some embodiments, after obtaining the predetermined format document, the predetermined format document is converted into a configuration file according to the set script. According to some embodiments, the script that converts the pre-formatted document into a configuration file includes Xlrd, pandas, pyyaml scripts. According to some embodiments, the Xlrd script reads the name in the predetermined format document as a packet name, and loops to obtain the base configuration information in the predetermined format document to generate a corresponding protocol configuration file. According to some embodiments, the generated configuration file includes register addresses and test data corresponding to each register address.
After the configuration file is obtained, the upper computer performs import and export of the configuration file. According to some embodiments, the configuration files created according to the product protocol documents are imported into the host computer, and the different protocol documents are imported into different configuration files to simulate products of different manufacturers. The serial tool parses the configuration file, initializing information such as register groups, command words, register values, register definitions, conversion coefficients, and the like. The interface UI thread of the upper computer renders the register group according to the configuration file, and displays the register information, as shown in fig. 11, wherein the configuration file is a yaml file. And initializing a simulation protocol register data structure by a serial port thread of the upper computer according to the configuration file, wherein the simulation protocol register data structure is used for requesting data operation by a later MODBUS protocol register. According to some embodiments, the upper computer obtains all current register values to generate a yaml configuration file, records the product state, and can subsequently import the yaml to realize state playback.
According to some embodiments, data (e.g., test data) of the configuration file may be modified. Clicking on the selected register, popping up the register modification window, inputting a 10-ary or 16-ary value to set the register value, and effecting display, as shown in fig. 12. As shown in fig. 12, the test data of "failure record" is modified to "100". When illegal data is input, data abnormality is presented.
After the configuration file is imported, the upper computer may start communication. According to some embodiments, after the method for analyzing the binding serial port protocol, the upper computer clicks on, opens the serial port, starts analyzing the serial port data, performs operations such as CRC16 data checking, and the like, operates according to instructions on legal data and responds to corresponding data, and sends error response to illegal data. When the test is expected to stop, clicking a stop button of the upper computer, closing the serial port, and stopping the analysis of the serial port.
According to some embodiments, during the testing process, the data acquisition device sends instructions to the host computer to acquire the test data. After receiving the instruction, the upper computer analyzes the instruction, further obtains the numerical value in which register is needed by the data acquisition equipment, obtains test data in the corresponding register from the configuration file according to the register address, writes the test data into the response buffer, and formats the response buffer data according to the MODBUS standard protocol specification. According to some embodiments, the system address, the data frame length, the response data, and the CRC16 check packet are written into the serial port transmit buffer, and the serial port transmits the response frame.
According to some embodiments, after receiving the response frame of the upper computer, the data acquisition device sends the response frame to the cloud server, the cloud server interacts with the data display device through the atom interface, and the data display device displays the received data. The data displayed by the data display equipment is compared with the test data manufactured by the lowest-layer upper computer register, so that the processing correctness of a whole set of data streams can be verified: and the data acquisition equipment is used for acquiring register data and packaging the DP, disassembling the DP point from the cloud server and providing the interface correctness for the data display equipment, so that the test of the data link of the whole energy product is realized.
According to some embodiments, in the process of testing the energy product data link, the test may be performed in two ways, the first way is to test the data display device first and then test the data acquisition device; the second way is to directly test the data link of the energy product, namely, through the configuration file, test the data acquisition equipment and directly verify the data display equipment.
According to a first test mode, fig. 13 is a schematic diagram of testing a data display device according to an embodiment of the present application, and fig. 14 is a schematic diagram of testing a data acquisition device according to an embodiment of the present application.
The consideration of testing the data display equipment and then testing the data acquisition equipment comprises the following steps: compared with the data display equipment, the data acquisition equipment has slow development rhythm, and after the data display equipment is tested, the data acquisition equipment is tested, so that the problems in the test of the data acquisition equipment can be positioned; and moreover, the data display equipment can provide effective data display after the test is finished, so that the display and comparison of test results are facilitated.
During a particular test, the preparation required includes:
a DP object model of a real product scheme such as an inverter is determined;
the DP analysis logic of the cloud server is completed;
the cloud server interface has been developed;
vendors have provided docked MODBUS protocol documents;
testing has developed inverter simulation host software;
the vendor MODBUS file has been converted into a general register identification file, i.e., a configuration file.
The specific test flow is as follows: in the testing process of the data display equipment, according to the DP object model and the requirements, a tester sorts test DP data, the test data display equipment is directly in butt joint with the object model, a register and data acquisition equipment are skipped, the test data display equipment is bound to a shadow equipment platform, virtual energy equipment is deployed, DP information is pushed through the shadow equipment, and data on the data display equipment are checked.
In the testing process of the data acquisition equipment, preparing test data required by an upper computer, namely data generated by a real product such as an inverter, preparing the data acquisition equipment, and burning and authorizing corresponding test firmware; after the data acquisition equipment is distributed with a network, the upper computer imports test data in the configuration file, and the serial port information is configured correctly; waiting for the firmware to read the register data, and viewing the data presentation on the data presentation device. In addition, in the case of updating the test data in real time in the upper computer, the data presentation is viewed on the data presentation apparatus.
In the first test mode, in the test process of the data display equipment, extreme data and fault data can be manufactured by depending on the DP point of the object model, the test coverage rate is improved, the analysis of the DP point by the cloud server can be verified by reporting the DP through the object model, and the correctness of the interface provided by the cloud server to the data display equipment can be verified by reporting the DP through the object model; in the testing process of the data acquisition equipment, only the upper computer software simulating the real product is required to be opened, the real product environment is not required to be prepared, the testing deployment efficiency is improved, the upper computer software simulating the inverter autonomously analyzes the instruction of the data acquisition equipment, autonomously combines and reports the corresponding register data, the problems of errors and overtime caused by manual test disassembly and combined commands are solved, and the testing accuracy is improved; various operations of a real product are not needed to be relied on, so that the test safety is improved; in addition, the firmware problem is intuitively fed back through the data and the effect displayed by the tested data display equipment, and the trouble of positioning the problem through the log is reduced. In addition, by simulating the inverter host software and the data (data derived from the configuration file) which is tested through the data display device, the capability of the firmware for register data reading and DP conversion can be verified, and after the whole link test is completed, the updated link (for example, the data acquisition device and/or the data display device update) can be tested through the configuration file.
For the subsequent application scenario of the first test mode, if the manufacturer updates the protocol document, the data acquisition device also needs to update if the manufacturer is a previously connected manufacturer, and only the modified protocol document needs to be tested, for example, one document is updated in 100 documents, and only the one document needs to be tested, so that the firmware capacity can be rapidly verified; if the existing data acquisition equipment is updated, checking and accepting firmware capacity is carried out through the tested data display equipment and the simulation inverter upper computer software; if the existing data display equipment (such as a panel) is upgraded, the DP information is rapidly reported through the object model to verify the data display equipment; if the data acquisition equipment is customized for manufacturers adopting other protocols independently, the firmware acceptance can be checked through the tested data display equipment; if the data display equipment is customized for other manufacturers independently, the DP information can be rapidly reported through the object model to verify the data display equipment.
The second test mode is considered: when multi-terminal testing is involved, the correctness of each terminal is ensured independently, and the testing is not realistic in a limited project period and in limited testing manpower; after the test data of manufacturers are changed, verifying the data accuracy of the data display equipment; after the cloud server interface is updated, the whole set of data flow can be verified.
According to a second test mode, referring to fig. 5, during a specific test, the preparation work required includes:
a DP object model of a real product scheme such as an inverter is determined;
the DP analysis logic of the cloud server is completed;
the cloud server interface has been developed;
vendors have provided docked MODBUS protocol documents;
testing has developed inverter simulation host software;
the manufacturer MODBUS file is converted into a general register identification file, namely a configuration file;
embedded firmware has been developed.
The specific test flow is as follows: preparing register data required by an upper computer, namely data generated by a real product, preparing data acquisition equipment which is already burnt and authorized, and successfully configuring a network, wherein the upper computer imports test data in a configuration file, and the configuration of serial information is correct; waiting for the data acquisition equipment to read the test data, checking the data display on the data display equipment, updating the test data in the upper computer in real time, and checking the data display on the data display equipment.
Benefits of the second test mode include: the data obtained by the data display equipment is compared with the test data of the lowest-layer upper computer register, so that the processing correctness of the data link of the energy product can be verified: the data acquisition equipment performs data acquisition and DP encapsulation on the register, disassembles the DP point from the cloud server, and provides the interface correctness for the data display equipment; by comparing the data displayed by the data display device with the data manufactured by the bottommost register, the time for testing the single data acquisition device and then testing the single data display device (such as panel test and/or EMS test) can be saved; when the data display equipment displays a plurality of pieces of equipment, a certain number of finished products are not required in a test stage, and the real products have certain requirements on a deployment environment and are not easy to deploy; the present application does not care about the register data processing and DP encapsulation process by the data acquisition device (e.g., communication stick firmware) and the DP resolution process by the cloud server.
For the subsequent application scene of the second test mode, under the condition that the cloud server updates the interface information, the manufacturer updates the register information such as the test data, the scene of the complete data stream can be rapidly verified through the second test mode.
On the basis of the above-described test system for energy products, according to an aspect of the present application, there is provided a test method for energy products, as shown in fig. 15, comprising the steps of.
Step S1501 determines the protocol of the product to be tested.
According to some embodiments, the basic flow of testing includes protocol selection, serial port configuration, protocol configuration, opening communication, and ending communication. Before the host computer establishes communication with the data acquisition device, the protocols used by the host computer and the data acquisition device need to be determined. After the protocol is selected, determining data acquisition equipment matched with the protocol, and communicating the upper computer with the data acquisition equipment according to the selected protocol, wherein the upper computer simulates a product of the selected protocol for testing.
Step S1502, generating a configuration file according to a protocol document corresponding to the protocol of the product to be tested.
According to some embodiments, the protocol documents provided by the respective vendors are based on respective protocols, which are likely to be different from each other. The open source upper computer adopted in the prior art only supports the generated general data according to the standard protocol, and for non-standard protocol content, the open source upper computer in the prior art cannot support, the applicability of a test mode is not universal, and command frames need to be manually combined and disassembled. In the present application, for protocol documents provided by respective manufacturers, they are first converted into documents of a preset format, respectively. The protocols followed by the various vendors may vary, as may the protocol documents provided. According to some embodiments, the type of information to be extracted may be predetermined, for example, information such as protocol register address, conversion coefficient, chinese name, default value, etc. may be extracted from the protocol document to form an Excel document. After obtaining the document in the predetermined format, a configuration file is generated. According to some embodiments, after obtaining the predetermined format document, the predetermined format document is converted into a configuration file according to the set script. According to some embodiments, the script that converts the pre-formatted document into a configuration file includes Xlrd, pandas, pyyaml scripts. According to some embodiments, the Xlrd script reads the name in the predetermined format document as a packet name, and loops to obtain the base configuration information in the predetermined format document to generate a corresponding protocol configuration file. According to some embodiments, the generated configuration file includes register addresses and test data corresponding to each register address.
Thus, step S1502 may include: acquiring a document in a preset format formed by the protocol document; and converting the document with the preset format into the configuration file according to the set script.
Step S1503, receiving an instruction for collecting test data from the data collecting device;
step S1504, determining test data corresponding to the target register address according to the target register address included in the instruction and the configuration file.
According to some embodiments, during the testing process, the data acquisition device sends instructions to the host computer to acquire the test data. After receiving the instruction, the upper computer analyzes the instruction, further obtains the numerical value in which register is needed by the data acquisition equipment, obtains test data in the corresponding register from the configuration file according to the address of the target register, writes the test data into the response buffer, and formats the response buffer data according to the MODBUS standard protocol specification.
Thus, step S1504 may include: analyzing the instruction to obtain the address information of the target register; and obtaining test data in a register corresponding to the address information from the configuration file.
Step S1505, transmitting the test data to the data acquisition device.
According to some embodiments, the host computer communicates with the data acquisition device in accordance with the protocol of the product to be tested. And the upper computer encapsulates the test data to be acquired according to the protocol of the product to be tested according to the instruction of the data acquisition equipment to form a protocol encapsulation frame, and then sends the protocol encapsulation frame to the data acquisition equipment.
Thus, step S1505 may include: packaging the test data through a protocol of a product to be tested to obtain a protocol packaging frame; and transmitting the protocol encapsulation frame to the data acquisition device.
Step S1506, comparing the result data fed back by the data display device with the test data to obtain a test result.
According to some embodiments, after receiving the response frame of the upper computer, the data acquisition device sends the response frame to the cloud server, interaction is performed between the cloud server and the data display device through the atom interface, and the data display device displays result data obtained according to the test data. The data display equipment feeds back the result data to the upper computer, and the upper computer can verify the processing correctness of a whole set of data streams by comparing the result data obtained by the data display equipment with test data manufactured by the registers of the upper computer at the bottommost layer: and the data acquisition equipment is used for acquiring register data and packaging the DP, disassembling the DP point from the cloud server and providing the interface correctness for the data display equipment, so that the test of the data link of the whole energy product is realized.
On the basis of the above-described test system for energy products, according to another aspect of the present application, there is provided a test method for energy products, as shown in fig. 16. In comparison with fig. 15, steps S1601 to S1606 of fig. 16 are the same as steps S1501 to S1506 of fig. 15, except that the method shown in fig. 16 further includes, before step S1601:
step S1601, test is performed on the data display device.
According to the mode of "test data presentation device first and then data acquisition device" shown in fig. 13 and 14, the data presentation device is tested before the data acquisition device is tested or the entire energy product data link is tested.
According to some embodiments, in the testing process of the data display device, according to the DP object model and the requirements, a tester sorts the test DP data, the test data display device is directly in butt joint with the object model, a register and a data acquisition device are skipped, the test data display device is bound to a shadow device platform, virtual energy devices are deployed, DP information is pushed through the shadow device, and data on the data display device is checked.
Thus, step S1601 may include:
sending test DP data to a cloud server through an object model;
transmitting the test DP data to the data display equipment through the cloud server; and
and checking the result data through the data display equipment.
According to the testing method and the testing system for the energy product, disclosed by the application, the developed upper computer can be compatible with standard protocol data and nonstandard protocol data, so that the testing method and the testing system can be compatible with business data of different manufacturers, and can be used for solving the problems that in the prior art, testing data is incomplete, the finished product deployment of the real product of the inverter/energy storage cabinet is inconvenient and the like when the energy data acquisition equipment is used for simulating equipment such as a power cabinet and an inverter, and the developed upper computer can autonomously combine and send a request of a MODBUS, so that the real inverter data can be directly and efficiently simulated. In addition, in the process of testing the energy product, each tested object such as the data acquisition equipment, the data display equipment and the like can be directly verified, the full link of the energy product data is opened, the testing flow is simplified, the testing accuracy is improved, and the time and the resources are saved.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are alternative embodiments, and that the acts and modules referred to are not necessarily required for the present application.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional manners of dividing the actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, electrical connection, or other forms.
Referring to fig. 17, fig. 17 provides an electronic device including a processor and a memory. The memory stores computer instructions that, when executed by the processor, cause the processor to execute the computer instructions to implement the methods and refinements shown in fig. 15 and 16.
It should be understood that the above-described device embodiments are illustrative only and that the disclosed device may be implemented in other ways. For example, the division of the units/modules in the above embodiments is merely a logic function division, and there may be another division manner in actual implementation. For example, multiple units, modules, or components may be combined, or may be integrated into another system, or some features may be omitted or not performed.
In addition, unless specifically described, each functional unit/module in each embodiment of the present application may be integrated into one unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated together. The integrated units/modules described above may be implemented either in hardware or in software program modules.
The integrated units/modules, if implemented in hardware, may be digital circuits, analog circuits, etc. Physical implementations of hardware structures include, but are not limited to, transistors, memristors, and the like. The processor or chip may be any suitable hardware processor, such as CPU, GPU, FPGA, DSP and ASIC, etc., unless otherwise specified. The on-chip cache, off-chip Memory, memory may be any suitable magnetic or magneto-optical storage medium, such as resistive Random Access Memory RRAM (Resistive Random Access Memory), dynamic Random Access Memory DRAM (Dynamic Random Access Memory), static Random Access Memory SRAM (Static Random Access Memory), enhanced dynamic Random Access Memory EDRAM (Enhanced Dynamic Random Access Memory), high-Bandwidth Memory HBM (High-Bandwidth Memory), hybrid Memory cube HMC (Hybrid Memory Cube), and the like, unless otherwise indicated.
The integrated units/modules may be stored in a computer readable memory if implemented in the form of software program modules and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, comprising several instructions for causing a computer electronic device (which may be a personal computer, a server or a network electronic device, etc.) to perform all or part of the steps of the method described in the various embodiments of the disclosure. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Embodiments of the present application also provide a non-transitory computer storage medium storing a computer program that, when executed by a plurality of processors, causes the processors to perform the methods and refinement as shown in fig. 15 and 16.
The foregoing has outlined rather broadly the more detailed description of embodiments of the application in order that the detailed description of the principles and embodiments of the application may be implemented in conjunction with the detailed description of embodiments of the application that follows. Meanwhile, based on the idea of the present application, those skilled in the art can make changes or modifications on the specific embodiments and application scope of the present application, which belong to the protection scope of the present application. In view of the foregoing, this description should not be construed as limiting the application.

Claims (10)

1. The test method for the energy product is applied to an upper computer and is characterized by comprising the following steps of:
determining a protocol of a product to be tested;
generating a configuration file according to a protocol document corresponding to the protocol of the product to be tested, wherein the configuration file comprises register addresses and test data corresponding to each register address;
receiving an instruction for collecting test data from data collecting equipment;
determining test data corresponding to a target register address according to the target register address contained in the instruction and the configuration file;
transmitting the test data to the data acquisition equipment; and
and comparing the result data fed back by the data display equipment with the test data to obtain a test result.
2. The method of testing as claimed in claim 1, wherein said determining test data corresponding to said target register address based on said target register address and said configuration file contained in said instruction comprises:
analyzing the instruction to obtain the address information of the target register; and
and obtaining test data in a register corresponding to the address information from the configuration file.
3. The test method of claim 1, wherein the transmitting the test data to the data acquisition device comprises:
packaging the test data through a protocol of a product to be tested to obtain a protocol packaging frame; and
and sending the protocol packaging frame to the data acquisition equipment.
4. A testing method according to any one of claims 1 to 3, wherein generating a configuration file according to a protocol document corresponding to a protocol of the product to be tested comprises:
acquiring a document in a preset format formed by the protocol document; and
and converting the document with the preset format into the configuration file according to the set script.
5. A test system for energy product, its characterized in that includes host computer, data acquisition equipment, cloud ware and data display device, wherein:
the upper computer is used for generating a configuration file according to a protocol document corresponding to a protocol of a product to be tested, the configuration file comprises register addresses and test data corresponding to each register address, receiving an instruction for collecting the test data from the data collection device, determining the test data corresponding to the destination register addresses according to the destination register addresses and the configuration file contained in the instruction, sending the test data to the data collection device, and comparing the result data fed back by the data display device with the test data to obtain a test result;
the data acquisition equipment sends the instruction to the upper computer, receives the test data and sends the test data to the cloud server;
the cloud server sends the test data to the data display equipment;
and the data display equipment forms result data according to the test data and feeds the result data back to the upper computer.
6. The test system of claim 5, wherein the host computer is configured to:
analyzing the instruction to obtain the address information of the target register; and
and obtaining test data in a register corresponding to the address information from the configuration file.
7. The test system of claim 5 or 6, wherein the host computer is further configured to:
acquiring a document in a preset format formed by the protocol document; and
and converting the document with the preset format into the configuration file according to the set script.
8. The test system of claim 5 or 6, further comprising an object model, wherein,
the object model is used for sending test DP data to the cloud server, the cloud server is used for sending the test DP data to the data display equipment, and the data display equipment is used for displaying result data.
9. An electronic device comprising a memory having a computer program stored thereon and a processor that when executing the computer program on the memory implements the method of any of claims 1 to 4.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 4.
CN202310975620.6A 2023-08-03 2023-08-03 Testing method and system for energy products Pending CN117061371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310975620.6A CN117061371A (en) 2023-08-03 2023-08-03 Testing method and system for energy products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310975620.6A CN117061371A (en) 2023-08-03 2023-08-03 Testing method and system for energy products

Publications (1)

Publication Number Publication Date
CN117061371A true CN117061371A (en) 2023-11-14

Family

ID=88654523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310975620.6A Pending CN117061371A (en) 2023-08-03 2023-08-03 Testing method and system for energy products

Country Status (1)

Country Link
CN (1) CN117061371A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117909150A (en) * 2023-12-27 2024-04-19 深圳市集贤科技有限公司 Device testing method, device, terminal device and storage medium
CN118474214A (en) * 2024-07-08 2024-08-09 合肥国轩高科动力能源有限公司 Energy storage data processing method, device and electronic equipment
CN118509500A (en) * 2024-07-19 2024-08-16 杭州华塑科技股份有限公司 Communication method, device and storage medium based on EXCEL file

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117909150A (en) * 2023-12-27 2024-04-19 深圳市集贤科技有限公司 Device testing method, device, terminal device and storage medium
CN118474214A (en) * 2024-07-08 2024-08-09 合肥国轩高科动力能源有限公司 Energy storage data processing method, device and electronic equipment
CN118509500A (en) * 2024-07-19 2024-08-16 杭州华塑科技股份有限公司 Communication method, device and storage medium based on EXCEL file

Similar Documents

Publication Publication Date Title
CN117061371A (en) Testing method and system for energy products
CN113206763B (en) Simulation test system and method suitable for Internet of things management platform
US9430364B1 (en) Systems, methods, and apparatuses for testing mobile device applications
CN103246586B (en) Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
CN109743301A (en) A data transceiver system and method based on Modbus protocol
CN108733552A (en) A kind of FPGA remote debugging systems and remote debugging method
CN107239271A (en) Develop document structure tree method and device
CN105743707A (en) Method for testing BMC log analysis function based on Redhat system
CN105120483B (en) Automatic testing method and system for compatibility of smart card and mobile terminal
CN102594618A (en) Method and device for realizing storage device test of storage area network (SAN)
CN111782117A (en) Interface display method and device, storage medium, and electronic device
CN109344075A (en) Configuration method, test method, configuration server and service node equipment
CN101951298A (en) Mthod and system for consistency test of an air ground communication system
CN113067738A (en) Network topology visualization function equipment compatibility testing method and system
CN112817859A (en) Automatic testing method and system for intelligent connection platform
TWI404383B (en) System for injecting protocol specific errors during the certification of components in a storage area network
CN111181781A (en) A test configuration method, system, terminal and storage medium of Vdbench
CN110825617A (en) Method and device for simulating communication interaction between devices
CN117376187B (en) Communication protocol detection method and detection system
US7016800B1 (en) Centralized console API testing architecture
CN104678292B (en) A kind of complex programmable logic device (CPLD) test method and device
CN115567422B (en) Basic platform testing method, testing terminal, host and testing system
CN102685012B (en) GOOSE secondary virtual wiring dynamic verification method for intelligent device
CN106981146A (en) A kind of billing method based on many Golden Taxes disks
CN116842884A (en) Closed loop simulation verification system based on phased array antenna beam control FPGA

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Country or region after: China

Address after: Room S408-2, 4th Floor, South Building, Shuzhi Fudi First Building, No. 181 Jingda Road, Sandun Town, Xihu District, Hangzhou City, Zhejiang Province, 310030

Applicant after: Hangzhou Yixing Intelligent Technology Co.,Ltd.

Address before: Room 314, Building 6, Yunchuang Gagu R&D Center, No. 428 Zhiqiang Road, Sandun Town, Xihu District, Hangzhou City, Zhejiang Province, 310030

Applicant before: Hangzhou Yixing Energy Co.,Ltd.

Country or region before: China

CB02 Change of applicant information