Industrial Internet of Things platform pressure test system and method
By encapsulating the Http gateway of the OPC protocol and automatically generating Jmeter pressure test scripts, the problems of low pressure testing efficiency and difficulty in automated testing of OPC clients in the prior art are solved, and efficient and automated stress testing and support for high-concurrency scenarios are achieved.
Patent Information
- Application Number
- CN202311544268.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2025-05-23
AI Technical Summary
The prior art simulates OPC client for stress testing, which is inefficient and error-prone, and cannot achieve efficient automated testing. The script development is complex, making it difficult to meet the needs of high-concurrency scenarios.
By encapsulating the Http gateway of the OPC protocol, identify the address bit of the KEPServer server, and automatically generate a standardized Jmeter pressure test script, implement the function of emulating the OPC protocol client based on the HTTP protocol gateway, and support high concurrency scenarios.
Improve script development efficiency, reduce the repetitive work of manual tests, realize efficient and automated stress testing, and enhance the readability and accuracy of simulations.
Smart Images

Figure CN120029894A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet of Things, and in particular relates to a pressure testing system and method for an industrial Internet of Things platform. Background Art
[0002] With the development of new industrialization in smart manufacturing, the demand for simulated OPC client testing in smart manufacturing projects is increasing, and the challenge of accurate and efficient simulated stress testing is also increasing.
[0003] Chinese patent CN112699020A provides a method for testing an industrial real-time database API interface, including: building an OPC interface server based on the APC-iSYS control platform; configuring the parameter information of each API interface to generate an XML configuration file; calling the parameter information of the API interface to be tested from the XML configuration file according to the test instructions; obtaining simulation data through the OPC interface server, and generating test cases using the parameter information of the called API interface to be tested; calling the interface testing tool, using the test case to perform API interface testing and obtain test results. Through the independently developed OPC interface server, using XML as the data carrier and driver, the parameter information configuration is templated and simplified, thereby streamlining the interface testing process and reducing the pressure on testers to configure parameter information. For example, Chinese patent CN116208539A relates to a test platform based on the OPC-UA industrial control protocol. The platform includes a physical network port, a user-mode kernel driver module, a synchronous packet transceiver module, a user-mode OPC-UA protocol stack processing module, a thread scheduling module, a link creation and unlinking module, and a front-end interaction module. The physical network port, user-mode kernel driver module, synchronous packet transceiver module, user-mode OPC-UA protocol stack processing module, thread scheduling module, link creation and unlinking module, and front-end interaction module are electrically connected. The provided test platform based on the OPC-UA industrial control protocol is a software platform deployed on general hardware. It has the function of testing different types of industrial control equipment, can effectively test the compatibility of OPC-UA gateways, reduce protocol data transmission errors, and effectively improve the operating efficiency and security of industrial production and highly intelligent manufacturing equipment systems.
[0004] The existing technical solutions still use manual single-step simulation testing, which requires a lot of manpower and time costs and is inefficient. It also relies on manual observation and marking of use case results, which is prone to errors and cannot achieve efficient automated testing, let alone meet stress testing simulation requirements.
[0005] Currently, industry-wide testing primarily uses the official OPC Quick Client, relying on manual simulation to read and write KEPServer address bits to achieve business scenario simulation. This is repetitive and tedious. Writing and developing OPC protocol scripts based on JAR files is complex, difficult to read, and prone to errors. Furthermore, due to the diverse scenarios involved in simulating device interactions, the number of stress testing scripts involving tag address bits is increasing. Improving script development efficiency and reducing repetitive manual testing work are key challenges facing project testing based on KEPServer solutions. Summary of the Invention
[0006] The purpose of the present invention is to provide an industrial Internet of Things platform stress testing system and method, which includes two parts: First, in the scenario of simulating the interaction of robots, monitoring equipment, software and KEPServer's OPC protocol, a gateway encapsulated as the http protocol can support high concurrency scenarios and improve the readability of simulation scripts; Second: Based on KEPServer OPC address bit recognition, stress testing scripts are automatically generated, and stress testing script development is efficiently realized, solving the existing problems of how to effectively improve script development efficiency and how to reduce the repetitive work of manual testing.
[0007] To solve the above technical problems, the present invention is achieved through the following technical solutions:
[0008] As a first aspect provided by the present invention, the present invention is a pressure testing system for an industrial IoT platform, comprising:
[0009] A label file sorting unit, which is used to sort various address bit labels by category;
[0010] IOTGateWay gateway configuration unit, which is used to add tag group information and start the gateway initialization tag;
[0011] A template script generation unit, which is used to automatically generate scripts by traversing and reading address bit labels through a custom jmeter component method;
[0012] Among them, the interactive communication between the OPC client and KEPServer is realized through the IOTGateWay gateway.
[0013] Furthermore, the IOTGateWay gateway configuration unit is also used to verify the gateway service.
[0014] Furthermore, the address bit tag includes an OPC tag name, an OPC address, a data type, and a data description.
[0015] Furthermore, the data description includes various types of fault information.
[0016] As a second aspect provided by the present invention, the present invention is a method for stress testing an industrial IoT platform. The testing method is implemented based on the testing system described in the first aspect, and the testing method includes the following steps:
[0017] Step S1: Organize the standardized label files and obtain the business type sheet page classification:
[0018] Step S11: sorting various address bit labels by category to generate an address bit label classification table;
[0019] Step S2: IOTGateWay Gateway Configuration:
[0020] Step S21: Add tag information to the configuration file;
[0021] Step S22: Start the service initialization tag;
[0022] Step S23: Verify the gateway;
[0023] Step S3: Read the address bit label classification table and generate a template script:
[0024] Step S31: Customize the jmeter component method;
[0025] Step S32: Read the tag signal by sheet page: loop through the tag address bit information of the specified column of the sheet page;
[0026] Step S33: Read the specified column label information of the sheet page according to the traversal, and automatically assemble and generate the test script;
[0027] Step S4: Debug the script and execute it.
[0028] Furthermore, each column of the address bit tag classification table in step S11 is OPC tag name, OPC address, data type, and data description. The OPC tag name of each row is read by the template script generation unit, and then a standard jmeter stress test script is automatically generated by category.
[0029] Furthermore, in step S23, it is verified whether the gateway is normally accessible, and the reading and writing of address bit tag information is simulated through the http protocol to realize business scenario simulation.
[0030] Furthermore, in step S31, the custom jmeter component method includes the following steps:
[0031] Step S311: Create a single API template jmx script;
[0032] Step S312: Develop a custom jmeter component java method based on the script information.
[0033] Furthermore, in step S32, the read tag signal includes: the read sheet page tag component name, the total number of tag address bits, and tag address bit information.
[0034] Furthermore, the method for debugging and executing the script in step S4 includes the following steps: adding information according to business scenario requirements, debugging and verifying the business, and selecting jmeter or stress testing platform for execution according to test environment conditions.
[0035] The present invention has the following beneficial effects:
[0036] The present invention encapsulates the Http gateway of the OPC protocol, identifies the KEPServer server address bit, and efficiently realizes business scenario simulation interaction; reads the KEPServer service design document to extract tag information, automatically generates a standardized Jmeter stress testing script, and realizes the simulation of the OPC protocol client function based on the HTTP protocol gateway. By sending Http protocol requests to read and write the KEPServer address bit information, the readability is enhanced and the simulation is more efficient. Based on the KEPServer address bit list information, the Jmeter template stress testing script is automatically generated in batches, avoiding the manual writing of design scripts, and is efficient and error-prone.
[0037] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 This is a diagram of the pressure testing system of the industrial IoT platform of the present invention;
[0040] Figure 2 This is the address bit label classification table of the present invention;
[0041] Figure 3 This is a flow chart of the pressure testing method for the industrial IoT platform of the present invention;
[0042] Figure 4 A schematic diagram of adding tag information to the configuration file of the present invention;
[0043] Figure 5 Schematic diagram of the service initialization tag for starting the present invention;
[0044] Figure 6This is a schematic diagram of the verification gateway of the present invention;
[0045] Figure 7 Create a single API template jmx script schematic for the present invention;
[0046] Figure 8 This is a schematic diagram of the tag reading effect of the present invention;
[0047] Figure 9 A schematic diagram of the effect of automatically generating a template script for the present invention;
[0048] Figure 10 This is a schematic diagram of the summary report of the present invention. DETAILED DESCRIPTION
[0049] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0050] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0051] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0052] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0053] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0054] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0055] Example 1:
[0056] See also Figure 1 As shown in the figure, as the first embodiment provided by the present invention, the present invention is a stress testing system for an industrial IoT platform. By encapsulating an HTTP protocol gateway and a method of traversing and reading execl address bit tags through a Java program, the automatic generation of a business scenario simulation script based on the KEPServer solution is realized. The stress testing system for the industrial IoT platform includes:
[0057] The label file sorting unit is used to sort various address bit labels, data format length description and other information by category;
[0058] As an embodiment provided by the present invention, preferably, the IOTGateWay gateway configuration unit is further used to verify the gateway service;
[0059] IOTGateWay gateway configuration unit, which is used to add tag group information and start the gateway initialization tag;
[0060] A template script generation unit, which is used to automatically generate scripts by traversing and reading address bit labels through a custom jmeter component method;
[0061] Among them, the interactive communication between the OPC client and KEPServer is realized through the IOTGateWay gateway. The KEPServer server address bit is identified through the Http gateway that encapsulates the OPC protocol, and the business scenario simulation interaction is efficiently realized; the KEPServer service design document is read to extract tag information and automatically generate a standardized Jmeter stress testing script.
[0062] As an embodiment provided by the present invention, preferably, the address bit label includes an OPC label name, an OPC address, a data type, and a data description.
[0063] As an embodiment provided by the present invention, preferably, the data description includes various types of fault information, and the various types of fault information include:
[0064] WBS: Left rear door check fault;
[0065] WBS: Left front door inspection fault;
[0066] WBS: Right rear door inspection fault;
[0067] WBS: Right front door check fault;
[0068] WBS: FD01 left rear door inspection fault;
[0069] WBS: FD01 left front door inspection fault;
[0070] WBS: FD01 right rear door inspection fault;
[0071] WBS: FD01 right front door inspection fault;
[0072] LF: emergency stop;
[0073] T50: Mechanical safety failure;
[0074] ILOT: PLC error;
[0075] ILOT: network failure;
[0076] LC1: Intrusion by entrance operator;
[0077] Z1: The area is locked;
[0078] Z1: Operators at the FD01 entrance intrude into the grating;
[0079] Z1: FD01 exit operator intrudes into the grating;
[0080] Z1: Z1 zone safety power-on failure;
[0081] Z1: 24V console supply error;
[0082] Z1: 24V power supply abnormality;
[0083] Z1: Zone 24V supply error;
[0084] Z1: FD02 motor starter 400V power supply failure;
[0085] Z1: Inverter 400V power supply failure;
[0086] Z1: FD02 friction wheel failure.
[0087] Example 2:
[0088] like Figure 3As shown, as the second embodiment provided by the present invention, the present invention is a stress testing method for an industrial IoT platform. The testing method is implemented based on the testing system described in the first aspect. Through the HTTP protocol gateway, the OPC client service can be accurately and efficiently simulated and meet the high concurrency testing requirements. Automatically generating test scripts through Java programs can reduce a lot of manpower and time costs. Automatically generating scripts based on HTTP protocol gateways and Java programs can improve script readability and reduce script development error rates. The testing method includes the following steps:
[0089] Step S1: Organize the standardized label files and obtain the business type sheet page classification:
[0090] Step S11: sorting various address bit labels by category and generating an address bit label classification table, such as Figure 2 As shown, Figure 2 The content is the designed label information divided by category. The program will read the signal label of each line and then automatically generate a standard jmeter stress test script by category.
[0091] like Figure 2 As shown, as an embodiment provided by the present invention, preferably, each column of the address bit label classification table in step S11 is OPC label name, OPC address, data type, and data description, and the OPC label name of each row is read by the template script generation unit, and then a standard jmeter stress test script is automatically generated by category.
[0092] Step S2: Configure the IOTGateWay gateway. The IOTGateWay gateway is an IIS site that implements communication between the OPC client and the KEPServer. Compared with traditional OPC protocol simulation, Http protocol simulation is more convenient and efficient, and can fully support the automation and stress testing simulation requirements of business scenarios:
[0093] Step S21: Add tag information to the configuration file, such as Figure 4 As shown:
[0094] <appsettings>
[0095] <add key="webpages:Version"value="3.0.0.0” / >
[0096] <add key="webpages:Enabled”value="false" / >
[0097] <add key="ClientValidationEnabled”value="true" / >
[0098] <add key="OpcserverName"value="Kepware,KEPServerEX.V6" / >
[0099] <add key="IsActive"value="true" / >
[0100] <add key="Issubscribed"value="false" / >
[0101] <add key="UpdateRate"value="1000” / >
[0102] <add key="aspnet MaxJsonDeserializerwembers"<add key="IotGateway'value="BPIC,PPIC,TPIC,Trim,ME5,SC5MOP1.MOP2.MOP3.MOP4.MOP6classic.door.a250.PIC<add key="TagCapacitytalue="10
[0103] <! --opCCache-1,OpCDevice-2-->
[0104] <add key="Readsource"value="2" / >
[0105] <add key="GroupsplitNum"value="1";
[0106] Step S22: Start the service initialization tag, such as Figure 5 As shown;
[0107] Step S23: Verify the gateway;
[0108] Step S3: Read the address bit label classification table and generate a template script:
[0109] Step S31: Customize the jmeter component method;
[0110] Step S32: Read the tag signal by sheet page: loop through the sheet page to specify the column tag address bit information:
[0111]
[0112] Step S33: Read the specified column label information of the sheet page and automatically assemble and generate the test script:
[0113]
[0114] Automatically generate template script effects such as Figure 9 As shown;
[0115] Step S4: Debug the script and execute it, and the summary report is as follows: Figure 10 shown.
[0116] like Figure 6 As shown, as an embodiment provided by the present invention, preferably, in step S23, it is verified whether the gateway is normally accessible, and the address bit tag information reading and writing are simulated through the http protocol to realize business scenario simulation.
[0117] As an embodiment provided by the present invention, preferably, in step S31, the custom jmeter component method includes the following steps:
[0118] Step S311: Create a single API template jmx script, such as Figure 7 Shown: Script template for a single address bit request;
[0119]
[0120]
[0121] In the tree table above, select the APL.CPU.Z2FD34.S2FD34DFDM drop-down option and fill in the following information in the HTTP request:
[0122]
[0123]
[0124] ......The following program is not shown.
[0125] like Figure 8 As shown, as an embodiment provided by the present invention, preferably, in step S32, the read label signal includes: the read sheet page label component name, the total number of label address bits, and the label address bit information.
[0126] As an embodiment provided by the present invention, preferably, the method for debugging and executing the script in step S4 includes the following steps: adding information according to business scenario requirements, debugging and verifying the business, and selecting jmeter or stress testing platform for execution according to test environment conditions.
[0127] A stress testing system and method for an industrial IoT platform uses an Http gateway that encapsulates the OPC protocol to identify the KEPServer server address bits, efficiently implementing business scenario simulation interactions. The system reads KEPServer service design documents to extract tag information and automatically generates standardized Jmeter stress testing scripts to simulate OPC protocol client functions based on the HTTP protocol gateway. KEPServer address bit information is read and written by sending Http protocol requests, resulting in enhanced readability and more efficient simulation. Based on the KEPServer address bit list information, Jmeter template stress testing scripts are automatically generated in batches, avoiding the need for manual design script writing, making the system more efficient and less prone to errors.
[0128] Throughout this specification, references to terms such as "one embodiment," "example," and "specific example" indicate that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0129] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.< / appsettings>
Claims
1. An industrial IoT platform pressure testing system, It is characterized in that include: A label file sorting unit, which is used to sort various address bit labels by category; IOTGateWay gateway configuration unit, which is used to add tag group information and start the gateway initialization tag; A template script generation unit, which is used to automatically generate scripts by traversing and reading address bit labels through a custom jmeter component method; Among them, the interactive communication between the OPC client and KEPServer is realized through the IOTGateWay gateway.
2. According to claim 1, an industrial IoT platform pressure testing system, It is characterized in that The IOTGateWay gateway configuration unit is also used to authenticate the gateway service.
3. According to claim 1, an industrial IoT platform pressure testing system, It is characterized in that The address bit label includes OPC label name, OPC address, data type, and data description.
4. According to claim 3, an industrial IoT platform pressure testing system, It is characterized in that The data description includes various types of fault information.
5. A stress testing method for an industrial IoT platform. It is characterized in that The test method is implemented based on the test system according to any one of claims 1 to 4, and the test method comprises the following steps: Step S1: Organize the standardized label files and obtain the business type sheet page classification: Step S11: sorting various address bit labels by category to generate an address bit label classification table; Step S2: IOTGateWay Gateway Configuration: Step S21: adding tag information to the configuration file; Step S22: Start the service initialization tag; Step S23: Verify the gateway; Step S3: Read the address bit label classification table and generate a template script: Step S31: Customize jmeter components; Step S32: Read the tag signal according to the sheet page: loop through the tag address bit information of the specified column of the sheet page; Step S33: automatically assemble and generate a test script according to the label information of the specified column of the sheet page; Step S4: Debug the script and execute it.
6. According to claim 5, a method for stress testing an industrial IoT platform, It is characterized in that In the step S11, each column of the address bit label classification table is OPC label name, OPC address, data type, and data description. The OPC label name of each row is read by the template script generation unit, and then a standard jmeter stress test script is automatically generated by category.
7. According to claim 5, a method for stress testing an industrial IoT platform, It is characterized in that In step S23, it is verified whether the gateway is normally accessible, and the business scenario is simulated by simulating the reading and writing of address bit tag information through the http protocol.
8. According to claim 5, a method for stress testing an industrial IoT platform, It is characterized in that In step S31, the custom jmeter component method The following steps are involved: Step S311: Create a single API template jmx script; Step S312: Develop a custom jmeter component java method based on the script information.
9. According to claim 5, a method for stress testing an industrial IoT platform, It is characterized in that In the step S32, the read label signal includes: the read sheet page label component name, the total number of label address bits, and the label address bit information.
10. The method for stress testing an industrial IoT platform according to claim 5, It is characterized in that The method for debugging and executing the script in step S4 includes the following steps: adding information according to business scenario requirements, debugging and verifying the business, and selecting jmeter or stress testing platform for execution according to test environment conditions.
Citation Information
Patent Citations
Industrial real-time database API interface test method
CN112699020A
Test platform based on OPC UA industrial control protocol
CN116208539A