Method, device, computer equipment and storage medium for testing solid state drive support for D3 characteristics

By disabling the automatic power switching function and sending power state switching commands, the D3 low power consumption state of the solid state drive is directly tested on the test host, solving the problem of low testing efficiency in the existing technology and achieving efficient D3 feature testing.

CN111949460BActive Publication Date: 2024-11-12SHENZHEN YILIAN INFORMATION SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010807391.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-12
Publication Date
2024-11-12
Estimated Expiration
2040-08-12

AI Technical Summary

Technical Problem

The prior art requires professional equipment and a long time to test the D3 low-power characteristics of solid-state drives, which is inefficient.

Method used

By disabling the automatic power switching function of the device to be tested, sending a power state switching command to control the SSD to enter the D3 low power state, and obtaining the power state value to determine the current state, realizing testing without specialized equipment.

Benefits of technology

Improves testing efficiency, reduces testing time, and simplifies the testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111949460B_ABST
    Figure CN111949460B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, device, computer equipment and storage medium for testing whether a solid-state hard disk supports D3 characteristics. The method comprises the following steps: disabling the automatic power switching function of a device to be tested so that the solid-state hard disk of the device to be tested maintains a normal power supply state; sending a power state switching command to the device to be tested to control the solid-state hard disk to enter a D3 low power consumption state; obtaining a power state value returned by the solid-state hard disk, and determining the current power state of the solid-state hard disk according to the power state value. The present invention disables the automatic power switching function of the device to be tested through a test host, and sends a power state switching command to the device to be tested, controls the solid-state hard disk to enter a D3 low power consumption state, and finally obtains the power state value returned by the solid-state hard disk, and determines the current power state of the solid-state hard disk according to the power state value. The entire test process does not need to access special test equipment and instruments, thereby improving test efficiency and reducing test time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of solid state drive testing, and more specifically to a method, device, computer equipment and storage medium for testing a solid state drive supporting D3 characteristics. Background Art

[0002] SSD (Solid State Disk or Solid State Drive), commonly known as solid-state hard disk, is a hard disk made of solid-state electronic storage chip array. SSD is generally used as data storage hardware in computer equipment / notebooks.

[0003] Microsoft requires that devices connected to the PCIe bus must support the D3 low-power feature, which is designed to enhance the low-energy consumption experience and fast response capabilities of notebook devices when notebook users use solid-state drives.

[0004] The existing solution adopts the low-power PCIe bus analysis method, which includes the following steps: connecting the device to the bus analyzer; using dedicated software to capture and analyze the trace; obtaining the behavior trace in the D3 state. This bus analysis method requires professional instrumentation and the analysis process is slow.

[0005] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to those skilled in the art. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the prior art and provide a method, device, computer equipment and storage medium for testing whether a solid state drive supports D3 characteristics.

[0007] To achieve the above object, the present invention adopts the following technical solutions:

[0008] In a first aspect, the present invention provides a method for testing whether a solid state drive supports D3 characteristics, comprising the following steps:

[0009] Disable the automatic power switching function of the device under test to keep the solid-state hard disk of the device under test in normal power supply state;

[0010] Send a power state switching command to the device under test to control the solid-state drive to enter the D3 low-power state;

[0011] The power state value returned by the solid state hard disk is obtained, and the current power state of the solid state hard disk is determined according to the power state value.

[0012] In a second aspect, the present invention provides a device for testing whether a solid state drive supports D3 characteristics, comprising:

[0013] A function disabling unit, used to disable the automatic power switching function of the device under test, so that the solid state hard disk of the device under test maintains a normal power supply state;

[0014] A state switching unit, used to send a power state switching command to the device under test to control the solid state drive to enter the D3 low power consumption state;

[0015] The state determination unit is used to obtain the power state value returned by the solid state hard disk, and determine the current power state of the solid state hard disk according to the power state value.

[0016] In a third aspect, the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for testing the support of the D3 feature of a solid-state drive as described above is implemented.

[0017] In a fourth aspect, the present invention provides a storage medium storing a computer program, which, when executed by a processor, can implement the method for testing the support of the D3 feature of a solid-state drive as described above.

[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention disables the automatic power switching function of the device to be tested through the test host, sends a power state switching command to the device to be tested, controls the solid-state hard disk to enter the D3 low power consumption state, and finally obtains the power state value returned by the solid-state hard disk, and determines the current power state of the solid-state hard disk according to the power state value. The entire test process does not need to connect to special test equipment and instruments, thereby improving test efficiency and reducing test time.

[0019] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0021] Figure 1 A schematic diagram of a flow chart of a method for testing a solid state drive supporting D3 characteristics provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of a sub-flow diagram of a method for testing a solid-state drive supporting D3 characteristics provided by an embodiment of the present invention;

[0023] Figure 3A schematic flow chart of a method for testing a solid state drive supporting D3 characteristics provided by another embodiment of the present invention;

[0024] Figure 4 A schematic block diagram of a device for testing a solid state drive supporting D3 characteristics provided by an embodiment of the present invention;

[0025] Figure 5 A schematic block diagram of a state determination unit of a device for testing a solid state drive supporting D3 characteristics provided by an embodiment of the present invention;

[0026] Figure 6 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0029] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0031] Figure 1 FIG. 1 is a flow chart of a method for testing a solid state drive supporting D3 characteristics provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110 to S130.

[0032] S110: Disable the automatic power switching function of the device under test to keep the solid state hard disk of the device under test in a normal power supply state.

[0033] In this embodiment, the device to be tested, such as a laptop computer, has an automatic power switch function on its motherboard or central chip. The automatic power switch function of the device to be tested is disabled to ensure that the corresponding solid-state drive remains in a normal power supply state by default and will only switch to the D3 low power state according to subsequent test commands. This can prevent the device to be tested from controlling the solid-state drive to automatically enter / exit the D3 low power state according to its set conditions, thereby affecting the accuracy of the corresponding solid-state drive test.

[0034] S120, sending a power state switching command to the device to be tested to control the solid state drive to enter the D3 low power consumption state.

[0035] In this embodiment, before testing, the device to be tested, which is equipped with a solid-state hard disk, is connected to a test host that supports D3 low-power state switching. The test host sends a power state switching command to the solid-state hard disk to control the solid-state hard disk to enter or exit the D3 low-power state, and determines whether the solid-state hard disk enters the D3 low-power state through the debugging information output by the serial port of the solid-state hard disk.

[0036] Specifically, the above-mentioned power state switching command is an NVMe command that can switch the power state.

[0037] S130, obtaining a power status value returned by the solid state hard disk, and determining a current power status of the solid state hard disk according to the power status value.

[0038] In this embodiment, the power state value corresponds to the state switching of the solid-state drive. For example, when the power state value is "D3-Skip normal PS4", it means that the solid-state drive has successfully entered the D3 low-power state; and when the power state value is "D3-Skip normal PS4", it is determined that the solid-state drive has not successfully entered the D3 low-power state. The power state switching command is sent up and down on the test host. After the solid-state drive executes the power state switching command, the solid-state drive will output the corresponding debugging information or serial port log. The debugging information records the power state value of the solid-state drive. According to the power state value in the debugging information, the test result of the solid-state drive D3 low-power mode can be obtained without connecting to a specific test instrument, and the test process is more efficient.

[0039] refer to Figure 2 In one embodiment, step S130 includes steps S131-S135.

[0040] S131. Obtain debugging information output by the solid state drive.

[0041] S132: parse the debugging information to obtain a power state value of the debugging information.

[0042] S133: Determine whether the solid state hard disk enters the D3 low power consumption state according to the power state value.

[0043] S134. If the power state value is "D3-Skip normal PS4", it is determined that the solid state drive has successfully entered the D3 low power consumption state.

[0044] S135, after controlling the solid state hard disk to maintain the D3 low power consumption state for a specified time, wake up the solid state hard disk through a data read command to enter a normal working state.

[0045] S136: If the power state value is "Dx to D0 (ISR)", it is determined that the solid state drive has not successfully entered the D3 low power state.

[0046] In this embodiment, after determining that the solid state drive has successfully entered the D3 low power state, the solid state drive is controlled to maintain the D3 low power state for a specified time, and finally the solid state drive is awakened by a read data command to enter a normal working state to complete the entire test.

[0047] The present invention disables the automatic power switching function of the device to be tested by the test host, sends a power state switching command to the device to be tested, controls the solid-state hard disk to enter the D3 low power consumption state, finally obtains the power state value returned by the solid-state hard disk, and determines the current power state of the solid-state hard disk according to the power state value. The entire test process does not need to access special test equipment and instruments, thereby improving test efficiency and reducing test time.

[0048] Figure 3 FIG. 2 is a flow chart of a method for testing a solid state drive supporting D3 characteristics provided by another embodiment of the present invention. Figure 3 As shown, the method for testing the solid state drive supporting the D3 feature in this embodiment includes steps S210-S240. Steps S220-S240 are similar to steps S110-S130 in the above embodiment and are not described in detail. The added step S210 in this embodiment is described in detail below.

[0049] S210, connecting the device to be tested equipped with a solid state drive to a test host that supports D3 low power state switching.

[0050] In this embodiment, before testing, the device to be tested, which is equipped with a solid-state hard disk, is connected to a test host that supports D3 low-power state switching. The test host sends a power state switching command to the solid-state hard disk to control the solid-state hard disk to enter or exit the D3 low-power state, and determines whether the solid-state hard disk enters the D3 low-power state through the debugging information output by the serial port of the solid-state hard disk.

[0051] Figure 4FIG. 1 is a schematic block diagram of a device for testing a solid state drive supporting D3 characteristics provided by an embodiment of the present invention. Figure 4 As shown, corresponding to the above method for testing the solid state drive for supporting the D3 feature, the present invention also provides a device for testing the solid state drive for supporting the D3 feature. The device for testing the solid state drive for supporting the D3 feature includes a unit for executing the above method for testing the solid state drive for supporting the D3 feature, and the device can be configured in a desktop computer, a tablet computer, a laptop computer, and other terminals. Specifically, please refer to Figure 4 The device for testing whether a solid state drive supports D3 characteristics includes a pre-connection unit 10, a function disabling unit 20, a state switching unit 30 and a state determining unit 40.

[0052] The pre-connection unit 10 is used to connect the device to be tested equipped with a solid state hard disk to a test host supporting D3 low power state switching.

[0053] In this embodiment, before testing, the device to be tested, which is equipped with a solid-state hard disk, is connected to a test host that supports D3 low-power state switching. The test host sends a power state switching command to the solid-state hard disk to control the solid-state hard disk to enter or exit the D3 low-power state, and determines whether the solid-state hard disk enters the D3 low-power state through the debugging information output by the serial port of the solid-state hard disk.

[0054] The function disabling unit 20 is used to disable the automatic power switching function of the device under test so that the solid state hard disk of the device under test maintains a normal power supply state.

[0055] In this embodiment, the device to be tested, such as a laptop computer, has an automatic power switch function on its motherboard or central chip. The automatic power switch function of the device to be tested is disabled to ensure that the corresponding solid-state drive remains in a normal power supply state by default and will only switch to the D3 low power state according to subsequent test commands. This can prevent the device to be tested from controlling the solid-state drive to automatically enter / exit the D3 low power state according to its set conditions, thereby affecting the accuracy of the corresponding solid-state drive test.

[0056] The state switching unit 30 is used to send a power state switching command to the device to be tested to control the solid state hard disk to enter the D3 low power consumption state.

[0057] In this embodiment, before testing, the device to be tested, which is equipped with a solid-state hard disk, is connected to a test host that supports D3 low-power state switching. The test host sends a power state switching command to the solid-state hard disk to control the solid-state hard disk to enter or exit the D3 low-power state, and determines whether the solid-state hard disk enters the D3 low-power state through the debugging information output by the serial port of the solid-state hard disk.

[0058] Specifically, the above-mentioned power state switching command is an NVMe command that can switch the power state.

[0059] The state determination unit 40 is used to obtain the power state value returned by the solid state hard disk, and determine the current power state of the solid state hard disk according to the power state value.

[0060] In this embodiment, the power state value corresponds to the state switching of the solid-state drive. For example, when the power state value is "D3-Skip normal PS4", it means that the solid-state drive has successfully entered the D3 low-power state; and when the power state value is "D3-Skip normal PS4", it is determined that the solid-state drive has not successfully entered the D3 low-power state. The power state switching command is sent up and down on the test host. After the solid-state drive executes the power state switching command, the solid-state drive will output the corresponding debugging information or serial port log. The debugging information records the power state value of the solid-state drive. According to the power state value in the debugging information, the test result of the solid-state drive D3 low-power mode can be obtained without connecting to a specific test instrument, and the test process is more efficient.

[0061] refer to Figure 5 The state determination unit 40 includes an information acquisition subunit 41, an information analysis subunit 42, a state determination subunit 43, a first determination subunit 44, a second determination subunit 45 and a state awakening subunit 46.

[0062] The information acquisition subunit 41 is used to acquire the debugging information output by the solid state drive.

[0063] The information parsing subunit 42 is used to parse the debugging information to obtain the power state value of the debugging information.

[0064] The state judgment subunit 43 is used to judge whether the solid state hard disk enters the D3 low power consumption state according to the power state value.

[0065] The first determination subunit 44 is configured to determine that the solid state hard disk successfully enters the D3 low power consumption state when the power state value is “D3-Skip normal PS4”.

[0066] The state awakening subunit 46 is used to control the solid state hard disk to maintain the D3 low power consumption state for a specified time, and then awaken the solid state hard disk to enter a normal working state through a data read command.

[0067] The second determination subunit 45 is used to determine that the solid state hard disk has not successfully entered the D3 low power consumption state when the power state value is "Dx to D0 (ISR)".

[0068] In this embodiment, after determining that the solid state drive has successfully entered the D3 low power state, the solid state drive is controlled to maintain the D3 low power state for a specified time, and finally the solid state drive is awakened by a read data command to enter a normal working state to complete the entire test.

[0069] The present invention disables the automatic power switching function of the device to be tested by the test host, sends a power state switching command to the device to be tested, controls the solid-state hard disk to enter the D3 low power consumption state, finally obtains the power state value returned by the solid-state hard disk, and determines the current power state of the solid-state hard disk according to the power state value. The entire test process does not need to access special test equipment and instruments, thereby improving test efficiency and reducing test time.

[0070] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned device and each unit for testing the support of the D3 feature of the solid-state drive can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0071] See also Figure 6 , Figure 6 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.

[0072] See also Figure 6 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0073] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a method for testing whether the solid state drive supports the D3 feature.

[0074] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0075] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for testing whether the solid state drive supports the D3 feature.

[0076] The network interface 505 is used to communicate with other devices over the network. Figure 6 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0077] The processor 502 is used to run a computer program 5032 stored in the memory.

[0078] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0079] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0080] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium.

[0081] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0082] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0083] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0084] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0086] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for testing whether a solid state drive supports D3 characteristics, characterized in that: The following steps are involved: Connect the device to be tested with a solid-state drive to a test host that supports D3 low-power state switching; Disable the automatic power switching function of the device under test to keep the solid-state hard disk of the device under test in normal power supply state; Send a power state switching command to the device under test to control the solid-state drive to enter the D3 low-power state; Obtaining a power status value returned by the solid state drive, and determining a current power status of the solid state drive according to the power status value; The step of obtaining the power status value returned by the solid state hard disk and determining the current power status of the solid state hard disk according to the power status value includes: Get the debugging information output by the SSD; Parse the debugging information to obtain the power status value of the debugging information; Determine whether the solid state drive enters the D3 low power consumption state according to the power state value; If the power status value is "D3-Skip normal PS4", it is determined that the solid state drive has successfully entered the D3 low power state; If the power state value is "Dx to D0(ISR)", it is determined that the solid state drive has not successfully entered the D3 low power state.

2. The method for testing whether a solid state drive supports D3 characteristics according to claim 1, characterized in that: After the step of determining that the solid state hard disk successfully enters the D3 low power consumption state, the method includes: After controlling the solid-state drive to maintain the D3 low-power state for a specified period of time, the solid-state drive is awakened by a read data command to enter a normal working state.

3. A device for testing whether a solid state drive supports D3 characteristics, characterized in that: include: A pre-connection unit, used to connect the device to be tested equipped with a solid-state hard disk to a test host supporting D3 low-power state switching; A function disabling unit, used to disable the automatic power switching function of the device under test, so that the solid state hard disk of the device under test maintains a normal power supply state; A state switching unit, used to send a power state switching command to the device under test to control the solid state drive to enter the D3 low power consumption state; A state determination unit, used to obtain a power state value returned by the solid state hard disk, and determine a current power state of the solid state hard disk according to the power state value; The state determination unit includes an information acquisition subunit, an information analysis subunit, a state determination subunit, a first determination subunit and a second determination subunit; The information acquisition subunit is used to acquire the debugging information output by the solid state drive; The information parsing subunit is used to parse the debugging information to obtain the power state value of the debugging information; The state judgment subunit is used to judge whether the solid state hard disk enters the D3 low power consumption state according to the power state value; The first determination subunit is used to determine that the solid state hard disk successfully enters the D3 low power consumption state when the power state value is "D3-Skip normal PS4"; The second determination subunit is used to determine that the solid state drive has not successfully entered the D3 low power consumption state when the power state value is "Dx to D0 (ISR)".

4. The device for testing the solid state drive for supporting D3 characteristics according to claim 3, characterized in that: The state determination unit also includes a state awakening subunit, which is used to control the solid state hard disk to maintain the D3 low power consumption state for a specified time, and then awaken the solid state hard disk to enter a normal working state through a data read command.

5. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method for testing the support of the D3 feature of a solid-state drive as claimed in any one of claims 1 to 2 when executing the computer program.

6. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for testing the support of the D3 feature of a solid-state drive as claimed in any one of claims 1 to 2 can be implemented.