CN114584498B - Gateway equipment power-on and power-off test method, device, equipment, system and product - Google Patents

Gateway equipment power-on and power-off test method, device, equipment, system and product Download PDF

Info

Publication number
CN114584498B
CN114584498B CN202011387328.5A CN202011387328A CN114584498B CN 114584498 B CN114584498 B CN 114584498B CN 202011387328 A CN202011387328 A CN 202011387328A CN 114584498 B CN114584498 B CN 114584498B
Authority
CN
China
Prior art keywords
power
test
target gateway
gateway equipment
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011387328.5A
Other languages
Chinese (zh)
Other versions
CN114584498A (en
Inventor
武宁宁
崔志兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202011387328.5A priority Critical patent/CN114584498B/en
Publication of CN114584498A publication Critical patent/CN114584498A/en
Application granted granted Critical
Publication of CN114584498B publication Critical patent/CN114584498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention provides a gateway equipment power-on and power-off testing method, a device, equipment, a system and a product, wherein the method comprises the following steps: acquiring test parameters for powering up and powering down target gateway equipment; performing power-on and power-off tests of preset test times on target gateway equipment according to test parameters, determining the network state of the target gateway equipment after the target gateway equipment is powered on for each power-on and power-off test, controlling the target gateway equipment to run preset service, controlling the target gateway equipment to be powered off in the running process of the preset service, and determining the power-on and power-off test result for each time according to the network state and the preset service processing result; and determining the test result of the target gateway equipment according to the test result of each time of power-on and power-off. The method can enable each time of power-on and power-off test to be the same as the power-on and power-off field in the actual use of the gateway equipment, cover all scenes of the actual use condition of the target gateway equipment, comprehensively test the power-on and power-off of the target gateway equipment and greatly improve the accuracy of the power-on and power-off test of the gateway equipment.

Description

Gateway equipment power-on and power-off test method, device, equipment, system and product
Technical Field
The embodiment of the invention relates to the technical field of equipment testing, in particular to a gateway equipment power-on and power-off testing method, device, equipment, system and product.
Background
With the development of the internet of things, intelligent gateway equipment has become an indispensable equipment. Before the intelligent gateway equipment leaves the factory, a series of functional tests are carried out to verify whether the intelligent gateway equipment has problems in the normal use process, so that the quality and the safety of the intelligent gateway equipment are ensured.
When testing the intelligent gateway equipment, the up-down electric test of the intelligent gateway equipment becomes an indispensable test for verifying whether the intelligent gateway equipment has problems in the normal use process. In the prior art, after the up-down electrical test times are configured in advance, the up-down electrical operation of the test times is directly carried out on the intelligent gateway equipment, after the last up-down electrical operation, whether each function of the intelligent gateway equipment is normal is judged, and if the function is normal, the intelligent gateway equipment is determined to pass the up-down electrical test.
However, the up-down electrical test method of the intelligent gateway equipment in the prior art cannot cover all scenes of actual use conditions of the intelligent gateway equipment, so that the up-down electrical test of the intelligent gateway equipment is not comprehensive, and finally the up-down electrical test of the intelligent gateway equipment is not accurate enough.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment, a system and a product for testing the up-down of gateway equipment, which solve the problems that the method for testing the up-down of the gateway equipment in the prior art cannot cover all scenes of actual use conditions of the intelligent gateway equipment, so that the test for the up-down of the intelligent gateway equipment is not comprehensive, and finally the test for the up-down of the intelligent gateway equipment is inaccurate.
In a first aspect, an embodiment of the present invention provides a method for powering on and powering off a gateway device, including:
acquiring test parameters for powering up and powering down target gateway equipment;
performing power-on and power-off tests of preset test times on the target gateway equipment according to the test parameters, determining the network state of the target gateway equipment after the target gateway equipment is powered on for each power-on and power-off test, controlling the target gateway equipment to run preset service, controlling power-off in the running process of the preset service, and determining the power-on and power-off test result for each time according to the network state and the preset service processing result;
and determining the test result of the target gateway equipment according to the upper and lower electrical test results of each time.
Further, the method as described above, wherein the determining the network state of the target gateway device after the target gateway device is powered on includes:
After the target gateway equipment is electrified, periodically sending a network test command to the target gateway equipment so that the target gateway equipment determines a network state according to the network test command;
if a network test response sent by target gateway equipment is received, determining that the network state of the target gateway equipment is normal;
and if the network test response sent by the target gateway equipment is not received in the preset time period, determining that the network state of the target gateway equipment is abnormal.
Further, as described above, the method for controlling the target gateway device to operate a preset service, and controlling power-down in the operation process of the preset service includes:
and controlling an operating system Shell of the target gateway equipment to read preset data, erasing the preset data into the embedded storage solution eMMC, and controlling power-down in the process of erasing the preset data into the embedded storage solution eMMC.
Further, in the method described above, the preset data is a file greater than a preset capacity threshold.
Further, as described above, the determining the uplink and downlink electrical test result each time according to the network state and the preset service processing result includes:
If the network state is normal and the preset service processing is successful in a certain power-on and power-off test, determining that the power-on and power-off test is passed;
and if the network state is abnormal and/or the preset service processing fails in the power-on and power-off test at a certain time, determining that the power-on and power-off test at the certain time fails.
Further, the method described above, wherein the determining the test result of the target gateway device according to the test result of each power-on and power-off includes:
if the power-on and power-off tests pass each time, determining that the test of the target gateway equipment passes;
and if one power-on and power-off test fails in each power-on and power-off test, determining that the target gateway equipment test fails.
In a second aspect, an embodiment of the present invention provides a device for testing power-on and power-off of a gateway device, including:
the acquisition module is used for acquiring test parameters for powering up and powering down the target gateway equipment;
the test module is used for carrying out power-on and power-off tests of preset test times on the target gateway equipment according to the test parameters, determining the network state of the target gateway equipment after the target gateway equipment is powered on for each power-on and power-off test, controlling the target gateway equipment to run preset service, controlling the power-off operation in the running process of the preset service, and determining the power-on and power-off test result for each time according to the network state and the preset service processing result;
And the determining module is used for determining the test result of the target gateway equipment according to the upper and lower electrical test results each time.
Further, as described above, the test module is specifically configured to, when determining the network state of the target gateway device after the target gateway device is powered on:
after the target gateway equipment is electrified, periodically sending a network test command to the target gateway equipment so that the target gateway equipment determines a network state according to the network test command; if a network test response sent by the target gateway equipment is received, determining that the network state of the target gateway equipment is normal; if the network test response sent by the target gateway equipment is not received in the preset time period, determining that the network state of the target gateway equipment is abnormal.
Further, the device, the test module, when controlling the target gateway device to run the preset service and controlling the power-down in the running process of the preset service, is specifically configured to:
and controlling an operating system Shell of the target gateway equipment to read the preset data, erasing the preset data into the embedded storage solution eMMC, and controlling power-down in the process of erasing the preset data into the embedded storage solution eMMC.
Further, the device as described above, the preset data is a file greater than a preset capacity threshold.
Further, the device, the test module, when determining the power-on and power-off test result according to the network state and the preset service processing result, is specifically configured to:
if the network state is normal and the preset service processing is successful in a certain power-on and power-off test, determining that the power-on and power-off test is passed; if the network state abnormality and/or the failure of the preset service processing in the power-on and power-off test at a time are determined, the power-on and power-off test at the time is determined to not pass.
Further, the device as described above, the determining module is specifically configured to:
if the power-on and power-off tests pass each time, determining that the test of the target gateway equipment passes; and if the power-on and power-off test fails in each power-on and power-off test, determining that the test of the target gateway equipment fails.
Further, in the apparatus as described above, the obtaining module is specifically configured to:
displaying a preset operation interface; and receiving the test parameters of power-on and power-off configured by a user through a preset operation interface.
Further, the device, the test module, as described above, is further configured to: and controlling the program-controlled power supply to electrify the target gateway equipment.
Correspondingly, the test module is specifically used for controlling power-down in the operation process of the preset service:
and controlling the program-controlled power supply to power down the target gateway equipment in the operation process of the preset service.
In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor, memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the method of any one of the first aspects.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon a computer program for execution by a processor to implement the method of any of the first aspects.
In a fifth aspect, an embodiment of the invention provides a computer program product comprising a computer program which, when executed by a processor, implements the method according to any of the first aspects.
In a sixth aspect, an embodiment of the present invention provides a system for powering on and off a gateway device, including: a programmable power supply, a target gateway device and an electronic device according to the third aspect;
And the electronic equipment is connected with the target gateway equipment through the programmable power supply.
Further, the system as described above, further comprising: a router;
and the electronic equipment is in communication connection with the target gateway equipment through the router.
The embodiment of the invention provides a gateway equipment power-on and power-off testing method, device, equipment, system and product, which are used for acquiring testing parameters for powering on and powering off target gateway equipment; performing power-on and power-off tests of preset test times on target gateway equipment according to test parameters, determining the network state of the target gateway equipment after the target gateway equipment is powered on for each power-on and power-off test, controlling the target gateway equipment to run preset service, controlling the target gateway equipment to be powered off in the running process of the preset service, and determining the power-on and power-off test result for each time according to the network state and the preset service processing result; and determining the test result of the target gateway equipment according to the test result of each time of power-on and power-off. Since the test is performed in software and hardware each time the power-on and power-off test is performed on the target gateway device. In terms of software, the network state of the target gateway device is tested. In terms of hardware, whether the gateway equipment is influenced after the instant power failure when the gateway equipment runs the preset service is tested. And then the up-down electric test of each time can be the same as the up-down electric field scene in the actual use of the gateway equipment, all scenes of the actual use condition of the intelligent gateway equipment are covered, the up-down electric test of the target gateway equipment is comprehensively tested, and the accuracy of the up-down electric test of the gateway equipment is greatly improved.
It should be understood that the description of the invention above is not intended to limit key or critical features of embodiments of the invention, nor to limit the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it will be obvious that the drawings in the following description are some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a architecture diagram of a gateway device power-on and power-off test system provided by an embodiment of the present invention;
fig. 2 is a flowchart of a method for testing power-on and power-off of a gateway device according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for testing power-on and power-off of a gateway device according to another embodiment of the present invention;
fig. 4 is a schematic diagram of a preset operation interface in a method for testing power-on and power-off of gateway equipment according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a power-on/power-off testing device of a gateway device according to an embodiment of the present invention;
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the invention is susceptible of embodiment in the drawings, it is to be understood that the invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided to provide a more thorough and complete understanding of the invention. It should be understood that the drawings and embodiments of the invention are for illustration purposes only and are not intended to limit the scope of the present invention.
The terms first, second, third, fourth and the like in the description and in the claims and in the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be capable of being practiced otherwise than as specifically illustrated and described. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For a clear understanding of the technical solutions of the present application, the prior art solutions will be described in detail first.
In the prior art, when the intelligent gateway equipment is electrified and electrified, after the electrified times are preset, the electrified operation of the electrified times is directly conducted on the intelligent gateway equipment, after the last electrified operation, whether each function of the intelligent gateway equipment is normal is judged, and if so, the intelligent gateway equipment is determined to pass the electrified and electrified test. And after each power-on and power-off operation, the real-time state of the intelligent gateway equipment cannot be detected. And more complex situations are encountered when the intelligent gateway device is actually used. If it is found in use that all modules of the gateway device are not necessarily fully activated after power-up, especially the most important network gateway functions. And the power is instantaneously lost when the special service is operated after the power is supplied, so that the state of the gateway equipment is possibly abnormal after the next or several times of future power-on. These anomalies may be gateway device software problems or hardware problems. Therefore, the up-down electrical testing method of the intelligent gateway equipment in the prior art cannot cover all scenes of actual use conditions of the intelligent gateway equipment, so that the up-down electrical testing of the intelligent gateway equipment is not comprehensive, and finally the up-down electrical testing of the intelligent gateway equipment is not accurate enough.
In order to solve the problems in the prior art, the inventor creatively discovers that in order to fully cover all scenes of the gateway equipment in the actual use process, testing in terms of testing software and hardware is required when the gateway equipment is tested in power-on and power-off modes each time. In terms of software, all modules of the gateway equipment are ensured to be completely started after the gateway equipment is powered on and started, and the network gateway function is ensured. In terms of hardware, whether the gateway equipment is influenced after the instant power failure when the gateway equipment runs the special service is tested. And then can make the electric field scene about all with gateway equipment in the in-service use the same about every turn, cover the all scenes of intelligent gateway equipment in-service use condition, carry out comprehensive test to intelligent gateway equipment and go up and down, improve the accuracy of electric measurement about intelligent gateway equipment greatly.
The inventor proposes the technical scheme of the embodiment of the invention based on the creative discovery. The network architecture corresponding to the power-on and power-off test method of the gateway equipment provided by the embodiment of the invention is introduced below.
Fig. 1 is a schematic diagram of an electrical test system for powering up and down a gateway device according to an embodiment of the present invention, as shown in fig. 1, where the electrical test system for powering up and down a gateway device according to the embodiment includes: electronic device 1, programmable power supply 2, router 3 and target gateway device 4. The electronic device 1 is connected with the target gateway device 4 through the programmable power supply 2. Alternatively, the electronic device 1 and the programmable power supply 2 may be connected through a GPIB. The electronic device 1 is communicatively connected to the target gateway device 4 via the router 3. The electronic equipment 1 is loaded with a gateway equipment power-on and power-off testing device, and can provide a preset operation interface for a user. The electronic device 1 may receive the test parameters of power-on and power-off configured by the user through a preset operation interface. And the electronic equipment 1 performs power-on and power-off tests of preset test times on the target gateway equipment according to the test parameters. In each power-on and power-off test, firstly, the electronic device 1 controls the programmable power supply 2 to power on the target gateway device 3, after the target gateway device 4 is powered on, the network state of the target gateway device 4 is determined, the target gateway device 4 is controlled to operate a preset service, the programmable power supply is controlled to power off the target gateway device 4 in the operation process of the preset service, the electronic device 1 determines each power-on and power-off test result according to the network state and the preset service processing result, and finally, the test result of the target gateway device 4 is determined according to each power-on and power-off test result.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Example 1
Fig. 2 is a flowchart of a method for testing power on and off of a gateway device according to an embodiment of the present application, as shown in fig. 2, an execution body of the embodiment is a device for testing power on and off of a gateway device, where the device for testing power on and off of a gateway device may be integrated in an electronic device, and the electronic device may be a computer, a server or other devices with independent computing and processing capabilities. The gateway device power-on and power-off test method provided in this embodiment includes the following steps.
Step 101, obtaining test parameters for powering up and powering down target gateway equipment.
The target gateway device is a gateway device to be tested, for example, may be an intelligent camera, a vehicle-mounted station or other gateway devices.
In this embodiment, the test parameters of powering up and powering down the target gateway device may be stored in advance in a local preset area, and the test parameters of powering up and powering down the target gateway device may be obtained from the preset area.
Or in this embodiment, the power-on and power-off testing device of the gateway device may be configured to provide a preset operation interface through the electronic device, and obtain, through the preset operation interface, test parameters of powering on and powering off the target gateway device.
In this embodiment, the test parameters may include: and presetting test times, and testing the IP address and the port number of the target gateway equipment. And the system can also comprise an address and a channel identifier corresponding to the GPIB of the programmable power supply.
Step 102, performing power-on and power-off tests of preset test times on the target gateway equipment according to the test parameters, determining the network state of the target gateway equipment after the target gateway equipment is powered on for each power-on and power-off test, controlling the target gateway equipment to run preset service, controlling the power-off operation in the running process of the preset service, and determining the power-on and power-off test result for each time according to the network state and the processing result of the preset service.
In this embodiment, the target gateway device is determined according to the IP address and the test port number of the target gateway device in the test parameters, and the power-on and power-off test is performed on the target gateway device according to the preset test times in the test parameters.
When the target gateway is subjected to power-on and power-off test each time, firstly, the electronic equipment is connected with the programmable power supply according to the address and the channel identifier corresponding to the GPIB of the programmable power supply, and the programmable power supply is controlled to power on the target gateway equipment, so that the target gateway equipment is started. And after the target gateway equipment is started, testing the network state of the target gateway equipment to determine whether the target gateway equipment can realize the network gateway function after being started. And then controlling the target gateway equipment to run a preset service, wherein the preset service is executed by the hardware of the target gateway equipment, and controlling the program-controlled power supply to perform power-down operation on the target gateway equipment in the process of running the preset service. And finally, determining the power-on and power-off test result of each time according to the network state of the power-on and power-off test of each time and the preset service processing result.
And step 103, determining the test result of the target gateway equipment according to the upper and lower electrical test results of each time.
In this embodiment, the test result of each power-on and power-off test can represent the actual condition of power-on and power-off of the target gateway device in the actual use process, so that the test result of the target gateway device is determined according to the test result of each power-on and power-off test. If the number of times of the up-down electrical test result is larger than the preset threshold, determining that the test of the target gateway equipment is passed. And otherwise, determining that the target gateway equipment test does not pass.
Or in order to ensure that the target gateway equipment cannot cause abnormal problems in the actual use process, when the test result of the target gateway equipment is determined according to the up-down test result of each time, if the up-down test result is failed, determining that the test result of the target gateway equipment is failed. Otherwise, all the uplink and downlink electrical test results are passed, and the test result of the target gateway equipment is determined to be passed.
According to the gateway equipment power-on and power-off testing method provided by the embodiment, the test parameters for powering on and powering off the target gateway equipment are obtained; performing power-on and power-off tests of preset test times on target gateway equipment according to test parameters, determining the network state of the target gateway equipment after the target gateway equipment is powered on for each power-on and power-off test, controlling the target gateway equipment to run preset service, controlling the target gateway equipment to be powered off in the running process of the preset service, and determining the power-on and power-off test result for each time according to the network state and the preset service processing result; and determining the test result of the target gateway equipment according to the test result of each time of power-on and power-off. Since the gateway device is tested in software and hardware each time it is tested in power-on and power-off. In terms of software, the network state of the target gateway device is tested. In terms of hardware, whether the gateway equipment is influenced after the instant power failure when the gateway equipment runs the preset service is tested. And then the up-down electric test of each time can be the same as the up-down electric field scene in the actual use of the gateway equipment, all scenes of the actual use condition of the target gateway equipment are covered, the up-down electric test of the target gateway equipment is comprehensively tested, and the accuracy of the up-down electric test of the gateway equipment is greatly improved.
Example two
Fig. 3 is a flowchart of a gateway device power-on/power-off test method according to another embodiment of the present invention, and as shown in fig. 3, the gateway device power-on/power-off test method according to the present embodiment further refines steps 101 to 103 on the basis of the gateway device power-on/power-off test method according to the first embodiment of the present invention, and the gateway device power-on/power-off test method according to the present embodiment includes the following steps.
Step 201, displaying a preset operation interface, and receiving test parameters of power on and power off configured by a user through the preset operation interface.
In this embodiment, when the electronic device is used to perform the power-on and power-off test on the target gateway device, a preset operation interface may be displayed through the display, as shown in fig. 4, in the operation interface, the user-configurable test parameters may include: the IP address and test port number of the target gateway device, as in fig. 4, are: 192.168.0.31. the test port number is 23. The test parameters may also include: the user name and password of the target gateway operating system Shell are logged in. As in fig. 4, the user name is: root. The test parameters may also include addresses and channel identifications corresponding to GPIBs of the programmable power supply. As in fig. 4, the addresses corresponding to GPIB are: GPIBO: 5:: INSTR. The channel identification is: 1. after a user clicks a start chart, receiving the power-on and power-off test parameters configured by the user, and performing power-on and power-off tests of preset test times on the target gateway equipment according to the test parameters.
Step 202, performing power-on and power-off tests of preset test times on target gateway equipment according to test parameters, controlling a programmable power supply to power on the target gateway equipment for each power-on and power-off test, determining a network state of the target gateway equipment after the target gateway equipment is powered on, controlling the target gateway equipment to operate a preset service, controlling the programmable power supply to power off the target gateway equipment in the operation process of the preset service, and determining a power-on and power-off test result for each time according to the network state and a preset service processing result.
In this embodiment, for each power-on and power-off test, connection is established with the programmable power source through the address and the channel identifier corresponding to the GPIB of the programmable power source, and the programmable power source is controlled to power on the target gateway device. Wherein, the power supply time delay of the programmable power supply is < <100ms, and the precision is < <0.1V.
Optionally, in this embodiment, in step 202, when determining the network state of the target gateway device after the target gateway device is powered on, steps 2021 to 2023 are specifically included.
Step 2021, after the target gateway device is powered on, periodically sending a network test command to the target gateway device, so that the target gateway device determines the network state according to the network test command.
Specifically, in this embodiment, a network test command is periodically sent to the target gateway device, where the network test command is a Ping command, so as to determine the network state of the target gateway device, that is, whether the target gateway device is turned on by Ping. And after the target gateway equipment receives the network test command, detecting the network state of the target gateway equipment.
The transmission period is not limited in this embodiment.
Step 2022, if a network test response sent by the target gateway device is received, determining that the network state of the target gateway device is normal.
In step 2023, if no network test response sent by the target gateway device is received in the preset time period, determining that the network state of the target gateway device is abnormal.
In this embodiment, if the target gateway device detects that its network state is normal, a network test response is sent to the electronic device, and if the electronic device receives the network test response, it determines that the network state of the target gateway device is normal. If the electronic equipment periodically sends a network test command to the target gateway equipment, the target gateway equipment does not send a network test response to the electronic equipment all the time, the network state of the target gateway equipment is abnormal, the electronic equipment is always in a state of not Ping, and the electronic equipment determines that the network state of the target gateway equipment is abnormal.
The specific value of the preset time period is not limited, and may be configured in advance.
Optionally, in this embodiment, in step 202, the target gateway device is controlled to operate a preset service, and power-down is controlled to be performed in the operation process of the preset service, which includes the following schemes.
And controlling an operating system Shell of the target gateway equipment to read the preset data, erasing the preset data into the embedded storage solution eMMC, and controlling power-down in the process of erasing the preset data into the embedded storage solution eMMC.
The preset data is a file with a capacity larger than a preset capacity threshold. For example, the preset capacity threshold may be 3G.
In this embodiment, after the network function test of the target gateway device is completed, the hardware function of the target gateway device is tested, and because the service that the hardware of each target gateway device generally executes when the eMMC is erased, the power is instantaneously turned off when the eMMC is erased, so as to test the hardware function of the target gateway device.
Specifically, first, the operating system Shell of the target gateway device is logged in through a preconfigured user name and password. And controlling Shell to read a preset file which is larger than a preset capacity threshold value from an SD card or an external storage device of the target gateway device, and erasing the preset file which is larger than the preset capacity threshold value into eMMC after the preset file which is larger than the preset capacity threshold value is read. Because the files which are preset and larger than the preset capacity threshold value are larger, a certain time is available in the process of erasing to the eMMC, so that the program-controlled power supply is controlled to perform power-down operation on the target gateway equipment at a moment in the process of erasing to the eMMC, and whether the erased data are reserved in the eMMC after power-down is judged so as to test the hardware function of the target gateway equipment.
In this embodiment, when the target gateway device is controlled to operate a preset service and power down is controlled to be performed in the operation process of the preset service, the operating system Shell of the target gateway device is controlled to read preset data, the preset data is erased to the embedded storage solution eMMC, and power down is controlled to be performed in the process of the preset data being erased to the embedded storage solution eMMC, wherein the preset data is a file greater than a preset capacity threshold. The method can enable the process of the eMMC for erasing data to be longer, and further can accurately complete the power-down operation of the target gateway device in the process of the eMMC for erasing data.
Optionally, in this embodiment, in step 202, each time the uplink and downlink electrical measurement results are determined according to the network status and the preset service processing results, the method specifically includes steps 2024 to 2025.
Step 2024, if it is determined that the network status is normal and the preset service processing is successful in the power-on and power-off test, determining that the power-on and power-off test passes.
In step 2025, if it is determined that the network status is abnormal and/or the preset service processing fails in the power-on/power-off test, it is determined that the power-on/power-off test fails.
In this embodiment, as shown in fig. 4, log data of the target gateway device is obtained each time a power-on and power-off test is performed, and the log data generated at each time point during each power-on and power-off test can be displayed on an operation interface for a user to view.
The log data may include whether the network status is normal, whether the eMMC is successfully erased, and the like.
Specifically, in this embodiment, if it is determined that the network state is normal and the preset service processing is successful in a certain power-up and power-down test, it is indicated that the network function and the hardware function of the target gateway device are normal in the power-up and power-down test, and it is determined that the power-up and power-down test passes. Otherwise, if the network state abnormality and/or the failure of the preset service processing in the power-on and power-off test at a certain time are determined, the network function and/or the hardware function abnormality of the target gateway equipment in the power-on and power-off test at the time are indicated, and the power-on and power-off test at the time is determined to not pass.
And 203, if the power-on and power-off tests pass each time, determining that the test of the target gateway equipment passes.
And 204, if one power-on and power-off test fails in each power-on and power-off test, determining that the test of the target gateway equipment fails.
In this embodiment, in order to ensure that the target gateway device will not have an abnormal problem in the actual use process, after the result of each time of power-on and power-off testing is obtained, whether each time of power-on and power-off testing is a test pass is determined, if each time of power-on and power-off testing is passed, the test pass of the target gateway device is determined. Otherwise, if one power-on and power-off test fails in each power-on and power-off test, determining that the test of the target gateway equipment fails. It is necessary to re-commission the target gateway device.
According to the gateway equipment power-on and power-off test method, when the test result of the target gateway equipment is determined according to the power-on and power-off test result, if the power-on and power-off test result is passed, the test of the target gateway equipment is determined to be passed, and if the power-on and power-off test is not passed once in the power-on and power-off test result, the test of the target gateway equipment is determined to be not passed, so that the risk of abnormal problems of the target gateway equipment in the actual use process can be effectively reduced.
Example III
Fig. 5 is a schematic structural diagram of a gateway device power-on/power-off testing apparatus according to an embodiment of the present invention, as shown in fig. 5, a gateway device power-on/power-off testing apparatus 30 according to the embodiment includes: the acquisition module 31, the test module 32 and the determination module 33.
The acquiring module 31 is configured to acquire a test parameter for powering up and powering down the target gateway device. The test module 32 is configured to perform power-on and power-off tests of a preset test number on the target gateway device according to the test parameters, determine a network state of the target gateway device after the target gateway device is powered on for each power-on and power-off test, control the target gateway device to run a preset service, control power-off in a running process of the preset service, and determine a power-on and power-off test result for each time according to the network state and a preset service processing result. And the determining module 33 is configured to determine a test result of the target gateway device according to the result of each power-on and power-off test.
The power-on and power-off testing device for gateway equipment provided in this embodiment may execute the technical scheme of the method embodiment shown in fig. 2, and its implementation principle and technical effect are similar, and will not be described herein again.
Optionally, the test module 32 is specifically configured to, when determining the network state of the target gateway device after the target gateway device is powered on:
after the target gateway equipment is electrified, periodically sending a network test command to the target gateway equipment so that the target gateway equipment determines a network state according to the network test command; if a network test response sent by the target gateway equipment is received, determining that the network state of the target gateway equipment is normal; if the network test response sent by the target gateway equipment is not received in the preset time period, determining that the network state of the target gateway equipment is abnormal.
Optionally, the test module 32 is specifically configured to, when controlling the target gateway device to run the preset service and controlling power-down in the running process of the preset service:
and controlling an operating system Shell of the target gateway equipment to read the preset data, erasing the preset data into the embedded storage solution eMMC, and controlling power-down in the process of erasing the preset data into the embedded storage solution eMMC.
The preset data is a file with a capacity larger than a preset capacity threshold.
Optionally, the test module 32 is specifically configured to, when determining each power-on and power-off test result according to the network state and the preset service processing result:
if the network state is normal and the preset service processing is successful in a certain power-on and power-off test, determining that the power-on and power-off test is passed; if the network state abnormality and/or the failure of the preset service processing in the power-on and power-off test at a time are determined, the power-on and power-off test at the time is determined to not pass.
Optionally, the determining module 33 is specifically configured to:
if the power-on and power-off tests pass each time, determining that the test of the target gateway equipment passes; and if the power-on and power-off test fails in each power-on and power-off test, determining that the test of the target gateway equipment fails.
Optionally, the obtaining module 31 is specifically configured to:
displaying a preset operation interface; and receiving the test parameters of power-on and power-off configured by a user through a preset operation interface.
The test module 32 is further configured to: and controlling the program-controlled power supply to electrify the target gateway equipment.
Accordingly, the test module 32 is specifically configured to, when controlling power-down in a preset service operation process:
and controlling the program-controlled power supply to power down the target gateway equipment in the operation process of the preset service.
The power-on and power-off testing device for gateway equipment provided in this embodiment may execute the technical scheme of the method embodiment shown in fig. 3, and its implementation principle and technical effect are similar, and will not be described herein again.
Example five
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 6, the electronic device 40 includes: at least one processor 41, memory 42;
memory 42 stores computer-executable instructions.
The at least one processor 41 executes computer-executable instructions stored in the memory, so that the at least one processor executes to implement the gateway device power-on and power-off test method provided in any one of the first embodiment or the second embodiment of the present invention. The relevant descriptions may be understood by referring to the relevant descriptions and effects corresponding to the steps of fig. 2 to 3, and are not repeated herein.
In this embodiment, the electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices.
In this embodiment, the memory 42 and the processor 41 are connected via a bus 53.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the gateway device power-on and power-off measurement method provided in any one of the first embodiment or the second embodiment of the invention.
The embodiment of the invention also provides a computer program product, which comprises a computer program, and the computer program when executed by a processor realizes the gateway device power-on and power-off test method provided by any one of the first embodiment or the second embodiment.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in hardware plus software functional modules.
Program code for carrying out methods of the present invention may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Moreover, although operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (11)

1. A method for power-on and power-off testing of gateway equipment, comprising:
acquiring test parameters for powering up and powering down target gateway equipment;
performing power-on and power-off tests of preset test times on the target gateway equipment according to the test parameters, determining the network state of the target gateway equipment after the target gateway equipment is powered on for each power-on and power-off test, controlling the target gateway equipment to run preset service, controlling power-off in the running process of the preset service, and determining the power-on and power-off test result for each time according to the network state and the preset service processing result;
determining a test result of the target gateway equipment according to the upper and lower electrical test results of each time;
the control target gateway device runs a preset service, and controls power-down in the running process of the preset service, comprising the following steps:
The method comprises the steps of controlling an operating system Shell of target gateway equipment to read preset data, erasing the preset data into an embedded storage solution eMMC, and controlling power-down in the process of erasing the preset data into the embedded storage solution eMMC;
the preset data is a file with a capacity greater than a preset capacity threshold.
2. The method of claim 1, wherein the determining the network state of the target gateway device after the target gateway device is powered up comprises:
after the target gateway equipment is electrified, periodically sending a network test command to the target gateway equipment so that the target gateway equipment determines a network state according to the network test command;
if a network test response sent by target gateway equipment is received, determining that the network state of the target gateway equipment is normal;
and if the network test response sent by the target gateway equipment is not received in the preset time period, determining that the network state of the target gateway equipment is abnormal.
3. The method of claim 1, wherein determining each power-on and power-off measurement according to the network status and a preset service processing result comprises:
if the network state is normal and the preset service processing is successful in a certain power-on and power-off test, determining that the power-on and power-off test is passed;
And if the network state is abnormal and/or the preset service processing fails in the power-on and power-off test at a certain time, determining that the power-on and power-off test at the certain time fails.
4. The method according to claim 1, wherein the determining the test result of the target gateway device according to each power-on and power-off test result comprises:
if the power-on and power-off tests pass each time, determining that the test of the target gateway equipment passes;
and if one power-on and power-off test fails in each power-on and power-off test, determining that the target gateway equipment test fails.
5. The method according to any one of claims 1-4, wherein the obtaining a test parameter for powering up and powering down the target gateway device includes:
displaying a preset operation interface;
and receiving the test parameters of power-on and power-off configured by a user through a preset operation interface.
6. The method according to any one of claims 1-4, wherein before determining the network state of the target gateway device after powering up the target gateway device, further comprises:
controlling a programmable power supply to electrify the target gateway equipment;
correspondingly, the controlling the power-down in the operation process of the preset service comprises the following steps:
And controlling the programmable power supply to power down the target gateway equipment in the operation process of the preset service.
7. A gateway equipment power-on and power-off testing device is characterized by comprising:
the acquisition module is used for acquiring test parameters for powering up and powering down the target gateway equipment;
the test module is used for carrying out power-on and power-off tests of preset test times on the target gateway equipment according to the test parameters, determining the network state of the target gateway equipment after the target gateway equipment is powered on for each power-on and power-off test, controlling the target gateway equipment to run preset service, controlling the power-off operation in the running process of the preset service, and determining the power-on and power-off test result for each time according to the network state and the preset service processing result;
the determining module is used for determining the test result of the target gateway equipment according to the upper and lower electrical test results each time;
the test module is used for controlling the target gateway equipment to run a preset service, controlling an operating system Shell of the target gateway equipment to read preset data when the target gateway equipment is powered down in the running process of the preset service, erasing the preset data into an embedded storage solution eMMC, and controlling the target gateway equipment to power down in the process of erasing the preset data into the embedded storage solution eMMC;
The preset data is a file with a capacity larger than a preset capacity threshold.
8. An electronic device, comprising: at least one processor, memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the method of any one of claims 1-6.
9. A computer readable storage medium, having stored thereon a computer program, the computer program being executed by a processor to implement the method of any of claims 1-6.
10. A gateway device power-on and power-off test system, comprising: a programmable power supply, a target gateway device and an electronic device according to claim 8;
and the electronic equipment is connected with the target gateway equipment through the programmable power supply.
11. The system of claim 10, further comprising: a router;
and the electronic equipment is in communication connection with the target gateway equipment through the router.
CN202011387328.5A 2020-12-01 2020-12-01 Gateway equipment power-on and power-off test method, device, equipment, system and product Active CN114584498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011387328.5A CN114584498B (en) 2020-12-01 2020-12-01 Gateway equipment power-on and power-off test method, device, equipment, system and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011387328.5A CN114584498B (en) 2020-12-01 2020-12-01 Gateway equipment power-on and power-off test method, device, equipment, system and product

Publications (2)

Publication Number Publication Date
CN114584498A CN114584498A (en) 2022-06-03
CN114584498B true CN114584498B (en) 2023-08-15

Family

ID=81767442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011387328.5A Active CN114584498B (en) 2020-12-01 2020-12-01 Gateway equipment power-on and power-off test method, device, equipment, system and product

Country Status (1)

Country Link
CN (1) CN114584498B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115529253A (en) * 2022-08-29 2022-12-27 阿里巴巴(中国)有限公司 Data center interconnection equipment testing method and system, electronic equipment and storage medium
CN115547396B (en) * 2022-11-30 2023-03-21 合肥康芯威存储技术有限公司 Test method and device for eMMC

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562037A (en) * 2017-08-25 2018-01-09 北京新能源汽车股份有限公司 A kind of control method and equipment of vehicle power-on and power-off
CN109656764A (en) * 2018-12-18 2019-04-19 郑州云海信息技术有限公司 A kind of method and system of the independent electric control up and down of automatic verifying hard disk
CN109684146A (en) * 2018-12-28 2019-04-26 北京旷视科技有限公司 Upper and lower electric test method, device, system and processing equipment
CN109917218A (en) * 2019-04-30 2019-06-21 深圳开立生物医疗科技股份有限公司 Power-on and power-off test macro, method and the electrical equipment of electrical equipment
CN110224885A (en) * 2019-05-31 2019-09-10 东软集团股份有限公司 Alarm method, device, storage medium and the electronic equipment of monitoring of tools
CN110430096A (en) * 2019-08-06 2019-11-08 深圳市同维通信技术有限公司 A kind of gateway test method and equipment
CN110427289A (en) * 2019-07-31 2019-11-08 东莞记忆存储科技有限公司 The method and device that automatic test SSD power down influences data consistency
CN110502376A (en) * 2019-07-18 2019-11-26 苏州浪潮智能科技有限公司 A kind of hard disk electric test method and device up and down
CN110569158A (en) * 2019-08-30 2019-12-13 东莞记忆存储科技有限公司 method and device for testing abnormal power failure in SSD random scene and computer equipment
CN111983545A (en) * 2020-08-24 2020-11-24 安徽南瑞中天电力电子有限公司 Testing method and testing device for communication module of intelligent electric energy meter

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9756051B2 (en) * 2014-11-26 2017-09-05 The Travelers Indemnity Company Targeted user access control system
US10628276B2 (en) * 2018-06-29 2020-04-21 International Business Machines Corporation Unit test framework for testing code in a gateway service

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107562037A (en) * 2017-08-25 2018-01-09 北京新能源汽车股份有限公司 A kind of control method and equipment of vehicle power-on and power-off
CN109656764A (en) * 2018-12-18 2019-04-19 郑州云海信息技术有限公司 A kind of method and system of the independent electric control up and down of automatic verifying hard disk
CN109684146A (en) * 2018-12-28 2019-04-26 北京旷视科技有限公司 Upper and lower electric test method, device, system and processing equipment
CN109917218A (en) * 2019-04-30 2019-06-21 深圳开立生物医疗科技股份有限公司 Power-on and power-off test macro, method and the electrical equipment of electrical equipment
CN110224885A (en) * 2019-05-31 2019-09-10 东软集团股份有限公司 Alarm method, device, storage medium and the electronic equipment of monitoring of tools
CN110502376A (en) * 2019-07-18 2019-11-26 苏州浪潮智能科技有限公司 A kind of hard disk electric test method and device up and down
CN110427289A (en) * 2019-07-31 2019-11-08 东莞记忆存储科技有限公司 The method and device that automatic test SSD power down influences data consistency
CN110430096A (en) * 2019-08-06 2019-11-08 深圳市同维通信技术有限公司 A kind of gateway test method and equipment
CN110569158A (en) * 2019-08-30 2019-12-13 东莞记忆存储科技有限公司 method and device for testing abnormal power failure in SSD random scene and computer equipment
CN111983545A (en) * 2020-08-24 2020-11-24 安徽南瑞中天电力电子有限公司 Testing method and testing device for communication module of intelligent electric energy meter

Also Published As

Publication number Publication date
CN114584498A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
CN111245898B (en) Network equipment online method, device, server and storage medium
CN114584498B (en) Gateway equipment power-on and power-off test method, device, equipment, system and product
CN106771972B (en) Automatic testing device, system and method for POS machine mainboard
CN102799504A (en) Power supply testing system and method
CN105120259B (en) Digital television detection method and device
CN106708716A (en) Software testing method, device and system
CN111322721A (en) Air conditioner fault detection processing method and system, storage medium and air conditioner
CN104536900A (en) Method and device for controlling mobile terminal
CN109361568B (en) Aging test method and device for network equipment
CN113225760B (en) Network testing method and equipment
CN109412880B (en) Method for testing abnormal starting of train network communication equipment
CN111078484A (en) Power-off test method, device, equipment and storage medium for system upgrading
CN110658478A (en) Testing method and device based on power supply balance signal stability and storage medium
CN111812445B (en) Intelligent capacitor error correction method and device, computer equipment and storage medium
CN112114897B (en) Parameter configuration method and device based on industrial control screen and computer equipment
CN107870840B (en) IPMI-based server multi-test instruction automatic execution method
CN113590401A (en) CPE equipment multifunctional test method, CPE equipment multifunctional test device, computer equipment and storage medium
CN114138587A (en) Reliability verification method, device and equipment for upgrading server power firmware
CN107220149B (en) Method and system for capturing debugging data of wireless communication module in Linux system under Windows
CN102411527B (en) Detecting method for image-processing chip, developing plate and detecting system
CN106405430B (en) Lithium ion battery on-line detection conversion control equipment, system and method
CN107015827B (en) Embedded system and method for automatically operating third-party extension program thereof
CN112492061A (en) IP address modification method, device and equipment of BMC (baseboard management controller) and readable storage medium
KR20150096612A (en) Test system for soc and test method thereof
CN114116034B (en) Distributed brushing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant