Internet of Things equipment test system, method, equipment and storage medium
By designing the IoT device testing system and using the interface module, interaction module and instruction module to convert data and issue test cases, the problem of device and protocol update in the existing technology has been solved, and automated equipment testing and efficient adaptation have been achieved.
Patent Information
- Application Number
- CN202410698401.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-13
AI Technical Summary
When facing newly added IoT devices and new protocols, the existing technology needs to update the protocol library, resulting in high upgrade costs, high programming overhead, and difficulty in testing device connections.
An IoT device testing system is designed, including an interface module, an interaction module and a command module. By obtaining device data and type tags, converting them into preset protocol data, test cases are selected and sent to the device for format conversion and testing. Determine the device connection status.
It realizes automated testing of different IoT devices, reduces manual intervention and testing time, improves testing efficiency, and adapts to a variety of smart devices.
Smart Images

Figure CN118642952A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and more specifically, to an Internet of Things device testing system, method, device and storage medium. Background Art
[0002] With the rapid development of Internet of Things technology, more and more different types of Internet of Things devices are connected to the Internet of Things platform. Since different types of Internet of Things devices use different data transmission protocols, the data formats transmitted by Internet of Things devices also differ.
[0003] In the related technology, in order to support the access of IoT devices using different data transmission protocols, there are usually two ways to achieve it. One is normalization on the IoT device side, which processes the reported data into data in a unified format required by the IoT platform through the IoT device side; the other is normalization on the IoT platform, which means that the device side uploads the original data, that is, the IoT platform will receive data in different formats, but the IoT platform has the ability to process data in different formats.
[0004] When facing new IoT devices and new protocols, the above two methods require updating the IoT platform according to the protocol library. The update cost is high, which will bring additional programming overhead, making it difficult to upgrade the IoT platform. It will also cause additional network IO consumption and make it difficult to test the connection status of different IoT devices. Summary of the invention
[0005] In response to at least one defect or improvement need in the prior art, the present invention provides an Internet of Things device testing system, method, device and storage medium to address the defects of the above-mentioned related technologies and the problem that when facing newly added Internet of Things devices and new protocols, the Internet of Things platform needs to be updated according to the protocol library, which makes it difficult to test new Internet of Things devices.
[0006] To achieve the above object, according to a first aspect of the present invention, there is provided an Internet of Things device testing system, comprising an interface module, an interaction module and an instruction module;
[0007] The interface module is connected to a preset number of IoT devices to obtain first data of the IoT devices and type labels of the IoT devices;
[0008] The receiving end of the interaction module is connected to the interface module, and is used to receive the first data and convert the first data into second data based on a preset protocol; the output end of the interaction module transfers the second data and the type label of the Internet of Things device to the instruction module connected to the interaction module;
[0009] The instruction module selects corresponding test data from a preset test case library based on the second data and the type tag, and sends the test data to the interaction module, so that the interaction module converts the test data into a format and sends it to the interface module, and the interface module sends the format-converted test data to the Internet of Things device corresponding to the type tag.
[0010] In a possible implementation, the system also includes a judgment module, which is connected to the interface module, receives the test result of the Internet of Things device in response to the test data after the format conversion through the interface module, and judges the connection status of the corresponding Internet of Things device based on the test result.
[0011] In a possible implementation, the system further includes a data screening module, one end of which is connected to the receiving end of the interaction module, and the other end of which is connected to the interface module;
[0012] The data screening module is used to screen the output data of the Internet of Things device, filter the noise in the output data, and output the first data.
[0013] In a possible implementation, the judgment module is further used to determine the IoT device corresponding to the test result according to the device tag of the IoT device, and mark the operating status of the IoT device corresponding to the test result.
[0014] In a second aspect, the present application also provides an IoT device testing method, including:
[0015] Acquire first data of a preset number of Internet of Things devices and type labels of the Internet of Things devices;
[0016] Converting the first data into second data based on a preset protocol;
[0017] Selecting corresponding test data from a preset test case library based on the second data and the type label;
[0018] The test data is formatted and sent to the IoT device corresponding to the type tag.
[0019] In a possible implementation manner of the second aspect, after converting the format of the test data and sending it to the IoT device corresponding to the type tag, the method further includes:
[0020] Obtaining a test result of the IoT device in response to the test data after the format conversion;
[0021] The operating status of the corresponding IoT device is determined based on the test results.
[0022] In a possible implementation, the obtaining first data of a preset number of IoT devices includes:
[0023] The output data of the Internet of Things device is screened, noise in the output data is filtered, and the first data is output.
[0024] In a possible implementation, obtaining a device tag of the IoT device, and determining the operating status of the corresponding IoT device based on the test result includes:
[0025] The IoT device corresponding to the test result is determined according to the device tag of the IoT device, and the operating status of the IoT device corresponding to the test result is marked.
[0026] According to the third aspect of the present invention, there is also provided an electronic device, which comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the method described in any one of the above embodiments.
[0027] According to a fourth aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program executable by an access authentication device, wherein when the computer program runs on the access authentication device, the access authentication device executes the steps of the method described in any one of the above embodiments.
[0028] In general, compared with the prior art, the above technical scheme conceived by the present invention can achieve at least the following beneficial effects: it is adaptable to various types of smart IoT devices, greatly improving the wide applicability of the test; it can realize automated testing of the equipment, and test data can be generated only according to the format-converted data, device type and preset test case library, thereby reducing manual intervention and testing time, and effectively improving testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A schematic diagram of the structure of an Internet of Things device testing system provided in an embodiment of the present application.
[0031] Figure 2 A flowchart of an Internet of Things device testing method provided in an embodiment of the present application.
[0032] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0033] Figure 4 A schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0035] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0036] Next, an Internet of Things device testing system, method, device and storage medium provided by the present application are introduced in conjunction with specific embodiments.
[0037] like Figure 1 As shown, the first embodiment of the present invention provides an Internet of Things device testing system 100, the system 100 includes an interface module 110, an interaction module 120 and an instruction module 130;
[0038] The interface module 110 is connected to a preset number of IoT devices to obtain first data of the IoT devices and type labels of the IoT devices.
[0039] Specifically, the interface module 110 can integrate different types of interfaces, such as a USB interface and a Type C interface connected to electronic devices, and can also include interfaces such as a serial port and a network port. The interface module 110 can also be connected to an IoT device through a wireless network, Bluetooth, NFC, etc., which is not limited in this application.
[0040] The receiving end of the interaction module 120 is connected to the interface module 110, and is used to receive the first data and convert the first data into second data based on a preset protocol; the output end of the interaction module 120 transfers the second data and the type label of the Internet of Things device to the instruction module 130 connected to the interaction module 120.
[0041] The instruction module 130 selects corresponding test data from a preset test case library based on the second data and the type tag, and sends the test data to the interaction module 120, so that the interaction module 120 converts the format of the test data and sends it to the interface module 120, and sends the format-converted test data to the Internet of Things device corresponding to the type tag through the interface module 110.
[0042] Specifically, the test case library can pre-set commonly used test cases for various IoT devices and generate labels according to the types of IoT devices. When extracting corresponding test cases from the test case library, selection is made based on the correspondence between the type label of the IoT device and the label of the test case.
[0043] It can be understood that the Internet of Things (IoT) refers to connecting devices to the network through information sensing devices according to agreed protocols, so that devices can exchange and communicate information through information dissemination media to achieve intelligent identification, positioning, tracking, supervision and other functions.
[0044] Specifically, the Internet of Things devices in the embodiments of the present application may include, but are not limited to, various types of terminal devices, such as home appliances with networking functions, home monitoring, access control systems, fire protection systems, and lighting systems.
[0045] It should be noted that Figure 1 The Internet of Things devices shown in the figure are shown with dotted lines. A testing system 100 for Internet of Things devices provided in an embodiment of the present application can be connected to any number of Internet of Things devices through an interface module. The Internet of Things devices are not part of the testing system provided in an embodiment of the present application.
[0046] In some embodiments, the interaction module 120 can determine the original protocol corresponding to the first data based on the first data, and can preset function models from multiple protocols to the target protocol. The correspondence between the output data of the Internet of Things device and the analysis results of the output data can be determined through the function model, and then the original protocol of the output data can be converted into the above preset protocol based on the correspondence between the output data and the analysis results of the output data according to the function model.
[0047] Among them, the neural network model can be used to learn the corresponding relationship between the output data of the networked device and the analysis results of the output data, and the protocol conversion can be completed through the neural network model.
[0048] Optionally, a protocol can be selected as the preset protocol, and translators for converting multiple protocols to the preset protocol can be pre-built. The type of the original protocol can be quickly determined through the first data, and the translator for converting to the preset protocol can be determined based on the type of the original protocol, thereby converting the first data of the IoT device into the second data of the preset protocol.
[0049] It can be understood that in this way, when adding new IoT devices and adding new data protocols, it is only necessary to develop translators for new protocols and preset protocols or update the established function models, without making changes to the test system and test data, which is conducive to saving maintenance costs and development costs.
[0050] In some embodiments, the system also includes a judgment module (not shown in the figure), which is connected to the interface module 110, receives the test results of the Internet of Things device in response to the test data after the format conversion through the interface module 110, and judges the connection status of the corresponding Internet of Things device based on the test results.
[0051] In some embodiments, the system further comprises a data screening module (not shown in the figure), one end of the data screening module is connected to the receiving end of the interaction module, and the other end of the data screening module is connected to the interface module;
[0052] The data screening module is used to screen the output data of the Internet of Things device, filter the noise in the output data, and output the first data.
[0053] In some embodiments, the judgment module is further used to determine the IoT device corresponding to the test result based on the device tag of the IoT device, and mark the operating status of the IoT device corresponding to the test result.
[0054] It is understandable that the format of test data for different devices may vary and may be predefined according to the type of device, such as setting current units, temperature range, light brightness, door opening instructions, alarm recovery and other data.
[0055] Specifically, after generating the test data, the instruction module 130 will also generate corresponding test instructions, and through the test instructions, the IoT device will complete the test content based on the test data and feedback the test results.
[0056] For example, for a refrigerator, test data for adjusting the temperature can be generated. If the refrigerator adjusts the temperature in response to the test data for adjusting the temperature, the test result of normal operation can be fed back. For a light, test data for adjusting the lighting time can be generated. If the light does not respond to the test data for adjusting the lighting time and does not turn off the lighting within the time range given by the test data, then the operating status of the device can be fed back as incorrect.
[0057] It can be understood that the format, data type, data unit and expected test result of the test data can be specified based on the test case. For example, by testing a case of improving brightness, feedback results of improved brightness can be obtained.
[0058] Specifically, the type of operation status of the IoT device can be determined based on the test results, which may include normal operation, deviation operation, and erroneous operation. Normal operation means that the corresponding IoT device fully responds to the test data, and the test result is the same as the expected test result. Deviation operation can be understood as the IoT device having an unreasonable delay when receiving the test data or after receiving the test data, that is, the ping value is greater than the preset threshold, resulting in a slow response speed of the IoT device to the test data. It can also be understood as the test result obtained by the IoT device based on the test data deviates from the expected test result, for example, the air conditioner temperature is adjusted to 26 degrees Celsius, and the actual adjustment result is 27 degrees Celsius. Whether it is an erroneous operation can be further determined based on the degree of deviation. Incorrect operation includes the situation where the test result deviation is large, and also includes the situation where the IoT device does not respond to the test data for testing, and the feedback test result is an empty set.
[0059] Specifically, if the operating status is an error operation, a warning message indicating "error" may be issued to prompt the user that there is a problem with the working status of the relevant IoT device, and the user is prompted to check the relevant IoT device.
[0060] In some embodiments, the output test results can be output in a specified format, including output as a local file, output as a server file, or output as an http link. The output file format can be one or more of word, csv, pdf, powerpoint, txt, html, json, sql, and xml.
[0061] Second, as Figure 2 As shown, the embodiment of the present application also provides an Internet of Things device testing method, including:
[0062] Acquire first data of a preset number of Internet of Things devices and type labels of the Internet of Things devices;
[0063] Converting the first data into second data based on a preset protocol;
[0064] Selecting corresponding test data from a preset test case library based on the second data and the type label;
[0065] The test data is formatted and sent to the IoT device corresponding to the type tag.
[0066] In some embodiments, after converting the format of the test data and sending it to the IoT device corresponding to the type tag, the method further includes:
[0067] Obtaining a test result of the IoT device in response to the test data after the format conversion;
[0068] The operating status of the corresponding IoT device is determined based on the test results.
[0069] In some embodiments, the obtaining first data of a preset number of IoT devices includes:
[0070] The output data of the Internet of Things device is screened, noise in the output data is filtered, and the first data is output.
[0071] In some embodiments, obtaining a device tag of the IoT device, and determining the operating status of the corresponding IoT device based on the test result includes:
[0072] The IoT device corresponding to the test result is determined according to the device tag of the IoT device, and the operating status of the IoT device corresponding to the test result is marked.
[0073] It should be noted that the above embodiments only exemplify the above functions when executing the IoT device testing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the method provided in the above embodiments belongs to the same concept as the IoT device testing system embodiment. The implementation process thereof is detailed in the system embodiment provided in the first aspect, which will not be repeated here.
[0074] like Figure 3 As shown, the third embodiment of the present invention further provides an electronic device 30, for example, comprising: at least one processing unit 31, and at least one storage unit 32, wherein the storage unit 32 stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the above method, and the beneficial effects of the electronic device 30 provided by this embodiment are the same as the beneficial effects of the method provided by the second embodiment.
[0075] like Figure 3As shown, the fourth embodiment of the present invention further provides a computer-readable storage medium 40 on which a computer program is stored. When the program is executed by a processor, the steps of the above method are implemented, and the beneficial effects of the computer-readable storage medium 40 provided by this embodiment are the same as the beneficial effects of the method provided by the second embodiment.
[0076] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0077] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0078] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program code.
[0082] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct the relevant hardware. The program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0083] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
[0084] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0085] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An Internet of Things device testing system, characterized in that: It includes an interface module, an interaction module and an instruction module; The interface module is connected to a preset number of IoT devices to obtain first data of the IoT devices and type labels of the IoT devices; The receiving end of the interaction module is connected to the interface module, and is used to receive the first data and convert the first data into second data based on a preset protocol; the output end of the interaction module transfers the second data and the type label of the Internet of Things device to the instruction module connected to the interaction module; The instruction module selects corresponding test data from a preset test case library based on the second data and the type tag, and sends the test data to the interaction module, so that the interaction module converts the test data into a format and sends it to the interface module, and the interface module sends the format-converted test data to the Internet of Things device corresponding to the type tag.
2. The IoT device testing system according to claim 1, characterized in that: The system also includes a judgment module, which is connected to the interface module, receives the test result of the Internet of Things device in response to the test data after the format conversion through the interface module, and judges the connection status of the corresponding Internet of Things device based on the test result.
3. The IoT device testing system according to claim 1, characterized in that: The system further comprises a data screening module, one end of which is connected to the receiving end of the interaction module, and the other end of which is connected to the interface module; The data screening module is used to screen the output data of the Internet of Things device, filter the noise in the output data, and output the first data.
4. The IoT device testing system according to claim 2, characterized in that: The judgment module is also used to determine the IoT device corresponding to the test result according to the device tag of the IoT device, and mark the operating status of the IoT device corresponding to the test result.
5. A method for testing an Internet of Things device, characterized in that: include: Acquire first data of a preset number of Internet of Things devices and type labels of the Internet of Things devices; Converting the first data into second data based on a preset protocol; Selecting corresponding test data from a preset test case library based on the second data and the type label; The test data is formatted and sent to the IoT device corresponding to the type tag.
6. The method for testing an Internet of Things device according to claim 5, characterized in that: After the test data is format-converted and sent to the IoT device corresponding to the type tag, the method further includes: Obtaining a test result of the IoT device in response to the test data after the format conversion; The operating status of the corresponding IoT device is determined based on the test results.
7. The method for testing an Internet of Things device according to claim 5, characterized in that: The obtaining of first data of a preset number of IoT devices includes: The output data of the Internet of Things device is screened, noise in the output data is filtered, and the first data is output.
8. The method for testing an Internet of Things device according to claim 6, characterized in that: Obtaining a device tag of the IoT device, and determining the operating status of the corresponding IoT device based on the test result, includes: The IoT device corresponding to the test result is determined according to the device tag of the IoT device, and the operating status of the IoT device corresponding to the test result is marked.
9. An electronic device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the method according to any one of claims 5 to 8.
10. A computer-readable storage medium, characterized in that: It stores a computer program executable by the access authentication device. When the computer program runs on the access authentication device, the access authentication device executes the steps of the method according to any one of claims 5 to 8.
