CN111752774A - Dormancy pressure testing method, system, computer device and storage medium - Google Patents

Dormancy pressure testing method, system, computer device and storage medium Download PDF

Info

Publication number
CN111752774A
CN111752774A CN202010435865.6A CN202010435865A CN111752774A CN 111752774 A CN111752774 A CN 111752774A CN 202010435865 A CN202010435865 A CN 202010435865A CN 111752774 A CN111752774 A CN 111752774A
Authority
CN
China
Prior art keywords
sleep
usb
tested
current
determining
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.)
Granted
Application number
CN202010435865.6A
Other languages
Chinese (zh)
Other versions
CN111752774B (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.)
Xian Fibocom Wireless Software Inc
Original Assignee
Xian Fibocom Wireless Software Inc
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 Xian Fibocom Wireless Software Inc filed Critical Xian Fibocom Wireless Software Inc
Priority to CN202010435865.6A priority Critical patent/CN111752774B/en
Publication of CN111752774A publication Critical patent/CN111752774A/en
Application granted granted Critical
Publication of CN111752774B publication Critical patent/CN111752774B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • 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
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The application relates to a dormancy pressure testing method, a system, a computer device and a storage medium. The method comprises the following steps: displaying a sleep configuration page, and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page; determining a protocol type of a driving protocol, and acquiring a corresponding keyword library according to the protocol type; determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library; generating a sleep control instruction according to the target level parameter and the power-off frequency; and issuing the sleep control instruction to the USB component to be tested corresponding to the communication address so that the USB component to be tested performs sleep pressure test based on the sleep control instruction. By adopting the method, the testing efficiency of the dormancy pressure test can be improved.

Description

Dormancy pressure testing method, system, computer device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a sleep pressure testing method, system, computer device, and storage medium.
Background
With the development of science and technology, the requirements of people on electronic products are more and more strict. At present, before the electronic product leaves the factory, a strict stress test needs to be performed, wherein a sleep test of a USB (Universal Serial Bus) module is an important one. Through relapse, many times control USB module and get into the dormant state, can judge whether the quality of product accords with the standard based on the dormant state of USB module, avoid the defective products to flow into market.
At present, the USB module is powered off and powered on manually, so that the USB module can be controlled to enter a dormant state through power-off processing of the USB module, and the USB module can be awakened through power-on processing of the USB module. However, manually powering off and powering up the USB module may reduce the efficiency of the sleep stress test.
Disclosure of Invention
In view of the above, it is desirable to provide a sleep pressure test method, system, computer device and storage medium capable of improving the test efficiency of the sleep pressure test.
A sleep pressure test method, the method comprising:
displaying a sleep configuration page, and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
determining a protocol type of the driving protocol, and acquiring a corresponding keyword library according to the protocol type;
determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library;
generating a sleep control instruction according to the target level parameter and the power-off frequency;
and issuing the sleep control instruction to the USB component to be tested corresponding to the communication address so as to enable the USB component to be tested to carry out sleep pressure test based on the sleep control instruction.
In one embodiment, the method further comprises:
when the operation of clicking the sleep mode configuration control occurs, acquiring sleep mode parameters configured based on the sleep configuration page and determining a connection mode with the USB module;
generating a corresponding sleep configuration instruction based on the connection mode and the sleep mode parameter;
and sending the sleep configuration instruction to the USB module so that the USB module performs corresponding configuration according to the sleep mode parameters in the sleep configuration instruction.
In one embodiment, the determining the protocol type of the driving protocol and obtaining the corresponding keyword library according to the protocol type includes:
when the protocol type is a character type, acquiring a keyword library corresponding to the character type; the keyword library corresponding to the character type comprises a first keyword and a second keyword;
the USB component to be tested comprises a control pin; the determining the target level parameter of the USB component to be tested based on the driving protocol and the keyword library comprises:
screening out a target paragraph corresponding to the control pin from the driving protocol according to the first keyword;
screening out position information among all control pins from a target section based on the second keyword;
and determining a target level parameter according to the position information.
In one embodiment, the sleep configuration page is provided with a sleep power consumption acquisition control; the method further comprises the following steps:
when the operation of clicking the sleep power consumption acquisition control occurs, acquiring the real-time current of the USB component to be detected in the sleep state; the real-time current comprises a current value and acquisition time;
determining an extreme current according to the current value and the acquisition time;
and displaying the real-time current and the extreme current in the sleep configuration page in a distinguishing manner, and determining the sleep power consumption of the USB component to be tested in the sleep duration based on the real-time current and the extreme current.
In one embodiment, determining the extreme current according to the current value and the acquisition time comprises:
acquiring a tracing point template and setting parameters;
according to the setting parameters, determining the tracing point coordinates corresponding to the current value and the acquisition time;
drawing a current trend curve on the tracing point template based on the tracing point coordinates;
and judging the corner points in the current trend curve as extreme currents.
A sleep pressure test apparatus, the apparatus comprising:
the information acquisition module is used for displaying a sleep configuration page and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
the instruction generation module is used for determining the protocol type of the driving protocol and acquiring a corresponding keyword library according to the protocol type; determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library; generating a sleep control instruction according to the target level parameter and the power-off frequency;
and the control module is used for sending the sleep control instruction to the USB component to be tested corresponding to the communication address so as to enable the USB component to be tested to carry out sleep and awakening operations based on the sleep control instruction.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
displaying a sleep configuration page, and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
determining a protocol type of the driving protocol, and acquiring a corresponding keyword library according to the protocol type;
determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library;
generating a sleep control instruction according to the target level parameter and the power-off frequency;
and issuing the sleep control instruction to the USB component to be tested corresponding to the communication address so as to enable the USB component to be tested to carry out sleep pressure test based on the sleep control instruction.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
displaying a sleep configuration page, and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
determining a protocol type of the driving protocol, and acquiring a corresponding keyword library according to the protocol type;
determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library;
generating a sleep control instruction according to the target level parameter and the power-off frequency;
and issuing the sleep control instruction to the USB component to be tested corresponding to the communication address so as to enable the USB component to be tested to carry out sleep pressure test based on the sleep control instruction.
According to the sleep pressure testing method, the sleep pressure testing system, the computer equipment and the storage medium, by displaying the sleep configuration page, the communication address, the power-off frequency and the driving protocol of the USB component to be tested can be acquired based on the sleep configuration page; by acquiring the driving protocol, the protocol type of the driving protocol can be judged, and a corresponding keyword library is acquired according to the protocol type; by acquiring a keyword library, target level parameters of each control pin in the USB component to be tested can be determined based on the keyword library, and a sleep control instruction is generated according to the target level parameters of each control pin and the acquired power failure frequency; by generating the sleep control instruction, the sleep control instruction can be issued to the to-be-tested USB component corresponding to the communication address, so that the to-be-tested USB component can be subjected to sleep pressure test based on the sleep control instruction. Because the user only needs to dispose communication address, outage frequency and the drive agreement of the USB subassembly that awaits measuring in dormancy configuration page, can generate dormancy control instruction to the USB subassembly that awaits measuring can carry out the pressure test based on dormancy control instruction is automatic, compares in traditional artifical for the USB module of needs and cuts off, supplies power, and this application can promote the efficiency of the test of dormancy pressure test greatly.
Drawings
FIG. 1 is a diagram of an exemplary implementation of a sleep pressure test method;
FIG. 2 is a flow diagram illustrating a sleep pressure test method according to one embodiment;
FIG. 3 is a diagram illustrating the connection between a test computer and a USB device under test according to an embodiment;
FIG. 4 is a flowchart illustrating a method for configuring sleep mode in one embodiment;
FIG. 5A is a schematic diagram illustrating tabulated real-time current in one embodiment;
FIG. 5B is a graph illustrating real-time current in one embodiment;
FIG. 6 is a block diagram of a sleep pressure test apparatus in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The sleep pressure testing method provided by the application can be applied to the application environment shown in fig. 1. The test computer 102 communicates with the USB component 104 to be tested through a Serial port line, a USB (Universal Serial Bus) line, or a GPIB (General-Purpose-Bus) line. The testing computer 102 may be, but not limited to, various personal computers, notebook computers, and tablet computers, and the testing computer 102 may be implemented by an independent testing computer or a testing computer cluster formed by a plurality of testing computers. The USB component under test 104 includes a power supply, a test board, a relay, and a USB module. The test computer 102 runs a sleep control platform for controlling the USB component 104 to be tested to enter a sleep state or to wake up from the sleep state.
In one embodiment, as shown in fig. 2, a sleep pressure testing method is provided, which is described by taking the method as an example applied to the testing computer in fig. 1, and includes the following steps:
s202, displaying the sleep configuration page, and determining a communication address, a power-off frequency and a driving protocol of the USB component to be tested configured based on the sleep configuration page.
The sleep configuration page is compiled based on an automatic test framework and can be used for correspondingly configuring the sleep stress test task.
Specifically, a developer may compile an automation script for implementing a sleep pressure test based on an automation testing framework and generate a sleep pressure test application based on the automation script. When the hibernation power consumption test needs to be carried out on the USB component to be tested, a user can open a hibernation configuration page by clicking an application identifier of the hibernation pressure test application. The USB component to be tested is a set of system formed by combining a power supply, a testing bottom plate, a relay and a USB module. The power supply refers to equipment for supplying power; the test bottom plate is a PCB (Printed Circuit Board) plate which can control a relay switch and close according to an automatic script written by a developer, and comprises a serial port, a USB interface and the like; the USB module is a communication module including a USB interface, and can transmit and receive communication data based on the communication module. The computer to be tested indirectly controls the USB module to enter a dormant state or a wakeup state by controlling the on-off of the relay, so that the dormant state of the USB module can be further analyzed subsequently. The sleep mode means that the whole USB module does not transmit and receive communication data, so that the USB module is in a low power consumption state. The awake state is a state in which the USB module frequently transmits and receives communication data and is thus in high power consumption. The USB module includes a backup power source so that the USB module can maintain power consumption required to be consumed in a sleep state based on the backup power source.
As shown in fig. 3, when the testing computer is connected to the USB component to be tested, that is, when the testing computer is connected to the serial port interface in the testing backplane through the serial port line, and the DTR (Data Terminal Ready) control pin in the serial port interface in the testing backplane is connected to the input Terminal of the relay, and the output Terminal of the relay is connected to the USB module, the testing computer obtains the communication address of the testing backplane through the serial port line and the preset serial port protocol, and displays the communication address in the device selection control of the sleep configuration page. And when the user is confirmed to select a certain communication address in the equipment selection control, the testing computer takes the communication address selected by the user as the communication address of the current USB component to be tested. FIG. 3 is a diagram illustrating the connection between a test computer and a USB device under test according to an embodiment.
Meanwhile, a user can configure the power-off frequency for the current USB component to be tested in the sleep configuration page and upload the driving protocol based on the sleep configuration page. The driving protocol refers to a protocol for driving the test backplane to operate. The driving protocol comprises the level state which is obtained by each pin in the serial port interface in the test bottom plate under different conditions. The level state comprises a high level exceeding a preset voltage threshold value and a low level less than or equal to the preset voltage threshold value. The protocol type of the driving protocol may be a text type or an image type. For example, the driving protocol may be a schematic circuit diagram of the test board or an instruction sheet of the test board.
In one embodiment, the test backplane has drive protocols pre-stored therein. And when the test computer determines the communication address of the current USB component to be tested, the test computer pulls the drive protocol from the test bottom plate according to the communication address.
In one embodiment, the sleep configuration page includes at least one of a sleep control, a power-off frequency setting control, a scene switching control, and a device selection control. The sleep control is used for generating a sleep control instruction. The power-off frequency setting control is used for setting the sleeping and awakening frequency of the USB component to be tested. The scene switching control is used for controlling the USB component to be tested to switch different scenes, such as performing sleep pressure test in a scene of opening Bluetooth and performing sleep pressure test in a scene of opening WIFI. Developers can write different test scripts aiming at different scenes in advance, so that scene switching can be carried out based on the scene switching control. Because one testing computer can test a plurality of USB components to be tested at the same time, the USB components to be tested which need to be set currently can be determined based on the equipment selection control.
And S204, determining the protocol type of the driving protocol, and acquiring a corresponding keyword library according to the protocol type.
S206, determining the target level parameter of the USB component to be tested based on the driving protocol and the keyword library.
The target level parameter refers to a level value to be set by each control pin in a serial port interface in the test backplane. The control pin is a pin of an interface which is positioned in the USB component to be tested and is connected with a testing computer. For example, when the test computer is connected to the test board through the serial line, the control pin is a pin in the serial interface in the test board, which is connected to the serial line. The serial interface generally has 9 control pins, and each control pin has a different function, for example, a Data Terminal Ready (DTR) control pin is provided in the serial interface. Since the serial ports produced by manufacturers of different serial ports have different arrangement sequences of control pins, the arrangement sequence of the control pins needs to be determined based on a driving protocol.
The target level parameters include a first target level parameter and a second target level parameter. The first target level parameter is a level value required by each control pin in the serial port interface when the control relay is in a closed state. The second target level parameter is a level value required by each control pin in the serial port interface when the control relay is in a disconnected state.
Specifically, a keyword library related to the type of the driving protocol is preset in the test computer. When the driving protocol is obtained, the testing computer determines that the driving protocol is an image type or a character type, and obtains a corresponding keyword library according to the type of the driving protocol.
And when the driving type is the image type, the corresponding keyword library comprises the name of each control pin in the serial port interface. The testing computer carries out image recognition on the circuit schematic diagram of the image type, searches position information among the control pins in the circuit schematic diagram according to the names of the control pins, and determines the arrangement sequence of the control pins in the serial port interface according to the position information, so that the testing computer can determine target level parameters of the control pins in the USB component to be tested according to the arrangement sequence. The names of the control pins are marked in the circuit schematic diagram, and the test computer can identify the names of the control pins in the circuit schematic diagram based on a preset image recognition algorithm. For example, when the DTR control pins are determined to be located at the start positions of the control pins, the test computer may determine that the first target level parameters of the control pins are: 1. 0, 0; the second target level parameter is: 0. 0, 0; where 1 represents high and 0 represents low.
When the driving type is a character type, the testing computer obtains a keyword library corresponding to the character type. The keyword library corresponding to the character type comprises a first keyword and a second keyword. The test computer screens out a target paragraph corresponding to the control pin from the driving protocol according to the first keyword; based on the second keyword, screening out position information among the control pins from the target section; and determining target level parameters of each control pin according to the position information.
In one embodiment, after the test computer obtains the driving protocol, the driving protocol may be displayed on a screen, so that a user may determine position information of the DTR control pin in the serial port interface based on the displayed driving protocol, determine a target level parameter of each control pin according to the position information of the DTR control pin, and input the determined target level parameter into the sleep configuration page. For example, when determining that the DTR control pin is located at the start position of each control pin, the user may set the first target level parameter to: 1. 0, 0; setting the second target level parameter to: 0. 0, 0; where 1 represents high and 0 represents low.
And S208, generating a sleep control instruction according to the target level parameter and the power-off frequency.
S210, the dormancy control instruction is sent to the USB component to be tested corresponding to the communication address, so that the USB component to be tested performs dormancy pressure test based on the dormancy control instruction.
Specifically, the test computer converts the target level parameter into a corresponding serial communication code based on a serial protocol, and generates a sleep control instruction according to the serial communication code and the power-off frequency. And the computer to be tested issues the generated serial port communication command to the corresponding USB test component according to the communication address, namely issues the serial port communication command to the test bottom plate, so that the test bottom plate controls the level conversion of each control pin in the serial port interface at the power-off frequency. For example, when the power-off frequency is 1/s (every second), the test base board turns over the level of the DTR control pin at the frequency of 1/s, so that when the DTR pin is at a high level, that is, the DTR pin outputs a 1.8V level, the relay connected with the DTR pin is in a closed state, and the USB module connected with the relay first can enter a wake-up state; when the DTR pin is at a low level, namely the DTR pin outputs a 0V level, the relay connected with the DTR pin is in a disconnected state, so that the USB module connected with the relay firstly can enter a dormant state.
In the sleep pressure test method, by displaying the sleep configuration page, the communication address, the power-off frequency and the driving protocol of the USB component to be tested can be acquired based on the sleep configuration page; by acquiring the driving protocol, the protocol type of the driving protocol can be judged, and a corresponding keyword library is acquired according to the protocol type; by acquiring a keyword library, target level parameters of each control pin in the USB component to be tested can be determined based on the keyword library, and a sleep control instruction is generated according to the target level parameters of each control pin and the acquired power failure frequency; by generating the sleep control instruction, the sleep control instruction can be issued to the to-be-tested USB component corresponding to the communication address, so that the to-be-tested USB component can be subjected to sleep pressure test based on the sleep control instruction. Because the user only needs to dispose communication address, outage frequency and the drive agreement of the USB subassembly that awaits measuring in dormancy configuration page, can generate dormancy control instruction to the USB subassembly that awaits measuring can carry out the pressure test based on dormancy control instruction is automatic, compares in traditional artifical for the USB module of needs and cuts off, supplies power, and this application can promote the efficiency of the test of dormancy pressure test greatly.
In addition, by determining the protocol type and determining the target level parameters of each control pin in the USB component to be tested according to the protocol type, the scheme can be compatible with various protocol types and can be compatible with different communication interfaces produced by different manufacturers.
In one embodiment, as shown in fig. 4, the sleep pressure test method further includes:
s402, when the operation of clicking the sleep mode configuration control occurs, acquiring sleep mode parameters configured based on a sleep configuration page and determining a connection mode with a USB module;
s404, generating a corresponding sleep configuration instruction based on the connection mode and the sleep mode parameter;
s406, the sleep configuration instruction is sent to the USB module, so that the USB module performs corresponding configuration according to the sleep mode parameter in the sleep configuration instruction.
The sleep configuration page is provided with a sleep mode configuration control, and the sleep mode configuration control is used for setting a sleep mode of the USB module. The connection method comprises USB connection and serial port connection.
Specifically, when it is determined that the user clicks the sleep mode configuration control, the test computer may generate a popup window for inputting sleep mode parameters in the sleep configuration page based on a clicking operation of the user, and the user may input the sleep mode parameters in the popup window.
Further, when the USB module has a USB interface and a serial interface, the user can connect the USB module with the testing computer based on the serial interface or the USB interface. The test computer generates a corresponding USB communication instruction based on the USB communication protocol, generates a serial communication instruction based on the serial protocol, and sends the USB communication instruction and the serial communication instruction to the USB interface. When the test computer receives response information returned by the USB module based on the USB communication instruction, the USB module can be considered to be connected with the test computer based on the USB interface at the moment; when the test computer receives response information returned by the USB module based on the USB communication instruction, the USB module can be considered to be connected with the test computer based on the serial port.
Furthermore, the test computer generates a sleep configuration instruction based on the sleep mode parameters and the connection mode, and sends the sleep configuration instruction to the USB module, so that the USB module performs configuration of the sleep mode according to the sleep mode parameters in the sleep configuration instruction.
In this embodiment, because the dormancy instruction is generated based on the connection mode, the application can be compatible with different connection modes, thereby improving the efficiency of the dormancy pressure test.
In one embodiment, determining a protocol type of a driver protocol and obtaining a corresponding keyword library according to the protocol type includes: when the protocol type is a character type, acquiring a keyword library corresponding to the character type; the keyword library corresponding to the character type comprises a first keyword and a second keyword; determining target level parameters of each control pin in the USB component to be tested based on the driving protocol and the keyword library comprises the following steps: screening a target paragraph corresponding to the control pin from the driving protocol according to the first keyword; based on the second keyword, screening out position information among the control pins from the target section; and determining a target level parameter according to the position information.
The first keyword comprises names of control pins in each serial port interface. The second keyword is a participle with a position meaning, for example, the second keyword may be: first row, first place, first order, etc.
Specifically, when the protocol type of the driving protocol is a text type, the testing computer obtains a keyword library corresponding to the text type, searches a paragraph containing the name of the control pin in the driving protocol of the text type based on the name of each control pin, and calls the found paragraph as a target paragraph. Meanwhile, the testing computer searches the position information of each control pin in the target paragraph according to the second keyword, and determines the arrangement sequence of each control pin in the serial port interface based on the position information. For example, when the target paragraph is "DTR control pin is located at the first head of the first row; when the TXD (data sending end) control pin is located at the first row and the second position, "the test computer may determine, based on the second keyword, that the position information corresponding to the DTR control pin is the" first row and the first position "; the position information corresponding to the TXD control pin is 'first row second position', so that the test computer can determine the arrangement sequence between the DTR and the TXD according to the position information. And then, the test computer determines a target level parameter according to the arrangement sequence of the control pins.
In this embodiment, the target level parameter can be automatically determined based on the first keyword and the second keyword, so that the testing efficiency of the sleep pressure test can be improved.
In one embodiment, the sleep pressure test method further includes: when the operation of clicking the sleep power consumption acquisition control occurs, acquiring the real-time current of the USB component to be detected in the sleep state; the real-time current comprises a current value and acquisition time; determining an extreme current according to the current value and the acquisition time; and the real-time current and the extreme current are displayed in the sleep configuration page in a distinguishing manner, and the sleep power consumption of the USB component to be tested in the sleep time length is determined based on the real-time current and the extreme current.
The sleep configuration page is provided with a sleep power consumption acquisition control, and the sleep power consumption acquisition control is used for acquiring the power consumed by the USB module during sleep. The sleep power consumption includes a mean sleep power consumption and a general sleep power consumption. The mean value sleep power consumption is determined based on the real-time current, and can truly reflect the sleep power consumption information of the communication component to be detected in the sleep time length. The general sleep power consumption is power consumption information determined based on the real-time current with the extreme current removed, and is used for reflecting a normal power consumption value which should be consumed when the communication component to be tested does not receive and transmit data and operates normally. Extreme current values refer to current bumps and current dips during the sleep period. When the USB component to be tested runs incorrectly, extreme current is generated.
Specifically, when the USB module is determined to be in the sleep state, the testing computer may obtain the real-time current in the USB module at a preset collection frequency. The real-time current comprises a current value and current acquisition time. The test computer sequences the real-time currents according to the acquisition time to obtain a real-time current sequence, and traverses each real-time current in the real-time current sequence. When the test computer obtains the real-time current of the current traversal sequence, the test computer determines a pre-sequence real-time current which is adjacent to the real-time current of the current traversal sequence and is positioned before the real-time current of the current traversal sequence, and a post-sequence real-time current which is adjacent to the real-time current of the current traversal sequence and is positioned after the real-time current of the current traversal sequence. The test computer extracts the current value of the real-time current of the current traversal sequence, the current value of the preorder real-time current and the current value of the subsequent real-time current, and when the current value of the real-time current of the current traversal sequence is larger than the current value of the preorder real-time current and smaller than the current value of the subsequent real-time current, the real-time current of the current traversal sequence can be considered as a current protrusion, and at the moment, the test computer judges the real-time current of the current traversal sequence as an extreme current. When the current value of the real-time current of the current traversal sequence is smaller than the current value of the pre-sequence real-time current and smaller than the current value of the subsequent real-time current, the real-time current of the current traversal sequence can be considered as a current sudden drop, and at the moment, the real-time current of the current traversal sequence is judged as an extreme current by the testing computer.
The sleep configuration page has a display area for displaying the real-time current and the extreme current collected. The presentation forms include, but are not limited to, a graph presentation and a list presentation as shown in fig. 5. FIG. 5A is a schematic diagram illustrating tabulated real-time current in one embodiment; FIG. 5B is a graph showing real-time current in one embodiment. After the extreme current is determined, the test computer may draw a current curve with the collection time as an abscissa and the current value as an ordinate, display the drawn current curve in the display area, and then distinguish and display the extreme current in the current curve based on the collection time of the extreme current, for example, highlight the extreme current in the drawn current curve according to the collection time and the current value of the extreme current. Alternatively, after determining the extreme current, the testing computer may generate a current list based on the acquisition time and the current value, and display the generated current list in the display area, and then distinguish the display of the extreme current in the current list based on the acquisition time of the extreme current.
Furthermore, the testing computer counts the number value of the real-time current received in the sleep duration, superimposes the current values of the real-time currents to obtain the current sum, and obtains the mean sleep power consumption according to the current sum and the number value, so that a user can determine the real sleep power consumption of the USB component to be tested in the sleep duration based on the mean sleep power consumption. The test computer deletes the extreme current from all the received real-time currents, and then calculates the general sleep power consumption based on the real-time current with the extreme current deleted, so that a user can determine the specific power consumption value which should be consumed by the USB component to be tested in an ideal state within the sleep time period based on the general sleep power consumption, namely the power consumption value which should be consumed under the condition of normal operation without receiving the transmitted data at all. Therefore, the user can further analyze the running state of the USB component to be tested based on the average sleep power consumption and the general sleep power consumption.
In this embodiment, because gather real-time current based on automatic test script is automatic, consequently compare in traditional manual collection current value, extreme current can accurately be learnt to this application to confirm accurate dormancy consumption based on extreme current and real-time current.
In one embodiment, determining the extreme current from the current value and the acquisition time comprises: acquiring a tracing point template and setting parameters; according to the setting parameters, determining the tracing point coordinates corresponding to the current value and the acquisition time; drawing a current trend curve on a tracing point template based on the tracing point coordinates; the corner points in the current trend curve are determined as extreme currents.
Specifically, the test computer stores a tracing point template and setting parameters configured for the tracing point template in advance. The dotted template refers to a template that includes coordinate axes but does not include a current curve. The setting parameters include an axis coordinate scale value and a Y-axis coordinate unit. The axis coordinate scale values include a Y-axis coordinate scale value, and an X-axis coordinate scale value. The scale value of the axis coordinate is numerical information represented by unit scales on the axis coordinate; the axis coordinate unit refers to unit information of a coordinate axis, for example, an axis coordinate unit of the Y axis may be milliampere, and a corresponding axis coordinate scale value may be 1, so that each unit scale on the Y axis coordinate may be represented as 1 milliampere. When all real-time currents in the sleep state are obtained, the testing computer obtains the setting information of the USB module, and determines the unit information of the current value in the obtained real-time currents according to the setting information of the USB module, for example, the unit of the output current value appointed in the setting information of the programmable power supply is milliampere. The test computer obtains a conversion relation between a preset axis coordinate unit and the setting information, and converts a unit of a current value in the real-time current into a Y-axis coordinate unit based on the conversion relation.
Further, the testing computer sequences all real-time currents in the dormant duration according to the acquisition time to obtain a real-time current sequence, and traverses the first real-time current sequence according to the sequence to convert each real-time current into a trace point in the trace point template. More specifically, the test computer obtains the real-time current of the current traversal order and records the sequence value of the current traversal order, for example, the test computer is provided with a sequence value with an initial value of 0, and when the test computer obtains the real-time current at the head of the real-time current sequence, the test computer sets the sequence value to 1; when the testing computer obtains the next real-time current behind the real-time current sequence header, the testing computer adds 1 to the sequence value, and the sequence value at the moment is 2. The test computer divides the current value in the real-time current by the scale value of the Y-axis coordinate to obtain a Y-axis description point corresponding to the real-time current of the current traversal sequence, divides the sequence value corresponding to the current traversal sequence by the scale value of the X-axis to obtain an X-axis description point corresponding to the real-time current of the current traversal sequence, combines the X-axis description point and the Y-axis description point to obtain a tracing point coordinate, and draws the tracing point corresponding to the real-time current of the current traversal sequence in a tracing point template based on the tracing point coordinate. When the real-time current sequence is traversed, the testing computer is connected with each tracing point in the tracing point template to obtain a current trend curve, so that the testing computer can perform curve identification on the current trend curve, and angular points in the current trend curve, namely the salient point and the salient drop point, are judged as extreme current values.
In one embodiment, the test computer correspondingly displays the current trend curve, obtains the extreme current value selected by the user in the current trend curve, and correspondingly corrects and identifies the generated extreme current value according to the extreme current value selected by the user, so that the accuracy of determining the extreme current value is improved.
In the embodiment, the angular points in the current trend curve can be quickly identified by drawing the current trend curve; the corner point can be determined as the extreme current by quickly determining the corner point, so that the determination efficiency of the extreme current can be improved, and the determination efficiency of the dormancy power consumption can be improved.
In one embodiment, there is provided a sleep pressure test system, the system comprising: testing a computer and a USB component to be tested; the USB component to be tested comprises a power supply, a testing bottom plate, a relay and a USB module; the power supply is used for supplying voltage to the test baseplate and the relay; the testing computer is used for displaying the sleep configuration page, acquiring a communication address, a power-off frequency and a driving protocol of the USB component to be tested based on the sleep configuration page, generating a sleep control instruction based on the driving protocol and the power-off frequency, and sending the sleep control instruction to the USB component to be tested corresponding to the communication address; the testing bottom plate is used for receiving the dormancy control instruction and controlling the opening and closing of the relay according to the power-off frequency in the dormancy control instruction; the relay is used for transmitting the voltage provided by the power supply to the USB module when the relay is closed; when the USB module is disconnected, the voltage provided by a power supply is suspended from being transmitted to the USB module; the USB module is used for entering a dormant state when voltage is not received; upon receiving the voltage, a wake-up state is entered from the sleep state.
Specifically, as shown in fig. 3, the power supply is connected to the test substrate and the relay to supply power to the test substrate and the relay. For example, the power supply may provide a 5V voltage to the test substrate and the relay. The testing computer is connected with the testing bottom plate through the serial port line, a dormancy pressure testing application runs in the testing computer, and the level state of a DTR control pin in the testing bottom plate can be controlled to turn over based on the dormancy pressure testing application. For example, the test computer can generate a sleep control instruction and send the sleep control instruction to the connection serial port in the test backplane, so that the serial port interface can repeatedly convert from 0 volt to 1.8 volt or from 1.8 volt to 0 volt according to the sleep control instruction. A DTR control pin in the test board is connected to an input section of the relay, and when the DTR pin is 1.8V, the relay is in a closed state, and at this time, the output terminal of the relay supplies the voltage provided by the power supply, for example, in the above example, the relay outputs 5V voltage; when the DTR pin is 0V, the relay is in an off state, and the output end of the relay does not provide voltage at the moment. The output end of the relay is connected with the USB module, so that when the relay does not output voltage, the USB module enters a dormant state, and when the relay outputs voltage, the USB module enters a wakeup state.
In this embodiment, because only need control the level state of DTR pin, can realize the dormancy control to the USB module, consequently, compare in traditional needs and manually break, supply power for the USB module, this application can promote the efficiency of dormancy pressure test.
In one embodiment, the test computer is further configured to obtain a preset communication instruction and send the communication instruction to the USB module according to the power-off frequency; and when the reply information of the USB module to the communication instruction is received, judging that the USB module is in an awakening state.
Specifically, the relay is closed and opened according to the power-off frequency, so that the test computer can judge whether the relay is in a closed state or not according to the power-off frequency, and the running state of the USB module at the moment is determined. The test computer obtains a preset communication instruction and sends the communication instruction to the USB module in a wired or wireless mode according to the power-off frequency. And when the USB module receives the communication instruction and is in an awakening state, generating reply information based on the communication instruction and returning the reply information to the computer to be tested. When the USB module receives the communication instruction but is in the dormant state, the USB module discards the communication instruction. Therefore, the testing computer can judge that the USB module is in the awakening state when receiving the reply information, and further can count the success probability of the USB module entering the dormant state in the preset counting time period.
In this embodiment, since the communication instruction is sent to the USB module at the power-off frequency, the success probability of the USB entering the sleep state can be determined according to the reply information, and then the USB module can be subsequently optimized according to the success probability.
It should be understood that although the steps in the flowcharts of fig. 2 and 4 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 6, there is provided a sleep pressure test apparatus 600 comprising: an information acquisition module 602, an instruction generation module 604, and a control module 606, wherein:
the information acquisition module 602 is configured to display a sleep configuration page, and determine a communication address, a power-off frequency, and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
the instruction generating module 604 is configured to determine a protocol type of the driver protocol, and obtain a corresponding keyword library according to the protocol type; determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library; generating a sleep control instruction according to the target level parameter and the power-off frequency;
the control module 606 is configured to issue the sleep control instruction to the to-be-tested USB component corresponding to the communication address, so that the to-be-tested USB component performs sleep and wake-up operations based on the sleep control instruction.
In one embodiment, the sleep pressure test apparatus 600 is further configured to, when an operation of clicking the sleep mode configuration control occurs, acquire a sleep mode parameter configured based on the sleep configuration page, and determine a connection manner with the USB module; generating a corresponding sleep configuration instruction based on the connection mode and the sleep mode parameter; and sending the sleep configuration instruction to the USB module so that the USB module performs corresponding configuration according to the sleep mode parameters in the sleep configuration instruction.
In one embodiment, the instruction generating module 604 further includes a keyword library obtaining module 6041, configured to obtain, when the protocol type is a text type, a keyword library corresponding to the text type; the keyword library corresponding to the character type comprises a first keyword and a second keyword; the USB component to be tested comprises a control pin; determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library comprises the following steps: screening a target paragraph corresponding to the control pin from the driving protocol according to the first keyword; based on the second keyword, screening out position information among the control pins from the target section; and determining a target level parameter according to the position information.
In one embodiment, the sleep pressure test apparatus 600 is further configured to, when the operation of clicking the sleep power consumption obtaining control occurs, obtain a real-time current of the USB component to be tested in sleep; the real-time current comprises a current value and acquisition time; determining an extreme current according to the current value and the acquisition time; and the real-time current and the extreme current are displayed in the sleep configuration page in a distinguishing manner, and the sleep power consumption of the USB component to be tested in the sleep time length is determined based on the real-time current and the extreme current.
In one embodiment, the resting pressure testing device 600 is further configured to obtain a dotting template and set parameters; according to the setting parameters, determining the tracing point coordinates corresponding to the current value and the acquisition time; drawing a current trend curve on a tracing point template based on the tracing point coordinates; the corner points in the current trend curve are determined as extreme currents.
For the specific definition of the resting pressure testing device, reference may be made to the above definition of the resting pressure testing method, which is not described herein again. The various modules in the above-described sleep pressure test apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a sleep pressure test method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
displaying a sleep configuration page, and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
determining a protocol type of a driving protocol, and acquiring a corresponding keyword library according to the protocol type;
determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library;
generating a sleep control instruction according to the target level parameter and the power-off frequency;
and issuing the sleep control instruction to the USB component to be tested corresponding to the communication address so that the USB component to be tested performs sleep pressure test based on the sleep control instruction.
In one embodiment, the sleep configuration page has a sleep mode configuration control therein; the USB component to be tested comprises a USB module; the processor, when executing the computer program, further performs the steps of:
when the operation of clicking the sleep mode configuration control occurs, acquiring sleep mode parameters configured based on a sleep configuration page and determining a connection mode with a USB module;
generating a corresponding sleep configuration instruction based on the connection mode and the sleep mode parameter;
and sending the sleep configuration instruction to the USB module so that the USB module performs corresponding configuration according to the sleep mode parameters in the sleep configuration instruction.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the protocol type is a character type, acquiring a keyword library corresponding to the character type; the keyword library corresponding to the character type comprises a first keyword and a second keyword;
the USB component to be tested comprises a control pin; determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library comprises the following steps:
screening a target paragraph corresponding to the control pin from the driving protocol according to the first keyword;
based on the second keyword, screening out position information among the control pins from the target section;
and determining a target level parameter according to the position information.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the operation of clicking the sleep power consumption acquisition control occurs, acquiring the real-time current of the USB component to be detected in the sleep state; the real-time current comprises a current value and acquisition time;
determining an extreme current according to the current value and the acquisition time;
and the real-time current and the extreme current are displayed in the sleep configuration page in a distinguishing manner, and the sleep power consumption of the USB component to be tested in the sleep time length is determined based on the real-time current and the extreme current.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring a tracing point template and setting parameters;
according to the setting parameters, determining the tracing point coordinates corresponding to the current value and the acquisition time;
drawing a current trend curve on a tracing point template based on the tracing point coordinates;
the corner points in the current trend curve are determined as extreme currents.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
displaying a sleep configuration page, and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
determining a protocol type of a driving protocol, and acquiring a corresponding keyword library according to the protocol type;
determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library;
generating a sleep control instruction according to the target level parameter and the power-off frequency;
and issuing the sleep control instruction to the USB component to be tested corresponding to the communication address so that the USB component to be tested performs sleep pressure test based on the sleep control instruction.
In one embodiment, the sleep configuration page has a sleep mode configuration control therein; the USB component to be tested comprises a USB module; the computer program when executed by the processor further realizes the steps of:
when the operation of clicking the sleep mode configuration control occurs, acquiring sleep mode parameters configured based on a sleep configuration page and determining a connection mode with a USB module;
generating a corresponding sleep configuration instruction based on the connection mode and the sleep mode parameter;
and sending the sleep configuration instruction to the USB module so that the USB module performs corresponding configuration according to the sleep mode parameters in the sleep configuration instruction.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the protocol type is a character type, acquiring a keyword library corresponding to the character type; the keyword library corresponding to the character type comprises a first keyword and a second keyword;
the USB component to be tested comprises a control pin; determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library comprises the following steps:
screening a target paragraph corresponding to the control pin from the driving protocol according to the first keyword;
based on the second keyword, screening out position information among the control pins from the target section;
and determining a target level parameter according to the position information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the operation of clicking the sleep power consumption acquisition control occurs, acquiring the real-time current of the USB component to be detected in the sleep state; the real-time current comprises a current value and acquisition time;
determining an extreme current according to the current value and the acquisition time;
and the real-time current and the extreme current are displayed in the sleep configuration page in a distinguishing manner, and the sleep power consumption of the USB component to be tested in the sleep time length is determined based on the real-time current and the extreme current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a tracing point template and setting parameters;
according to the setting parameters, determining the tracing point coordinates corresponding to the current value and the acquisition time;
drawing a current trend curve on a tracing point template based on the tracing point coordinates;
the corner points in the current trend curve are determined as extreme currents.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A sleep pressure test method, the method comprising:
displaying a sleep configuration page, and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
determining a protocol type of the driving protocol, and acquiring a corresponding keyword library according to the protocol type;
determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library;
generating a sleep control instruction according to the target level parameter and the power-off frequency;
and issuing the sleep control instruction to the USB component to be tested corresponding to the communication address so as to enable the USB component to be tested to carry out sleep pressure test based on the sleep control instruction.
2. The method of claim 1, wherein the sleep configuration page has a sleep mode configuration control therein; the USB component to be tested comprises a USB module; the method further comprises the following steps:
when the operation of clicking the sleep mode configuration control occurs, acquiring sleep mode parameters configured based on the sleep configuration page and determining a connection mode with the USB module;
generating a corresponding sleep configuration instruction based on the connection mode and the sleep mode parameter;
and sending the sleep configuration instruction to the USB module so that the USB module performs corresponding configuration according to the sleep mode parameters in the sleep configuration instruction.
3. The method of claim 1, wherein the determining a protocol type of the driver protocol and obtaining a corresponding keyword library according to the protocol type comprises:
when the protocol type is a character type, acquiring a keyword library corresponding to the character type; the keyword library corresponding to the character type comprises a first keyword and a second keyword;
the USB component to be tested comprises a control pin; the determining the target level parameter of the USB component to be tested based on the driving protocol and the keyword library comprises:
screening out a target paragraph corresponding to the control pin from the driving protocol according to the first keyword;
screening out position information among all control pins from a target section based on the second keyword;
and determining a target level parameter according to the position information.
4. The method of claim 1, wherein the sleep configuration page has a sleep power consumption acquisition control therein; the method further comprises the following steps:
when the operation of clicking the sleep power consumption acquisition control occurs, acquiring the real-time current of the USB component to be detected in the sleep state; the real-time current comprises a current value and acquisition time;
determining an extreme current according to the current value and the acquisition time;
and displaying the real-time current and the extreme current in the sleep configuration page in a distinguishing manner, and determining the sleep power consumption of the USB component to be tested in the sleep duration based on the real-time current and the extreme current.
5. The method of claim 4, wherein determining an extreme current from the current values and acquisition times comprises:
acquiring a tracing point template and setting parameters;
according to the setting parameters, determining the tracing point coordinates corresponding to the current value and the acquisition time;
drawing a current trend curve on the tracing point template based on the tracing point coordinates;
and judging the corner points in the current trend curve as extreme currents.
6. A sleep pressure test system, the system comprising: testing a computer and a USB component to be tested; the USB component to be tested comprises a power supply, a testing bottom plate, a relay and a USB module;
the power supply is used for supplying voltage to the test baseplate and the relay;
the testing computer is used for displaying the sleep configuration page, acquiring a communication address, a power-off frequency and a driving protocol of the USB component to be tested based on the sleep configuration page, generating a sleep control instruction based on the driving protocol and the power-off frequency, and issuing the sleep control instruction to the USB component to be tested corresponding to the communication address;
the testing bottom plate is used for receiving the dormancy control instruction and controlling the opening and closing of the relay according to the power-off frequency in the dormancy control instruction;
the relay is used for transmitting the voltage provided by the power supply to the USB module when the relay is closed; when the USB module is disconnected, the voltage provided by the power supply is suspended from being transmitted to the USB module;
the USB module is used for entering a dormant state when voltage is not received; upon receiving the voltage, a wake-up state is entered from the sleep state.
7. The system of claim 6, wherein the test computer is further configured to obtain a preset communication command and send the communication command to the USB module according to a power-off frequency; and when the reply information of the USB module to the communication instruction is received, judging that the USB module is in an awakening state.
8. A sleep pressure test apparatus, the apparatus comprising:
the information acquisition module is used for displaying a sleep configuration page and determining a communication address, a power-off frequency and a driving protocol of a USB component to be tested configured based on the sleep configuration page;
the instruction generation module is used for determining the protocol type of the driving protocol and acquiring a corresponding keyword library according to the protocol type; determining a target level parameter of the USB component to be tested based on the driving protocol and the keyword library; generating a sleep control instruction according to the target level parameter and the power-off frequency;
and the control module is used for sending the sleep control instruction to the USB component to be tested corresponding to the communication address so as to enable the USB component to be tested to carry out sleep and awakening operations based on the sleep control instruction.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010435865.6A 2020-05-21 2020-05-21 Sleep pressure test method, system, computer device and storage medium Active CN111752774B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010435865.6A CN111752774B (en) 2020-05-21 2020-05-21 Sleep pressure test method, system, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010435865.6A CN111752774B (en) 2020-05-21 2020-05-21 Sleep pressure test method, system, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN111752774A true CN111752774A (en) 2020-10-09
CN111752774B CN111752774B (en) 2024-03-15

Family

ID=72673472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010435865.6A Active CN111752774B (en) 2020-05-21 2020-05-21 Sleep pressure test method, system, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN111752774B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235088A1 (en) * 2004-04-20 2005-10-20 Hynix Semiconductor Inc. Multi-protocol serial interface system
CN102023912A (en) * 2009-09-11 2011-04-20 鸿富锦精密工业(深圳)有限公司 Dormancy wake-up testing system and method
CN102937928A (en) * 2011-08-16 2013-02-20 鸿富锦精密工业(深圳)有限公司 Main board sleeping and waking device
US20130117489A1 (en) * 2011-11-03 2013-05-09 Nvidia Corporation Usb host wake from sleep state for mobile devices
CN108563600A (en) * 2018-04-26 2018-09-21 上海移远通信技术股份有限公司 Switching circuit and device for the test of electronic product dormancy power consumption

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235088A1 (en) * 2004-04-20 2005-10-20 Hynix Semiconductor Inc. Multi-protocol serial interface system
CN102023912A (en) * 2009-09-11 2011-04-20 鸿富锦精密工业(深圳)有限公司 Dormancy wake-up testing system and method
CN102937928A (en) * 2011-08-16 2013-02-20 鸿富锦精密工业(深圳)有限公司 Main board sleeping and waking device
US20130117489A1 (en) * 2011-11-03 2013-05-09 Nvidia Corporation Usb host wake from sleep state for mobile devices
CN108563600A (en) * 2018-04-26 2018-09-21 上海移远通信技术股份有限公司 Switching circuit and device for the test of electronic product dormancy power consumption

Also Published As

Publication number Publication date
CN111752774B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN111639002B (en) Sleep power consumption testing method, system, computer equipment and storage medium
CN107391021B (en) Recognition methods, device, storage medium and the mobile terminal of blank screen gesture
CN104516812A (en) Method and device for testing software
WO2022217484A1 (en) Method and apparatus for testing vehicle-mounted sensor system, and computer device
CN105120259A (en) Detection method and apparatus for digital television
CN113077834A (en) Storage device testing method and device, television and storage medium
CN113268416A (en) Application program testing method and device, storage medium and terminal
CN106776259A (en) A kind of mobile terminal frame rate detection method, device and mobile terminal
CN107450953B (en) Method and device for updating BIOS
CN111858364A (en) Parameter configuration method, device and system of test terminal
CN214896630U (en) Fingerprint sensing device
CN113703792A (en) Firmware remote upgrade test method, device, server and medium
CN111752774A (en) Dormancy pressure testing method, system, computer device and storage medium
WO2018227475A1 (en) Fingerprint chip detection method, device and system
CN109491825B (en) Method, device, storage medium and terminal for positioning abnormal starting problem
CN113434179B (en) Online upgrade method, device and equipment of programmable power supply and storage medium
CN115687146A (en) BIOS (basic input output System) test method and device, computer equipment and storage medium
CN106843440B (en) A kind of mobile terminal restarts control method, device and mobile terminal
CN115114152A (en) Automatic testing method and system based on control attribute and image recognition, electronic equipment and storage medium
CN114327779A (en) Application operation environment building method and device and storage medium
CN114064485A (en) Software testing method, system, computer equipment and readable storage medium
CN116047259A (en) Detection system and detection method
CN117631793B (en) Reset method, reset device, computer equipment and storage medium
TWI581089B (en) Power state testing system
CN110008105A (en) A kind of BMC time reservation method, device and electronic equipment and storage medium

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