Internet of Things gateway equipment test method and system

By connecting the IoT platform with gateway devices and testing equipment via network, test commands are generated and transmitted, solving the problems of long testing time and high manpower and material costs for IoT gateway devices, and realizing efficient testing of communication protocol conversion capabilities.

CN119299344AActive Publication Date: 2025-01-10GUANGDONG POWER GRID CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411331082.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-10
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

Existing technologies for testing IoT gateway devices mainly rely on manually setting up the test environment, resulting in long testing times and high costs in terms of manpower and resources.

Method used

By connecting the IoT platform with the gateway device under test and the test equipment via network, test commands are generated and transmitted to perform downlink and uplink data tests, and test reports are generated to evaluate the communication protocol conversion capabilities of the gateway device.

Benefits of technology

The testing environment has been standardized, the operation process has been simplified, manual intervention and testing time have been reduced, and the communication protocol conversion capabilities of gateway devices in different scenarios have been fully verified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299344A_ABST
    Figure CN119299344A_ABST
Patent Text Reader

Abstract

The invention discloses an Internet of Things gateway device test method and system, the method is suitable for a test device of the Internet of Things gateway device test system, and the system comprises a preset Internet of Things platform and a to-be-tested gateway device; the method comprises the following steps: acquiring a communication test request and a state monitoring report of to-be-tested gateway equipment; generating a first test instruction according to the communication test request; according to the first test instruction and the Internet of Things platform, performing a data downlink test operation on the to-be-tested gateway device to obtain a first test result; generating a second test instruction according to the communication test request; according to the second test instruction and the state monitoring report, performing data uplink test operation on the to-be-tested gateway equipment, and obtaining a second test result through the Internet of Things platform; and performing judgment according to the first test instruction, the second test instruction, the first test result and the second test result, and generating a test report of the to-be-tested gateway equipment. According to the invention, the operation process is simplified, and the standardization of the test environment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Things communication technology, and in particular to an Internet of Things gateway device testing method and system. Background Art

[0002] The Internet of Things is a highly integrated and comprehensive application of a new generation of information technology, which is of great significance to the new round of industrial transformation and the green, intelligent and sustainable development of society. With the widespread application of Internet of Things technology, the power grid field has also begun to vigorously promote Internet of Things technology to improve the level of intelligence in equipment monitoring and management. However, a large number of existing monitoring devices have low hardware configurations and do not have sufficient processing power to support standard Internet of Things protocols such as MQTT. Therefore, it is necessary to perform protocol conversion through an Internet of Things smart gateway to achieve the connection between these devices and the Internet of Things platform. At present, the method of testing Internet of Things gateway devices mainly relies on manually building a test environment, which makes the testing of Internet of Things gateway devices time-consuming and labor-intensive. Summary of the invention

[0003] The embodiments of the present invention provide a method and system for testing an Internet of Things gateway device, which can effectively solve the problem that the method for testing an Internet of Things gateway device in the prior art mainly relies on manually building a test environment, which makes the testing of the Internet of Things gateway device take a long time and consumes manpower and material resources.

[0004] An embodiment of the present invention provides an Internet of Things gateway device testing method, which is applicable to a testing device of an Internet of Things gateway device testing system, wherein the Internet of Things gateway device testing system comprises: a preset Internet of Things platform and a gateway device to be tested; the gateway device to be tested, the testing device and the Internet of Things platform are connected to each other through a network;

[0005] The Internet of Things gateway device testing method comprises:

[0006] Obtain the communication test request and status monitoring report of the gateway device under test;

[0007] Generate a first test instruction for device data downlink test according to the communication test request;

[0008] The first test instruction is transmitted to the gateway device to be tested through the Internet of Things platform to perform a data downlink test operation on the gateway device to be tested, and a first test result representing the data downlink test of the gateway device to be tested is obtained;

[0009] Generate a second test instruction for device data uplink test according to the communication test request;

[0010] According to the second test instruction and the status monitoring report, a data uplink test operation is performed on the gateway device to be tested, and a second test result representing a data downlink test of the gateway device to be tested is obtained through the Internet of Things platform;

[0011] A judgment is made according to the first test instruction, the second test instruction, the first test result and the second test result, and a test report of the gateway device to be tested is generated.

[0012] Furthermore, the data downlink test includes:

[0013] Sending the first test instruction to the gateway device to be tested through the Internet of Things platform, so that the gateway device to be tested responds according to the first test instruction, generates a first instruction response result, and transmits the first instruction response result to the test device;

[0014] By comparing the first instruction response result and the first test instruction, it is determined whether the gateway device under test correctly responds to the first test instruction, and a first test result representing a data downlink test of the gateway device under test is obtained.

[0015] Furthermore, the data uplink test includes:

[0016] After encoding the status monitoring report through a preset first communication protocol, a status monitoring data packet is obtained;

[0017] Sending the second test instruction and the status monitoring data packet to the gateway device to be tested, so that the gateway device to be tested responds to the status monitoring data packet according to the second test instruction and the preset second communication protocol, generates a second response result, and transmits the second response result to the test device through the Internet of Things platform;

[0018] By comparing the second response result, the second test instruction and the status monitoring report, it is determined whether the gateway device under test correctly responds to the second test instruction, and a second test result representing the data downlink test of the gateway device under test is obtained.

[0019] Furthermore, the first communication protocol includes a traditional communication protocol; and the second communication protocol includes an Internet of Things communication protocol.

[0020] Furthermore, the test device is a sub-device of the gateway device to be tested.

[0021] As an improvement of the above solution, another embodiment of the present invention provides an Internet of Things gateway device testing system, including: a testing device, a preset Internet of Things platform and a gateway device to be tested;

[0022] The test device, the gateway device to be tested and the Internet of Things platform are connected to the network in pairs;

[0023] The test device is used to obtain a communication test request and a status monitoring report of a gateway device under test; generate a first test instruction for a device data downlink test according to the communication test request; transmit the first test instruction to the gateway device under test through the Internet of Things platform, so as to perform a data downlink test operation on the gateway device under test, and obtain a first test result representing the data downlink test of the gateway device under test; generate a second test instruction for a device data uplink test according to the communication test request; perform a data uplink test operation on the gateway device under test according to the second test instruction and the status monitoring report, and obtain a second test result representing the data downlink test of the gateway device under test through the Internet of Things platform; make a judgment based on the first test instruction, the second test instruction, the first test result and the second test result, and generate a test report for the gateway device under test;

[0024] The Internet of Things platform is used to receive a first test instruction from the test device and transmit the first test instruction to the gateway device to be tested; receive a second response result from the gateway device to be tested, and transmit the second response result to the test device;

[0025] The gateway device to be tested is used to respond according to the first test instruction, generate a first instruction response result, and transmit the first instruction response result to the test device; respond to the status monitoring data packet according to the second test instruction and a preset second communication protocol, generate a second response result, and transmit the second response result to the test device through the Internet of Things platform.

[0026] Further, the gateway device to be tested is used to respond according to the first test instruction and generate a first instruction response result;

[0027] Responding according to the first test instruction to generate a first instruction response result includes:

[0028] Parsing the first test instruction through a preset second communication protocol to extract an instruction parsing result;

[0029] The command parsing result is encoded and converted through a preset first communication protocol to generate a first command response result.

[0030] Furthermore, the testing equipment comprises:

[0031] A connector module, used for network connection between the test device and the gateway device to be tested;

[0032] An Internet of Things platform interface module, used for connecting the test device with the Internet of Things platform;

[0033] The first communication protocol simulation module is used to simulate the first communication protocol so that the status monitoring report is encoded through the preset first communication protocol to obtain a status monitoring data packet.

[0034] Furthermore, the first communication protocol includes a traditional communication protocol; and the second communication protocol includes an Internet of Things communication protocol.

[0035] Furthermore, the test device is a sub-device of the gateway device to be tested.

[0036] By implementing the present invention, at least the following beneficial effects are achieved:

[0037] The present invention provides an Internet of Things gateway device testing method and system, wherein the method is applicable to a testing device of an Internet of Things gateway device testing system, wherein the Internet of Things gateway device testing system comprises: a preset Internet of Things platform and a gateway device to be tested; the gateway device to be tested, the testing device and the Internet of Things platform are connected to each other through a network; the Internet of Things gateway device testing method comprises: obtaining a communication test request and a status monitoring report of the gateway device to be tested; generating a first test instruction for a device data downlink test according to the communication test request; transmitting the first test instruction to the gateway device to be tested through the Internet of Things platform, so as to perform a data downlink test operation on the gateway device to be tested, and obtain a first test result for representing the data downlink test of the gateway device to be tested; generating a second test instruction for a device data uplink test according to the communication test request; performing a data uplink test operation on the gateway device to be tested according to the second test instruction and the status monitoring report, and obtaining a second test result for representing the data downlink test of the gateway device to be tested through the Internet of Things platform; and making a judgment according to the first test instruction, the second test instruction, the first test result and the second test result, and generating a test report for the gateway device to be tested. The gateway device to be tested is connected to the test device and the Internet of Things platform in pairs. By generating the first test instruction and the second test instruction, the test environment is standardized, the operation process is simplified, the manual intervention and test time are reduced, and the use of manpower and material resources is reduced. Data uplink test and data downlink test are implemented through the test device, the gateway device to be tested and the Internet of Things platform, so as to test the two-way communication protocol conversion capability of the gateway device to be tested, ensuring that the communication protocol conversion capability of the gateway device to be tested in different scenarios can be fully verified. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a flowchart of a method for testing an Internet of Things gateway device provided by an embodiment of the present invention;

[0039] Figure 2 It is a structural diagram of an Internet of Things gateway device testing system provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] See also Figure 1 , is a flow chart of a method for testing an Internet of Things gateway device provided by an embodiment of the present invention, comprising:

[0042] Obtain the communication test request and status monitoring report of the gateway device under test;

[0043] Generate a first test instruction for device data downlink test according to the communication test request;

[0044] The first test instruction is transmitted to the gateway device to be tested through the Internet of Things platform to perform a data downlink test operation on the gateway device to be tested, and a first test result representing the data downlink test of the gateway device to be tested is obtained;

[0045] Generate a second test instruction for device data uplink test according to the communication test request;

[0046] According to the second test instruction and the status monitoring report, a data uplink test operation is performed on the gateway device to be tested, and a second test result representing a data downlink test of the gateway device to be tested is obtained through the Internet of Things platform;

[0047] A judgment is made according to the first test instruction, the second test instruction, the first test result and the second test result, and a test report of the gateway device to be tested is generated.

[0048] Specifically, the status monitoring report includes the operation data of the gateway device, such as temperature and flow rate, and the performance parameters of the gateway device. The data downlink test of the gateway device to be tested is a test from the Internet of Things platform to the gateway device to be tested to the test device, which tests the communication protocol conversion capability of the gateway to be tested. When the test device receives the communication test request of the gateway device to be tested, it generates a first test instruction for the device data downlink test according to the communication test request; then, according to the first test instruction and the Internet of Things platform, the data downlink test operation is performed on the gateway device to be tested, and a first test result for representing the data downlink test of the gateway device to be tested is obtained. At the same time, when the test device receives the communication request, it generates a second test instruction for the device data uplink test according to the communication test request; then, according to the second test instruction and the status monitoring report, the gateway device to be tested is tested. The second test result for representing the data downlink test of the gateway device to be tested is obtained through the Internet of Things platform. The data downlink test of the gateway device to be tested represents the test from the test device to the gateway device to be tested to the Internet of Things platform. Finally, a judgment is made according to the first test instruction, the second test instruction, the first test result and the second test result, and a test report of the gateway device to be tested is generated to implement the test of the two-way communication protocol conversion capability of the gateway device to be tested.

[0049] Preferably, the data downlink test includes:

[0050] Sending the first test instruction to the gateway device to be tested through the Internet of Things platform, so that the gateway device to be tested responds according to the first test instruction, generates a first instruction response result, and transmits the first instruction response result to the test device;

[0051] By comparing the first instruction response result and the first test instruction, it is determined whether the gateway device under test correctly responds to the first test instruction, and a first test result representing a data downlink test of the gateway device under test is obtained.

[0052] Specifically, the gateway device to be tested is used to respond according to the first test instruction and generate a first instruction response result;

[0053] Responding according to the first test instruction to generate a first instruction response result includes:

[0054] Parsing the first test instruction through a preset second communication protocol to extract an instruction parsing result;

[0055] The command parsing result is encoded and converted through a preset first communication protocol to generate a first command response result.

[0056] In a preferred embodiment of the present invention, the test device sends a first test instruction to the Internet of Things platform, and sends the first test instruction to the gateway device under test through the Internet of Things platform. After receiving the first test instruction, the gateway device under test uses the second communication protocol to parse the first test instruction, extracts the instruction parsing results such as the instruction type and instruction operation parameters, and then the gateway device under test converts the instruction parsing result using the first communication protocol to generate a first instruction response result, and then the gateway device under test transmits the first instruction response result to the test device. The test device receives the first instruction response result, compares the first instruction response result with the first test instruction, and if the first instruction response result is inconsistent with the instruction content corresponding to the first test instruction, it means that the gateway device under test fails to execute the first test instruction, the gateway device under test does not correctly respond to the first test instruction, and the first test result for indicating that the data downlink test of the gateway device under test fails. At the same time, if the first instruction response result is inconsistent with the first test instruction, it also means that the gateway device under test does not correctly forward the first test instruction, and the first test result for indicating that the data downlink test of the gateway device under test fails.

[0057] Preferably, the data uplink test includes:

[0058] After encoding the status monitoring report through a preset first communication protocol, a status monitoring data packet is obtained;

[0059] Sending the second test instruction and the status monitoring data packet to the gateway device to be tested, so that the gateway device to be tested responds to the status monitoring data packet according to the second test instruction and the preset second communication protocol, generates a second response result, and transmits the second response result to the test device through the Internet of Things platform;

[0060] By comparing the second response result, the second test instruction and the status monitoring report, it is determined whether the gateway device under test correctly responds to the second test instruction, and a second test result representing the data downlink test of the gateway device under test is obtained.

[0061] In a preferred embodiment of the present invention, the test device encodes the status monitoring report through a preset first communication protocol to obtain a status monitoring data packet, and then the test device sends the second test instruction and the status monitoring data packet to the gateway device to be tested, and the gateway device to be tested responds to the status monitoring data packet according to the second test instruction and the preset second communication protocol, generates a second response result, and transmits the second response result to the test device through the Internet of Things platform. After the Internet of Things platform receives the second response result of the gateway device to be tested, it sends the second response result to the test device. The test device receives the second response result sent by the Internet of Things platform, compares the second response result, the second test instruction and the status monitoring report, determines whether the gateway device to be tested correctly responds to the second test instruction, and obtains a second test result for indicating the data downlink test of the gateway device to be tested. The data in the second response result is inconsistent with the status monitoring report, indicating that the reported data of the gateway device to be tested is not executed according to the second test instruction, or the gateway device to be tested does not correctly forward the second test instruction of the test device, and the first test result for indicating the data downlink test of the gateway device to be tested is that the data uplink test of the gateway device to be tested fails.

[0062] Preferably, the first communication protocol includes a traditional communication protocol; and the second communication protocol includes an Internet of Things communication protocol.

[0063] In a preferred embodiment of the present invention, a traditional power communication protocol (such as IEC 104) and an Internet of Things communication protocol (such as MQTT) are used.

[0064] Schematically, the test device is a sub-device of the gateway device to be tested. Using the test device as a sub-device can more accurately simulate the network environment and data interaction in actual use. This configuration makes the test results more realistic reference value, because in actual deployment, the sub-device usually communicates with the outside world through the gateway. When the test device is used as a sub-device, there is no need to build a complex external test environment, because the sub-device can be directly connected to the existing network architecture. This not only simplifies the test steps, but also reduces the probability of error. Using the test device as a sub-device can effectively test the data forwarding capability of the gateway. This is particularly important for evaluating the performance of the gateway when processing large amounts of data, especially in high-concurrency scenarios. Gateway devices usually need to support multiple communication protocols to be compatible with different types of sub-devices. Including the test device in the sub-device list of the gateway helps to test and verify the compatibility and interoperability of these protocols.

[0065] By implementing this embodiment, the gateway device to be tested is connected to the test device and the Internet of Things platform in pairs through a network. By generating a first test instruction and a second test instruction, the test environment is standardized, the operation process is simplified, and manual intervention is reduced. Data uplink testing and data downlink testing are implemented through the test device, the gateway device to be tested, and the Internet of Things platform, so as to test the two-way communication protocol conversion capability of the gateway device to be tested, ensuring that the communication protocol conversion capability of the gateway device to be tested in different scenarios can be fully verified.

[0066] See also Figure 2 , is a structural diagram of an Internet of Things gateway device testing system provided by an embodiment of the present invention, comprising: a testing device, a preset Internet of Things platform and a gateway device to be tested;

[0067] The test device, the gateway device to be tested and the Internet of Things platform are connected to the network in pairs;

[0068] The test device is used to obtain a communication test request and a status monitoring report of a gateway device under test; generate a first test instruction for a device data downlink test according to the communication test request; transmit the first test instruction to the gateway device under test through the Internet of Things platform, so as to perform a data downlink test operation on the gateway device under test, and obtain a first test result representing the data downlink test of the gateway device under test; generate a second test instruction for a device data uplink test according to the communication test request; perform a data uplink test operation on the gateway device under test according to the second test instruction and the status monitoring report, and obtain a second test result representing the data downlink test of the gateway device under test through the Internet of Things platform; make a judgment based on the first test instruction, the second test instruction, the first test result and the second test result, and generate a test report for the gateway device under test;

[0069] The Internet of Things platform is used to receive a first test instruction from the test device and transmit the first test instruction to the gateway device to be tested; receive a second response result from the gateway device to be tested, and transmit the second response result to the test device;

[0070] The gateway device to be tested is used to respond according to the first test instruction, generate a first instruction response result, and transmit the first instruction response result to the test device; respond to the status monitoring data packet according to the second test instruction and a preset second communication protocol, generate a second response result, and transmit the second response result to the test device through the Internet of Things platform.

[0071] Specifically, the gateway device to be tested is used to respond according to the first test instruction and generate a first instruction response result;

[0072] Responding according to the first test instruction to generate a first instruction response result includes:

[0073] Parsing the first test instruction through a preset second communication protocol to extract an instruction parsing result;

[0074] The command parsing result is encoded and converted through a preset first communication protocol to generate a first command response result.

[0075] Preferably, the testing device comprises:

[0076] A connector module, used for network connection between the test device and the gateway device to be tested;

[0077] An Internet of Things platform interface module, used for connecting the test device with the Internet of Things platform;

[0078] The first communication protocol simulation module is used to simulate the first communication protocol so that the status monitoring report is encoded through the preset first communication protocol to obtain a status monitoring data packet.

[0079] Preferably, the first communication protocol includes a traditional communication protocol; and the second communication protocol includes an Internet of Things communication protocol.

[0080] Illustratively, the test device is a sub-device of the gateway device to be tested.

[0081] In a preferred embodiment of the present invention, the test device includes: a connector module, which is used for the network connection between the test device and the gateway device to be tested, responsible for the communication connection between the test device and the gateway device to be tested, and ensures that data can be smoothly transmitted between the two; an Internet of Things platform interface module, which is used for connecting the test device to the Internet of Things platform, and registering the gateway device to be tested on the Internet of Things platform, and registering the test device as a sub-device of the gateway device to be tested; a first communication protocol simulation module, which is used to simulate the first communication protocol, so that the status monitoring report is encoded through the preset first communication protocol to obtain a status monitoring data packet, and can also simulate a variety of traditional power communication protocols (such as Modbus, IEC103, IEC104, etc.), and provide data to the gateway device to be tested. At the same time, the module also provides management services for externally displaying the status information of the test device itself (such as the status history record of receiving or sending data), responding to related commands (such as actively reporting data) and other services; and a test module is also provided for designing and implementing an automated test case set for testing the two-way communication protocol conversion capability of the gateway device to be tested. In a preferred embodiment of the present invention, the test device accesses the Internet of Things platform through the Internet of Things platform interface module, registers the test device as a sub-device of the device under test; then confirms the connection configuration from the Internet of Things platform, configures the gateway device under test, and confirms that the gateway device under test is connected to the Internet of Things platform; then uses the connector module to connect the test device and the gateway device under test, and confirms that the network connection is successful; then the test device performs a test to test the two-way communication protocol conversion capability of the gateway device under test, which mainly includes two direction tests:

[0082] IoT platform->gateway device to be tested->test device direction:

[0083] The test module calls the Internet of Things platform service, and sends data instructions (such as a data general call command) for the first communication protocol simulation module from the Internet of Things platform to the gateway device under test; the test module accesses the management service of the first communication protocol simulation module, obtains the received data information, and verifies whether the gateway device under test correctly converts the Internet of Things communication protocol into the traditional power communication protocol and sends it to the first communication protocol simulation module; if the verification fails, an error analysis prompt is given. For example, the test module calls the Internet of Things platform service, sends the data instruction DataCmdA for its sub-device (the first communication protocol simulation module of the test device) to the gateway device under test, and records the DataCmdA information; the test module calls the Internet of Things platform service, obtains the result of the gateway device under test executing the data instruction DataCmdA as ResultA; if the intelligent gateway fails to execute the data instruction DataCmdA, the failure information is recorded and the verification is completed; the test module accesses the management service of the first communication protocol simulation module, obtains the data instruction information received by the first communication protocol simulation module, and confirms whether the simulation module has correctly received the DataCmdA instruction; if the simulation module does not receive the DataCmdA instruction, the failure information is recorded and the verification is completed; obtains the response result ResultB of the first communication protocol simulation module to the DataCmdA instruction, compares ResultA and ResultB, and confirms whether the intelligent gateway forwards it correctly.

[0084] Test equipment -> Gateway device to be tested -> IoT platform direction:

[0085] The first communication protocol simulation module of the test device sends data (such as status report or monitoring data) to the gateway device under test; the test module calls the first communication protocol simulation module service (such as active data upload command) to send data to the gateway device under test; the test module calls the Internet of Things platform service to obtain the data reception result, and verifies whether the gateway device under test correctly forwards the data reported by the first communication protocol simulation module to the Internet of Things platform; if the verification fails, an error analysis is given. For example, the test module constructs a monitoring data report TestReportA, calls the first communication protocol simulation module (such as an active data sending command), and commands it to send data to the gateway device under test; after receiving the command, the first communication protocol simulation module encodes TestReportA with the traditional power communication protocol (IEC 104) and actively sends it to the gateway device under test; the gateway device under test receives the data report, parses the data report, encodes the data report with the Internet of Things communication protocol (MQTT) and reports it to the Internet of Things platform as a data report of the sub-device (the first communication protocol simulation module of the test device); the test module calls the Internet of Things platform service, obtains the latest reported data DeviceReportA of the sub-device (the first communication protocol simulation module) of the gateway device under test, compares TestReportA and DeviceReportA, and confirms whether the gateway device under test forwards it correctly.

[0086] Schematically, the gateway device under test parses the received data instructions encoded using the Internet of Things communication protocol (MQTT), and extracts information such as the instruction type, sub-device (the first communication protocol simulation module of the test device), and operating parameters; according to the instruction parsing result, the received instruction is converted into a corresponding instruction for the target sub-device, and sent to the target sub-device using the traditional power communication protocol (IEC 104) encoding; the gateway device under test waits for the target sub-device to respond, and after receiving the response result returned by the sub-device in the traditional power communication protocol (IEC 104), parses the result data, converts the result into the Internet of Things communication protocol (MQTT) encoding, and sends it to the Internet of Things platform.

[0087] The present invention provides an Internet of Things gateway device testing system, comprising: a testing device, a preset Internet of Things platform and a gateway device to be tested; the testing device, the gateway device to be tested and the Internet of Things platform are connected to each other through a network; the testing device is used to obtain a communication test request and a status monitoring report of the gateway device to be tested; a first test instruction for a device data downlink test is generated according to the communication test request; the first test instruction is transmitted to the gateway device to be tested through the Internet of Things platform, so as to perform a data downlink test operation on the gateway device to be tested, and obtain a first test result for representing the data downlink test of the gateway device to be tested; a second test instruction for a device data uplink test is generated according to the communication test request; a data uplink test operation is performed on the gateway device to be tested according to the second test instruction and the status monitoring report, and a first test result for representing the data downlink test of the gateway device to be tested is obtained through the Internet of Things platform. Represents a second test result of a data downlink test of the gateway device under test; judging based on the first test instruction, the second test instruction, the first test result and the second test result, generating a test report for the gateway device under test; the Internet of Things platform is used to receive the first test instruction of the test device, and transmit the first test instruction to the gateway device under test; receive the second response result of the gateway device under test, and transmit the second response result to the test device; the gateway device under test is used to respond according to the first test instruction, generate a first instruction response result, and transmit the first instruction response result to the test device; respond to the status monitoring data packet according to the second test instruction and a preset second communication protocol, generate a second response result, and transmit the second response result to the test device through the Internet of Things platform. The gateway device to be tested is connected to the test device and the Internet of Things platform in pairs through the network. By generating the first test instruction and the second test instruction, the test environment is standardized, the operation process is simplified, manual intervention and test time are reduced, and the use of manpower and material resources is reduced. Data uplink test and data downlink test are implemented through the test device, the gateway device to be tested and the Internet of Things platform, so as to test the two-way communication protocol conversion capability of the gateway device to be tested, ensuring that the communication protocol conversion capability of the gateway device to be tested in different scenarios can be fully verified.

[0088] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for testing an Internet of Things gateway device, characterized in that: A test device applicable to an Internet of Things gateway device test system, the Internet of Things gateway device test system comprising: a preset Internet of Things platform and a gateway device to be tested; the gateway device to be tested, the test device and the Internet of Things platform are connected to each other through a network; The Internet of Things gateway device testing method comprises: Obtain the communication test request and status monitoring report of the gateway device under test; Generate a first test instruction for device data downlink test according to the communication test request; The first test instruction is transmitted to the gateway device to be tested through the Internet of Things platform to perform a data downlink test operation on the gateway device to be tested, and a first test result representing the data downlink test of the gateway device to be tested is obtained; Generate a second test instruction for device data uplink test according to the communication test request; According to the second test instruction and the status monitoring report, a data uplink test operation is performed on the gateway device to be tested, and a second test result representing a data downlink test of the gateway device to be tested is obtained through the Internet of Things platform; A judgment is made according to the first test instruction, the second test instruction, the first test result and the second test result, and a test report of the gateway device to be tested is generated.

2. A method for testing an Internet of Things gateway device as claimed in claim 1, characterized in that: The data downlink test includes: Sending the first test instruction to the gateway device to be tested through the Internet of Things platform, so that the gateway device to be tested responds according to the first test instruction, generates a first instruction response result, and transmits the first instruction response result to the test device; By comparing the first instruction response result and the first test instruction, it is determined whether the gateway device under test correctly responds to the first test instruction, and a first test result representing a data downlink test of the gateway device under test is obtained.

3. A method for testing an Internet of Things gateway device as claimed in claim 1, characterized in that: The data uplink test includes: After encoding the status monitoring report through a preset first communication protocol, a status monitoring data packet is obtained; Sending the second test instruction and the status monitoring data packet to the gateway device to be tested, so that the gateway device to be tested responds to the status monitoring data packet according to the second test instruction and the preset second communication protocol, generates a second response result, and transmits the second response result to the test device through the Internet of Things platform; By comparing the second response result, the second test instruction and the status monitoring report, it is determined whether the gateway device under test correctly responds to the second test instruction, and a second test result representing the data downlink test of the gateway device under test is obtained.

4. A method for testing an Internet of Things gateway device as claimed in claim 3, characterized in that: The first communication protocol includes a traditional communication protocol; the second communication protocol includes an Internet of Things communication protocol.

5. A method for testing an Internet of Things gateway device as claimed in claim 1, characterized in that: The test device is a sub-device of the gateway device to be tested.

6. An Internet of Things gateway device testing system, characterized in that: include: Test equipment, preset IoT platform and gateway device to be tested; The test device, the gateway device to be tested and the Internet of Things platform are connected to the network in pairs; The test device is used to obtain a communication test request and a status monitoring report of the gateway device to be tested; and generate a first test instruction for a device data downlink test according to the communication test request; The first test instruction is transmitted to the gateway device to be tested through the Internet of Things platform to perform a data downlink test operation on the gateway device to be tested, and a first test result representing the data downlink test of the gateway device to be tested is obtained; Generate a second test instruction for device data uplink test according to the communication test request; perform a data uplink test operation on the gateway device to be tested according to the second test instruction and the status monitoring report, and obtain a second test result representing the data downlink test of the gateway device to be tested through the Internet of Things platform; Perform judgment according to the first test instruction, the second test instruction, the first test result and the second test result, and generate a test report for the gateway device to be tested; The Internet of Things platform is used to receive a first test instruction from the test device and transmit the first test instruction to the gateway device to be tested; receive a second response result from the gateway device to be tested, and transmit the second response result to the test device; The gateway device to be tested is used to respond according to the first test instruction, generate a first instruction response result, and transmit the first instruction response result to the test device; Respond to the status monitoring data packet according to the second test instruction and the preset second communication protocol, generate a second response result, and transmit the second response result to the test device through the Internet of Things platform.

7. An Internet of Things gateway device testing system as claimed in claim 6, characterized in that: The gateway device to be tested is used to respond according to the first test instruction and generate a first instruction response result; Responding according to the first test instruction to generate a first instruction response result includes: Parsing the first test instruction through a preset second communication protocol to extract an instruction parsing result; The command parsing result is encoded and converted through a preset first communication protocol to generate a first command response result.

8. An Internet of Things gateway device testing system as claimed in claim 6, characterized in that: The testing equipment comprises: A connector module, used for network connection between the test device and the gateway device to be tested; An Internet of Things platform interface module, used for connecting the test device with the Internet of Things platform; The first communication protocol simulation module is used to simulate the first communication protocol so that the status monitoring report is encoded through the preset first communication protocol to obtain a status monitoring data packet.

9. An Internet of Things gateway device testing system as claimed in claim 7, characterized in that: The first communication protocol includes a traditional communication protocol; the second communication protocol includes an Internet of Things communication protocol.

10. An Internet of Things gateway device testing system as claimed in claim 6, characterized in that: The test device is a sub-device of the gateway device to be tested.

Citation Information

Patent Citations

  • Internet of Things gateway monitoring method and system, and storage medium

    CN114328110A

  • Gateway performance test method and device, storage medium and electronic device

    CN115442266A

  • Joint debugging development method of gateway equipment and sub-equipment, cloud platform, equipment and medium

    CN117319187A

  • Simulator for testing a gateway device

    US20160173349A1