Method and device for determining noise caused by ssd, computer device and storage medium
By recording the PCIe trace and measuring the latency of the solid-state drive while the terminal is powered by battery, the problem of difficulty in determining system audio noise caused by SSD in the existing technology is solved, and automatic and accurate noise judgment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU UNIONMEMORY INFORMATION SYST LTD
- Filing Date
- 2023-02-15
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies struggle to automatically determine whether solid-state drives (SSDs) will cause system audio noise, especially when the probability of such noise occurring is low, making it difficult to quantify and pinpoint the problem.
By connecting a PCIe protocol analyzer while the terminal is powered by battery, the PCIe trace of music playback is recorded, the latency of the solid-state drive responding to host commands in low power mode is measured, and the result is compared with a set threshold to determine whether it will cause system audio noise.
It enables automatic and accurate determination of whether a solid-state drive will cause system audio noise, avoiding the uncertainty of human hearing and improving the accuracy and efficiency of problem localization.
Smart Images

Figure CN116047187B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to solid-state drives, and more specifically to methods, apparatus, computer equipment, and storage media for determining noise caused by SSDs. Background Technology
[0002] Windows and Linux are not real-time operating systems, meaning they cannot guarantee that requests from software will reach the hardware for processing within a specific timeframe. This isn't a problem for most hardware or tasks, but it is a challenge for audio playback. During audio playback, the audio driver must frequently and promptly transmit data from the audio buffer to the underlying system and hardware. If this process exceeds the time limit, noticeable bubbling sounds will be heard during audio playback, affecting sound quality.
[0003] When a computer equipped with a specific solid-state drive makes a popping sound, it is difficult for users or problem analysts to pinpoint the cause. Discovering and verifying the problem can only be done by listening. If the probability of it occurring is low, it is even more difficult to quantify and is hard for humans to detect.
[0004] Therefore, it is necessary to design a new method to automatically determine whether a solid-state drive will cause system audio noise. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, apparatus, computer equipment and storage medium for determining noise caused by SSDs.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for determining noise caused by SSDs, comprising:
[0007] When the terminal is powered by battery, connect the terminal to a PCIe protocol analyzer and record the PCIe trace of music playback;
[0008] The latency of the solid-state drive responding to host commands in low-power state is determined based on the PCIe trace;
[0009] Determine whether the delay time is greater than a set threshold;
[0010] If the delay time is greater than the set threshold, it is determined that the solid-state drive will cause system audio noise problems.
[0011] The further technical solution is as follows: after determining whether the delay time is greater than the set threshold, it also includes:
[0012] If the delay time is not greater than the set threshold, it is determined that the solid-state drive will not cause system audio noise problems.
[0013] The further technical solution is as follows: determining the latency of the solid-state drive responding to host commands in low-power state each time based on the PCIe trajectory includes:
[0014] The latency of the solid-state drive responding to host commands in low-power mode was observed using the PCIe trajectory timestamp function.
[0015] The further technical solution is as follows: the delay time refers to the duration of the delay when the terminal power is unplugged, the terminal enters the power saving mode, the solid-state drive meets the command-free interval time, the solid-state drive enters the low power consumption state under the drive of the host, the host sends a command to wake up the solid-state drive, and the solid-state drive responds with a delay.
[0016] The present invention also provides a device for determining noise caused by SSDs, comprising:
[0017] The recording unit is used to connect the terminal to a PCIe protocol analyzer and record the PCIe track of music playback when the terminal is in battery-powered mode.
[0018] The delay determination unit is used to determine the delay time of the solid-state drive in responding to host commands in low-power state each time, based on the PCIe trajectory.
[0019] The judgment unit is used to determine whether the delay time is greater than a set threshold.
[0020] The first determining unit is configured to determine that the solid-state drive will cause system audio noise problems if the delay time is greater than a set threshold.
[0021] Its further technical solutions include:
[0022] The second determining unit is used to determine that the solid-state drive will not cause system audio noise problems if the delay time is not greater than a set threshold.
[0023] The further technical solution is as follows: the delay determination unit is used to observe the delay time of the solid-state drive responding to host commands each time in a low-power state according to the PCIe trajectory timestamp function.
[0024] The present invention also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method.
[0025] The present invention also provides a storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0026] The beneficial effects of this invention compared with the prior art are as follows: This invention determines the delay time of the solid-state drive (SSD) in responding to host commands in low power state by using the recorded PCIe trajectory of music playback when the terminal battery is in a powered state. By using this time to determine the command response delay of the SSD in low power state, it is possible to determine whether it will cause system audio noise problems, thus realizing automatic determination of whether the SSD will cause system audio noise.
[0027] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A schematic diagram illustrating an application scenario of the method for determining noise caused by SSDs provided in this embodiment of the invention;
[0030] Figure 2 A flowchart illustrating the method for determining noise caused by SSDs provided in an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of a terminal in DC mode provided in an embodiment of the present invention;
[0032] Figure 4 A schematic block diagram of a device for determining noise caused by an SSD, provided in an embodiment of the present invention.
[0033] Figure 5 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0036] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0037] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0038] Please see Figure 1 and Figure 2 , Figure 1 This is a schematic diagram illustrating an application scenario of the method for determining noise caused by SSDs provided in this embodiment of the invention. Figure 2 This is a schematic flowchart illustrating a method for determining SSD-induced noise according to an embodiment of the present invention. This method is applied in a terminal that interacts with a solid-state drive (SSD). By measuring the command response latency of the SSD in a low-power state, it can accurately and proactively determine whether an SSD might cause system audio noise problems.
[0039] Specifically, the test was conducted using a terminal combined with a PCIe protocol analyzer, with a Windows or Linux operating system as the software environment and a PCIe interface solid-state drive as the solid-state drive.
[0040] Figure 2 This is a flowchart illustrating the method for determining noise caused by an SSD according to an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S150.
[0041] S110. When the terminal is powered by battery, connect the terminal to a PCIe protocol analyzer and record the PCIe trace of music playback.
[0042] In this embodiment, the PCIe (Peripheral Component Interconnect Express) track refers to the track recorded after the terminal is connected to the PCIe protocol analyzer and played for a period of time.
[0043] S120. Determine the latency of the solid-state drive responding to host commands each time in a low-power state based on the PCIe trace.
[0044] In this embodiment, the delay time refers to the duration of the delay when the terminal's power is turned off, the terminal enters power-saving mode, the solid-state drive meets the command-free interval time, the solid-state drive enters a low-power state under the host's drive, the host sends a command to wake up the solid-state drive, and the solid-state drive responds.
[0045] Specifically, the latency of the solid-state drive responding to host commands each time in a low-power state is observed using the PCIe trajectory timestamp function.
[0046] Please see Figure 3 The solid-state drive (SSD) command delay is as follows: When the terminal's power is unplugged and put into power-saving mode, the host will put the SSD into a low-power state as long as the "no command interval" is met. After that, the host will send a command to wake up the SSD or other commands, and the SSD will have a response delay.
[0047] S130. Determine whether the delay time is greater than a set threshold.
[0048] In this embodiment, during the process of using a computer with bubbling sounds, it was found that the solid-state drive (SSD) may frequently enter a low-power state during audio playback. Further investigation using PCIe trace revealed that the SSD producing bubbling sounds had a longer latency in responding to host commands in the low-power state than a normal SSD, and the longer the latency, the more pronounced the noise problem.
[0049] Taking Table 1 as an example, if the command response latency of a certain solid-state drive in low power mode is greater than x milliseconds, it is easy to cause system audio noise problems.
[0050] Table 1. Noise Test
[0051] Different solid-state drives Command response latency in low power mode Noise test #1 Approximately x milliseconds Cannot hear noise #2 Approximately y milliseconds (y is greater than x) Occasionally hear noise #3 Approximately z milliseconds (z is greater than y) Frequent noise #3 shortened from z to x milliseconds Cannot hear noise
[0052] As shown in Table 1, by measuring the command response latency of the solid-state drive (SSD) in a low-power state, it is possible to determine in advance and accurately whether an SSD might cause system audio noise problems.
[0053] S140. If the delay time is greater than the set threshold, it is determined that the solid-state drive will cause system audio noise problems.
[0054] S150. If the delay time is not greater than the set threshold, it is determined that the solid-state drive will not cause system audio noise problems.
[0055] In this embodiment, if the command response delay is greater than x milliseconds, it is considered that the solid-state drive will cause system audio noise problems, as shown in Table 2.
[0056] Table 2. Test Results
[0057] Solid State Drive Response Latency Is there audio noise? ≤x ms Test passed, no risk of audio noise. >x ms Test failure will cause system audio noise.
[0058] By measuring the command response latency of a solid-state drive (SSD) in a low-power state using a PCIe protocol analyzer, it can be determined whether it will cause system audio noise problems, without having to rely on human hearing.
[0059] The aforementioned method for determining SSD noise involves recording the PCIe traces of music playback while the terminal is powered by battery. This allows for the determination of the SSD's response time to host commands in low-power mode. By using this time to determine the SSD's command response latency in low-power mode, it is possible to determine whether it will cause system audio noise. This method enables automatic determination of whether an SSD will cause system audio noise.
[0060] Figure 4 This is a schematic block diagram of an SSD noise determination device 300 provided in an embodiment of the present invention. Figure 4 As shown, corresponding to the above-described method for determining SSD noise, the present invention also provides an SSD noise determination device 300. This SSD noise determination device 300 includes a unit for executing the above-described SSD noise determination method, and the device can be configured in a desktop computer, tablet computer, laptop computer, or other terminal. For details, please refer to... Figure 4 The noise determination device 300 for SSD includes a recording unit 301, a delay determination unit 302, a judgment unit 303, a first determination unit 304, and a second determination unit 305.
[0061] The recording unit 301 is used to connect the terminal to a PCIe protocol analyzer and record the PCIe trajectory of music playback when the terminal is in battery-powered mode; the delay determination unit 302 is used to determine the delay time of the solid-state drive responding to host commands in low-power mode based on the PCIe trajectory; the judgment unit 303 is used to determine whether the delay time is greater than a set threshold; the first determination unit 304 is used to determine that the solid-state drive will cause system audio noise problems if the delay time is greater than the set threshold; the second determination unit 305 is used to determine that the solid-state drive will not cause system audio noise problems if the delay time is not greater than the set threshold.
[0062] In one embodiment, the delay determination unit 302 is used to observe the delay time of the solid-state drive responding to host commands each time in a low-power state, based on the PCIe trajectory timestamp function.
[0063] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned SSD noise determination device 300 and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0064] The aforementioned noise detection device 300 for SSDs can be implemented as a computer program, which can, for example... Figure 5 It runs on the computer device shown.
[0065] Please see Figure 5 , Figure 5 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal, wherein the terminal can be an electronic device with communication functions such as a smartphone, tablet computer, laptop computer, desktop computer, personal digital assistant, and wearable device.
[0066] See Figure 5 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0067] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method for determining noise caused by the SSD.
[0068] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0069] 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 determining noise caused by the SSD.
[0070] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which 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 different component arrangements.
[0071] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps:
[0072] When the terminal is in battery-powered mode, connect the terminal to a PCIe protocol analyzer and record the PCIe trace of music playback; determine the latency of the solid-state drive responding to host commands in low-power mode based on the PCIe trace; determine whether the latency is greater than a set threshold; if the latency is greater than the set threshold, determine that the solid-state drive will cause system audio noise problems.
[0073] The delay time refers to the duration of the delay when the terminal's power is turned off, the terminal enters power-saving mode, the solid-state drive meets the command-free interval time, the solid-state drive enters a low-power state under the host's drive, the host sends a command to wake up the solid-state drive, and the solid-state drive responds.
[0074] In one embodiment, after performing the step of determining whether the delay time is greater than a set threshold, the processor 502 further performs the following steps:
[0075] If the delay time is not greater than the set threshold, it is determined that the solid-state drive will not cause system audio noise problems.
[0076] In one embodiment, when the processor 502 implements the step of determining the delay time for the solid-state drive to respond to host commands in a low-power state each time based on the PCIe trajectory, the specific steps are as follows:
[0077] The latency of the solid-state drive responding to host commands in low-power mode was observed using the PCIe trajectory timestamp function.
[0078] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0079] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and 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 embodiments of the above methods.
[0080] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein when executed by a processor, the computer program causes the processor to perform the following steps:
[0081] When the terminal is in battery-powered mode, connect the terminal to a PCIe protocol analyzer and record the PCIe trace of music playback; determine the latency of the solid-state drive responding to host commands in low-power mode based on the PCIe trace; determine whether the latency is greater than a set threshold; if the latency is greater than the set threshold, determine that the solid-state drive will cause system audio noise problems.
[0082] The delay time refers to the duration of the delay when the terminal's power is turned off, the terminal enters power-saving mode, the solid-state drive meets the command-free interval time, the solid-state drive enters a low-power state under the host's drive, the host sends a command to wake up the solid-state drive, and the solid-state drive responds.
[0083] In one embodiment, after executing the computer program to perform the step of determining whether the delay time is greater than a set threshold, the processor further performs the following steps:
[0084] If the delay time is not greater than the set threshold, it is determined that the solid-state drive will not cause system audio noise problems.
[0085] In one embodiment, when the processor executes the computer program to implement the step of determining the delay time for the solid-state drive to respond to host commands in a low-power state based on the PCIe trajectory, the processor specifically implements the following steps:
[0086] The latency of the solid-state drive responding to host commands in low-power mode was observed using the PCIe trajectory timestamp function.
[0087] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0088] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0089] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0090] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this 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.
[0091] If the integrated unit is implemented as 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, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0092] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for determining noise caused by SSDs, characterized in that, include: When the terminal is powered by battery, connect the terminal to a PCIe protocol analyzer and record the PCIe trace of music playback; The latency of the solid-state drive responding to host commands in low-power state is determined based on the PCIe trace; Determine whether the delay time is greater than a set threshold; If the delay time is greater than the set threshold, it is determined that the solid-state drive will cause system audio noise problems.
2. The method for determining noise caused by SSDs according to claim 1, characterized in that, After determining whether the delay time is greater than a set threshold, the method further includes: If the delay time is not greater than the set threshold, it is determined that the solid-state drive will not cause system audio noise problems.
3. The method for determining noise caused by SSDs according to claim 1, characterized in that, The step of determining the latency of the solid-state drive in low-power state to respond to host commands each time based on the PCIe trajectory includes: The latency of the solid-state drive responding to host commands in low-power state was observed using the PCIe trajectory timestamp function.
4. The method for determining noise caused by an SSD according to claim 1, characterized in that, The delay time refers to the duration of the delay when the terminal's power is turned off, the terminal enters power-saving mode, the solid-state drive meets the command-free interval time, the solid-state drive enters a low-power state under the host's drive, the host sends a command to wake up the solid-state drive, and the solid-state drive responds.
5. A device for determining noise generated by an SSD, characterized in that, include: The recording unit is used to connect the terminal to a PCIe protocol analyzer and record the PCIe track of music playback when the terminal is in battery-powered mode. The delay determination unit is used to determine the delay time of the solid-state drive in responding to host commands in low-power state each time, based on the PCIe trajectory. The judgment unit is used to determine whether the delay time is greater than a set threshold. The first determining unit is configured to determine that the solid-state drive will cause system audio noise problems if the delay time is greater than a set threshold.
6. The device for determining noise caused by an SSD according to claim 5, characterized in that, Also includes: The second determining unit is used to determine that the solid-state drive will not cause system audio noise problems if the delay time is not greater than a set threshold.
7. The device for determining noise caused by an SSD according to claim 5, characterized in that, The delay determination unit is used to observe the delay time of the solid-state drive responding to host commands each time in a low-power state, based on the PCIe trajectory timestamp function.
8. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1 to 4.
9. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Audio play apparatus and process capable of eliminating popping
CN101511046A
Audio processing method and related device
CN103594103A