Hard disk detection method and computing device

By writing and comparing sample data to the hard drive, the system detects and replaces hard drives with signal interference, thus solving the problem of reduced data storage density and data loss caused by mechanical hard drive signal interference, and improving detection accuracy and user experience.

CN115713960BActive Publication Date: 2025-12-16XFUSION DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211397318.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-09
Publication Date
2025-12-16
Estimated Expiration
2042-11-09

AI Technical Summary

Technical Problem

Mechanical hard drives are prone to signal interference between magnetic recording tracks during operation, which affects data storage density and may lead to data loss. Users cannot effectively detect and replace the affected hard drives.

Method used

By writing a first sample of data smaller than the pre-written sample data into the first area of ​​the hard drive, and comparing the detection data before and after the repeated writing, signal interference between magnetic recording tracks is detected, it is determined whether signal interference exists, and the user is prompted to replace the hard drive.

Benefits of technology

It improves the accuracy of hard drive signal interference detection, avoids reduced data storage density and data loss, and optimizes the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115713960B_ABST
    Figure CN115713960B_ABST
Patent Text Reader

Abstract

The application relates to a hard disk detection method and a computing device, and relates to the technical field of hardware detection. In the application, first sample data is written in a first writing position in a first region of a hard disk to be tested, and the first region is previously written with second sample data. Data of the first region is read as first detection data. After the first sample data is repeatedly written in the first writing position for multiple times, data of the first region is read as second detection data. In the case that the first detection data and the second detection data are inconsistent, it is determined that the hard disk to be tested has a signal interference phenomenon. The method provided in the application can detect the signal interference phenomenon of the hard disk by comparing the changes of the second sample data written in the adjacent tracks and the far tracks of the first sample data before and after the first sample data is repeatedly written.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of hardware detection, and particularly relates to a hard disk detection method and a computing device. BACKGROUND

[0002] A mechanical hard disk (HDD) is an important component of a computing device. Generally, the mechanical hard disk positions a magnetic recording head to a corresponding magnetic recording track on a disk to realize reading and writing of data. However, since the angle between the magnetic recording head and the magnetic recording track changes, and the write head edge magnetic field of the magnetic recording head cannot be completely shielded. Therefore, in the working process of the mechanical hard disk, the signal interference phenomenon (xTI) between the magnetic recording tracks is prone to occur. For example, adjacent track interference (ATI) and far track interference (FTI). On the one hand, the signal interference phenomenon affects the data storage density of the magnetic recording surface, and on the other hand, it can also cause the data written by the user in the mechanical hard disk to be lost.

[0003] Therefore, how to accurately detect the signal interference phenomenon between the magnetic recording tracks of the mechanical hard disk becomes a technical problem to be solved. SUMMARY

[0004] Embodiments of the present application provide a hard disk detection method and a computing device, which are used for detecting the signal interference phenomenon between the magnetic recording tracks of the mechanical hard disk, so that the user replaces the hard disk with the detected signal interference phenomenon, thereby avoiding the data storage density of the magnetic recording surface of the hard disk used by the user being low, and avoiding the data written by the user in the mechanical hard disk being lost.

[0005] To achieve the above object, embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a hard disk detection method is provided, and the method comprises:

[0007] write first sample data in a first write position in a first region of the hard disk to be tested, the first region being pre-written with second sample data; the first sample data has a size smaller than that of the second sample data, and the first sample data is different from the second sample data; read data of the first region as first detection data; after repeatedly writing the first sample data in the first write position for multiple times, read data of the first region as second detection data; in a case where the first detection data and the second detection data are inconsistent, determine that the hard disk to be tested has a signal interference phenomenon. The method provided in the application can detect the signal interference phenomenon of the hard disk by comparing the changes of the second sample data written in the adjacent tracks and the far tracks of the first sample data before and after the first sample data is repeatedly written, so that the user can replace the hard disk with the detected signal interference phenomenon, thereby avoiding the use of the hard disk with a low data storage density of the magnetic recording surface, and avoiding the loss of the data written in the hard disk.

[0008] In a possible implementation of the first aspect, the first write position is a center position of the first region. When the hard disk has the signal interference phenomenon between the magnetic recording tracks, writing data in the first write position can cause the data written in the adjacent tracks and the far tracks of the magnetic recording track corresponding to the first write position to change. Therefore, the method provided in the application sets the center position of the first region as the first write position, so that when the first sample data is repeatedly written in the first write position, the data written in the adjacent tracks and the far tracks of the magnetic recording track corresponding to the first write position can change more obviously when the hard disk has the signal interference phenomenon between the magnetic recording tracks, thereby increasing the difference between the first detection data and the second detection data, and effectively improving the accuracy of the detection result.

[0009] In a possible implementation of the first aspect, before writing the first sample data in the first write position in the first region of the hard disk to be tested, the method further includes: determining the first region on the hard disk to be tested in a balanced manner. The second sample data is written in the first region, and the capacity of the first region is equal to the size of the second sample data. The method provided in the application determines the first region storing the second sample data in the hard disk to be tested, and then repeatedly writes the first sample data smaller than the second sample data in the first write position in the first region, thereby verifying the influence of writing the first sample data on the second sample data written, and further detecting the signal interference phenomenon between the magnetic recording tracks of the hard disk.

[0010] In a possible implementation of the first aspect, the first area is determined on the hard disk to be tested in a balanced manner, including: determining a plurality of equally divided capacity points according to the storage capacity of the hard disk to be tested; and determining the first area on the hard disk to be tested according to the plurality of equally divided capacity points. The method provided in the application can detect the signal interference phenomenon between the magnetic recording tracks of the hard disk by determining the first area in which the second sample data is stored on the hard disk to be tested, and then writing the first sample data smaller than the second sample data at the first write position in the first area multiple times, and verifying the influence of writing the first sample data on the second sample data that has been written.

[0011] In a possible implementation of the first aspect, the method further includes: in a case where the first detection data and the second detection data are consistent, determining that the hard disk to be tested does not have the signal interference phenomenon. The method provided in the application can accurately detect whether the hard disk has the signal interference phenomenon according to the first detection data and the second detection data.

[0012] In a possible implementation of the first aspect, the number of the first areas is a plurality; and in a case where the first detection data and the second detection data are inconsistent, determining that the hard disk to be tested has the signal interference phenomenon includes: in a case where the first detection data and the second detection data corresponding to any one or more of the first areas are inconsistent, determining that the hard disk to be tested has the signal interference phenomenon. The method provided in the application can improve the accuracy of the detection result by detecting a plurality of first areas of the hard disk to be tested.

[0013] In a possible implementation of the first aspect, the method further includes: in a case where the first detection data and the second detection data are inconsistent, determining the number of characters that are inconsistent in the first detection data and the second detection data; and in a case where the number of characters exceeds a preset threshold, determining that the working state of the hard disk to be tested is abnormal. The method provided in the application can determine the working state of the hard disk to be tested according to the number of characters that are inconsistent in the first detection data and the second detection data, on the one hand, determine the working state of the hard disk to be tested with a relatively serious signal interference phenomenon as abnormal, and prompt the user to replace the hard disk, so as to avoid affecting the user experience, and on the other hand, determine the working state of the hard disk to be tested with a relatively non-serious signal interference phenomenon as normal, so as to avoid the user from replacing the hard disk too frequently, which leads to high cost and affects the user experience.

[0014] In a possible implementation of the first aspect, the method further includes: determining that the working state of the hard disk to be tested is normal when the number of characters does not exceed the preset threshold. The method provided in the application determines the working state of the hard disk to be tested according to the number of inconsistent characters in the first detection data and the second detection data, on the one hand, determines that the working state of the hard disk to be tested with a relatively serious signal interference phenomenon is abnormal, and prompts the user to replace the hard disk, thereby avoiding affecting the user experience, and on the other hand, determines that the working state of the hard disk to be tested with a less serious signal interference phenomenon is normal, thereby avoiding the user from replacing the hard disk frequently, which leads to high cost and affects the user experience.

[0015] In a possible implementation of the first aspect, the operation of writing data in the hard disk to be tested is implemented based on a data writing tool in input output (IO) storage test software. The method provided in the application writes the first sample data at the first writing position in the first area through the data writing tool in the storage test software, and also writes the second sample data in the first area. For example, the data writing tool is an fio tool. In this way, detection of whether there is a signal interference phenomenon between the magnetic recording tracks of the hard disk can be implemented.

[0016] In a possible implementation of the first aspect, the operation of reading data in the hard disk to be tested is implemented based on a data reading tool. The method provided in the application reads the data written in the first area through the data reading tool. For example, the data reading tool can be a hexdump tool. In this way, the first detection data and the second detection data are obtained, and then the first detection data is used to verify the second detection data, thereby implementing detection of whether there is a signal interference phenomenon between the magnetic recording tracks of the hard disk.

[0017] In a possible implementation of the first aspect, the operation of reading data in the hard disk to be tested is implemented based on a data reading tool. The method provided in the application reads the data written in the first area through the data reading tool. For example, the data reading tool can be a hexdump tool. In this way, the first detection data and the second detection data are obtained, and then the first detection data is used to verify the second detection data, thereby implementing detection of whether there is a signal interference phenomenon between the magnetic recording tracks of the hard disk.

[0018] In a possible implementation of the second aspect, the processor is further configured to determine that the hard disk to be tested does not have a signal interference phenomenon when the first detection data and the second detection data are consistent.

[0019] In a third aspect, a hard disk detection apparatus is provided, which comprises functional units for performing any of the methods provided in the first aspect, and each of the functional units performs actions by hardware or by hardware executing corresponding software. For example, the control device can comprise a writing unit, a reading unit and a processing unit. The writing unit is configured to write first sample data at a first writing position in a first region of a hard disk to be tested, and the first region is pre-written with second sample data; the first sample data has a size smaller than that of the second sample data. The reading unit is configured to read data of the first region as first detection data. The reading unit is further configured to read data of the first region as second detection data after the first sample data is written at the first writing position for multiple times. The processing unit is configured to determine that the hard disk to be tested has a signal interference phenomenon when the first detection data and the second detection data are inconsistent.

[0020] In a fourth aspect, a computing device is provided, which comprises a processor and a memory, the processor is connected with the memory and a hard disk to be tested respectively; the memory is configured to store computer execution instructions, and the processor is configured to execute the computer execution instructions stored in the memory to write and read data in the hard disk to be tested, so as to implement any of the methods provided in the first aspect.

[0021] In a fifth aspect, a chip is provided, which comprises a processor and an interface circuit; the interface circuit is configured to receive code instructions and transmit the code instructions to the processor; and the processor is configured to run the code instructions to execute any of the methods provided in the first aspect.

[0022] In a sixth aspect, a computer readable storage medium is provided, which stores computer execution instructions, and when the computer execution instructions are run on a computer, the computer is caused to execute any of the methods provided in the first aspect.

[0023] In a seventh aspect, a computer program product is provided, which comprises computer execution instructions, and when the computer execution instructions are run on a computer, the computer is caused to execute any of the methods provided in the first aspect.

[0024] The technical effects brought by any of the designs in the second aspect to the seventh aspect can refer to the technical effects brought by different implementation manners in the first aspect, which will not be described herein. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 An application scenario diagram of a hard disk detection method provided by an embodiment of the present application is shown;

[0026] Figure 2 A structural schematic diagram of a computing device provided by an embodiment of the present application is shown;

[0027] Figure 3 Fig. 1 shows a flow diagram of a hard disk detection method according to an embodiment of the present application;

[0028] Figure 4 Fig. 2 shows a schematic diagram of a first area according to an embodiment of the present application;

[0029] Figure 5 Fig. 3 shows a schematic diagram of another first area according to an embodiment of the present application;

[0030] Figure 6 Fig. 4 shows a schematic diagram of another first area according to an embodiment of the present application;

[0031] Figure 7 Fig. 5 shows a schematic diagram of another first area according to an embodiment of the present application;

[0032] Figure 8 Fig. 6 shows a structural block diagram of a hard disk detection device according to an embodiment of the present application. DETAILED DESCRIPTION

[0033] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, "multiple" means two or more than two, unless otherwise specified. "At least one of the following" or similar expressions means any combination of the items, including any combination of single item or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0034] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, "first", "second", etc. are used in the embodiments of the present application to distinguish the same items or similar items with basically the same function and effect. Those skilled in the art can understand that "first", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. also do not necessarily mean different. Meanwhile, in the embodiments of the present application, "exemplary" or "for example" is used to represent as an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. In fact, "exemplary" or "for example" is used to present the relevant concept in a specific way, and is convenient for understanding.

[0035] To realize detection on the signal interference phenomenon between the magnetic recording tracks of the mechanical hard disk, in the related art, the hard disk manufacturer can test the devices in the hard disk in dimension, and then obtain the Symbol Error Rate (SER) variation of the adjacent track and the far track of the magnetic recording track. For example, the hard disk head and the head stack are tested. However, due to the confidentiality of the hard disk manufacturing technology, the hard disk manufacturer does not open the track position, the error rate and other related parameter interfaces of the hard disk to the user. Therefore, the user cannot detect the signal interference phenomenon of the magnetic recording track of the hard disk.

[0036] In view of this, the application provides a hard disk detection method. The method determines a first area in which second sample data is stored in a hard disk to be tested, and then repeatedly writes first sample data smaller than the second sample data at a first write position in the first area. By comparing the variation of the second sample data that has been written in the first area before and after the repeated writing of the first sample data, the signal interference phenomenon of the hard disk can be detected. The user can replace the hard disk with the detected signal interference phenomenon. On the one hand, the data storage density of the magnetic recording surface of the hard disk used by the user is low. On the other hand, the data loss in the hard disk can be avoided.

[0037] The application scenario of the hard disk detection method provided by the embodiments of the application is exemplarily described below.

[0038] Figure 1 The application scenario diagram of the hard disk detection method provided by the embodiments of the application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the application scenario includes a computing device 110 and a hard disk 120 to be tested. The computing device 110 is connected to the hard disk 120 to be tested to realize data writing and data reading operations in the hard disk 120 to be tested.

[0039] As an example, the computing device 110 can be any device with data processing capability, such as a general-purpose computer, a personal computer or a server, etc. The specific implementation of the computing device 110 is not limited here.

[0040] Optionally, the hard disk 120 to be tested can be any hard disk with magnetic recording tracks and capable of realizing data writing and data reading functions. For example, a mechanical hard disk. The specific implementation of the hard disk 120 to be tested is not limited here.

[0041] It can also be understood that Figure 1 The application scenario provided and the functions realized by each execution subject in the application scenario are only one exemplary implementation in the embodiments of the application. The application scenario and the functions realized by each execution subject in the embodiments of the application include but are not limited to the above description.

[0042] Figure 2 A structural schematic diagram of the computing device 110 provided by the embodiments of the present application is shown. The computing device 110 includes a processor 210, a memory 220, and at least one communication interface 230.

[0043] The processor 210 can include one or more processing cores. The processor 210 connects various parts within the computing device 110 by various interfaces and lines, performs various functions of the computing device 110 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 220, and calling data stored in the memory 220. Optionally, the processor 210 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 210 can integrate a combination of one or more of a central processing unit (CPU), a graphics processor (graphics processing unit, GPU), and a modem. It can be understood that the above-mentioned modem can also not be integrated into the processor 210, but can be implemented separately by a communication chip.

[0044] The memory 220 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 220 includes a non-transitory computer-readable storage medium. The memory 220 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 220 can include a storage program area. The storage program area can store instructions for implementing an operating system, instructions for implementing at least one function (such as a data writing function, a data reading function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.

[0045] The communication interface 230 is used to communicate with other devices, equipment or communication networks, such as data storage devices, image processing equipment or Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. For example, the processor 210 of the computing device 110 is connected with the hard disk to be tested 120 through the communication interface 230.

[0046] It should be noted that the number of the communication interfaces 230 can be multiple. The computing device 110 can be connected with the multiple hard disks to be tested 120 through the multiple communication interfaces 230, so as to realize the data writing and data reading operations in the multiple hard disks to be tested, and further realize the detection of the signal interference phenomenon between the magnetic recording tracks of the multiple hard disks to be tested 120. The number of the communication interfaces 230 and the number of the hard disks to be tested 120 connected with the computing device 110 are not particularly limited. Figure 1

[0047] In a physical implementation, the above-mentioned devices (such as the processor 210, the memory 220 and the communication interface 230) can be devices in the same computing device (such as a server) respectively, or at least two of them can be arranged in the same computing device as different devices in the computing device, such as the deployment of devices or components in a distributed system.

[0048] It can be understood that the structure illustrated in the embodiment does not constitute a specific limitation on the computing device 110. In other embodiments of the present application, the computing device 110 can include more or fewer components than those illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software or a combination of software and hardware.

[0049] The hard disk detection method provided by the embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0050] Figure 3 A flowchart of a hard disk detection method provided by an embodiment of the present application. Optionally, the method can be applied to the application scenario shown in Figure 1 and executed by the computing device 110 with the hardware structure shown in Figure 2 The method can include the following steps:

[0051] S301, write first sample data in a first write position in a first region of a hard disk to be tested.

[0052] Specifically, the processor of the computing device sends a storage instruction of the first sample data to the hard disk to be tested, the storage instruction including the position information of the first write position and the first sample data, and the controller of the hard disk to be tested writes the first sample data in the first write position according to the position information of the first write position in response to the storage instruction.

[0053] Specifically, the first region is pre-written with second sample data, and the second sample data is data of a preset size and a preset content, and the capacity of the first region is the same as the size of the second sample data.

[0054] ​In one possible implementation, the first region is randomly selected by the computing device on the hard drive under test or determined according to a load balancing principle; this is not limited. Optionally, the number of first regions determined by the computing device on the hard drive under test can be one or more; this is not limited.

[0055] Taking the determination of the first region based on the principle of balancing as an example, firstly, the computing device determines multiple equally divided capacity points based on the maximum capacity of the hard drive under test. These multiple capacity points can be understood as multiple starting write positions for the first region. The starting write position is a data point used to write the first character of the second sample data. Then, the second sample data is written starting from the starting write position. After the second sample data is written, the area where the second sample data has been written is the first region.

[0056] In one example, the maximum capacity of the hard drive under test is 2TB. Based on the maximum capacity of the hard drive under test, multiple capacity points are determined with 50GB storage capacity intervals according to the principle of balancing. There is a 50GB storage capacity interval between every two capacity points. Then, each capacity point is used as the starting position for writing the first region. The second sample data is written from the starting position. If the size of the second sample data can be 100MB, the region where the second sample data is written is a first region with a size of 100MB.

[0057] Specifically, the processor of the computing device sends a storage instruction for the second sample data to the hard disk under test. This storage instruction includes location information of the starting write position of the first region and the second sample data. The controller of the hard disk under test responds to the storage instruction and writes the second sample data into the first region according to the location information of the starting write position of the first region. It should be noted that the above is only an exemplary description of the first region, and the specific method for determining the first region is not particularly limited in this application embodiment.

[0058] In another example, see Figure 4 , Figure 4 This is a schematic diagram of a first region shown in an embodiment of this application. The first region can be any one of multiple first regions on the hard disk under test. The first region corresponds to five magnetic recording tracks on the disk platter of the hard disk under test, namely tracks A, B, C, D and E. The first region is written with second sample data of the same size as the first region, as shown in the figure. The data content of the second sample data includes multiple consecutive 1s.

[0059] It should be noted that the first sample data and the second sample data can be data of any content, and the first sample data and the second sample data are different. The embodiments of this application do not impose any special restrictions on the content of the first sample data and the second sample data.

[0060] Specifically, the first write position is any position in the first region, which is used as a write position of the first sample data. The first write position can also be understood as a region of the first sample data in the first region. For example, in combination with Figure 4 , the first write position can be located in the region corresponding to any one of the tracks A, B, C, D, and E.

[0061] Optionally, the first write position can be located at the center position of the first region. In combination with Figure 4 , the first write position is located on the track C.

[0062] When the first sample data is written at the first write position, the data written in the adjacent tracks and the far tracks of the magnetic recording track corresponding to the first write position can be changed due to the signal interference phenomenon between the magnetic recording tracks of the hard disk. Therefore, the method provided by the present application sets the first write position at the center position of the first region, so that when the first sample data is written at the first write position, the data written in the adjacent tracks and the far tracks around the magnetic recording track where the first write position is located can be changed, in combination with Figure 5 , when the first sample data is written on the track C, the data written in the tracks A, B, D, and E can be changed. When the first sample data is written on the track A, only the data written in the tracks B and C in the first region can be changed, and the data written in the tracks D and E can not be changed due to the far distance from the track A. Therefore, the method provided by the present application sets the first write position at the center position of the first region, so that when the hard disk has a signal interference phenomenon between the magnetic recording tracks, the changes of the tracks in the first region are more obvious, that is, the difference between the first detection data and the second detection data is increased, and thus the accuracy of the detection result is effectively improved.

[0063] Specifically, the first sample data is data with a preset size and content, and the size of the first sample data is smaller than the size of the second sample data, that is, the size of the first sample data is smaller than the capacity of the first region. For example, in the case that the size of the second sample data is 100MB, the size of the first sample data can be 20MB. It should be noted that the data content of the first sample data is different from that of the second sample data.

[0064] For example, in combination with Figure 4 , see Figure 5 , Figure 5 is a schematic diagram of a first region shown by an embodiment of the present application, which is written with the first sample data at the track C as the first write position on the basis of Figure 4 . The data content of the first sample data is a plurality of continuous 0s.

[0065] In a possible implementation, the writing operations of the first sample data and the second sample data are implemented based on a data writing tool in input-output (IO) storage test software.

[0066] Optionally, the data writing tool can be one of an fio tool, an iometer tool, or an Oriongon tool.

[0067] The method provided in the application can write the first sample data to the first writing position in the first area by using the data writing tool in the storage test software, and can also write the second sample data to the first area, thereby achieving detection of whether there is signal interference phenomenon between the magnetic recording tracks of the hard disk. In addition, in the method provided in the application, there are various data writing tools for the user to select when writing data to the hard disk to be tested, so that the use requirements of the user in different use scenarios can be met, thereby improving the user experience.

[0068] S302, reading data of the first area as first detection data;

[0069] Specifically, the computing device reads the data of the first area and takes the read data as the first detection data. It should be understood that the first detection data is the benchmark data of the hard disk detection method provided in the embodiments of the application, and the benchmark data is used to verify the second detection data obtained in the following S303.

[0070] Specifically, the processor of the computing device sends a reading instruction of the first detection data to the hard disk to be tested, the reading instruction including position information corresponding to the first area, and the hard disk to be tested reads the data written in the first area according to the position information corresponding to the first area in response to the reading instruction, as the first detection data.

[0071] In an example, in combination with Figure 5 , Figure 5 The first detection data corresponding to the first area shown in FIG. 8 is the data of the track A-track E, which is “1111111111111111111111000000000001111111111111111111111” in sequence.

[0072] It should be noted that the above first detection data is only an example, and the first sample data and the second sample data stored in the hard disk to be tested can be binary, octal, decimal, or hexadecimal data, which is not particularly limited here.

[0073] S303, after repeating writing the first sample data at the first write position for multiple times, reading data of the first region as second detection data. Specifically, the computing device writes the first sample data at the first write position for multiple times, which can also be understood as repeating the operation of S301. That is, writing the same first sample data at the same first write position for multiple times.

[0074] It should be noted that the number of repeated writing of the first sample data can be any number, which can be set by the user according to the detection requirement. For example, it can be 50 times. Here, the number of repeated writing of the first sample data is not particularly limited.

[0075] Specifically, first, the processor of the computing device sends a storage instruction of a preset number of first sample data to the hard disk to be tested, the storage instruction including the position information of the first write position and the first sample data, and the controller of the hard disk to be tested writes the first sample data at the first write position according to the position information of the first write position in response to the storage instruction. After repeating writing the first sample data at the first write position for multiple times, the processor of the computing device sends a reading instruction of the second detection data to the hard disk to be tested, the reading instruction including the position information corresponding to the first region, and the hard disk to be tested reads the data written in the first region according to the position information corresponding to the first region in response to the reading instruction as the second detection data.

[0076] In the case where the hard disk to be tested has signal interference phenomenon, after repeating writing the first sample data at the first write position for multiple times, the data written in the adjacent tracks and the far tracks corresponding to the first sample data will change, thereby causing the first detection data and the second detection data to be inconsistent.

[0077] For example, referring to Figure 6 , Figure 6 For example, referring to Figure 5 the first region after repeating writing the first sample data at the first write position for multiple times. Figure 6 The second detection data corresponding to the first region shown in FIG. 8 is that the data of tracks A-E are “1111111111111001111111000000000001111111111111111110000” in turn. Among them, the 3rd-4th data of track B and the 7th-11th data of track E change from the originally written 1 to 0 due to the signal interference phenomenon between the magnetic recording tracks.

[0078] In the case where the hard disk to be tested has no signal interference phenomenon, after repeating writing the first sample data at the first write position for multiple times, the data written in the adjacent tracks and the far tracks corresponding to the first sample data will not change, thereby causing the first detection data and the second detection data to be consistent.

[0079] For example, referring toFigure 7 , Figure 7 to write the first sample data at the first write position repeatedly. Figure 5 The first region shown in FIG. 6 corresponds to the second detection data of the tracks A-E, which are "1111111111111111111111000000000001111111111111111111111" in sequence. It can be seen that the data written in the tracks A-E has not changed. Figure 7

[0080] In a possible implementation, after the first sample data is written at the first write position repeatedly, if the data reading of the first region fails, it is determined that the hard disk to be tested has the signal interference phenomenon.

[0081] Specifically, in the case that the magnetic recording tracks of the hard disk to be tested have the signal interference phenomenon, the first sample data is written at the first write position repeatedly, which can cause more changes in the data written in the adjacent tracks and the far tracks of the magnetic recording track where the first write position is located, and further cause the data written in the first region to be damaged, thereby causing the data reading of the first region to fail. Therefore, if the data reading of the first region fails, it is determined that the hard disk to be tested has the signal interference phenomenon.

[0082] The method provided in the present application can determine that the hard disk to be tested has the signal interference phenomenon in the case of data reading failure. The detection of the hard disk to be tested is avoided from failing due to the failure in successfully reading the second detection data.

[0083] In a possible implementation, the operation of the processor of the computing device to read the first detection data and the second detection data in the hard disk to be tested is based on a data reading tool, for example, a hexdump tool. Based on the hexdump tool, the first detection data and the second detection data are obtained from the first region, and then the second detection data is verified according to the first detection data, thereby realizing the detection of whether the signal interference phenomenon exists between the magnetic recording tracks of the hard disk.

[0084] S304、In the case that the first detection data and the second detection data are inconsistent, it is determined that the hard disk to be tested has the signal interference phenomenon.

[0085] Specifically, the computing device can compare each of the first detection data and the second detection data one by one, or use any data difference detection method to detect, in the case that any inconsistency exists between the first detection data and the second detection data, it is determined that the first detection data and the second detection data are inconsistent, and then it is determined that the hard disk to be tested has the signal interference phenomenon.

[0086] ​In the case that the to-be-tested hard disk has a signal interference phenomenon, after the first sample data is repeatedly written at the first write position for multiple times, the data written in the adjacent track and the far track corresponding to the first sample data will change, and thus the first detection data and the second detection data are inconsistent. Therefore, in the case that the first detection data and the second detection data are inconsistent, it is determined that the to-be-tested hard disk has a signal interference phenomenon.

[0087] For example, the first region shown in FIG. 1 and FIG. 2 respectively corresponds to the first detection data and the second detection data. As can be seen, after the first sample data is repeatedly written at the first write position for multiple times, the data written in the track B and the track E changes, and thus the first detection data and the second detection data are inconsistent. Therefore, it is determined that the to-be-tested hard disk has a signal interference phenomenon. Figure 5 Figure 6 For example, the first region shown in FIG. 1 and FIG. 2 respectively corresponds to the first detection data and the second detection data. As can be seen, after the first sample data is repeatedly written at the first write position for multiple times, the data written in the track B and the track E changes, and thus the first detection data and the second detection data are inconsistent. Therefore, it is determined that the to-be-tested hard disk has a signal interference phenomenon.

[0088] In a possible implementation, the number of the first regions can be multiple. The computing device simultaneously writes the first sample data in multiple first regions of the to-be-tested hard disk, and then reads the data of each first region as the first detection data. Then, after the first sample data is repeatedly written at the first write position for multiple times, the data of each first region is read as the second detection data. In the case that the first detection data and the second detection data corresponding to any one first region are inconsistent, it is determined that the to-be-tested hard disk has a signal interference phenomenon.

[0089] The method provided in the present application can improve the accuracy of the detection result by detecting multiple first regions of the to-be-tested hard disk.

[0090] In a possible implementation, the method further includes the following steps:

[0091] S305, in the case that the first detection data and the second detection data are consistent, it is determined that the to-be-tested hard disk does not have a signal interference phenomenon.

[0092] Specifically, consistent means exactly the same. In the case that the first detection data and the second detection data are exactly the same, it is determined that the to-be-tested hard disk does not have a signal interference phenomenon.

[0093] In the case that the to-be-tested hard disk does not have a signal interference phenomenon, after the first sample data is repeatedly written at the first write position for multiple times, the data written in the adjacent track and the far track corresponding to the first sample data will not change, and thus the first detection data and the second detection data are consistent. Therefore, in the case that the first detection data and the second detection data are consistent, it is determined that the to-be-tested hard disk does not have a signal interference phenomenon.

[0094] For example, the first region shown in FIG. 1 and FIG. 2 respectively corresponds to the first detection data and the second detection data. As can be seen, after the first sample data is repeatedly written at the first write position for multiple times, the data written in the track B and the track E changes, and thus the first detection data and the second detection data are inconsistent. Therefore, it is determined that the to-be-tested hard disk has a signal interference phenomenon. Figure 5 Figure 7 ​​The first region shown corresponds to the first detection data and the second detection data respectively. It can be seen that after the first sample data is repeatedly written at the first writing position, the data written in the tracks A, B, D and E does not change, at this time, the first detection data and the second detection data read by the computing device are consistent, and therefore, it is determined that the to-be-tested hard disk does not have the signal interference phenomenon.

[0095] It should be noted that the method provided by the embodiments of the present application can simultaneously detect a plurality of first regions in the to-be-tested hard disk, and in the case that the first detection data and the second detection data corresponding to any first region are inconsistent, it is determined that the to-be-tested hard disk has the signal interference phenomenon. The embodiments of the present application can also detect one of the plurality of first regions in the to-be-tested hard disk, and in the case that the first detection data and the second detection data corresponding to the first region are inconsistent, it is determined that the to-be-tested hard disk has the signal interference phenomenon. It should be understood that the more the number of first regions detected simultaneously, the higher the detection accuracy, that is, the more comprehensive the to-be-tested hard disk. The user can select the number of first regions in the to-be-tested hard disk according to the detection requirement, and the number of first regions is not particularly limited in the embodiments of the present application.

[0096] As can be seen from S301-S305, the method provided by the present application can determine the first region in which the second sample data is stored in the to-be-tested hard disk, then repeatedly write the first sample data smaller than the second sample data at the first writing position in the first region, and by comparing the change of the second sample data written in the first region before and after the first sample data is repeatedly written, the signal interference phenomenon of the hard disk can be detected. On the one hand, it can eliminate the decrease of the data storage density of the magnetic recording surface caused by the signal interference phenomenon, and on the other hand, it can avoid the loss of the data written in the hard disk.

[0097] It can be understood that when the to-be-tested hard disk has the signal interference phenomenon, the signal interference phenomenon of some to-be-tested hard disks is not serious, at this time, replacing these to-be-tested hard disks leads to high cost, and therefore, it is necessary to determine the degree of the signal interference phenomenon of the to-be-tested hard disk, which can also be understood as determining the working state of the to-be-tested hard disk.

[0098] In a possible implementation, the above method further includes: in the case that the first detection data and the second detection data are inconsistent, determining the number of inconsistent characters in the first detection data and the second detection data; in the case that the number of characters exceeds a preset threshold, determining that the working state of the to-be-tested hard disk is abnormal. In the case that the number of characters does not exceed the preset threshold, determining that the working state of the to-be-tested hard disk is normal.

[0099] Specifically, the preset threshold can be determined according to the data amount of the first detection data. For example, the preset threshold can be half of the total amount of characters in the first detection data. In the case where the total amount of characters in the first detection data is 100, the preset threshold is 50.

[0100] It should be noted that the above explanation of the preset threshold is only exemplary, and the specific setting manner of the preset threshold is not particularly limited in the embodiments of the present application.

[0101] In another possible implementation, the above method further includes: in the case where the first detection data and the second detection data are inconsistent, determining the number of inconsistent characters in the first detection data and the second detection data, and in the case where the ratio of the number of inconsistent characters in the first detection data and the second detection data to the total amount of characters in the first detection data exceeds a preset threshold, determining that the working state of the hard disk under test is abnormal. In the case where the ratio of the number of inconsistent characters in the first detection data and the second detection data to the total amount of characters in the first detection data does not exceed the preset threshold, determining that the working state of the hard disk under test is normal.

[0102] The method provided in the present application determines the working state of the hard disk under test according to the number of inconsistent characters in the first detection data and the second detection data. On the one hand, the working state of the hard disk under test with serious signal interference is determined to be abnormal, and the user is prompted to replace it, so as to avoid affecting the user experience. On the other hand, the working state of the hard disk under test with less serious signal interference is determined to be normal, so as to avoid the user's high cost and affect the user experience due to frequent replacement of the hard disk.

[0103] In a possible implementation, the above method further includes: performing multiple detections on the above hard disk under test, determining the number of times that the number of inconsistent characters in the first detection data and the second detection data exceeds a preset threshold, and in the case where the number of times exceeds a preset number of times, determining that the working state of the hard disk under test is abnormal. For example, the hard disk under test is tested 5 times, the number of times that the number of inconsistent characters in the first detection data and the second detection data exceeds the preset threshold is 4 times, and the number of times exceeds the preset number of times 2 times, so the working state of the hard disk under test is determined to be abnormal.

[0104] The method provided in the present application can avoid the influence of the error of single detection on the detection result by performing multiple detections on the hard disk under test, can prompt the accuracy of the detection, and thus improve the user experience.

[0105] The above mainly describes the scheme of the embodiments of the present application from the method aspect. It can be understood that the hard disk detection apparatus described above comprises at least one of the hardware structure and the software module for executing the respective functions in order to implement the above functions. Those skilled in the art should easily realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present application can be implemented in the form of hardware or the combination of hardware and computer software. Whether a certain function is implemented in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0106] The embodiments of the present application can divide the functional units of the hard disk detection apparatus according to the above method examples. For example, each functional unit can be divided according to each function, or two or more functions can be integrated in one processing unit. The integrated unit can be implemented in the form of hardware or software functional unit. It should be noted that the division of units in the embodiments of the present application is illustrative, and is only a logical function division. In actual implementation, there can be another division manner.

[0107] For example, Figure 8 A structural block diagram of a hard disk detection apparatus provided by the embodiments of the present application is shown. The apparatus comprises a writing unit 810, a reading unit 820 and a processing unit 830. The writing unit 810 is configured to write first sample data at a first writing position in a first region of a hard disk to be tested, and the first region is pre-written with second sample data; the size of the first sample data is smaller than the size of the second sample data. The reading unit 820 is configured to read the data of the first region as first detection data. The reading unit 820 is further configured to read the data of the first region as second detection data after the first sample data is repeatedly written at the first writing position for multiple times. The processing unit 830 is configured to determine that the hard disk to be tested has a signal interference phenomenon in the case that the first detection data and the second detection data are inconsistent. For example, in combination with Figure 3 The writing unit 810 can be configured to perform steps S301 and S303 as shown in Figure 3 The reading unit 820 can be configured to perform step S302 as shown in Figure 3 The processing unit 830 can be configured to perform step S304 as shown in Figure 3

[0108] Optionally, the first writing position is located at the center position of the first region.

[0109] ​Optionally, the processing unit 830 is further configured to determine a first area on the hard disk to be tested in a balanced manner; and write the second sample data in the first area, the capacity of the first area being equal to the size of the second sample data.

[0110] Optionally, the processing unit 830 is specifically configured to determine a plurality of equally divided capacity points according to the storage capacity of the hard disk to be tested; and determine the first area on the hard disk to be tested according to the plurality of equally divided capacity points.

[0111] Optionally, the processing unit 830 is further configured to determine that the hard disk to be tested does not have a signal interference phenomenon in a case where the first detection data and the second detection data are consistent.

[0112] Optionally, the number of the first areas is a plurality; and optionally, the processing unit 830 is specifically configured to determine that the hard disk to be tested has a signal interference phenomenon in a case where the first detection data and the second detection data corresponding to any one or more of the first areas are inconsistent.

[0113] Optionally, the processing unit 830 is further configured to determine the number of inconsistent characters in the first detection data and the second detection data in a case where the first detection data and the second detection data are inconsistent; and determine that the working state of the hard disk to be tested is abnormal in a case where the number of characters exceeds a preset threshold.

[0114] Optionally, the processing unit 830 is further configured to determine that the working state of the hard disk to be tested is normal in a case where the number of characters does not exceed the preset threshold.

[0115] Optionally, the operation of writing data in the hard disk to be tested is implemented based on a data writing tool in input / output (IO) storage test software.

[0116] Optionally, the operation of reading data in the hard disk to be tested is implemented based on a data reading tool.

[0117] For specific descriptions of the above optional manners, refer to the foregoing method embodiments, which will not be described herein again. In addition, the explanations and beneficial effect descriptions of any of the foregoing hard disk detection apparatuses can refer to the corresponding method embodiments described above, which will not be described herein again.

[0118] The embodiment of the present application further provides a computing device, comprising: a processor and a communication interface, the processor being connected with a hard disk to be tested through the communication interface; the processor is used for: writing first sample data in a first write position in a first area of the hard disk to be tested, the first area being previously written with second sample data; the size of the first sample data is smaller than the size of the second sample data, and the first sample data is different from the second sample data; reading the data of the first area as first detection data; the processor is further used for reading the data of the first area as second detection data after repeatedly writing the first sample data in the first write position for multiple times; and determining that the hard disk to be tested has a signal interference phenomenon in the case that the first detection data and the second detection data are inconsistent. The processor is further used for determining that the hard disk to be tested does not have a signal interference phenomenon in the case that the first detection data and the second detection data are consistent.

[0119] The embodiment of the present application further provides a computer readable storage medium, and at least one computer instruction is stored in the computer readable storage medium, the at least one computer instruction is loaded and executed by a processor to realize the resource configuration method of each of the above embodiments. The explanation and beneficial effects of the related content in any of the above computer readable storage media are described above, and will not be repeated here.

[0120] The embodiment of the present application further provides a chip. The chip integrates a control circuit and one or more ports for realizing the functions of the above hard disk detection device. Optionally, the functions supported by the chip can be referred to above, and will not be repeated here. Those skilled in the art can understand that all or part of the steps of the above embodiments can be completed by programs instructing related hardware. The programs can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The above processing unit or processor can be a central processing unit, a general-purpose processor, an application specific integrated circuit (ASIC), a digital signal processor (DSP), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.

[0121] The embodiments of the present application further provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform any of the methods described above. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are wholly or partially generated. 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 a wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or include one or more data storage devices such as servers, data centers, etc. that can be integrated with the medium. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, an SSD), etc.

[0122] It should be noted that the above devices for storing computer instructions or computer programs provided by the embodiments of the present application, such as but not limited to the above memory, computer-readable storage medium, and communication chip, etc., are all non-volatile. Those skilled in the art should realize that the functions described in the embodiments of the present application can be realized by hardware, software, firmware, or any combination thereof in one or more of the above examples. When implemented by software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or codes on a computer-readable storage medium. The computer-readable storage medium includes a computer storage medium and a communication medium, wherein the communication medium includes any medium that facilitates the transfer of a computer program from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0123] The above is only an optional embodiment of the present application and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A hard disk testing method, characterized in that, The method includes: First sample data is written to a first write position in a first region of the hard disk under test. The first region has second sample data pre-written in it. The size of the first sample data is smaller than the size of the second sample data. The first sample data is different from the second sample data. The first write position is located at the center of the first region. The capacity of the first region is equal to the size of the second sample data. Read the data from the first region as the first detection data; After repeatedly writing the first sample data to the first write position, the data in the first region is read as the second detection data. If the first detection data and the second detection data are inconsistent, it is determined that the hard drive under test has signal interference.

2. The method according to claim 1, characterized in that, The method further includes: The first region is determined evenly on the hard drive under test; Write the second sample data into the first region.

3. The method according to claim 2, characterized in that, The equalization process for determining the first region on the hard drive under test includes: Multiple equally divided capacity points are determined based on the storage capacity of the hard disk to be tested; The first region is determined on the hard disk under test based on the plurality of equally divided capacity points.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: If the first detection data and the second detection data are consistent, it is determined that the hard drive under test does not have signal interference.

5. The method according to any one of claims 1-3, characterized in that, The number of the first regions is multiple; the step of determining that the hard drive under test has signal interference when the first detection data and the second detection data are inconsistent includes: If the first detection data and the second detection data corresponding to any one or more of the first regions are inconsistent, it is determined that the hard drive under test has signal interference.

6. The method according to any one of claims 1-3, characterized in that, The method further includes: In the case where the first detection data and the second detection data are inconsistent, determine the number of inconsistent characters in the first detection data and the second detection data; If the number of characters exceeds a preset threshold, the working state of the hard drive under test is determined to be abnormal.

7. The method according to claim 6, characterized in that, The method further includes: If the number of characters does not exceed a preset threshold, the working state of the hard drive under test is determined to be normal.

8. A computing device, characterized in that, include: A processor and a communication interface, wherein the processor is connected to the hard disk under test via the communication interface; the processor is used for: First sample data is written to a first write position in a first region of the hard disk under test. The first region has second sample data pre-written in it. The size of the first sample data is smaller than the size of the second sample data. The first sample data is different from the second sample data. The first write position is located at the center of the first region. The capacity of the first region is equal to the size of the second sample data. The processor reads data from the first region as first detection data; the processor is also used for... After repeatedly writing the first sample data to the first write position, the data in the first region is read as the second detection data. If the first detection data and the second detection data are inconsistent, it is determined that the hard drive under test has signal interference.

9. The computing device according to claim 8, characterized in that, The processor is also used for: If the first detection data and the second detection data are consistent, it is determined that the hard drive under test does not have signal interference.

Citation Information

Patent Citations

  • Disk-based storage device with head position control responsive to detected inter-track interference

    CN103247313A

  • Hard disk inspection method

    CN103631686A