Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 shows a multi-body interaction structure schematic diagram of a method for testing network distribution performance of internet of things equipment. As shown in fig. 1, the method is based on a test equipment terminal, a plurality of to-be-tested internet of things devices and a cloud; each piece of equipment to be tested is connected with the test equipment terminal through a one-to-one data interface, and the cloud end is connected with each piece of equipment to be tested through a wireless network.
In this embodiment, the test device terminal is used for testing the device of the internet of things to be tested, and the test device terminal may be a mobile terminal or a personal computer, for example, a smart phone, a notebook computer, etc., which is not limited herein. And the network distribution performance of the to-be-tested Internet of things equipment is tested by utilizing the test equipment terminal, so that the to-be-tested Internet of things equipment is effectively ensured to have good use experience after leaving a factory for sale.
The internet of things equipment to be tested comprises, but is not limited to, intelligent furniture, such as intelligent air conditioners, televisions, refrigerators, washing machines, sweeping robots, intelligent weighing scales, intelligent toothbrushes, intelligent cameras, doorbell, intelligent alarms and the like. The to-be-detected internet of things equipment can also comprise some internet of things equipment related to transportation, medical treatment, education and finance, such as a positioning system on a bus, medical equipment, electronic equipment and the like, and the to-be-detected internet of things equipment is not limited herein.
The cloud end is provided with a server and is connected with the test equipment terminal and a plurality of to-be-tested internet of things equipment in a network mode.
It should be noted that each device of the internet of things to be tested is connected with the test device terminal through a data interface corresponding to each other one by one. Specifically, because the communication between the test equipment terminal and each piece of equipment of the internet of things to be tested is an independent channel, all pieces of equipment of the internet of things to be tested recorded in the pre-written configuration file can be extracted, batch test can be carried out according to the maximum equipment number which can be supported by the data interface, and the technical effect of simultaneously testing a plurality of pieces of equipment of the internet of things to be tested can be achieved, so that the distribution network performance of each piece of equipment of the internet of things to be tested is determined.
In this embodiment, the data interface is a USB interface. Preferably, all the devices of the internet of things to be tested can be connected with the US B interface of the test device terminal through the 32-bit USB-HUB data line, so that the connection of each device of the internet of things to be tested and the test device terminal in one-to-one correspondence is realized. According to the USB3.0 specification, at most 32 devices to be tested of the Internet of things can be supported to be connected at the same time.
Meanwhile, each piece of equipment to be tested is connected with the cloud end in a wireless mode. The wireless connection means that a communication link between devices is established by using wireless technologies such as WiFi, 4G and the like, a basis is provided for data communication between the devices, and common devices for realizing wireless connection include wireless routers, cellular devices and the like. The wireless connection may also be a data connection mode of a non-port or interface type, which mainly means that the device can perform data transmission or connection with other devices through a bluetooth function or an infrared function.
It should be noted that, the physical connection among the test equipment terminal, the to-be-tested internet of things equipment and the cloud is a precondition of the method for testing the network distribution performance of the internet of things equipment, and if a preset connection relationship does not exist among the three, the subsequent steps of the method cannot be realized.
On the basis of the above step, fig. 2 shows a flow chart of the method for testing the network distribution performance of the internet of things equipment provided by the invention. The method includes an automatic network allocation operation, as shown in fig. 2, including:
s1, acquiring identity information of the corresponding to-be-tested Internet of things equipment and related communication interface parameters thereof through a pre-written configuration file of each to-be-tested Internet of things equipment.
In this step, it should be noted that the method for testing the performance of the internet of things involved distribution network provided by the invention includes automatic distribution network operation, specifically, according to the pre-written configuration file of each internet of things device to be tested, obtaining the identity information of the corresponding internet of things device to be tested and the communication interface parameters associated with the corresponding internet of things device to be tested.
Fig. 3 is a schematic diagram of a configuration file in the method for testing the network configuration performance of the internet of things device, where, as shown in the drawing, the content of the configuration file includes four parts:
(1) The device set comprises a unique ID (identity) and a COM (component object) port corresponding to each device, wherein each device to be tested has a unique device identifier belonging to the device to be tested and the corresponding COM port is different from other devices to be tested in the Internet of things, such as the device IDs 111 and 222 in FIG. 3, and the corresponding COM ports are 1 and 3 respectively.
(2) The protocol used in this embodiment is a serial communication protocol, and in serial communication, common protocols include RS-232, RS-422 and RS-485, which are not limited herein, as the protocol in fig. 3 is serial.
(3) The instruction set is used for distributing the network, and comprises a distribution network instruction sent by the test equipment terminal and distribution network state information returned by each Internet of things involved pen, wherein the distribution network instruction sent by the test equipment terminal is shown as '4A 4C 0110010300017800245C' in fig. 3, the distribution network state information returned by each Internet of things equipment to be tested comprises two types of success or failure, and the distribution network mode is determined to be successfully entered when the distribution network state information returned by the corresponding Internet of things equipment to be tested is shown as '4A 4C0110010100006E 0E' in fig. 3; when the distribution network state information returned by the corresponding to-be-detected Internet of things equipment is '4A 4C0110010100016E 0E', determining that the to-be-detected Internet of things equipment does not enter a distribution network mode, namely failure.
(4) AP information, AP, is a typical application of a wlan, is used to connect various wireless network clients together, is a bridge for communication between a wireless network and a wired network, and is a core device for constructing the wlan. In this embodiment, as shown in fig. 3, the AP information may include an SSID name and a corresponding SSID password.
It can be understood that before the network performance testing link of the to-be-tested internet of things device is performed, writing the content shown in fig. 3 into the configuration file of each to-be-tested internet of things device. When the network performance test of each piece of equipment to be tested is performed, based on the previously written configuration file information of each piece of equipment to be tested, the identity information of the corresponding piece of equipment to be tested and the associated communication interface parameters thereof in the configuration file are obtained, wherein the identity information can be the unique identifier of each piece of equipment to be tested, namely the device ID, and the associated communication interface parameters thereof refer to the COM port of each piece of equipment to be tested.
Based on the above steps, fig. 4 shows a data interaction diagram between the test device terminal and the device of the internet of things to be tested. As shown in the drawing, the liquid crystal display device,
s2, based on the identity information and the communication interface parameters, communication connection is respectively established with each piece of equipment to be tested of the Internet of things, and a network distribution instruction is sent.
And S3, after each piece of equipment of the internet of things to be tested returns response information for confirming entering the network configuration state based on the received network configuration instruction, the access information for the network configuration matched with the equipment of the internet of things to be tested, which is written in the configuration file in advance, is sent to the equipment of the internet of things to be tested, and the equipment of the internet of things to be tested automatically configures the network based on the access information for the network configuration.
In this step, according to the identity information, namely the device ID, of the corresponding to-be-tested internet of things device obtained in the previous step and the communication interface parameter, namely the COM interface parameter, corresponding to each to-be-tested internet of things device, the test device terminal establishes communication connection with each to-be-tested internet of things device, and after the communication connection is established, the test device terminal sends a network allocation instruction to the corresponding to-be-tested internet of things device. The definition and explanation of each node of the distribution network instruction sent by the test equipment terminal are shown in the following table 1:
and after receiving the network allocation instruction, the corresponding to-be-tested internet of things equipment returns corresponding network allocation state information to the test equipment terminal. The ligand state information here includes information confirming that the ligand state is entered and information confirming that the ligand state is not entered.
When the to-be-tested internet of things equipment successfully enters the network distribution mode, corresponding network distribution state information is returned to the test equipment terminal, after the test equipment terminal receives the network distribution state information confirmed to be transmitted by the corresponding to-be-tested internet of things equipment, the network distribution access information corresponding to the to-be-tested internet of things equipment, which is written in the configuration file in advance, is transmitted to the to-be-tested internet of things equipment, the to-be-tested internet of things equipment receives the network distribution access information transmitted by the test equipment terminal, and the automatic network distribution mode is performed based on the network distribution access information.
It should be noted that, the access information for the distribution network refers to the AP information previously written in the configuration file, that is, the SSID name and SSID password corresponding to the device to be tested.
In addition, the to-be-tested internet of things device determines whether to enter a configuration network state instruction, and definition and explanation of each node are shown in the following table 2:
based on the above steps, fig. 5 shows a functional interaction diagram between a test device terminal and an internet of things device to be tested, and fig. 6 shows a schematic diagram of the test device implementing the monitoring of an automatic network configuration result. As shown in fig. 5:
s4, after the automatic network allocation operation is carried out, the method further comprises the following steps: monitoring an automatic network distribution result of each to-be-tested internet of things device, recording to-be-tested internet of things devices successfully distributed in the network, and determining the network distribution performance.
In this step, after the foregoing automatic network configuration operation is performed, the test device terminal may further monitor an automatic network configuration result of each of the to-be-tested internet of things devices, record an automatic network configuration result obtained by monitoring each of the to-be-tested internet of things devices, that is, whether the automatic network configuration result is successful or failed, and determine network configuration performance of the corresponding to-be-tested internet of things device based on the automatic network configuration result.
It should be noted that, monitoring of an automatic network allocation result of the to-be-tested internet of things device by the test device terminal relates to the test device terminal, the to-be-tested internet of things device and a cloud three-party main body. In particular, the invention also relates to a gateway for realizing information interaction between the to-be-tested internet of things equipment and the cloud. After automatic network allocation operation is performed, when automatic network allocation of the to-be-tested Internet of things equipment is successful, the to-be-tested equipment sends a request for activating binding information to the cloud end, the cloud end sends the request for activating the binding information to a gateway between the to-be-tested Internet of things equipment and the gateway, the gateway binds the to-be-tested Internet of things equipment, and after the binding, the to-be-tested Internet of things equipment sends information of successful binding to the cloud end. The binding information is binding relation between the to-be-tested internet of things equipment and the gateway, and AP information corresponding to each to-be-tested internet of things equipment, namely SSID names and SSID passwords.
And the cloud end updates the network configuration state information of the corresponding to-be-tested internet of things equipment according to the information of successful binding sent by the to-be-tested internet of things equipment, sets the binding state as successful, and sets the automatic network configuration result as successful.
If the to-be-tested Internet of things equipment fails to enter the automatic network distribution mode, the to-be-tested Internet of things equipment failing to enter the network distribution mode successfully sends a request for activating binding information to the cloud, the cloud sends the request for activating the binding information to a gateway between the to-be-tested Internet of things equipment and the to-be-tested Internet of things equipment, the gateway cannot bind the to-be-tested Internet of things equipment, and the to-be-tested Internet of things equipment sends information of binding failure to the cloud.
And the cloud end updates the network configuration state information of the corresponding to-be-tested internet of things equipment according to the binding failure information sent by the to-be-tested internet of things equipment, sets the binding state as failure, and sets the automatic network configuration result as failure.
The test equipment terminals are in wireless connection with the cloud, the monitoring of the automatic network distribution state of the to-be-tested internet of things equipment is carried out by inquiring the network distribution information of all the internet of things equipment participating in the test updated by the cloud every second, the information that the automatic network distribution result corresponding to each to-be-tested internet of things equipment is successful or failed is obtained, and the information is recorded, so that the network distribution performance of each to-be-tested internet of things equipment is determined.
The embodiment is based on a test equipment terminal, a plurality of to-be-tested internet of things equipment and a cloud; and each device to be tested is communicated with the test device terminal by using an independent channel, and batch processing is carried out according to the maximum number of devices supported by the communication interface, so that the effect of simultaneously operating a plurality of devices to be tested can be realized. Establishing communication connection with each piece of equipment to be tested through the pre-written identity information of the corresponding piece of equipment to be tested and the associated communication interface parameters in the configuration file of each piece of equipment to be tested, and sending a network allocation instruction; after receiving response information of each piece of equipment of the internet of things to be tested for confirming entering of a network allocation state, sending access information for the network allocation, which is written in a configuration file in advance and is matched with the equipment of the internet of things to be tested, to the equipment of the internet of things to be tested, so that the equipment of the internet of things to be tested can automatically allocate the network based on the access information for the network allocation; after the automatic network allocation operation is performed, an automatic network allocation result of each piece of to-be-detected internet of things equipment can be monitored, and the to-be-detected internet of things equipment with successful network allocation is recorded, so that the network allocation performance of the to-be-detected internet of things equipment is determined. By the method, the network distribution performance of a plurality of pieces of Internet of things equipment is tested in batches, and labor cost and time are greatly reduced.
Further, in a preferred embodiment, the automatic network allocation operation is performed for a plurality of devices of the internet of things to be tested in a cyclic and multi-round manner; recording an automatic network distribution result of each piece of equipment of the Internet of things to be tested in each round of operation; counting the successful distribution network times of each to-be-detected Internet of things device in the multi-round distribution network operation; determining the distribution network performance further comprises determining the corresponding distribution network success rate based on each to-be-detected internet of things device, and determining the distribution network performance according to the distribution network success rate.
In this embodiment, the foregoing automatic network configuration operation may be performed repeatedly, and an automatic network configuration result corresponding to each piece of equipment to be tested in each automatic network configuration operation is recorded. Based on the method, the times that the total automatic network distribution result of each piece of equipment to be tested is successful in the execution of the multiple automatic network distribution operations are counted, so that the network distribution success rate of each piece of equipment to be tested in the multiple automatic network distribution operations is calculated, and the network distribution performance of each piece of equipment to be tested is further determined according to the obtained network distribution success rate of each piece of equipment to be tested. The network allocation success rate of a certain to-be-detected internet of things device=the total number of times that the to-be-detected internet of things device is successfully automatically allocated in a plurality of automatic network allocation operations/the total number of times that the to-be-detected internet of things device is automatically allocated.
For example, in a specific embodiment, the to-be-tested internet of things device a performs 500 times of automatic network allocation operations, where the number of times of successful automatic network allocation results is 25 times, and then the network allocation success rate of the to-be-tested internet of things device a in 500 times of automatic network allocation operations is 25/500, that is, the network allocation success rate of the to-be-tested internet of things device a is 5%.
For another embodiment, for example, the to-be-tested internet of things device B performs 100 automatic network allocation operations, where the number of times of success of the automatic network allocation results is 99 times, and then the network allocation success rate of the to-be-tested internet of things device a in the 100 times of automatic network allocation operations is 99/100, that is, the network allocation success rate of the to-be-tested internet of things device a is 99%.
It can be understood that on the basis, the average network distribution success rate of the to-be-detected internet of things equipment in the multi-round automatic network distribution operation can be calculated. Taking the aforementioned internet of things equipment a to be tested as an example, carrying out 500 times of automatic network allocation operations, wherein each 100 times is one round, then 5 rounds are taken, calculating the network allocation success rate of the internet of things equipment a to be tested in each round, and obtaining the average network allocation success rate of the internet of things equipment a to be tested based on the network allocation success rate of the five rounds. The network allocation success rate for each round is shown in table 3 below:
| Round of
|
Run 1
|
Run 2
|
Run 3
|
Run 4
|
Run 5
|
| Distribution network success rate
|
5%
|
25%
|
40%
|
98%
|
2% |
Based on the table, the average network allocation success rate of the to-be-tested internet of things equipment A is as follows: (5% +25% +40% +98% + 2%)/5=34%.
In addition, when judging the distribution network performance of the to-be-detected internet of things device, a plurality of thresholds can be preset for the distribution network success rate and/or the average distribution network success rate of the to-be-detected internet of things device, and when the distribution network success rate or the average distribution network success rate of the to-be-detected internet of things device reaches a certain value, the distribution network performance of the to-be-detected internet of things device is determined to be excellent, good, medium or poor, and whether the to-be-detected internet of things device can be delivered and sold can be judged according to the distribution network performance.
According to the method, the network distribution success rate of the to-be-tested Internet of things equipment is calculated according to the multiple automatic network distribution results by recording the automatic network distribution results of the to-be-tested Internet of things equipment in the multiple automatic network distribution operation, the network distribution performance of the to-be-tested Internet of things equipment is determined based on the network distribution success rate of the to-be-tested Internet of things equipment, and the network distribution performance results are more accurate.
Further, on the basis of the above embodiment, the network configuration result further includes a network configuration duration of the to-be-tested internet of things device for which each network configuration is successful; recording the network allocation success of the to-be-detected Internet of things equipment further comprises recording network allocation time required by each to-be-detected Internet of things equipment with the successful network allocation; and determining the distribution network performance further comprises determining the distribution network performance according to the distribution network success rate and the distribution network duration of each piece of equipment to be tested.
In this embodiment, the foregoing automatic network allocation result may further include a network allocation duration of the to-be-detected internet of things device that is successfully allocated, record an automatic network allocation duration corresponding to each to-be-detected internet of things device that is operated by each automatic network allocation, and further determine a network allocation performance of the to-be-detected internet of things device based on a network allocation success rate and a network allocation duration of the to-be-detected internet of things device.
Similarly, on the basis, the average network distribution time length of the to-be-detected Internet of things equipment in the multi-time automatic network distribution operation can be calculated. In a specific embodiment, the to-be-detected internet of things device C performs 5 times of automatic network allocation operations, records the network allocation duration of the to-be-detected internet of things device C in each round, and obtains the average network allocation duration of the to-be-detected internet of things device C based on the network allocation duration of five rounds. The network allocation duration of each round is shown in table 4 below:
| round of
|
Run 1
|
Run 2
|
Run 3
|
Run 4
|
Run 5
|
| Distribution network duration
|
0.2 seconds
|
0.8 second
|
5 seconds
|
0.09 seconds
|
2.91 seconds |
Based on the table, the average network allocation duration of the to-be-tested internet of things equipment C is as follows: (0.2+0, 8+5+0.09+2.91)/5=1.8 seconds.
Similarly, when judging the network distribution performance of the to-be-detected internet of things equipment, a plurality of thresholds can be preset for the network distribution time length of the to-be-detected internet of things equipment, when the network distribution time length of the to-be-detected internet of things equipment reaches a certain value, the network distribution success rate of the to-be-detected internet of things equipment is combined, the network distribution performance of the to-be-detected internet of things equipment is determined to be excellent, good, medium or poor, and whether the to-be-detected internet of things equipment can be delivered and sold can be judged.
It should be noted that when judging the network distribution performance of the to-be-detected internet of things device, the network distribution success rate or the network distribution duration of the to-be-detected internet of things device can be independently determined, or the network distribution success rate and the network distribution duration of the to-be-detected internet of things device can be determined, which is not limited herein.
According to the method, the network distribution success rate and the network distribution duration of the to-be-detected Internet of things equipment with successful network distribution in the multi-round automatic network distribution operation are recorded, the network distribution performance of the to-be-detected Internet of things equipment is determined, and the determination of the network distribution performance is more accurate.
Further, on the basis of the above embodiment, after sending the network allocation instruction, if the to-be-tested internet of things device returns the response information of not entering the network allocation state, confirming that the to-be-tested internet of things device fails in the round of operation.
In this embodiment, if the to-be-tested internet of things device fails to enter the automatic network configuration mode, the test device terminal directly sets the automatic network configuration result of the to-be-tested internet of things device in the round as failure, and determines the network configuration performance of the to-be-tested internet of things device based on the failure.
Further, on the basis of the foregoing embodiment, fig. 7 shows a schematic diagram of initiating unbinding by the test device terminal, and after monitoring the network configuration result of the to-be-tested internet of things device and recording the to-be-tested internet of things device with successful network configuration in this round, the method further includes: and recovering state parameters of the to-be-tested internet of things equipment with successful network allocation so as to perform the next round of automatic network allocation test.
In this embodiment, for an internet of things device to be tested, where the automatic network configuration result is successful, the test device terminal sends an instruction for unbinding the device to the cloud end, so as to recover the state parameters of the internet of things device to be tested, thereby preparing for the execution of the next automatic network configuration operation.
Specifically, the state parameters of the to-be-tested internet of things equipment successfully allocated to the network are restored, the test equipment terminal is required to send an instruction for unbinding the corresponding equipment to the cloud, the cloud interface is called, the cloud interacts with the gateway after receiving the instruction for unbinding the corresponding equipment issued by the test equipment terminal, the instruction for unbinding the corresponding equipment is issued to the gateway, the gateway executes the instruction, and the to-be-tested internet of things equipment bound with the instruction is removed, so that the binding relation is unbinding. After the binding relation is released, the gateway synchronizes the result of the binding relation release to the cloud end, and the cloud end forwards the result to the test equipment terminal. Based on the method, the test equipment terminal can determine whether the automatic network allocation operation of the next round should be carried out on the to-be-tested internet of things equipment.
According to the method, the system and the device, the state parameters of the to-be-tested Internet of things equipment which is successfully distributed are recovered, so that the to-be-tested Internet of things equipment can be subjected to the next round of automatic network distribution operation, the multi-round circulation automatic network distribution test is realized, and the finally obtained network distribution performance result of the to-be-tested Internet of things equipment is more accurate.
Further, on the basis of the above embodiment, a plurality of devices of the internet of things to be tested are connected with the USB interface of the test device terminal through the USB-HUB.
In this embodiment, the device to be tested is connected to the USB interface of the test device terminal through the USB-HUB, so as to realize connection between the device to be tested and the test device terminal.
USB Hub refers to a device that can extend one USB interface to multiple interfaces and allow these interfaces to be used simultaneously. USB HUB can be classified into USB2.0 HUB, USB3.0HUB and USB3.1 HUB according to the belonging USB protocol. According to USB3.0HUB specifications, at most 32 devices to be tested can be supported to be connected simultaneously.
According to the embodiment, the USB interface of the USB-HUB and the test equipment terminal is connected, so that a plurality of to-be-tested Internet of things equipment can be tested for network distribution performance at the same time, and labor cost and time cost are greatly reduced.
Further, on the basis of the above embodiment, the access information for the distribution network includes an SSID and a corresponding password required for accessing the network.
In this embodiment, after receiving a network configuration instruction sent by a test device terminal, the device to be tested returns response information for confirming that the network configuration state is entered, and after receiving the response information, the test device terminal sends access information for network configuration, which is written in advance in a configuration file, to the device to be tested, so that the device to be tested can perform automatic network configuration. The access information for the distribution network comprises an SSID and an SSID password required by the network access.
Specifically, SSID is an abbreviation of Service Set Identifier, meaning: service set identification. The SSID technology can divide a wireless local area network into a plurality of sub-networks requiring different identity verification, each sub-network needs independent identity verification, and only users passing the identity verification can enter the corresponding sub-network to prevent unauthorized users from entering the network.
The SSID corresponding to each to-be-detected Internet of things device and the corresponding SSID password are different, so that the to-be-detected Internet of things device can access a network to perform automatic network allocation.
Fig. 8 is a schematic structural diagram of a test device terminal for testing network distribution performance of an internet of things device, wherein the test device terminal is matched with a plurality of internet of things devices to be tested and a cloud; each piece of equipment to be tested is connected with the test equipment terminal through a one-to-one data interface, and the cloud end is connected with each piece of equipment to be tested through a wireless network.
As shown in fig. 8, the test equipment terminal includes: an information acquisition module 81, a distribution network request module 82, an automatic distribution network module 83 and a distribution network monitoring module 84.
The information obtaining module 81 is configured to obtain, according to the pre-written configuration file of each device to be tested, identity information of the corresponding device to be tested and communication interface parameters associated with the corresponding device to be tested.
Wherein, again, the content of the configuration file comprises four parts:
(1) The device set comprises a unique ID (identity) and a COM (component object) port corresponding to each device, wherein each device to be tested is provided with a unique device identifier and a corresponding COM port, and the device set is different from other devices to be tested.
(2) The protocol used in this embodiment is a serial communication protocol, and in serial communication, common protocols include RS-232, RS-422 and RS-485, which are not limited herein.
(3) The instruction set is used for distributing the network, and comprises a network distribution instruction sent by the test equipment terminal and network distribution state information returned by each piece of equipment to be tested, wherein the network distribution state information returned by each piece of equipment to be tested comprises two types, namely success or failure.
(4) AP information, AP, is a typical application of a wlan, is used to connect various wireless network clients together, is a bridge for communication between a wireless network and a wired network, and is a core device for constructing the wlan.
It may be understood that, before entering the network configuration request module 82, based on the previously written configuration file information of each to-be-tested internet of things device, the identity information of the corresponding to-be-tested internet of things device and the associated communication interface parameter thereof in the configuration file are obtained, where the identity information may be a unique identifier of each to-be-tested internet of things device, i.e. the device ID, and the associated communication interface parameter thereof refers to the COM port of each to-be-tested internet of things device.
The network allocation request module 82 is configured to establish communication connection with each of the devices to be tested based on the identity information and the communication interface parameters, and send a network allocation instruction.
In the network configuration request module 82, the network configuration request module is configured to establish a communication connection between the test device terminal and each of the devices to be tested according to the identity information, i.e. the device ID, of the corresponding device to be tested and the communication interface parameter, i.e. the COM interface parameter, corresponding to each of the devices to be tested, and send a network configuration instruction to the corresponding device to be tested by the test device terminal after the communication connection is established. The definition and explanation of each node of the distribution network instruction sent by the test equipment terminal are shown in a reference table 1.
The automatic network distribution module 83 is configured to send, after each piece of equipment to be tested returns response information for confirming that the equipment enters a network distribution state based on the received network distribution instruction, access information for network distribution, which is written in advance in a configuration file and matches with the equipment to be tested, to the equipment to be tested, so that the equipment to be tested can perform automatic network distribution based on the access information for network distribution.
In the automatic distribution network module 83, after receiving the distribution network instruction, the corresponding to-be-tested internet of things device returns corresponding distribution network state information to the test device terminal. The ligand state information here includes information confirming that the ligand state is entered and information confirming that the ligand state is not entered.
When the to-be-tested internet of things equipment successfully enters a network distribution mode, corresponding network distribution state information is returned to the test equipment terminal, after the test equipment terminal receives the network distribution state information confirmed to be transmitted by the corresponding to-be-tested internet of things equipment, the network distribution access information corresponding to the to-be-tested internet of things equipment, which is written in a configuration file in advance, is transmitted to the to-be-tested internet of things equipment, the to-be-tested internet of things equipment receives the network distribution access information transmitted by the test equipment terminal, and automatic network distribution is performed based on the network distribution access information.
It should be noted that, the access information for the distribution network refers to the AP information previously written in the configuration file, that is, the SSID name and SSID password corresponding to the device to be tested.
In addition, the to-be-tested internet of things device determines whether to enter the configuration network state, and the definition and description of each node of the instruction are shown in table 2.
The distribution network monitoring module 84 is configured to monitor an automatic distribution network result of each piece of to-be-tested internet of things equipment, record to-be-tested internet of things equipment with successful distribution network, and determine distribution network performance.
After the automatic network allocation operation is performed, the test equipment terminal can monitor an automatic network allocation result of each to-be-tested internet of things device, record an automatic network allocation result obtained by monitoring each to-be-tested internet of things device, namely whether the automatic network allocation result is successful or failed, and determine network allocation performance of the corresponding to-be-tested internet of things device based on the automatic network allocation result.
It should be noted that, monitoring of an automatic network allocation result of the to-be-tested internet of things device by the test device terminal relates to the test device terminal, the to-be-tested internet of things device and a cloud three-party main body. In particular, the invention also relates to a gateway for realizing information interaction between the to-be-tested internet of things equipment and the cloud.
After automatic network allocation operation is performed, when automatic network allocation of the to-be-tested Internet of things equipment is successful, the to-be-tested equipment sends a request for activating binding information to the cloud end, the cloud end sends the request for activating the binding information to a gateway between the to-be-tested Internet of things equipment and the gateway, the gateway binds the to-be-tested Internet of things equipment, and after the binding, the to-be-tested Internet of things equipment sends information of successful binding to the cloud end. The binding information is binding relation between the to-be-tested internet of things equipment and the gateway, and AP information corresponding to each to-be-tested internet of things equipment, namely SSID names and SSID passwords.
And the cloud end updates the network configuration state information of the corresponding to-be-tested internet of things equipment according to the information of successful binding sent by the to-be-tested internet of things equipment, sets the binding state as successful, and sets the automatic network configuration result as successful.
If the to-be-tested Internet of things equipment fails to enter the automatic network distribution mode, the to-be-tested Internet of things equipment failing to enter the network distribution mode successfully sends a request for activating binding information to the cloud, the cloud sends the request for activating the binding information to a gateway between the to-be-tested Internet of things equipment and the to-be-tested Internet of things equipment, the gateway cannot bind the to-be-tested Internet of things equipment, and the to-be-tested Internet of things equipment sends information of binding failure to the cloud.
And the cloud end updates the network configuration state information of the corresponding to-be-tested internet of things equipment according to the binding failure information sent by the to-be-tested internet of things equipment, sets the binding state as failure, and sets the automatic network configuration result as failure.
The test equipment terminals are in wireless connection with the cloud, the monitoring of the automatic network distribution state of the to-be-tested internet of things equipment is carried out by inquiring the network distribution information of all the internet of things equipment participating in the test updated by the cloud every second, the information that the automatic network distribution result corresponding to each to-be-tested internet of things equipment is successful or failed is obtained, and the information is recorded, so that the network distribution performance of each to-be-tested internet of things equipment is determined.
Fig. 9 illustrates a physical schematic diagram of an electronic device, as shown in fig. 9, which may include: processor 910, communication interface (Communications Interface), memory 930, and communication bus 940, wherein processor 910, communication interface 920, and memory 930 communicate with each other via communication bus 940. The processor 910 may invoke the logic instructions in the memory 930 to execute a method for testing the network deployment performance of the internet of things device, where the method is based on a test device terminal, a plurality of internet of things devices to be tested, and a cloud; each piece of equipment to be tested is connected with the test equipment terminal through a one-to-one data interface, and the cloud end is connected with each piece of equipment to be tested through a wireless network; the method comprises automatic network allocation operation, wherein the automatic network allocation operation comprises the following steps:
Acquiring identity information of the corresponding to-be-tested internet of things equipment and related communication interface parameters thereof through a pre-written configuration file of each to-be-tested internet of things equipment; based on the identity information and the communication interface parameters, communication connection is respectively established with each piece of equipment to be tested, and a network allocation instruction is sent; after each piece of equipment of the internet of things to be tested returns response information for confirming entering into a network allocation state based on the received network allocation instruction, the access information for the network allocation, which is written in the configuration file in advance and matched with the equipment of the internet of things to be tested, is sent to the equipment of the internet of things to be tested, and the equipment of the internet of things to be tested automatically allocates the network based on the access information for the network allocation; and after the automatic network allocation operation is performed, the method further comprises the following steps: monitoring an automatic network distribution result of each to-be-tested internet of things device, recording to-be-tested internet of things devices successfully distributed in the network, and determining the network distribution performance.
Further, the logic instructions in the memory 930 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
On the other hand, the invention also provides a system for testing the network distribution performance of the Internet of things equipment, which comprises: the system comprises a test equipment terminal, a plurality of to-be-tested internet of things equipment and a cloud; each piece of equipment to be tested is connected with the test equipment terminal through a one-to-one data interface, and the cloud end is connected with each piece of equipment to be tested through a wireless network; the test equipment terminal comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, and the processor realizes the steps of the method for testing the network distribution performance of the Internet of things equipment when executing the program. Since the steps in the above method have been described, reference should be made to the foregoing description, and further description is omitted herein.
In another aspect, the present invention further provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute the method for testing the network distribution performance of the internet of things device provided by the methods, where the method is based on a test device terminal, a plurality of to-be-tested internet of things devices, and a cloud; each piece of equipment to be tested is connected with the test equipment terminal through a one-to-one data interface, and the cloud end is connected with each piece of equipment to be tested through a wireless network; the method comprises automatic network allocation operation, wherein the automatic network allocation operation comprises the following steps:
Acquiring identity information of the corresponding to-be-tested internet of things equipment and related communication interface parameters thereof through a pre-written configuration file of each to-be-tested internet of things equipment; based on the identity information and the communication interface parameters, communication connection is respectively established with each piece of equipment to be tested, and a network allocation instruction is sent; after each piece of equipment of the internet of things to be tested returns response information for confirming entering into a network allocation state based on the received network allocation instruction, the access information for the network allocation, which is written in the configuration file in advance and matched with the equipment of the internet of things to be tested, is sent to the equipment of the internet of things to be tested, and the equipment of the internet of things to be tested automatically allocates the network based on the access information for the network allocation; and after the automatic network allocation operation is performed, the method further comprises the following steps: monitoring an automatic network distribution result of each to-be-tested internet of things device, recording to-be-tested internet of things devices successfully distributed in the network, and determining the network distribution performance.
In still another aspect, the present invention further provides a non-transitory computer readable storage medium, on which a computer program is stored, where the computer program is implemented when executed by a processor to perform the method for testing the network allocation performance of the internet of things device provided by the above methods, where the method is based on a test device terminal, a plurality of devices to be tested, and a cloud end; each piece of equipment to be tested is connected with the test equipment terminal through a one-to-one data interface, and the cloud end is connected with each piece of equipment to be tested through a wireless network; the method comprises automatic network allocation operation, wherein the automatic network allocation operation comprises the following steps:
Acquiring identity information of the corresponding to-be-tested internet of things equipment and related communication interface parameters thereof through a pre-written configuration file of each to-be-tested internet of things equipment; based on the identity information and the communication interface parameters, communication connection is respectively established with each piece of equipment to be tested, and a network allocation instruction is sent; after each piece of equipment of the internet of things to be tested returns response information for confirming entering into a network allocation state based on the received network allocation instruction, the access information for the network allocation, which is written in the configuration file in advance and matched with the equipment of the internet of things to be tested, is sent to the equipment of the internet of things to be tested, and the equipment of the internet of things to be tested automatically allocates the network based on the access information for the network allocation; and after the automatic network allocation operation is performed, the method further comprises the following steps: monitoring an automatic network distribution result of each to-be-tested internet of things device, recording to-be-tested internet of things devices successfully distributed in the network, and determining the network distribution performance.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the various embodiments or methods of some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.