A hard disk early warning method and device and storage medium
By monitoring the number of hard drive rewrites/reads and the impact of environmental vibration, early warning information is provided to reduce the maintenance cost of mechanical hard drives and solve the problem of hard drive failure caused by environmental vibration.
Patent Information
- Application Number
- CN202211266981.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-17
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-10-17
AI Technical Summary
Mechanical hard drives are more prone to failure due to environmental vibrations. Current technology requires manual troubleshooting only after a hard drive fails, resulting in high maintenance costs.
The system obtains the current rated rewrite/read count and current rewrite/read count of the hard drive through a computing device, and outputs prompts to indicate the extent of the impact of environmental vibration on the hard drive, supporting early prevention of failures.
It reduces hard drive maintenance costs, and reduces hard drive failures caused by environmental vibrations through real-time monitoring and early warning mechanisms.
Smart Images

Figure CN115831210B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data storage, and in particular to a hard disk early warning method and device and storage medium. BACKGROUND
[0002] With the continuous development of Internet applications, the demand for data storage is also increasing, so the capacity of mechanical hard disks used for storing data also increases accordingly. However, with the increase in the capacity of mechanical hard disks, the probability of failure of the mechanical hard disks due to vibration in the environment also increases.
[0003] Generally, the user will determine the cause of the failure of the hard disk after the failure occurs by manually troubleshooting, and eliminate the failure. When troubleshooting the cause of the failure, whether it is the vibration in the environment of the computing device where the hard disk is located, it needs to be manually performed after the hard disk fails, that is, the above method is executed in the case of computing device downtime due to hard disk failure, thereby resulting in high maintenance cost of the hard disk. SUMMARY
[0004] The embodiments of the present application provide a hard disk early warning method, device and storage medium, which can reduce the maintenance cost of the hard disk.
[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, the embodiments of the present application provide a hard disk early warning method, which comprises: a computing device obtaining a current rated rewrite / read number and a current rewrite / read number of a hard disk in the computing device; wherein the current rated rewrite / read number is the number of times of rewriting / reading data by the hard disk caused by the computing device itself; and the computing device outputs a prompt information according to the current rated rewrite / read number and the current rewrite / read number of the hard disk; wherein the prompt information is used to prompt the influence degree of vibration in the current environment of the computing device on rewriting / reading data by the hard disk.
[0007] The embodiments of the present application provide a hard disk early warning method, which outputs a prompt information for prompting the influence degree of vibration in the current environment of the computing device on rewriting / reading data by the hard disk in the computing device according to the number of times of rewriting / reading data by the hard disk caused by the computing device itself and the current rewrite / read number of the hard disk; so that the user can know the current normal rewrite / read number and the current actual rewrite / read number according to the prompt information, and then master the influence degree of vibration in the environment of the computing device on writing / reading data by the hard disk in the computing device, and support preventing the failure of the hard disk in the computing device caused by vibration in the environment of the computing device in advance according to the influence degree, thereby reducing the maintenance cost of the hard disk.
[0008] In a possible implementation, the computing device outputs the prompt information according to the difference between the current rated number of rewrites / reads and the current number of rewrites / reads of the hard disk, including: the computing device determines the difference between the current rated number of rewrites / reads and the current number of rewrites / reads of the hard disk in the computing device; and the computing device outputs the prompt information according to the difference.
[0009] The embodiments of the present application provide a hard disk early warning method, which includes: obtaining the number of rewrites / reads of data of a hard disk caused by a computing device itself and the current number of rewrites / reads of the hard disk; determining the difference between the number of rewrites / reads of data of the hard disk caused by the computing device itself and the current number of rewrites / reads of the hard disk; and outputting prompt information for prompting the influence degree of vibration in the environment where the computing device is currently located on the rewrites / reads of data of the hard disk in the computing device according to the difference; so that the user can master the influence degree of vibration in the environment where the computing device is located on the writes / reads of data of the hard disk in the computing device in real time according to the prompt information, and take preventive measures in time; and the maintenance cost of the hard disk is reduced.
[0010] In a possible implementation, the outputting of the prompt information according to the difference includes: when the difference is greater than or equal to a first preset difference, the computing device outputs first prompt information; and the first prompt information is used to prompt the influence degree of vibration in the environment where the computing device is currently located on the rewrites / reads of data of the hard disk.
[0011] In a possible implementation, when the difference is greater than or equal to a second preset difference and less than the first preset difference, the computing device outputs second prompt information; the influence degree represented by the second prompt information is lower than the influence degree represented by the first prompt information, and the influence degree is the influence degree of vibration in the environment where the computing device is currently located on the rewrites / reads of data of the hard disk.
[0012] The embodiments of the present application compare the difference between the current rated number of rewrites / reads and the current number of rewrites / reads of the hard disk with the first preset difference and the second preset difference respectively, output different prompt information according to the size of the difference, that is, the CPU in the computing device outputs prompt information with different levels according to the size of the difference, so that the user can more accurately master the influence degree of external vibration of the computing device on the rewrites / reads of data of the hard disk.
[0013] In a possible implementation, when the number of continuously output second prompt information is greater than a preset threshold, the computing device outputs third prompt information; the influence degree represented by the third prompt information is higher than the influence degree represented by the second prompt information.
[0014] The embodiment of the present application monitors the number of the second prompt information continuously, and when the number of the second prompt information continuously output is greater than a preset threshold, the CPU outputs the third prompt information with a higher influence degree than the second prompt information, so that the user can timely know the influence degree of the rotation in the environment of the computing device on the rewriting / reading of the hard disk.
[0015] In a possible implementation, the computing device outputs the prompt information according to the current rated rewriting / reading times of the hard disk and the current rewriting / reading times, including: when the current rewriting / reading times of the hard disk is greater than or equal to the target rewriting / reading times of the hard disk, the computing device outputs the prompt information according to a target time length, wherein the target rewriting / reading times is greater than the current rated rewriting / reading times of the hard disk, the target time length is the difference between the occurrence time of the Mth rewriting / reading event in N rewriting / reading events and the occurrence time of the 1st rewriting / reading event, the N is the current rewriting / reading times, and the M is the target rewriting / reading times.
[0016] The embodiment of the present application outputs the prompt information according to the target time length when the current rewriting / reading times of the hard disk is greater than or equal to the target rewriting / reading times of the hard disk, wherein the target time length is the difference between the occurrence time of the Mth rewriting / reading event in N rewriting / reading events and the occurrence time of the 1st rewriting / reading event, the N is the current rewriting / reading times, and the M is the target rewriting / reading times, so that the user can timely know the situation of more rewriting events in a short time and timely prevent, thereby reducing the maintenance cost of the hard disk.
[0017] In a possible implementation, when the current rated rewriting / reading times is the first rated rewriting / reading times, the target rewriting / reading times is the first target rewriting / reading times, wherein the first rated rewriting / reading times is the rated rewriting / reading times of the hard disk when the heat dissipation device in the computing device is at a first rotating speed; when the current rated rewriting / reading times is the second rated rewriting / reading times, the target rewriting / reading times is the second target rewriting / reading times, wherein the second rated rewriting / reading times is the rated rewriting / reading times of the hard disk when the heat dissipation device is at a second rotating speed; the first target rewriting / reading times is different from the second target rewriting / reading times; the ratio of the first target rewriting / reading times to the first rated rewriting / reading times is the same as the ratio of the second target rewriting / reading times to the second rated rewriting / reading times.
[0018] In a possible implementation, the outputting the prompt information according to the target time includes: when the target time length is greater than or equal to a first preset time length, the computing device outputs fourth prompt information; the fourth prompt information is used to prompt an influence degree of vibration in an environment in which the computing device is currently located on rewriting / reading data of the hard disk; when the target time length is equal to a second preset time length and less than the first preset time length, the computing device outputs fifth prompt information; the influence degree represented by the fifth prompt information is lower than the influence degree represented by the fourth prompt information, and the influence degree is an influence degree of vibration in the environment in which the computing device is currently located on rewriting / reading data of the hard disk.
[0019] According to the embodiment, the target time length is compared with the first preset time length and the first preset time length respectively, different prompt information is output according to the difference, the computing device outputs prompt information with different levels according to the target time length, and therefore, a user can more accurately master the influence degree of external vibration of the computing device on rewriting / reading data of the hard disk.
[0020] In a possible implementation, the current rated rewriting / reading times are specifically: in the initialization process of the computing device, the rewriting / reading times of the hard disk in the computing device at a current rotating speed of a heat dissipation device in the computing device; the current rotating speed is the rotating speed of the heat dissipation device when the computing device acquires the current rewriting / reading times.
[0021] In a possible implementation, before the current rated rewriting / reading times and the current rewriting / reading times of the hard disk in the computing device are acquired, the method further includes: the computing device acquires a current rotating speed of the heat dissipation device; and the computing device determines the current rated rewriting / reading times corresponding to the current rotating speed from a correspondence between a plurality of rotating speed gears of the heat dissipation device and a plurality of rated rewriting / reading times of the hard disk according to the current rotating speed of the heat dissipation device; the plurality of rotating speed gears and the plurality of rated rewriting / reading times are in one-to-one correspondence, and the rated rewriting / reading times corresponding to one rotating speed gear are the rated rewriting / reading times of the hard disk at the rotating speed gear.
[0022] In a possible implementation, in the initialization process of the computing device, a CPU in the computing device controls the heat dissipation device to work at a first rotating speed gear; the plurality of rotating speed gears include the first rotating speed gear; in the process in which the CPU controls the heat dissipation device to work at the first rotating speed gear, the CPU in the computing device receives a first rated rewriting / reading times sent by a hard disk controller of the computing device; the plurality of rated rewriting / reading times include the first rated rewriting / reading times; and the CPU in the computing device establishes a correspondence between an identifier of the first rotating speed gear and the first rated rewriting / reading times.
[0023] In a possible implementation, in the initialization process of the computing device, the hard disk controller of the computing device receives an identification of a first rotation speed gear of a plurality of rotation speed gears sent by a processor CPU in the computing device; the first rotation speed gear is a current rotation speed gear used by the heat dissipation device; the hard disk controller of the computing device, in response to the receiving operation, counts a first rated rewrite / read number of the hard disk at the first rotation speed gear, and establishes a corresponding relationship between the identification of the first rotation speed gear and the first rated rewrite / read number; the plurality of rated rewrite / read numbers include the first rated rewrite / read number.
[0024] Compared with the method of determining the corresponding relationship by the CPU, the embodiment of the application determines the corresponding relationship between the first rotation speed gear and the first rated rewrite / read number by counting the first rated rewrite / read number of the hard disk of the heat dissipation device at the first rotation speed gear through the hard disk controller of the computing device, thereby reducing the calculation pressure of the CPU and improving the initialization efficiency of the computing device.
[0025] In a possible implementation, the determining, according to the current rotation speed of the heat dissipation device, of the current rated rewrite / read number from the corresponding relationship between the plurality of rotation speed gears of the heat dissipation device and the plurality of rated rewrite / read numbers of the hard disk includes: determining, by the computing device, a second rotation speed gear from the corresponding relationship according to the current rotation speed of the heat dissipation device, where the second rotation speed gear contains the current rotation speed of the heat dissipation device; and determining, by the computing device, a second rated rewrite / read number corresponding to the second rotation speed gear as the current rated rewrite / read number of the hard disk.
[0026] In a second aspect, the embodiment of the application provides a computing device, which includes an obtaining module and an output module; the obtaining module is configured to obtain a current rated rewrite / read number and a current rewrite / read number of a hard disk in the computing device; the current rated rewrite / read number is a rewrite / read number of data of the hard disk caused by the computing device itself; and the output module is configured to output prompt information according to the current rated rewrite / read number and the current rewrite / read number of the hard disk; the prompt information is used to prompt an influence degree of vibration in an environment in which the computing device is currently located on rewriting / reading data of the hard disk.
[0027] In a possible implementation, the computing device further includes a determining module, the obtaining module is configured to obtain the current rated rewrite / read number and the current rewrite / read number of the hard disk in the computing device; the determining module is configured to determine a difference between the current rated rewrite / read number and the current rewrite / read number of the hard disk; and the output module is configured to output the prompt information according to the difference.
[0028] In a possible implementation, the output module is configured to output the first prompt information when the difference is greater than or equal to a first preset difference; the first prompt information is used to prompt an influence degree of vibration in an environment where the computing device is currently located on rewriting / reading data of the hard disk.
[0029] In a possible implementation, the output module is configured to output the second prompt information when the difference is greater than or equal to a second preset difference and less than the first preset difference; the second prompt information represents a lower influence degree than the first prompt information, and the influence degree is an influence degree of vibration in an environment where the computing device is currently located on rewriting / reading data of the hard disk.
[0030] In a possible implementation, the output module is configured to output the third prompt information when a number of the second prompt information that is continuously output is greater than a preset threshold; the third prompt information represents a higher influence degree than the second prompt information.
[0031] In a possible implementation, the output module is configured to output the prompt information according to a target time length when the current rewriting / reading times of the hard disk is greater than or equal to a target rewriting / reading times of the hard disk; the target rewriting / reading times is greater than a current rated rewriting / reading times of the hard disk, and the target time length is a difference between a time of an Mth rewriting / reading event and a time of a first rewriting / reading event in N rewriting / reading events; N is the current rewriting / reading times, and M is the target rewriting / reading times.
[0032] In a possible implementation, the target rewriting / reading times is a first target rewriting / reading times when the current rated rewriting / reading times is a first rated rewriting / reading times; the first rated rewriting / reading times is a rated rewriting / reading times of the hard disk under a first rotating speed of a heat dissipation device in the computing device; the target rewriting / reading times is a second target rewriting / reading times when the current rated rewriting / reading times is a second rated rewriting / reading times; the second rated rewriting / reading times is a rated rewriting / reading times of the hard disk under a second rotating speed of the heat dissipation device; the first target rewriting / reading times is different from the second target rewriting / reading times; a ratio of the first target rewriting / reading times to the first rated rewriting / reading times is same as a ratio of the second target rewriting / reading times to the second rated rewriting / reading times.
[0033] In a possible implementation, the output module is configured to output fourth prompt information when the target time length is greater than or equal to the first preset time length, the fourth prompt information being used to indicate an influence degree of vibration in an environment in which the computing device is currently located on rewriting / reading data of the hard disk. The output module is further configured to output fifth prompt information when the target time length is equal to the second preset time length and less than the first preset time length, the fifth prompt information being used to indicate an influence degree lower than the influence degree indicated by the fourth prompt information, the influence degree being an influence degree of vibration in an environment in which the computing device is currently located on rewriting / reading data of the hard disk.
[0034] In a possible implementation, the current rated rewriting / reading times are the rewriting / reading times of the hard disk at the current rotating speed of the heat dissipation device in the computing device during initialization of the computing device, the current rotating speed being the rotating speed of the heat dissipation device when the computing device acquires the current rewriting / reading times.
[0035] In a possible implementation, the computing device includes a determination module, the acquisition module is configured to acquire the current rotating speed of the heat dissipation device, and the determination module is configured to determine, according to the current rotating speed of the heat dissipation device, the current rated rewriting / reading times corresponding to the current rotating speed from a correspondence between a plurality of rotating speed gears of the heat dissipation device and a plurality of rated rewriting / reading times of the hard disk, the plurality of rotating speed gears and the plurality of rated rewriting / reading times being in one-to-one correspondence, and the rated rewriting / reading times corresponding to one rotating speed gear being the rated rewriting / reading times of the hard disk at the rotating speed gear.
[0036] In a possible implementation, the computing device includes a statistics module and a creation module, the acquisition module is configured to receive, during initialization of the computing device, an identifier of a first rotating speed gear in a plurality of rotating speed gears sent by a processor CPU in the computing device, the first rotating speed gear being a currently used rotating speed gear of the heat dissipation device, the statistics module is configured to, in response to the receiving operation, count a first rated rewriting / reading times of the hard disk at the first rotating speed gear, and the creation module is configured to establish a correspondence between the identifier of the first rotating speed gear and the first rated rewriting / reading times, the plurality of rated rewriting / reading times including the first rated rewriting / reading times.
[0037] In a possible implementation, the computing device includes a control module, the control module is configured to control the heat dissipation device to work at a first rotating speed gear during initialization of the computing device, the plurality of rotating speed gears including the first rotating speed gear, the acquisition module is configured to receive, during the process in which the control module controls the heat dissipation device to work at the first rotating speed gear, a first rated rewriting / reading times sent by a hard disk controller of the computing device, the plurality of rated rewriting / reading times including the first rated rewriting / reading times, and the creation module is configured to establish a correspondence between the identifier of the first rotating speed gear and the first rated rewriting / reading times.
[0038] In a possible implementation, the determining module is configured to determine the second rotating speed gear from the correspondence according to the current rotating speed of the heat dissipation device, wherein the second rotating speed gear contains the current rotating speed of the heat dissipation device; and the determining module is further configured to determine the second rated re-write / read times corresponding to the second rotating speed gear as the current rated re-write / read times of the hard disk.
[0039] In a third aspect, an embodiment of the present application provides a computing device, comprising a memory and a processor, the memory being coupled to the processor; the memory is configured to store computer program codes, wherein the computer program codes comprise computer instructions; when the computer instructions are executed by the processor, the processor executes the method in any one of the first aspect and possible implementation manners thereof.
[0040] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer instructions, when the computer instructions are run on a computing device, the computing device executes the method in any one of the first aspect and possible implementation manners thereof.
[0041] In a fifth aspect, an embodiment of the present application provides a computer program product, when the computer program product is run on a computer, the computer executes the method in any one of the first aspect and possible implementation manners thereof.
[0042] It should be understood that the beneficial effects achieved by the second aspect to the fifth aspect and corresponding possible implementation manners of the embodiments of the present application can refer to the technical effects of the first aspect and corresponding possible implementation manners, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 A hardware structure schematic diagram of a computing device provided by an embodiment of the present application;
[0044] Figure 2 A hardware structure schematic diagram of a mechanical hard disk provided by an embodiment of the present application;
[0045] Figure 3 A flowchart of a hard disk early warning method provided by an embodiment of the present application Figure 1 ;
[0046] Figure 4 A flowchart of a hard disk early warning method provided by an embodiment of the present application Figure 2 ;
[0047] Figure 5 A flowchart of a method for creating a correspondence between a plurality of rotating speed gears and a plurality of rated re-write / read times of a hard disk by a computing device provided by an embodiment of the present application;
[0048] Figure 6 Another flowchart of a method for creating a correspondence between multiple rotational speed gears and multiple rated rewrite / read times of a hard disk by a computing device according to an embodiment of the present application is shown in FIG. 7.
[0049] Figure 7 Another flowchart of a method for creating a correspondence between multiple rotational speed gears and multiple rated rewrite / read times of a hard disk by a computing device according to an embodiment of the present application is shown in FIG. 7. Figure 3
[0050] Figure 8 Another flowchart of a method for creating a correspondence between multiple rotational speed gears and multiple rated rewrite / read times of a hard disk by a computing device according to an embodiment of the present application is shown in FIG. 7.
[0051] Figure 9 Another flowchart of a method for creating a correspondence between multiple rotational speed gears and multiple rated rewrite / read times of a hard disk by a computing device according to an embodiment of the present application is shown in FIG. 7.
[0052] Figure 10 Another flowchart of a method for creating a correspondence between multiple rotational speed gears and multiple rated rewrite / read times of a hard disk by a computing device according to an embodiment of the present application is shown in FIG. 7. Figure 4
[0053] Figure 11 Another flowchart of a method for creating a correspondence between multiple rotational speed gears and multiple rated rewrite / read times of a hard disk by a computing device according to an embodiment of the present application is shown in FIG. 7. DETAILED DESCRIPTION
[0054] The term "and / or" in the present application is merely used to describe an associated relationship between associated objects, and can represent three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone.
[0055] The terms "first" and "second" and the like in the specification and claims of the present application are used to distinguish different objects, and are not used to describe a specific order of the objects. For example, the first rotational speed gear and the second rotational speed gear are used to distinguish different rotational speed gears, and are not used to describe a specific order of the rotational speed gears.
[0056] In the present application, the words "exemplary" and "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described in the present application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the exemplary or for example embodiments are used to illustrate at least one of the concepts described in the present application.
[0057] In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specified. For example, multiple rotational speed gears means two or more rotational speed gears; multiple rated rewrite / read times means two or more rated rewrite / read times.
[0058] With the advent of the era of big data, the capacity of storage hard disk is also increasing, at the same time, the probability of hard disk failure due to vibration in the environment also increases.
[0059] For example, a mechanical hard disk: it is known that the size of the disk used for storing data in the mechanical hard disk is constant, so in order to increase the capacity of the disk, it is generally achieved by increasing the number of tracks on the disk. However, the width of each track in the disk after increasing the number of tracks is smaller, so that the distance between the head and the disk is reduced. At this time, if the vibration in the environment of the mechanical hard disk is large (such as the computing device where the mechanical hard disk is located is located in a subway station, when the subway passes through the subway station, it will produce a large vibration to the mechanical hard disk in the computing device), it will cause the head writing / reading data on the disk to deviate from the current track, at this time, the head can only store the data by re-writing / reading the data.
[0060] Generally, the user will determine the cause of the failure of the hard disk by manual troubleshooting after the failure of the hard disk, and eliminate the failure. When troubleshooting the cause of the failure, whether it is the vibration in the environment of the computing device where the hard disk is located, it needs to be manually performed after the hard disk fails, that is, the above method is executed in the case of computing device downtime due to hard disk failure, thereby resulting in high maintenance cost of the hard disk.
[0061] Therefore, the embodiment of the present application provides a hard disk early warning method, which outputs prompt information for prompting the influence degree of the vibration in the current environment of the computing device on the re-writing / reading data of the hard disk in the computing device according to the number of times of re-writing / reading data of the hard disk caused by the computing device itself and the current number of times of re-writing / reading data of the hard disk; so that the user can know the number of times of re-writing / reading data under normal circumstances and the actual number of times of re-writing / reading data according to the prompt information, and then master the influence degree of the vibration in the environment of the computing device on the writing / reading data of the hard disk in the computing device, and support to prevent the failure of the hard disk in the computing device caused by the vibration in the environment of the computing device in advance according to the influence degree, thereby reducing the maintenance cost of the hard disk.
[0062] The hard disk early warning method provided by the embodiment of the present application is applied to the computing device as shown in Figure 1 The computing device includes a processor 101, a hard disk 102, a network interface 103 and a heat dissipation device 104.
[0063] It can be appreciated that the structures illustrated by the embodiments of the present application do not constitute a specific limitation on the computing device. In other embodiments of the present application, the computing device can include more or fewer components than illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0064] The processor 101 can include one or more processing units, such as: a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.
[0065] The processor 101 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 101 is a cache memory. The memory can hold instructions or data that the processor 101 has just used or recycled. If the processor 101 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 101, thus improving the efficiency of the system.
[0066] The hard disk 102 includes, but is not limited to, a mechanical hard disk (HDD) or a solid-state disk (SSD), etc., wherein the hard disk 102 includes a controller that reads and writes data of the hard disk storage area.
[0067] It should be noted that the hard disks of the embodiments of the present application are all mechanical hard disks, which will not be described in detail hereinafter.
[0068] Optionally, the processor 101 implements the hard disk early warning method provided by the embodiments of the present application by reading the instructions saved in the hard disk 102, or the processor 101 implements the hard disk early warning method provided by the embodiments of the present application by reading the instructions saved in the internal memory. When the hard disk 102 saves the instructions for implementing the hard disk early warning method provided by the embodiments of the present application, the processor 101 implements the method in the above embodiments by reading the instructions saved in the hard disk 102.
[0069] The network interface 103 is a wired interface (port), such as an FDDI, GE interface. Alternatively, the network interface 103 is a wireless interface. It should be understood that the network interface 103 includes a plurality of physical ports, and the network interface 103 is configured to obtain the current rated rewrite / read times of the hard disk 102.
[0070] The heat dissipation device 104 can be a water-cooled radiator or an air-cooled radiator, and the heat dissipation device 104 is configured to cool the computing device based on a fan.
[0071] Optionally, the computing device further includes a bus 105, and the processor 101, the hard disk 102, the network interface 103, and the heat dissipation device 104 are connected to each other through the bus 105 or are connected to each other in other manners.
[0072] For example, when the hard disk 102 is a mechanical hard disk, a schematic diagram of an internal structure of the mechanical hard disk 102 is as shown in Figure 2 The mechanical hard disk 102 includes an input interface 201, a controller 202, a magnetic head 203, and a magnetic disk 204.
[0073] The input interface 201 is configured to receive a read / write instruction sent by the processor 101, and the input interface 201 can be a physical interface or a virtual interface.
[0074] The controller 202 is configured to determine a target track in the magnetic disk 204 corresponding to the read / write instruction according to the read / write instruction received by the input interface 201, and control the magnetic head 203 to execute the read / write instruction on the target track of the magnetic disk 204.
[0075] Optionally, the controller 202 controls the magnetic head 203 to read the saved instruction in the magnetic disk 204 to implement the hard disk pre-warning method provided in the embodiments of the present application.
[0076] The magnetic head 203 is configured to read and write data on a track in the magnetic disk 204.
[0077] The magnetic disk 204 is configured to store data, and specifically, the magnetic disk 204 includes a plurality of tracks, and the data is stored in the plurality of tracks.
[0078] It should be noted that the device for executing the hard disk pre-warning method provided in the embodiments of the present application can be the computing device as shown in Figure 1 .
[0079] It should be noted that the hard disks in the embodiments of the present application are all taken as examples of mechanical hard disks, and subsequent descriptions will not be repeated.
[0080] The hard disk early warning method provided by the embodiment of the application can be executed by the processor 101 in the computing device or the controller 202 in the hard disk 102 (the hard disk 102 is a mechanical hard disk 102 in the computing device). Figure 2 As shown in the figure, the method comprises the following steps. Figure 3 The method comprises steps S110-S120.
[0081] In S110, the computing device acquires the current rated rewrite / read times and the current rewrite / read times of the hard disk in the computing device.
[0082] The rewrite / read specifically comprises rewriting or re-reading.
[0083] The current rated rewrite / read times of the hard disk are the rewrite / read times of the hard disk caused by the computing device itself, specifically, the rewrite / read times of the hard disk caused by the internal vibration of the computing device, wherein the internal vibration of the computing device is the vibration caused by the operation of the heat dissipation device (such as a heat dissipation fan) in the computing device.
[0084] For example, assuming that the hard disk A is only affected by the vibration caused by the heat dissipation fan in the server where the hard disk A is located, the rewrite times of the hard disk A per unit time is 5, and the rated rewrite times of the hard disk A is 5.
[0085] The current rewrite / read times of the hard disk are the rewrite / read times of the hard disk caused by the computing device itself and the environment where the computing device is located, specifically, the rewrite / read times of the hard disk caused by the internal vibration of the computing device and the external vibration of the environment where the computing device is located, wherein the external vibration of the computing device is the vibration in the environment where the computing device is located, for example, assuming that the computing device is located in a subway station, when the subway passes through the subway station, the vibration caused by the subway to the computing device.
[0086] For example, assuming that the hard disk A is affected by the vibration caused by the heat dissipation fan in the server where the hard disk A is located and the vibration in the environment where the server is located, the rewrite times of the hard disk A per unit time is 10, and the current rewrite times of the hard disk A is 10.
[0087] The specific implementation of how to determine the current rated rewrite / read times and the current rewrite / read times is described below (S510-S530), which will not be repeated here.
[0088] In S120, the computing device outputs prompt information according to the current rated rewrite / read times and the current rewrite / read times of the hard disk.
[0089] The prompt information is used to prompt an influence degree of vibration in an environment where the computing device is currently located on rewriting / reading data of the hard disk (i.e., external vibration of the computing device).
[0090] For example, based on the example in S110, the current rated rewriting times of the hard disk A is 5, and the current rewriting times is 10. That is, the computing device outputs "the current rated rewriting times of the hard disk A in the current computing device is 5, the current rewriting times is 10, please handle it in time!!!".
[0091] The embodiment of the present application provides a hard disk warning method. According to the rewriting / reading times of data of the hard disk caused by the computing device itself and the current rewriting / reading times of the hard disk, prompt information used to prompt an influence degree of vibration in an environment where the computing device is currently located on rewriting / reading data of the hard disk is output. Therefore, the user can know the rewriting / reading times under normal condition and the current actual rewriting / reading times according to the prompt information, and then master the influence degree of vibration in the environment where the computing device is located on rewriting / reading data of the hard disk in the computing device, and support preventing the failure of the hard disk in the computing device caused by vibration in the environment where the computing device is located in advance according to the influence degree, so that the maintenance cost of the hard disk is reduced.
[0092] Based on the hard disk warning method, the embodiment of the present application provides two specific hard disk warning method embodiments, which are as follows.
[0093] Embodiment 1
[0094] As shown in Figure 4 The embodiment of the present application provides a hard disk warning method. The method can include S210-S230.
[0095] S210, the computing device acquires the current rated rewriting / reading times and the current rewriting / reading times of the hard disk in the computing device.
[0096] It should be noted that the specific implementation of S210 is consistent with the specific implementation of S110. For the specific description of S210, reference can be made to the specific description of S110, which will not be repeated here.
[0097] S220, the computing device determines the difference between the current rated rewriting / reading times and the current rewriting / reading times of the hard disk in the computing device.
[0098] The difference between the current number of rewrites / reads and the current rated number of rewrites / reads of the hard disk is used to represent the influence of the vibration in the environment in which the computing device is located (i.e., the external vibration of the computing device) on the number of rewrites / reads of the hard disk. The difference can be represented by the ratio of the current number of rewrites / reads to the current rated number of rewrites / reads, and can also be represented by the difference between the current number of rewrites / reads and the current rated number of rewrites / reads. The present application does not limit the form of representation of the difference.
[0099] For example, assuming that the difference is represented by the difference between the current number of rewrites / reads and the current rated number of rewrites / reads, the current number of rewrites / reads is 6, and the current rated number of rewrites / reads is 2, the difference is 4, which is the difference between the current number of rewrites / reads 6 and the current rated number of rewrites / reads 2.
[0100] Optionally, the difference in S220 can be directly obtained, in which case the method does not include S210. The computing device can obtain the difference from a local device, or from another device other than the computing device. The present application does not limit the implementation of obtaining the difference.
[0101] The specific implementation of how to determine the current number of rewrites / reads and the current rated number of rewrites / reads is described below (S510-S530), and will not be described here.
[0102] In S230, the computing device outputs prompt information according to the difference between the current rated number of rewrites / reads and the current number of rewrites / reads of the hard disk.
[0103] The prompt information is used to prompt the influence of the vibration in the environment in which the computing device is currently located (i.e., the external vibration of the computing device) on the number of rewrites / reads of the hard disk.
[0104] For the example in S220, the difference is 4, and the computing device outputs “The number of rewrites / reads of the hard disk in the current computing device due to external vibration is 4 times, please handle it in time!!!”.
[0105] For another example, assuming that the difference is represented by the ratio of the current number of rewrites / reads to the current rated number of rewrites / reads, the current number of rewrites / reads is 6, and the current rated number of rewrites / reads is 2, the difference is 3, which is the ratio of the current number of rewrites / reads 6 to the current rated number of rewrites / reads 2. The computing device outputs “The actual number of rewrites of the hard disk in the current computing device is 3 times the rated number of rewrites / reads, please handle it in time!!!”.
[0106] The hard drive early warning method provided in this application embodiment is as follows: by acquiring the number of hard drive data rewrites / reads caused by the computing device itself and the current number of hard drive rewrites / reads, and determining the difference between the number of hard drive data rewrites / reads caused by the computing device itself and the current number of hard drive rewrites / reads; and based on the difference, outputting a prompt message to indicate the degree of impact of vibration in the current environment of the computing device on the hard drive's data rewrite / reading in the computing device; thereby enabling the user to grasp the degree of impact of vibration in the environment of the computing device on the hard drive's data writing / reading in the computing device in real time based on the prompt message, and take timely preventive measures; thereby reducing the maintenance cost of the hard drive.
[0107] It should be understood that when the hard drive is exposed to significant vibrations in its environment, it can cause data write / read failures. In such cases, the controller in the hard drive, upon detecting the data write / read failure, will rewrite / read the failed data. The number of rewrite / read operations in this embodiment specifically refers to the number of times the failed data is rewritten / read.
[0108] The vibrations in the environment in which the hard drive is located include both internal vibrations of the computing device and external vibrations (i.e., vibrations caused by the environment in which the computing device is located). Internal vibrations of the computing device include vibrations caused by the rotation of the cooling system; the higher the rotation speed of the cooling system, the greater the vibration generated on the hard drive. External vibrations of the computing device specifically refer to vibrations in its environment. For example, if the computing device is located in a subway station, the vibrations generated by the passing subway trains. The greater the vibrations in the environment, the greater the vibrations generated on the hard drive, and the more write / read operations the hard drive will perform per unit time.
[0109] Based on the impact of vibration generated by the aforementioned heat dissipation device on the number of write / read cycles of the hard drive, in this embodiment, the computing device first establishes a correspondence between multiple speed settings and multiple rated rewrite / read cycles of the hard drive (hereinafter referred to as Stage 1: Creating Correspondence), and then executes a hard drive warning method based on this correspondence (hereinafter referred to as Stage 2: Hard Drive Warning). The following describes these two stages respectively.
[0110] Phase 1: Creating Correspondence
[0111] like Figure 5 The diagram illustrates a method for creating a correspondence between multiple rotational speed settings and multiple rated rewrite / read cycles of a hard disk, according to an embodiment of this application. The method includes steps S310-S360.
[0112] S310, in an initialization process, a CPU in the computing device controls the heat dissipation device to work at a first rotating speed gear of a plurality of rotating speed gears.
[0113] The heat dissipation device is a heat dissipation device in the computing device, that is, the heat dissipation device is the heat dissipation device in the computing device Figure 1 as shown in the computing device in FIG. 1, and the heat dissipation device can be a heat dissipation fan in the computing device.
[0114] The rotating speed gear can represent a rotating speed interval, for example, the rotating speed gear is that the rotating speed is greater than 0 revolutions per second and less than or equal to 300 revolutions per second, that is, the rotating speed gear is (0 revolutions per second, 300 revolutions per second]. Or the rotating speed of the heat dissipation device, for example, 300 revolutions per second, and the specific form of the rotating speed gear is not limited in the embodiments of the present application.
[0115] It should be understood that there is no vibration in the environment in which the computing device is located in the initialization process; that is, in the initialization process, the hard disk is only subjected to the vibration inside the computing device, and the internal vibration of the computing device mainly includes the vibration generated by the rotation of the heat dissipation device in the computing device.
[0116] S320, the CPU in the computing device sends an identifier of the first rotating speed gear to a hard disk controller of the computing device.
[0117] The hard disk controller of the computing device is a controller in the hard disk 102 of the computing device as shown in FIG. 1; when the hard disk is a mechanical hard disk, the hard disk controller is the controller 202 in the mechanical hard disk 102 as shown in FIG. 1. Figure 1 Figure 2
[0118] It should be noted that the CPU sending the first rotating speed gear to the hard disk controller can be sent through a wired link between the CPU and the hard disk, or can be sent through a wireless link between the CPU and the hard disk; the specific implementation of the CPU sending the first rotating speed gear to the hard disk controller is not limited in the embodiments of the present application.
[0119] The specific implementation of S320 is that the CPU sends the first rotating speed gear to the input interface 201 of the hard disk in the computing device, and then the input interface 201 sends the first rotating speed gear to the controller 202 in the hard disk. Figure 2
[0120] S330, the hard disk controller of the computing device receives the identifier of the first rotating speed gear sent by the CPU.
[0121] The first rotating speed gear is the current rotating speed gear used by the heat dissipation device.
[0122] S340, the hard disk controller of the computing device counts a first rated rewrite / read number of the hard disk in the first rotation speed gear.
[0123] The S340 is executed after the controller receives the identification of the first rotation speed gear, that is, the S340 is executed in response to the receiving operation in the S330.
[0124] The first rated rewrite / read number is the rewrite / read number of the hard disk in the first rotation speed gear of the heat dissipation device, wherein the S310-S340 are executed in the initialization process of the computing device, and the hard disk is not affected by the vibration in the environment of the computing device in the initialization process of the computing device, and the first rated rewrite / read number is not affected by the vibration in the environment of the computing device.
[0125] S350, the CPU in the computing device receives the first rated rewrite / read number sent by the hard disk controller of the computing device during the process in which the CPU controls the heat dissipation device to work in the first rotation speed gear.
[0126] S360, the CPU in the computing device establishes a corresponding relationship between the identification of the first rotation speed gear and the first rated rewrite / read number.
[0127] Based on the S310-S360, a corresponding relationship between a plurality of rotation speed gears and a plurality of rated rewrite / read numbers of the hard disk is obtained, specifically: in the initialization process of the computing device, the computing device adjusts the heat dissipation device to each of a plurality of rotation speed gears, and counts the rewrite / read number of the hard disk in the current rotation speed gear, thereby obtaining a plurality of rated rewrite / read numbers; then, the computing device determines the corresponding relationship according to the plurality of rotation speed gears and the plurality of rated rewrite / read numbers. Wherein, any two rotation speed gears in the plurality of rotation speed gears are different; the plurality of rotation speed gears and the plurality of rated rewrite / read numbers are one-to-one corresponding, and the rated rewrite / read number corresponding to one rotation speed gear is the rated rewrite / read number of the hard disk in the rotation speed gear.
[0128] A specific manifestation of the corresponding relationship is shown in Table 1; specifically including: when the rotation speed gear of the heat dissipation device is (0%, 30%] of the rated rotation speed of the heat dissipation device, the vibration (i.e. the internal vibration of the computing device) caused by the rotation speed of the heat dissipation device causes the rewrite / read number of the hard disk to be 0 times; when the rotation speed gear of the heat dissipation device is (30%, 60%] of the rated rotation speed of the heat dissipation device, the vibration caused by the rotation speed of the heat dissipation device causes the rewrite / read number of the hard disk to be 2 times; when the rotation speed gear of the heat dissipation device is (60%, 100%] of the rated rotation speed of the heat dissipation device, the vibration caused by the rotation speed of the heat dissipation device causes the rewrite / read number of the hard disk to be 5 times.
[0129] Table 1
[0130] Number RPM range Rated rewrite / read cycles 1 (0%,30%] 0 2 (30%,60%] 2 3 (60%,100%] 5
[0131] Another specific representation of the above correspondence is shown in Table 2 below; the speed settings include: (0 rpm, 300 rpm), (300 rpm, 600 rpm), and (600 rpm, 1000 rpm); at this time, after the CPU in the computing device adjusts the speed of the cooling device to (0 rpm, 300 rpm), it obtains the number of hard drive rewrites / reads within 1 minute as counted by the hard drive controller of the computing device, which is 0; then, after the CPU in the computing device adjusts the speed of the cooling device to (300 rpm, 600 rpm), it obtains the number of hard drive rewrites / reads within 1 minute as counted by the hard drive controller of the computing device, which is 0; The hard drive controller records 2 write / read operations within one minute. Then, the CPU in the computing device adjusts the cooling system's speed to (600 RPM, 1000 RPM) and obtains 5 write / read operations from the hard drive controller within one minute. At this point, the CPU in the computing device determines the above correspondence based on the RPM settings (0 RPM, 300 RPM), (300 RPM, 600 RPM), and (600 RPM, 1000 RPM) and the write / read operations counts of 0, 2, and 5.
[0132] Table 2
[0133]
[0134]
[0135] It should be noted that after the CPU in the aforementioned computing device determines the above correspondence, it can store the correspondence in the hard disk, and the computing device can directly retrieve it from the hard disk when used subsequently.
[0136] like Figure 6 The diagram illustrates another method for creating a correspondence between multiple rotational speed levels and multiple rated rewrite / read cycles of a hard disk, according to an embodiment of this application. The method includes steps S410-S430.
[0137] S410. During the initialization process of the computing device, the hard disk controller of the computing device receives the identifier of the first speed level among multiple speed levels sent by the CPU in the computing device.
[0138] The aforementioned first speed setting is the speed setting currently used by the heat dissipation device in the computing device; that is, during the execution of S410, the current speed of the heat dissipation device in the computing device is the speed in the first speed setting.
[0139] It should be noted that the implementation of S410 is similar to that of S310-S330. For a detailed description of S410, please refer to the relevant descriptions of S310-S330 above. It will not be repeated here.
[0140] S420 The hard disk controller of the computing device responds to the received operation and counts the first rated number of write / read operations of the hard disk at the first speed setting.
[0141] It should be noted that the implementation of S420 is similar to that of S340. For a detailed description of S420, please refer to the relevant description of S340 above. It will not be repeated here.
[0142] S430, The hard disk controller of the computing device establishes a correspondence between the identifier of the first speed range and the first rated number of rewrite / read cycles.
[0143] It should be noted that the implementation of S430 is similar to that of S360. For a detailed description of S430, please refer to the relevant description of S360 above. It will not be repeated here.
[0144] Compared to the above method of determining the correspondence through the CPU, the embodiments of this application determine the correspondence between the first speed setting and the first rated rewrite / read count by the hard disk controller of the computing device by counting the first rated rewrite / read count of the hard disk at the first speed setting; thereby reducing the computing pressure on the CPU and improving the initialization efficiency of the computing device.
[0145] Phase 2: Hard Drive Warning
[0146] like Figure 7 The diagram shown is a schematic representation of a hard disk early warning method provided in an embodiment of this application. The method may include steps S510-S550.
[0147] S510: The CPU in the computing device obtains the current rotation speed of the heat dissipation device in the computing device.
[0148] The computing device can obtain the current rotation speed of the heat dissipation device from other devices besides itself, or it can obtain the current rotation speed of the heat dissipation device directly from the heat dissipation device. The specific implementation method of obtaining the current rotation speed of the heat dissipation device in the embodiments of this application is not limited.
[0149] S520: The CPU in the computing device determines the current rated number of rewrite / read operations based on the current rotation speed of the heat sink, from the correspondence between multiple rotation speed levels of the heat sink and multiple rated rewrite / read operations of the hard drive.
[0150] The current rotation speed of the heat dissipation device is the current rotation speed obtained in S510.
[0151] It should be noted that the above-mentioned corresponding relationship can be a corresponding relationship created in stage 1.
[0152] It should be noted that the above-mentioned corresponding relationship can be a corresponding relationship created in stage 1.
[0153] The current rated rewrite / read times of the hard disk are the rewrite / read times of the hard disk caused by the computing device itself, that is, the current rated rewrite / read times of the hard disk are the rewrite / read times of the hard disk (such as the rewrite / read times of the data per unit time) when the hard disk is vibrated by the internal vibration of the computing device.
[0154] The specific implementation of S520 is shown in Figure 8 S520a-S520c.
[0155] S520a, the CPU in the computing device obtains a corresponding relationship between a plurality of rotation speed gears of the heat dissipation device and a plurality of rated rewrite / read times of the hard disk.
[0156] It should be noted that the above-mentioned corresponding relationship can be obtained by the computing device from other devices other than the computing device, or can be obtained by the computing device from the local (such as the hard disk), and specifically, the application embodiments do not limit the obtaining method of the above-mentioned corresponding relationship.
[0157] It should be understood that the environment in which the computing device is located during the initialization process does not have vibration, that is, during the initialization process, the vibration received by the hard disk is only the internal vibration of the computing device.
[0158] S520b, the CPU in the computing device determines a second rotation speed gear from the corresponding relationship according to the current rotation speed of the heat dissipation device. The second rotation speed gear contains the current rotation speed of the heat dissipation device.
[0159] For example, assuming that the above-mentioned corresponding relationship is shown in Table 2; the current rotation speed of the heat dissipation device is 500 revolutions / second; at this time, the rotation speed gear of [300 revolutions / second, 600 revolutions / second] in the corresponding relationship includes 500 revolutions / second, that is, the CPU determines the rotation speed gear of [300 revolutions / second, 600 revolutions / second] as the second rotation speed gear.
[0160] S520c, the CPU in the computing device determines the rated rewrite / read times corresponding to the second rotation speed gear as the current rated rewrite / read times of the hard disk.
[0161] For example, based on the example in S520b, the second rotation speed range is [300 rpm, 600 rpm]; in the corresponding relationship shown in Table 2, the rotation speed range [300 rpm, 600 rpm] corresponds to the current number of times of rewriting / reading of 2, i.e., the current number of times of rewriting / reading of 2 is determined as the current number of times of rewriting / reading of the hard disk.
[0162] In S530, the CPU in the computing device acquires the current number of times of rewriting / reading of the hard disk.
[0163] The current number of times of rewriting / reading is the number of times of rewriting / reading of the hard disk caused by the computing device itself and the environment in which the computing device is located. Specifically, when the hard disk is affected by both the internal vibration of the computing device and the external vibration of the computing device, the number of times of rewriting / reading of the hard disk is affected.
[0164] It should be understood that the specific implementation of the CPU acquiring the current number of times of rewriting of the hard disk is that when the head in the hard disk fails to write data to the disk in the hard disk, the controller in the hard disk sends the write failure event to the CPU, wherein the write event includes the type (i.e., the reason) of the write failure, such as a vibration-caused write failure event or an over-temperature-caused write failure event, and the time at which the event occurs. Then, the CPU counts the number of vibration-caused write failure events received within a unit of time, and stores the write failure events in a log.
[0165] It should be noted that the current number of times of rewriting / reading is obtained by the computing device at the current rotation speed of the cooling device in S510 (e.g., 500 rpm). That is, the current rotation speed of the cooling device used to determine the second rotation speed range in S520b is the same as the current rotation speed of the cooling device used to obtain the current number of times of rewriting / reading.
[0166] For example, assuming that the current rotation speed of the cooling device is 500 rpm, and the current number of times of rewriting / reading determined based on the corresponding relationship in Table 2 is 2 times; at this time, the computing device counts the number of times of rewriting / reading of the hard disk within 1 minute at the current rotation speed of the cooling device of 500 rpm, which is 6 times, and then determines the number of times of rewriting / reading of 6 times as the current number of times of rewriting / reading.
[0167] In S540, the CPU in the computing device determines the difference between the current number of times of rewriting / reading of the hard disk in the computing device and the current number of times of rewriting / reading.
[0168] It should be noted that the implementation of S540 is similar to the specific implementation of S220, and for the specific description of S540, reference can be made to the related description of S220, which will not be described herein.
[0169] S550, the CPU in the computing device outputs prompt information according to a difference between the current rated rewrite / read times and the current rewrite / read times of the hard disk in the computing device.
[0170] The prompt information is used to prompt an influence degree of vibration in an environment where the computing device is currently located on rewrite / read data of the hard disk of the computing device; that is, the prompt information is used to represent the influence degree of external vibration of the computing device on rewrite / read data of the hard disk.
[0171] The specific implementation of S550 includes the following steps, as shown in Figure 9
[0172] S550a, the CPU in the computing device determines whether the difference is greater than or equal to a first preset difference.
[0173] The difference is a difference between the current rated rewrite / read times and the current rewrite / read times of the hard disk.
[0174] When the difference is greater than or equal to the first preset difference, S550b is performed.
[0175] When the difference is less than the first preset difference, S550c is performed.
[0176] S550b, the CPU in the computing device outputs first prompt information.
[0177] The first prompt information is used to prompt an influence degree of vibration in an environment where the computing device is currently located on rewrite / read data of the hard disk.
[0178] After the CPU performs S550b, the CPU performs an end action.
[0179] S550c, the CPU in the computing device determines whether the difference is greater than or equal to a second preset difference. The second preset difference is less than the first preset difference.
[0180] When the difference is greater than or equal to the second preset difference, S550d is performed.
[0181] When the difference is less than the second preset difference, it means that the vibration in the environment where the computing device is currently located has a small influence on the rewrite / read times of the hard disk, and the CPU in the computing device performs an end action.
[0182] S550d, the CPU in the computing device outputs second prompt information.
[0183] It should be noted that the influence degree represented by the second prompt information is lower than the influence degree represented by the first prompt information, wherein the influence degree is the influence degree of the vibration in the current environment of the computing device on the rewriting / reading of the hard disk, that is, the influence degree of the external vibration of the computing device on the rewriting / reading of the hard disk.
[0184] The embodiment of the present application compares the difference between the current rated rewriting / reading times of the hard disk and the current rewriting / reading times with the first preset difference and the second preset difference respectively, and outputs different prompt information according to the size of the difference, that is, the CPU in the computing device outputs prompt information with different levels according to the size of the difference, so that the user can more accurately master the influence degree of the external vibration of the computing device on the rewriting / reading of the hard disk.
[0185] Optionally, the output modes of the first prompt information and the second prompt information are different, for example, the first prompt information can display warning information with a font of a first color in the form of a pop-up box or a short message; and the second prompt information displays early warning information in the form of an interface with a font of a second color, wherein the brightness of the first color is higher than that of the second color.
[0186] The embodiment of the present application displays the first prompt information and the second prompt information in different ways and with different fonts, so that the user can more clearly feel the influence degree of the external vibration of the computing device on the rewriting / reading of the hard disk.
[0187] Optionally, the S510-S550 are periodically executed, when the number of the second prompt information continuously output by the CPU in the computing device is large, the rewriting / reading times of the hard disk will be greatly affected, so the method of outputting the prompt information further includes S550e-S550f.
[0188] S550e, the CPU in the computing device judges whether the number of the second prompt information continuously output is greater than a preset threshold.
[0189] When the number of the second prompt information continuously output is less than or equal to the preset threshold, the CPU performs an ending action.
[0190] Since when the number of the second prompt information output is large, the rewriting / reading times of the hard disk will be greatly affected, thereby causing a relatively high probability of failure of the hard disk, it is necessary to monitor the number of the second prompt information continuously output, that is, when the number of the second prompt information continuously output is greater than the preset threshold, the following S550f is performed.
[0191] S550f, the CPU in the computing device outputs third prompt information.
[0192] The influence degree represented by the third prompt information is higher than the influence degree represented by the second prompt information.
[0193] It should be noted that the third prompt information can be the same as the first prompt information, or can be different from the first prompt information.
[0194] The embodiment of the present application monitors the number of the second prompt information that appears continuously, and when the number of the second prompt information that is output continuously is greater than a preset threshold, the CPU outputs the third prompt information whose influence degree is higher than the second prompt information, so that the user can timely grasp the influence degree of the rotation in the environment where the computing device is located on the rewriting / reading data of the hard disk.
[0195] Optionally, the execution subject of S520-S550 can also be the hard disk controller of the computing device, and at this time, the hard disk controller receives the current rotating speed of the cooling device in the computing device sent by the CPU in the computing device after S510.
[0196] Embodiment 2
[0197] When the number of rewriting / reading times of the hard disk occurring in a short time exceeds a certain number, the rewriting / reading times data of the hard disk is greatly affected, that is, the shorter the time of the predetermined number (target rewriting / reading times described below) of rewriting / reading events occurring in the hard disk, the higher the damage degree of the hard disk. Based on this, as shown in the figure, the embodiment of the present application provides another hard disk warning method; the method comprises: S610-S620. Figure 10
[0198] S610, the computing device obtains the current rated rewriting / reading times and the current rewriting / reading times of the hard disk in the computing device.
[0199] It should be noted that the specific implementation of S610 is consistent with the specific implementation of S110, and the specific description of S610 can refer to the specific description of S110 described above, which will not be repeated here.
[0200] S620, when the current rewriting / reading times of the hard disk is greater than or equal to the target rewriting / reading times of the hard disk, the computing device outputs the prompt information according to the target time length.
[0201] The target rewriting / reading times is greater than the current rated rewriting / reading times of the hard disk.
[0202] It should be noted that when the current rewrite / read times of the hard disk is greater than or equal to the target rewrite / read times, at this time, the hard disk is greatly affected by the vibration in the environment of the computing device, and the probability of failure of the hard disk is relatively high; that is, the target rewrite / read times is used to represent the critical value of the probability of failure of the hard disk caused by the vibration in the environment of the computing device. That is, the target rewrite / read times is the minimum value of the rewrite / read times of the hard disk caused by the vibration in the environment of the computing device.
[0203] The target rewrite / read times can be preset or determined according to the current rated rewrite / read times, and the specific manner of determining the target rewrite / read times is not limited by the embodiments of the present application.
[0204] It should be noted that when the target rewrite / read times is determined according to the current rated rewrite / read times, because the rated rewrite / read times corresponding to the cooling device in the computing device at different speeds are different, the target rewrite / read times determined by different rated rewrite / read times are also different; the specific is as follows:
[0205] When the current rated rewrite / read times is the first rated rewrite / read times, the target rewrite / read times is the first target rewrite / read times; wherein the first rated rewrite / read times is the rated rewrite / read times of the hard disk in the computing device at the first speed.
[0206] When the current rated rewrite / read times is the second rated rewrite / read times, the target rewrite / read times is the second target rewrite / read times; wherein the second rated rewrite / read times is the rated rewrite / read times of the hard disk in the computing device at the second speed.
[0207] It should be noted that the first target rewrite / read times and the second target rewrite / read times are different; the ratio of the first target rewrite / read times to the first rated rewrite / read times is the same as the ratio of the second target rewrite / read times to the second rated rewrite / read times. That is, the target rewrite / read times is a preset multiple of the current rated rewrite / read times, and the preset multiple is greater than 1.
[0208] For example, assuming that the preset multiple is 2; when the current rated rewrite times is 5, the target rewrite times is 10; when the current rated rewrite times is 20, the target rewrite times is 40.
[0209] The target time length is the difference between the occurrence time of the Mth rewrite / read event and the occurrence time of the 1st rewrite / read event in the N rewrite / read events; wherein N is the current number of rewrite / read, and M is the target number of rewrite / read. That is, the target time length is the time length from the 1st rewrite / read event to the target number of rewrite / read event in the current number of rewrite / read events.
[0210] For example, assuming that the target number of rewrite is 2 times, and the current number of rewrite is 3 times, which are rewrite event A, rewrite event B and rewrite event C in turn. Among them, the occurrence time of rewrite event A is 2022-12-12 12:00:00, the occurrence time of rewrite event B is 2022-12-12 12:01:00, and the occurrence time of rewrite event C is 2022-12-12 12:01:30; then, the target time length is the difference between the occurrence time of the first two rewrite events (i.e. rewrite event A and rewrite event B) in rewrite event A, rewrite event B and rewrite event C (2022-12-12 12:01:00 and 2022-12-12 12:00:00, the difference is 1 minute), that is, the target time length is 1 minute.
[0211] The specific implementation of S620 is assumed that the target number of rewrite is 10 times, the target time length is 30 seconds, the current rated number of rewrite is 5 times, the current number of rewrite is 12 times; the computing device outputs "the current rated number of rewrite is 5 times, the actual number of rewrite is 12 times, of which the first 10 times of rewrite occurs within 30 seconds, please handle in time!!!".
[0212] It should be noted that the determination method of the current rated number of rewrite and the current number of rewrite is the specific implementation of S510-S530 in stage 2 of embodiment 1; the creation of the corresponding relationship between the rated number of rewrite and the speed of the heat dissipation device is referred to stage 1 of embodiment 1; here is not repeated.
[0213] The specific implementation of S620 is shown in Table 3 as follows:
[0214] When the target time length is greater than or equal to the first preset time length, the computing device outputs the fourth prompt information; wherein the fourth prompt information is used to prompt the influence degree of vibration in the environment where the computing device is currently located on the hard disk rewrite / read data in the computing device.
[0215] When the target time length is equal to the second preset time length and less than the first preset time length, the computing device outputs fifth prompt information; wherein, the influence degree represented by the fifth prompt information is lower than the influence degree represented by the fourth prompt information, and the influence degree is the influence degree of vibration in the current environment of the computing device on rewriting / reading data of the hard disk in the computing device.
[0216] Table 3
[0217]
[0218] For example, assuming that the first preset time length is 10 minutes, the second preset time length is 1 hour, and the target rewriting times are 20 times; when the target time length is 8 minutes, the computing device outputs "the vibration in the current environment of the computing device seriously affects the stability of the hard disk A, please handle immediately!!!". When the target time length is 45 minutes, the computing device outputs "the vibration in the current environment of the computing device affects the stability of the hard disk A, please handle in time!!!".
[0219] Optionally, the fourth prompt information and the fifth prompt information are output in different ways, for example, the fourth prompt information can display the warning information with the first color font through the pop-up box or the short message; and the fifth prompt information displays the early warning information through the interface with the second color font, wherein, the brightness of the first color is higher than that of the second color.
[0220] The embodiments of the present application display the fourth prompt information and the fifth prompt information in different ways and with different fonts, so that the user can more clearly feel the influence degree of the external vibration of the computing device on the rewriting / reading data of the hard disk.
[0221] The embodiments of the present application output the prompt information according to the target time length when the current rewriting / reading times of the hard disk are greater than or equal to the target rewriting / reading times of the hard disk; wherein, the target time length is the difference between the occurrence time of the Mth rewriting / reading event in N rewriting / reading events and the occurrence time of the first rewriting / reading event; the N is the current rewriting / reading times, and the M is the target rewriting / reading times; so that the user can timely grasp the situation that more rewriting events occur in a short time, and then timely prevent; thus, the maintenance cost of the hard disk is reduced.
[0222] Correspondingly, the embodiment of the present application provides a computing device for performing each step in the hard disk early warning method, and the computing device can be divided into functional modules according to the method examples, for example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be realized in the form of hardware or in the form of a software functional module. The division of the modules in the embodiment of the present application is illustrative, and is only a logical functional division, and another division mode can be used in actual implementation.
[0223] In the case of dividing each functional unit according to each function, Figure 11 A possible structural schematic diagram of the computing device involved in the above embodiment is shown. As shown in the figure, Figure 11 The computing device includes an acquisition module 101 and an output module 102.
[0224] The acquisition module 101 is configured to acquire the current rated rewrite / read times and the current rewrite / read times of the hard disk in the computing device, for example, performing step S110 in the method embodiment.
[0225] The output module 102 is configured to output prompt information according to the current rated rewrite / read times and the current rewrite / read times of the hard disk, for example, performing step S120 in the method embodiment.
[0226] Optionally, the computing device further includes a determination module 103.
[0227] The acquisition module 101 is configured to acquire the current rated rewrite / read times and the current rewrite / read times of the hard disk in the computing device, for example, performing step S210 in the method embodiment.
[0228] The determination module 103 is configured to determine the difference between the current rated rewrite / read times and the current rewrite / read times of the hard disk, for example, performing step S220 in the method embodiment.
[0229] The output module 102 is configured to output prompt information according to the difference, for example, performing step S230 in the method embodiment.
[0230] Optionally, the output module 102 is configured to output first prompt information when the difference is greater than or equal to a first preset difference, for example, performing step S550b in the method embodiment.
[0231] Optionally, the output module 102 is also configured to output second prompt information when the difference is greater than or equal to a second preset difference and less than the first preset difference, for example, performing step S550d in the method embodiment.
[0232] Optionally, the output module 102 is further configured to output a third prompt information when the number of the second prompt information outputted continuously is greater than a preset threshold; for example, step S550f in the above method embodiment is performed.
[0233] Optionally, the obtaining module 101 is configured to obtain the current rated rewrite / read times and the current rewrite / read times of the hard disk in the computing device; for example, step S610 in the above method embodiment is performed.
[0234] The output module 102 is configured to output the prompt information according to the target time length when the current rewrite / read times of the hard disk is greater than or equal to the target rewrite / read times of the hard disk; for example, step S620 in the above method embodiment is performed.
[0235] Optionally, the output module 102 is configured to output a fourth prompt information when the target time length is less than or equal to a first preset time length.
[0236] The output module 102 is configured to output a fifth prompt information when the target time length is less than or equal to a second preset time length and greater than the first preset time length.
[0237] Optionally, the obtaining module 101 is configured to obtain the current rotation speed of the heat dissipation device; for example, step S510 in the above method embodiment is performed.
[0238] The determining module 103 is configured to determine the current rated rewrite / read times corresponding to the current rotation speed of the heat dissipation device from the correspondence between the multiple rotation speed gears of the heat dissipation device and the multiple rated rewrite / read times of the hard disk; for example, step S520 in the above method embodiment is performed.
[0239] Optionally, the computing device further comprises a statistical module 104 and a creating module 105.
[0240] The obtaining module 101 is configured to receive the identification of a first rotation speed gear in the multiple rotation speed gears sent by a processor CPU in the computing device during the initialization process of the computing device; for example, step S410 in the above method embodiment is performed.
[0241] The statistical module 104 is configured to statistically determine the first rated rewrite / read times of the hard disk under the first rotation speed gear in response to the receiving operation; for example, step S420 in the above method embodiment is performed.
[0242] The creating module 105 is configured to establish the correspondence between the identification of the first rotation speed gear and the first rated rewrite / read times; for example, step S430 in the above method embodiment is performed.
[0243] Optionally, the computing device further comprises a control module 106.
[0244] The control module 106 is configured to control the heat dissipation device to work at the first speed gear during initialization of the computing device; for example, performing step S310 in the method embodiments described above.
[0245] The obtaining module 101 is configured to receive the first rated rewrite / read times sent by the hard disk controller of the computing device; for example, performing step S350 in the method embodiments described above.
[0246] The creating module 105 is configured to establish a corresponding relationship between the identification of the first speed gear and the first rated rewrite / read times; for example, performing step S360 in the method embodiments described above.
[0247] Optionally, the determining module 103 is configured to determine the second speed gear from the corresponding relationship according to the current speed of the heat dissipation device; for example, performing step S520b in the method embodiments described above.
[0248] The determining module 103 is further configured to determine the second rated rewrite / read times corresponding to the second speed gear as the current rated rewrite / read times of the hard disk; for example, performing step S520c in the method embodiments described above.
[0249] The various units of the computing device described above can also be configured to perform other actions in the method embodiments described above, and all related contents of each step involved in the method embodiments described above can be cited to the function description of the corresponding functional unit, which will not be repeated here.
[0250] Part or all of the steps in the obtaining module 101, the determining module 103, the statistical module 104, the creating module 105 and the control module 106 can be implemented by the processor 101 executing the code of the hard disk 102. Part or all of the steps in the output module 102 can be implemented by the network interface 103. Figure 1 Figure 1
[0251] In the above embodiments, all or part can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, all or part generates the processes or functions in the embodiments of the present application. The computer can be a general purpose computer, a special purpose computer, a computer network or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, magnetic disk, magnetic tape), optical media (such as digital video disc (DVD)), or semiconductor media (such as solid state drive (SSD)) and the like.
[0252] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
[0253] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0254] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0255] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0256] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a flash memory, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and various program code storage media.
[0257] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A hard drive early warning method, characterized in that, The method includes: The computing device obtains the current rated write / read count and the current write / read count of the hard disk in the computing device; wherein, the current rated write / read count is the number of times the hard disk rewrites / reads data due to the computing device itself; When the current write / read count of the hard drive is greater than or equal to the target write / read count of the hard drive, the computing device outputs a prompt message based on the target time length; wherein, the target write / read count is greater than the current rated write / read count of the hard drive, and the target time length is the difference between the occurrence time of the Mth write / read event and the occurrence time of the 1st write / read event out of N write / read events; N is the current write / read count, and M is the target write / read count; the prompt message is used to indicate the degree of impact of vibration in the current environment of the computing device on the write / read data of the hard drive.
2. The method according to claim 1, characterized in that, When the current rated rewrite / read count is the first rated rewrite / read count, the target rewrite / read count is the first target rewrite / read count; wherein, the first rated rewrite / read count is the rated rewrite / read count of the hard disk at a first rotation speed of the heat dissipation device in the computing device; When the current rated write / read count is the second rated write / read count, the target write / read count is the second target write / read count; wherein, the second rated write / read count is the rated write / read count of the hard drive under the second rotation speed of the heat dissipation device; the first target write / read count is different from the second target write / read count; the ratio of the first target write / read count to the first rated write / read count is the same as the ratio of the second target write / read count to the second rated write / read count.
3. The method according to claim 1 or 2, characterized in that, The step of outputting the prompt information based on the target time includes: When the target time length is less than or equal to the first preset time length, the computing device outputs a fourth prompt message; the fourth prompt message is used to indicate the degree of impact of vibration in the current environment of the computing device on the hard disk rewriting / reading data; When the target time length is less than or equal to the second preset time length and greater than the first preset time length, the computing device outputs a fifth prompt message; the degree of influence represented by the fifth prompt message is lower than the degree of influence represented by the fourth prompt message, and the degree of influence is the degree of influence of the vibration in the current environment of the computing device on the hard disk rewriting / reading data.
4. The method according to claim 1 or 2, characterized in that, The current rated rewrite / read count specifically refers to the number of rewrite / read counts of the hard drive at the current rotation speed of the heat dissipation device in the computing device during the initialization process of the computing device; wherein, the current rotation speed is the rotation speed of the heat dissipation device when the computing device obtains the current rewrite / read count.
5. The method according to claim 4, characterized in that, Before obtaining the current rated write / read count and current write / read count of the hard disk in the computing device, the method further includes: The computing device obtains the current rotational speed of the heat dissipation device; The computing device determines the current rated write / read count corresponding to the current rotation speed based on the current rotation speed of the heat dissipation device, from the correspondence between multiple rotation speed levels of the heat dissipation device and multiple rated write / read counts of the hard drive; wherein, the multiple rotation speed levels and the multiple rated write / read counts are in one-to-one correspondence, and the rated write / read count corresponding to a rotation speed level is the rated write / read count of the hard drive at that rotation speed level.
6. The method according to claim 5, characterized in that, The method further includes: During the initialization process of the computing device, the hard disk controller of the computing device receives an identifier of the first speed setting among the plurality of speed settings sent by the CPU of the computing device; wherein, the first speed setting is the speed setting currently used by the heat dissipation device; In response to the receiving operation, the hard disk controller of the computing device counts the first rated rewrite / read count of the hard disk at the first speed setting, and establishes a correspondence between the identifier of the first speed setting and the first rated rewrite / read count; wherein, the plurality of rated rewrite / read counts includes the first rated rewrite / read count.
7. The method according to claim 5, characterized in that, The method further includes: During the initialization process of the computing device, the CPU in the computing device controls the heat dissipation device to operate at a first speed setting; wherein, the plurality of speed settings include the first speed setting; During the process of controlling the heat dissipation device to operate at the first speed setting, the CPU in the computing device receives a first rated number of write / read cycles sent by the hard disk controller of the computing device; wherein, the plurality of rated write / read cycles includes the first rated number of write / read cycles; The CPU in the computing device establishes a correspondence between the identifier of the first speed range and the first rated number of rewrite / read cycles.
8. The method according to any one of claims 5-7, characterized in that, The step of determining the current rated write / read count based on the current rotation speed of the heat dissipation device, from the correspondence between multiple rotation speed levels of the heat dissipation device and multiple rated write / read counts of the hard drive, includes: The computing device determines a second speed setting from the corresponding relationship based on the current speed of the heat dissipation device, wherein the second speed setting includes the current speed of the heat dissipation device; The computing device determines the second rated rewrite / read count corresponding to the second speed setting as the current rated rewrite / read count of the hard drive.
9. A computing device, characterized in that, The device includes a memory and a processor, the memory being coupled to the processor; the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the processor causes the processor to perform the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Fan control method and device, electronic equipment and readable storage medium
CN111506174A
Disk control apparatus, disk control method, and storage medium storing disk control program
US20120084503A1