Disclosure of Invention
In view of this, embodiments of the present invention provide a secondary device testing system based on an internet of things technology, so as to improve the testing speed and the testing efficiency of a secondary device.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
a secondary equipment testing method based on the technology of the Internet of things comprises the following steps:
based on a preset test template, communicating to a terminal machine of an IP address appointed in the test template through the wireless private network so as to send a control command which is calibrated in the template and matched with the IP address to the terminal machine;
and acquiring a response result of the terminal to the control command through the wireless private network.
Optionally, in the secondary device testing method based on the internet of things, the method further includes:
and generating and displaying a test report in a target format through display equipment according to the obtained response result.
Optionally, in the method for testing a secondary device based on an internet of things, the communicating with the terminal machine with the IP address specified in the test template through the wireless private network based on the preset test template to send the control command matched with the IP address and calibrated in the template to the terminal machine includes:
acquiring a test template, analyzing the test template to obtain an IP address of a terminal to be tested contained in the test template, and obtaining a control command matched with the IP address;
based on the IP address, sending an online detection command to the terminal to be tested through the wireless private network;
judging whether response information of the terminal to be tested is acquired, if so, acquiring a control command matched with the IP address of the terminal to be tested, and sending the control command to the terminal to be tested based on the IP address;
and when the response information of the terminal to be tested is not acquired, listing the terminal to be tested in a no-response list, and displaying the no-response list to a user through display equipment.
Optionally, in the method for testing a secondary device based on an internet of things, the sending the control command to the terminal to be tested based on the IP address includes:
starting a preset number of concurrent threads, and sending a control command to the terminal to be tested through the concurrent threads;
and based on the test template, judging whether a control command is sent to all the terminal machines to be tested, if not, judging whether idle concurrent threads exist, and if so, sending the control command to the terminal machines to be tested through the idle concurrent threads.
Optionally, in the method for testing a secondary device based on an internet of things, before the communication is performed to the terminal with the specified IP address in the test template through the wireless private network based on the preset test template, the method further includes:
and extracting the test account in the test template, judging whether the test account has the test authority for the terminal machine corresponding to the IP address, if so, continuing to execute the test, and otherwise, not responding to the test template.
A secondary equipment test system based on internet of things technology includes:
the system comprises a main control machine, a wireless private network system and a terminal machine;
the main control computer is used for communicating with a terminal machine of an IP address appointed in the test template through the wireless private network based on a preset test template so as to send a control command which is calibrated in the template and matched with the IP address to the terminal machine, and acquiring a response result of the terminal machine to the control command through the wireless private network.
Optionally, in the secondary device testing system based on the internet of things, the main control computer is further configured to generate a test report in a target format according to the obtained response result and display the test report in the target format through the display device.
Optionally, in the secondary device testing system based on the internet of things, when the main controller communicates with the terminal machine with the IP address specified in the test template through the wireless private network based on the preset test template, so as to send the control command matched with the IP address and calibrated in the template to the terminal machine, the main controller is specifically configured to:
acquiring a test template, analyzing the test template to obtain an IP address of a terminal to be tested contained in the test template, and obtaining a control command matched with the IP address;
based on the IP address, sending an online detection command to the terminal to be tested through the wireless private network;
judging whether response information of the terminal to be tested is acquired, if so, acquiring a control command matched with the IP address of the terminal to be tested, and sending the control command to the terminal to be tested based on the IP address;
and when the response information of the terminal to be tested is not acquired, listing the terminal to be tested in a no-response list, and displaying the no-response list to a user through display equipment.
Optionally, in the system for testing secondary equipment based on the internet of things, the sending the control command to the terminal to be tested based on the IP address includes:
starting a preset number of concurrent threads, and sending a control command to the terminal to be tested through the concurrent threads;
and based on the test template, judging whether a control command is sent to all the terminal machines to be tested, if not, judging whether idle concurrent threads exist, and if so, sending the control command to the terminal machines to be tested through the idle concurrent threads.
Optionally, in the system for testing secondary equipment based on the internet of things, before the main control computer communicates with the terminal with the specified IP address in the test template through the wireless private network based on the preset test template, the method further includes:
and extracting the test account in the test template, judging whether the test account has the test authority for the terminal machine corresponding to the IP address, if so, continuing to execute the test, and otherwise, not responding to the test template.
Based on the technical scheme, according to the scheme provided by the embodiment of the invention, when the terminal needs to be tested, a user loads a pre-edited test template into the equipment applying the method, when the test is started, the equipment automatically extracts the IP address of the terminal to be tested which needs to be tested and a control command matched with the terminal to be tested or the IP address from the test template, starts the control command to the terminal matched with the IP address, outputs an analog quantity according to the control command after the terminal to be tested acquires the control command, and feeds back an execution result of the terminal to be tested on the command to be tested to the equipment applying the method as a feedback signal, so that the terminal to be tested is automatically tested based on the test template, and the test efficiency of the terminal is improved, and no language user participates in the test process, so that the test cost is reduced.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Aiming at the problem that the testing efficiency of secondary equipment is low in the prior art, the application discloses a secondary equipment testing method based on the technology of the internet of things, which comprises the following steps:
step S101: and obtaining a test template.
The test template is loaded to the system applying the method by a test user when the terminal needs to be tested, and the test template at least comprises an IP address of the terminal to be tested which is aimed at the test and a test command corresponding to the terminal to be tested.
Before testing, a user can freely configure the terminal to be tested in the test template and the test command corresponding to the terminal to be tested according to the self requirement.
Step S102: and acquiring an IP address corresponding to a terminal to be tested in the test template and a test command matched with the IP address.
In this step, after a start instruction input by a user is obtained, the IP address of each terminal to be tested and the test command matched with the IP address or the terminal to be tested, which are calibrated in the test template, are extracted.
Step S103: and communicating the terminal machine of the IP address appointed in the test template through the wireless private network so as to send a control command which is calibrated in the template and matched with the IP address to the terminal machine.
In this step, after the IP address of the terminal to be tested and the corresponding control command are extracted, the control command is sent to the corresponding IP address through a pre-established wireless private network. The control command is used for controlling the terminal to be tested to perform specific operation, so that the test of the terminal to be tested is realized.
Step S104: and acquiring a response result of the terminal to the control command through the wireless private network.
And after the terminal to be tested acquires the control command through the wireless private network, executing the control command, outputting analog quantity by the terminal to be tested according to the received control command, and feeding back the execution condition to the equipment applying the method through the wireless private network.
In the technical scheme disclosed by the embodiment of the application, when the terminal needs to be tested, a user loads a pre-edited test template into the equipment applying the method, when the test is started, the equipment automatically extracts the IP address of the terminal to be tested which needs to be tested and a control command matched with the terminal to be tested or the IP address from the test template, starts the control command to the terminal matched with the IP address, outputs an analog quantity according to the control command after the terminal to be tested obtains the control command, and feeds back the execution result of the terminal to be tested on the command to be tested to the equipment applying the method as a feedback signal, thereby realizing the automatic test of the terminal to be tested based on the test template and improving the test efficiency of the terminal, and no language user participates in the test process, so that the test cost is reduced.
Example two
Referring to fig. 2, the secondary device testing method based on the internet of things technology disclosed in the embodiment of the present application includes:
step S201: and obtaining a test template.
Step S202: and acquiring an IP address corresponding to a terminal to be tested in the test template and a test command matched with the IP address.
Step S203: and communicating the terminal machine of the IP address appointed in the test template through the wireless private network so as to send a control command which is calibrated in the template and matched with the IP address to the terminal machine.
Step S204: and acquiring a response result of the terminal to the control command through the wireless private network.
Step S205: and generating and displaying a test report in a target format through display equipment according to the obtained response result.
In this step, after obtaining the response result of the terminal to be tested, the device applying the method analyzes the message information including the response result, extracts the action information and the experimental data included in the response result, automatically completes the collection of the action information and the experimental data, generates an experimental report in a standard format based on the action information and the experimental data, and displays the experimental report to a user through a display device.
EXAMPLE III
Referring to fig. 3, the secondary device testing method based on the internet of things technology disclosed in the embodiment of the present application includes:
step S301: and obtaining a test template.
Step S302: and analyzing the test template to obtain the IP address of the terminal to be tested contained in the test template, and obtaining a control command matched with the IP address.
Step S303: based on the IP address, sending an online detection command to the terminal to be tested through the wireless private network;
in the technical scheme disclosed in this embodiment, before sending a control command to the device to be tested, the online state of the terminal to be tested is tested to determine whether the terminal to be tested is online or can normally communicate with the device to which the method is applied.
Step S304: and judging whether response information of the terminal to be tested is acquired, if so, executing step S305, and if not, executing step S307.
In this step, when the terminal to be tested can normally respond to the test command, it is indicated that the terminal to be tested is online and can normally communicate with the system applying the method, and the subsequent steps are continuously executed.
Step S305: acquiring a control command matched with the IP address of the terminal to be tested, and sending the control command to the terminal to be tested based on the IP address;
step S306: and acquiring a response result of the terminal to the control command through the wireless private network.
Step S307: and listing the terminal to be tested into a no-response list, and displaying the no-response list to a user through a display device.
In this step, when the relevant information of the terminal to be tested is listed in the no-response list, the no-response list is displayed to the user through the display device, so that the user can determine which terminal to be tested cannot be tested, and the user can be reminded to check the terminal to be tested in time.
Example four
Referring to fig. 4, the application discloses a secondary device testing method based on the technology of the internet of things, which includes:
step S401: and obtaining a test template.
Step S402: and analyzing the test template to obtain the IP address of the terminal to be tested contained in the test template, and obtaining a control command matched with the IP address.
Step S403: based on the IP address, sending an online detection command to the terminal to be tested through the wireless private network;
step S404: and judging whether response information of the terminal to be tested is acquired, if so, executing step S405, and if not, executing step S407.
Step S405: starting a preset number of concurrent threads, and sending a control command to the terminal to be tested through the concurrent threads.
Further, the present step may further include: and based on the test template, judging whether a control command is sent to all the terminal machines to be tested, if not, judging whether idle concurrent threads exist, and if so, sending the control command to the terminal machines to be tested through the idle concurrent threads.
In the step, the test command is sent to the plurality of terminal machines to be tested simultaneously in a concurrent thread mode, so that the plurality of terminal machines to be tested can be tested simultaneously, and the test efficiency of the terminal machines is further improved.
Step S406: and acquiring a response result of the terminal to the control command through the wireless private network.
Step S407: and listing the terminal to be tested into a no-response list, and displaying the no-response list to a user through a display device.
EXAMPLE five
In the technical solution disclosed in this embodiment, in order to ensure the security and the validity of the test process, before the preset test template communicates with the terminal with the IP address specified in the test template through the wireless private network, the identity of the test user may be verified, and the specific method further includes:
and extracting the test account in the test template, judging whether the test account has the test authority for the terminal machine corresponding to the IP address, if so, continuing to execute, otherwise, indicating that the test user does not have the test authority and does not respond to the test template.
In the embodiment, corresponding to the method, a secondary device testing system based on the internet of things technology is also disclosed, and specific work contents of all components in the system are referred to in the content of the method embodiment
The secondary device testing system based on the internet of things provided by the embodiment of the invention is described below, and the secondary device testing system based on the internet of things described below and the secondary device testing system based on the internet of things described above can be referred to correspondingly.
Referring to fig. 5, the secondary device testing system based on the internet of things technology disclosed in the embodiment of the present application may include:
the system comprises a main control machine 100, a wireless private network system 200 and a terminal 300, wherein the terminal 300 can be secondary side equipment such as a relay protection testing instrument;
the main control computer 100 is configured to communicate with the terminal 300 having the IP address specified in the test template through the wireless private network 200 based on a preset test template, to send a control command matched with the IP address and calibrated in the template to the terminal 300, and to obtain a response result of the terminal 300 to the control command through the wireless private network 200.
Corresponding to the above method, the main control computer 100 is further configured to generate a test report in a target format according to the obtained response result and display the test report in the target format through the display device.
Corresponding to the method, when the main control computer communicates with the terminal machine of the specified IP address in the test template through the wireless private network based on the preset test template to send the control command matched with the IP address and calibrated in the template to the terminal machine, the main control computer is specifically configured to:
acquiring a test template, analyzing the test template to obtain an IP address of a terminal to be tested contained in the test template, and obtaining a control command matched with the IP address;
based on the IP address, sending an online detection command to the terminal to be tested through the wireless private network;
judging whether response information of the terminal to be tested is acquired, if so, acquiring a control command matched with the IP address of the terminal to be tested, and sending the control command to the terminal to be tested based on the IP address;
and when the response information of the terminal to be tested is not acquired, listing the terminal to be tested in a no-response list, and displaying the no-response list to a user through display equipment.
Corresponding to the method, the sending the control command to the terminal to be tested based on the IP address includes:
starting a preset number of concurrent threads, and sending a control command to the terminal to be tested through the concurrent threads;
and based on the test template, judging whether a control command is sent to all the terminal machines to be tested, if not, judging whether idle concurrent threads exist, and if so, sending the control command to the terminal machines to be tested through the idle concurrent threads.
Corresponding to the method, before the main control computer communicates with the terminal with the IP address specified in the test template through the wireless private network based on the preset test template, the method further includes:
and extracting the test account in the test template, judging whether the test account has the test authority for the terminal machine corresponding to the IP address, if so, continuing to execute the test, and otherwise, not responding to the test template.
For convenience of description, the above system is described with the functions divided into various modules, which are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations of the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.