Hard disk testing method, electronic equipment, storage medium and program product
By performing flash break stability test on the hard disk, obtaining the tolerance time of internal and external channels and configuring hard disk parameters, the problem of poor flash break compatibility of hard disk links is solved, and the system stability and data security are improved.
Patent Information
- Application Number
- CN202411829304.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
The hard disk and host side have poor compatibility with hard disk link flash breakage, which cannot ensure the secure transmission of data, resulting in low system stability.
Provide a hard disk test method. By flash break stability test on the target hard disk, obtain the tolerance time of the inner and outer channels, configure the hard disk parameters based on these data, and generate a test report to improve the stability of the system.
Through flash break stability testing, determine the tolerance duration of internal and external channels of the hard disk link flash break, configure hard disk parameters, generate test reports, improve system stability, and avoid the risk of data loss.
Smart Images

Figure CN119718803A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a hard disk testing method, electronic equipment, storage medium and program product. Background Art
[0002] The hard disk is the host's storage device, which can store the host's operating system, software programs, data files, etc. The host can read and write data through the hard disk to complete various operations.
[0003] During the operation of the hard disk, the hard disk may repeatedly go online and offline, which is called hard disk flash. Hard disk flash not only makes the hard disk unusable, but also requires the host device to handle the interruption events of hard disk online and offline accordingly, reducing the working efficiency of the host device. At the same time, hard disk flash will also cause data read and write interruption and data consistency errors, bringing risks to data security.
[0004] In the above situation, the hard disk and host sides have poor compatibility with hard disk link interruptions, and cannot ensure safe data transmission, resulting in low system stability. Summary of the invention
[0005] The present application provides a hard disk testing method, electronic device, storage medium and program product, which are used to solve the technical problem that the hard disk end and the host end have poor compatibility with the hard disk link flash disconnection, cannot ensure the safe transmission of data, and lead to low system stability.
[0006] In a first aspect, the present application provides a hard disk testing method, comprising:
[0007] In response to a user's test instruction for a target hard disk, acquiring test configuration information, the target hard disk including an inner track and an outer track;
[0008] According to the test configuration information, a flash stability test is performed on the target hard disk to obtain test data of the target hard disk, wherein the test data includes an inner track tolerance time of the inner track and an outer track tolerance time of the outer track;
[0009] According to the inner track tolerance time and the outer track tolerance time, hard disk parameters of the target hard disk are configured;
[0010] A test report of the target hard disk is generated according to the test data.
[0011] In this way, different models of hard disks can be tested for stability in order to determine the tolerance time of the internal and external channels of the hard disk link. The hard disk parameters can be configured according to the tolerance time, and a test report can be generated to improve the stability of the system.
[0012] Optionally, the method as described above, performing a flash stability test on the target hard disk according to the test configuration information to obtain test data of the target hard disk, includes:
[0013] Determine the initial duration and interval increase amount according to the test configuration information;
[0014] According to the initial duration and the interval increase, the target hard disk is subjected to multiple flash disconnection processes until the external track tolerance duration is obtained;
[0015] According to the outer track tolerance time and the interval increase, the target hard disk is subjected to multiple flash cut processing until the inner track tolerance time is obtained.
[0016] In this way, the flash-break stability test can be performed on hard disks of different models to determine the tolerance time of the internal and external channels of the hard disk link flash-break, and the hard disk parameters can be configured according to the tolerance time of the internal and external channels to improve the stability of the system.
[0017] Optionally, the method described above, according to the initial duration and the interval increase, performs multiple flash disconnection processing on the target hard disk until the external track tolerance duration is obtained, including:
[0018] Determine the i-th interruption duration corresponding to the i-th flash interruption processing, wherein the first interruption duration is the initial duration, and when i is greater than or equal to 2, the i-th interruption duration is the i-1-th interruption duration plus the interval increase;
[0019] According to the i-th interruption duration, performing an i-th flash interruption process on the target hard disk to obtain an i-th data record of the target hard disk, and judging whether an external track of the target hard disk is interrupted according to the i-th data record;
[0020] Herein, the i is sequentially 1, 2, ... until it is determined according to the Mth data record that an external track of the target hard disk is interrupted, and the Mth interruption duration is determined as the external track tolerance duration.
[0021] In this way, multiple flash-off stability tests can be performed based on the initial duration and the interval increase to determine the external channel tolerance duration of the hard disk link flash-off, so as to improve the stability of the system.
[0022] Optionally, the method as described above, according to the outer track tolerance time and the interval increase, performs multiple flash disconnection processing on the target hard disk until the inner track tolerance time is obtained, including:
[0023] Determine the jth interruption duration corresponding to the jth flash interruption processing, wherein the first interruption duration is the external channel tolerance duration, and when j is greater than or equal to 2, the jth interruption duration is the j-1th interruption duration plus the interval increase amount;
[0024] According to the jth interruption duration, performing a jth flash interruption process on the target hard disk to obtain a jth data record of the target hard disk, and judging whether there is an interruption in the inner track of the target hard disk according to the jth data record;
[0025] The j is sequentially 1, 2, ... until it is determined according to the Nth data record that there is an interruption in the inner track of the target hard disk, and the Nth interruption duration is determined as the inner track tolerance duration.
[0026] In this way, multiple flash-off stability tests can be performed based on the external channel tolerance time and the interval increase to determine the internal channel tolerance time of the hard disk link flash-off, so as to improve the stability of the system.
[0027] Optionally, the method as described above, performing an i-th flash disconnection process on the target hard disk according to the i-th interruption duration, comprises:
[0028] According to the i-th interruption duration, determining the i-th disconnection time and the i-th connection time of the target hard disk, the time interval between the i-th connection time and the i-th disconnection time being the i-th interruption duration;
[0029] According to the i-th disconnection time, disconnecting the target hard disk;
[0030] According to the i-th access time, access processing is performed on the target hard disk;
[0031] The flash disconnection process includes the disconnection process and the access process.
[0032] In this way, multiple flash-break stability tests can be performed to determine the tolerance duration of the internal and external channels of the hard disk link flash-break, so as to improve the stability of the system.
[0033] Optionally, the method as described above, configuring hard disk parameters of the target hard disk according to the inner track tolerance time and the outer track tolerance time, comprises:
[0034] Determine a preset range smaller than the external track tolerance time as a first preset range, wherein the first preset range is used to indicate an interruption time range corresponding to the target hard disk not performing hard disk switching processing;
[0035] Determine a preset range that is greater than or equal to the external track tolerance time and less than the internal track tolerance time as a second preset range, wherein the second preset range is used to represent an interruption time range corresponding to the storage of data of the target hard disk to the internal track;
[0036] Determine a preset range greater than or equal to the inner track tolerance time as a third preset range, wherein the third preset range is used to represent an interruption time range corresponding to the entire disk switching process of the target hard disk;
[0037] The hard disk parameter includes the first preset range, the second preset range and the third preset range.
[0038] In this way, different control strategies can be implemented for different situations to avoid the risk of data loss and improve the stability of the system.
[0039] Optionally, the method as described above, after performing a flash stability test on the target hard disk according to the test configuration information to obtain test data of the target hard disk, further comprises:
[0040] Performing stability verification processing on the inner track tolerance time and the outer track tolerance time to obtain a verification result, wherein the verification result includes verification pass and verification fail;
[0041] When the verification result is verification failure, the target hard disk is subjected to a flash stability test according to the test configuration information, and the test data of the target hard disk is updated until the verification result corresponding to the updated inner track tolerance time and outer track tolerance time is verification passed.
[0042] In this way, the stability of the tolerance time of the internal and external tracks when the hard disk link is disconnected can be determined to improve the stability of the system.
[0043] In a second aspect, the present application provides a hard disk testing device, comprising:
[0044] An acquisition module, for acquiring test configuration information in response to a user's test instruction for a target hard disk, wherein the target hard disk includes an inner track and an outer track;
[0045] A testing module, configured to perform a flash stability test on the target hard disk according to the test configuration information, and obtain test data of the target hard disk, wherein the test data includes an inner track tolerance time of the inner track and an outer track tolerance time of the outer track;
[0046] A configuration module, configured to configure hard disk parameters of the target hard disk according to the inner track tolerance time and the outer track tolerance time;
[0047] A generating module is used to generate a test report of the target hard disk according to the test data.
[0048] Optionally, in the above device, the testing module is specifically used for:
[0049] Determine the initial duration and interval increase amount according to the test configuration information;
[0050] According to the initial duration and the interval increase, the target hard disk is subjected to multiple flash disconnection processes until the external track tolerance duration is obtained;
[0051] According to the outer track tolerance time and the interval increase, the target hard disk is subjected to multiple flash cut processing until the inner track tolerance time is obtained.
[0052] Optionally, in the above device, the testing module is specifically used for:
[0053] Determine the i-th interruption duration corresponding to the i-th flash interruption processing, wherein the first interruption duration is the initial duration, and when i is greater than or equal to 2, the i-th interruption duration is the i-1-th interruption duration plus the interval increase;
[0054] According to the i-th interruption duration, performing an i-th flash interruption process on the target hard disk to obtain an i-th data record of the target hard disk, and judging whether an external track of the target hard disk is interrupted according to the i-th data record;
[0055] Herein, the i is sequentially 1, 2, ... until it is determined according to the Mth data record that an external track of the target hard disk is interrupted, and the Mth interruption duration is determined as the external track tolerance duration.
[0056] Optionally, in the above device, the testing module is specifically used for:
[0057] Determine the jth interruption duration corresponding to the jth flash interruption processing, wherein the first interruption duration is the external channel tolerance duration, and when j is greater than or equal to 2, the jth interruption duration is the j-1th interruption duration plus the interval increase amount;
[0058] According to the jth interruption duration, performing a jth flash interruption process on the target hard disk to obtain a jth data record of the target hard disk, and judging whether there is an interruption in the inner track of the target hard disk according to the jth data record;
[0059] The j is sequentially 1, 2, ... until it is determined according to the Nth data record that there is an interruption in the inner track of the target hard disk, and the Nth interruption duration is determined as the inner track tolerance duration.
[0060] Optionally, in the above device, the testing module is specifically used for:
[0061] According to the i-th interruption duration, determining the i-th disconnection time and the i-th connection time of the target hard disk, the time interval between the i-th connection time and the i-th disconnection time being the i-th interruption duration;
[0062] According to the i-th disconnection time, disconnecting the target hard disk;
[0063] According to the i-th access time, access processing is performed on the target hard disk;
[0064] The flash disconnection process includes the disconnection process and the access process.
[0065] Optionally, the device configuration module as described above is specifically used for:
[0066] Determine a preset range smaller than the external track tolerance time as a first preset range, wherein the first preset range is used to indicate an interruption time range corresponding to the target hard disk not performing hard disk switching processing;
[0067] Determine a preset range that is greater than or equal to the external track tolerance time and less than the internal track tolerance time as a second preset range, wherein the second preset range is used to represent an interruption time range corresponding to the storage of data of the target hard disk to the internal track;
[0068] Determine a preset range greater than or equal to the inner track tolerance time as a third preset range, wherein the third preset range is used to represent an interruption time range corresponding to the entire disk switching process of the target hard disk;
[0069] The hard disk parameter includes the first preset range, the second preset range and the third preset range.
[0070] Optionally, the device as described above further comprises a verification module, and the verification module is used to:
[0071] Performing stability verification processing on the inner track tolerance time and the outer track tolerance time to obtain a verification result, wherein the verification result includes verification pass and verification fail;
[0072] When the verification result is verification failure, the target hard disk is subjected to a flash stability test according to the test configuration information, and the test data of the target hard disk is updated until the verification result corresponding to the updated inner track tolerance time and outer track tolerance time is verification passed.
[0073] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0074] The memory stores computer-executable instructions;
[0075] The processor executes the computer-executable instructions stored in the memory to implement the method described in any one of the first aspects.
[0076] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0077] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method as described in any one of the first aspects when executed by a computer.
[0078] The hard disk test method, electronic device, storage medium and program product provided by the present application obtain test configuration information by responding to the user's test instruction for the target hard disk. The target hard disk includes inner tracks and outer tracks. According to the test configuration information, the target hard disk is tested for stability of flash failure to obtain test data of the target hard disk. The test data includes the inner track tolerance time of the inner track and the outer track tolerance time of the outer track. According to the inner track tolerance time and the outer track tolerance time, the hard disk parameters of the target hard disk are configured and processed. According to the test data, a test report of the target hard disk is generated. In this way, flash failure stability tests can be performed on hard disks of different models to determine the inner and outer track tolerance time of flash failure of the hard disk link. According to the inner and outer track tolerance time, the hard disk parameters are configured and a test report is generated to improve the stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0080] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0081] Figure 2 A flowchart of a hard disk testing method provided in an embodiment of the present application;
[0082] Figure 3 A schematic diagram of a flow chart of another hard disk testing method provided in an embodiment of the present application;
[0083] Figure 4 A flowchart of another hard disk testing method provided in an embodiment of the present application;
[0084] Figure 5 A schematic diagram of the structure of a hard disk testing device provided in an embodiment of the present application;
[0085] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0086] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0087] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0088] It should be noted that, although the terms "first", "second", etc. are used to describe various information in the embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. Optionally, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
[0089] It should be understood that the terms "comprises" and "includes" indicate the presence of the previously mentioned features, steps, operations, but do not exclude the presence, occurrence or addition of one or at least one other feature, step, operation. The terms "and / or" and the like used in this application may be interpreted as inclusive, or mean any one or any combination. Optionally, "A and / or B" means "any of the following: A; B; A and B". In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship.
[0090] In the related art, a hard disk is a storage device of a host computer, which can store the host computer's operating system, software programs, data files, etc. The host computer can read and write data through the hard disk to complete various operations.
[0091] Next, combine Figure 1 , and give examples to illustrate the application scenarios corresponding to the hard disk testing methods.
[0092] Figure 1 This is a schematic diagram of an application scenario provided by the embodiment of this application. Figure 1 , Figure 1 The system 100 may include at least a host 101 and a hard disk 102 .
[0093] The host 101 can be used to control the operation of the computer and process data.
[0094] The host 101 may include a central processing unit.
[0095] When a user operates on a computer and needs to read or write data in the hard disk 102 , the central processing unit in the host 101 can initiate a corresponding data read or write request to the hard disk 102 through control components such as a chipset on the mainboard.
[0096] The hard disk 102 can store data in a long term and in a large capacity through a specific storage method.
[0097] Storage methods can include magnetic recording of mechanical hard disks and flash memory storage of solid-state drives.
[0098] Data may include operating systems, applications, and various user files.
[0099] When the host 101 is powered off or shut down, the data can be permanently stored in the hard disk 102 as long as the hard disk 102 does not fail and the data is not actively deleted.
[0100] If the hard disk 102 is a solid state disk, after the solid state disk receives the read / write request from the host 101 , it can quickly locate the corresponding position according to the address information of the storage unit in the flash memory chip in the request.
[0101] During the operation of the hard disk, the hard disk may repeatedly go online and offline, which is called hard disk flash. Hard disk flash not only makes the hard disk unusable, but also requires the host device to handle the interruption events of hard disk online and offline accordingly, reducing the working efficiency of the host device. At the same time, hard disk flash will also cause data read and write interruption and data consistency errors, bringing risks to data security.
[0102] In the above situation, the hard disk and host sides have poor compatibility with hard disk link interruptions, and cannot ensure safe data transmission, resulting in low system stability.
[0103] In order to solve the above technical problems, the embodiment of the present application provides a hard disk testing method, which performs a flash-break stability test on the target hard disk to obtain the inner channel tolerance time and outer channel tolerance time of the target hard disk, configures the hard disk parameters of the target hard disk according to the inner channel tolerance time and the outer channel tolerance time, and generates a test report of the target hard disk. In this way, flash-break stability tests can be performed on hard disks of different models to determine the inner and outer channel tolerance time of the hard disk link flash-break, configure the hard disk parameters according to the inner and outer channel tolerance time, and generate a test report to improve the stability of the system.
[0104] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0105] The technical solution shown in the present application is described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.
[0106] Figure 2 This is a flowchart of a hard disk testing method provided by an embodiment of the present application. The execution subject of the embodiment of the present application can be a host or a hard disk testing device set in the host. The hard disk testing device can be implemented by software or by a combination of software and hardware. Figure 2 , the method comprising:
[0107] S201. In response to a user's test instruction for a target hard disk, obtain test configuration information.
[0108] The target hard disk includes inner tracks and outer tracks.
[0109] The test command can be used to instruct to perform a flash stability test on the target hard disk.
[0110] The test instruction may be a test instruction generated by a test tool.
[0111] The test tool can be used to detect the hard disk.
[0112] The test instruction may include a hard disk identification of the hard disk.
[0113] The target hard disk may be the hard disk corresponding to the hard disk identifier in the test instruction.
[0114] The test configuration information may include the hardware information of the hard disk, the test duration, the initial duration corresponding to the flash off, the interval increase amount, etc.
[0115] A test control of the target hard disk can be displayed on the display interface, and a test instruction of the target hard disk can be generated in response to a user clicking operation on the test control. In response to the test instruction, test configuration information can be obtained in the storage space.
[0116] S202: Perform a flash stability test on the target hard disk according to the test configuration information to obtain test data of the target hard disk.
[0117] The test data includes the inner-channel tolerance time of the inner channel and the outer-channel tolerance time of the outer channel.
[0118] The flash stability test can simulate the flash failure situations that may occur in actual use of the hard disk to check whether the hard disk can work normally after the flash failure, so as to judge the stability of the hard disk.
[0119] Flash disconnection can be used to indicate that the hard disk has lost connection with the host.
[0120] Test data may include data reading and writing data, flash-related data, environment and hardware related data, etc.
[0121] The data reading and writing data may include reading and writing speed variation data, data reading and writing error data, and the like.
[0122] The flash-interruption related data may include multiple flash-interruption durations, inner channel tolerance durations and outer channel tolerance durations.
[0123] The duration of the flash disconnection can be used to indicate the duration from when the hard disk starts to be disconnected to when it resumes normal connection.
[0124] The internal track tolerance time can be used to indicate the maximum duration of the flash interruption that the internal track of the hard disk can tolerate.
[0125] The external track tolerance time can be used to indicate the maximum duration of the external interruption that the hard disk's external track can tolerate.
[0126] The data read and write error data may include read and write speed variation data and data read and write error data, etc.
[0127] The initial duration and the interval increase amount may be determined according to the test configuration information, and the target hard disk may be flashed multiple times according to the initial duration and the interval increase amount to obtain the test data of the target hard disk.
[0128] S203: According to the inner track tolerance time and the outer track tolerance time, hard disk parameters of the target hard disk are configured.
[0129] Hard disk parameters can be used to control the reading and writing process of hard disk data.
[0130] The target parameters can be determined according to the inner track tolerance time and the outer track tolerance time, and the hard disk parameters of the target hard disk can be updated according to the target parameters.
[0131] S204: Generate a test report of the target hard disk according to the test data.
[0132] The test report can be used to record the relevant logs of the flash stability test of the target hard disk.
[0133] The test report may include hard disk logs, storage link logs, and hard disk parameter change records, etc., which are not limited here.
[0134] The hard disk test method provided in this embodiment obtains test configuration information by responding to the user's test instruction for the target hard disk. The target hard disk includes inner tracks and outer tracks. According to the test configuration information, the target hard disk is tested for stability of flash disconnection to obtain test data of the target hard disk. The test data includes the inner track tolerance time of the inner track and the outer track tolerance time of the outer track. According to the inner track tolerance time and the outer track tolerance time, the hard disk parameters of the target hard disk are configured and processed, and according to the test data, a test report of the target hard disk is generated. In this way, flash disconnection stability tests can be performed on hard disks of different models to determine the inner and outer track tolerance time of flash disconnection of the hard disk link, and the hard disk parameters are configured according to the inner and outer track tolerance time, and a test report is generated to improve the stability of the system.
[0135] Next, combine Figure 3 , the process (S202) of testing the hard disk of the device to be tested according to the detection item configuration file and obtaining the test result of the hard disk is explained.
[0136] Figure 3 This is a flow chart of another hard disk testing method provided in an embodiment of the present application. Figure 3 , the method comprising:
[0137] S301. Determine the initial duration and interval increase amount according to the test configuration information.
[0138] The initial duration can be used to indicate the initial duration from the beginning of the flash disconnection to the restoration of the normal connection.
[0139] The interval increase amount can be used to indicate the increase in duration between two adjacent interruption durations.
[0140] The test configuration information may be parsed to determine the initial duration and the interval increment.
[0141] S302: Initialize i to 1.
[0142] S303: Determine the i-th interruption duration corresponding to the i-th flash interruption processing.
[0143] Among them, the first interruption duration is the initial duration.
[0144] When i is greater than or equal to 2, the duration of the i-th interruption is the duration of the i-1-th interruption plus the interval increase.
[0145] The i-th interruption duration corresponding to the i-th flash interruption processing may be the interruption duration tested when determining the external channel tolerance duration.
[0146] The i-th interruption duration may be used to indicate the duration from the beginning of the flash disconnection to the restoration of the normal connection.
[0147] S304, performing an i-th flash interruption process on the target hard disk according to the i-th interruption duration, obtaining an i-th data record of the target hard disk, and determining whether an external track of the target hard disk is interrupted according to the i-th data record.
[0148] If yes, execute S305;
[0149] If not, execute S306.
[0150] The i-th disconnection time and the i-th connection time can be determined according to the duration of the i-th interruption. According to the i-th disconnection time and the i-th connection time, the target hard disk is subjected to the i-th flash disconnection processing to obtain the i-th data record of the target hard disk. The i-th data record is analyzed and processed to determine whether there is an interruption in the external track of the target hard disk.
[0151] Optionally, the target hard disk can be subjected to the i-th flash disconnection processing according to the i-th interruption duration in the following manner: according to the i-th interruption duration, determine the i-th disconnection time and the i-th connection time of the target hard disk; according to the i-th disconnection time, disconnect the target hard disk; according to the i-th connection time, connect the target hard disk.
[0152] The time interval between the i-th access time and the i-th disconnection time is the i-th interruption duration.
[0153] Flash disconnection processing includes disconnection processing and access processing.
[0154] S305: Determine the i-th interruption duration as the out-track tolerance duration.
[0155] After executing S305, execute S307.
[0156] S306, i is set to i+1.
[0157] After executing S306, execute S303.
[0158] S307: Determine the external channel tolerance time length as the jth interruption time length corresponding to the jth flash interruption processing.
[0159] The jth interruption duration corresponding to the jth flash interruption processing may be the interruption duration tested when determining the out-channel tolerance duration.
[0160] The first interruption duration in the jth interruption duration is the out-channel tolerance duration.
[0161] S308, performing a j-th flash interruption process on the target hard disk according to the j-th interruption duration, obtaining a j-th data record of the target hard disk, and determining whether an internal track of the target hard disk is interrupted according to the j-th data record.
[0162] If yes, execute S309;
[0163] If not, execute S310.
[0164] The jth disconnection time and the jth connection time can be determined according to the jth interruption duration. According to the jth disconnection time and the jth connection time, the target hard disk is subjected to the jth flash disconnection processing to obtain the jth data record of the target hard disk. The jth data record is analyzed and processed to determine whether there is an interruption in the internal track of the target hard disk.
[0165] Optionally, the target hard disk can be subjected to the jth flash disconnection processing according to the jth interruption duration in the following manner: determine the jth disconnection time and the jth connection time of the target hard disk according to the jth interruption duration; perform disconnection processing on the target hard disk according to the jth disconnection time; perform connection processing on the target hard disk according to the jth connection time.
[0166] The time interval between the jth access time and the jth disconnection time is the jth interruption duration.
[0167] Flash disconnection processing includes disconnection processing and access processing.
[0168] S309: Determine the j-th interruption duration as the inner lane tolerance duration.
[0169] S310, j is set to j+1.
[0170] After executing S310 , execute S308 .
[0171] The implementation content of each step in the embodiment of the present application can refer to the description of the corresponding steps or operations in the above method embodiment, and repeated content will not be repeated.
[0172] The hard disk testing method provided in the present embodiment determines the initial duration and the interval increase according to the test configuration information; determines the i-th interruption duration corresponding to the i-th flash-off processing, wherein the first interruption duration is the initial duration, and when i is greater than or equal to 2, the i-th interruption duration is the i-1-th interruption duration plus the interval increase; performs the i-th flash-off processing on the target hard disk according to the i-th interruption duration, obtains the i-th data record of the target hard disk, and determines whether the external track of the target hard disk is interrupted according to the i-th data record; wherein i is successively 1, 2, ..., until it is determined that the external track of the target hard disk is interrupted according to the M-th data record , determine the Mth interruption duration as the external track tolerance duration; determine the jth interruption duration corresponding to the jth flash interruption processing, wherein the first interruption duration is the external track tolerance duration, and when j is greater than or equal to 2, the jth interruption duration is the j-1th interruption duration plus the interval increase; according to the jth interruption duration, perform the jth flash interruption processing on the target hard disk, obtain the jth data record of the target hard disk, and determine whether there is an interruption in the internal track of the target hard disk according to the jth data record; wherein j is 1, 2, ... in sequence, until it is determined that there is an interruption in the internal track of the target hard disk according to the Nth data record, and the Nth interruption duration is determined as the internal track tolerance duration. In this way, flash interruption stability tests can be performed on hard disks of different models to determine the internal and external track tolerance durations of flash interruptions of the hard disk link, configure the hard disk parameters according to the internal and external track tolerance durations, and generate a test report to improve the stability of the system.
[0173] Next, combine Figure 4 , the technical solution shown in this application is explained through specific examples.
[0174] Figure 4 A flowchart of another hard disk testing method provided in an embodiment of the present application. Figure 4 , the method comprising:
[0175] S401 . In response to a user's test instruction for a target hard disk, obtain test configuration information.
[0176] The execution process of S401 can refer to the execution process of S201, which will not be described in detail here.
[0177] S402: Determine the initial duration and interval increase amount according to the test configuration information.
[0178] The execution process of S402 can refer to the execution process of S301, and will not be described in detail here.
[0179] S403, performing multiple flash cut processing on the target hard disk according to the initial duration and the interval increase, until the external track tolerance duration is obtained.
[0180] The execution process of S403 can refer to the execution process of S302-S306, which will not be repeated here.
[0181] S404, performing multiple flash cut processes on the target hard disk according to the external track tolerance time and the interval increase, until the internal track tolerance time is obtained.
[0182] The execution process of S404 can refer to the execution process of S307-S310, which will not be described in detail here.
[0183] S405: Perform stability verification processing on the inner track tolerance time and the outer track tolerance time to obtain a verification result.
[0184] The verification results include verification passed and verification failed.
[0185] The stability verification process of the external track tolerance time can be performed within the time range of the initial time and the external track tolerance time, with the interval increasing each time, performing multiple flash-off processes on the target hard disk to obtain multiple data records, and judging whether there is an interruption in the external track of the target hard disk in the multiple data records. If so, it is determined that the external track verification has failed, if not, it is determined that the external track verification has passed.
[0186] The stability verification process of the inner track tolerance time can be performed within the time range of the outer track tolerance time and the inner track tolerance time, with the target hard disk being flashed multiple times by increasing the interval each time to obtain multiple data records, and determine whether there is an interruption in the inner track of the target hard disk in the multiple data records. If so, it is determined that the inner track verification has failed, if not, it is determined that the inner track verification has passed.
[0187] When the inner channel verification passes and the outer channel verification passes, the verification result is determined to be verification passed, otherwise, the verification result is determined to be verification failed.
[0188] S406. When the verification result is verification failure, perform a flash stability test on the target hard disk according to the test configuration information, and update the test data of the target hard disk until the verification result corresponding to the updated inner track tolerance time and outer track tolerance time is verification passed.
[0189] S407: When the verification result is that the verification is passed, a preset range that is smaller than the external channel tolerance time is determined as a first preset range.
[0190] The first preset range is used to indicate the interruption duration range corresponding to the target hard disk not performing hard disk switching processing.
[0191] For example, assuming that the current flash off duration of the target hard disk is within a first preset range, the flash off event is recorded and no hard disk switching process is performed.
[0192] S408: Determine a preset range that is greater than or equal to the outer track tolerance time length and less than the inner track tolerance time length as a second preset range.
[0193] The second preset range is used to represent the interruption time range corresponding to the internal processing of data storage in the target hard disk.
[0194] For example, assuming that the current flash off duration of the target hard disk is within the second preset range, the flash off event is recorded, and the data is automatically controlled to be saved to the inner track area of the hard disk to avoid the risk of data loss in advance.
[0195] S409: Determine a preset range that is greater than or equal to the inner lane tolerance time as a third preset range.
[0196] The third preset range is used to represent the interruption duration range corresponding to the entire disk switching process on the target hard disk.
[0197] For example, assuming that the current flash off duration of the target hard disk is within the third preset range, the flash off event is recorded, and the data is automatically controlled to switch to other hard disks to avoid the risk of data loss in advance.
[0198] S410: Generate a test report of the target hard disk according to the test data.
[0199] The execution process of S410 can refer to the execution process of S204, which will not be described in detail here.
[0200] In this way, different models of hard disks can be tested for stability in order to determine the tolerance time of the internal and external channels of the hard disk link. The hard disk parameters can be configured according to the tolerance time, and a test report can be generated to improve the stability of the system.
[0201] Figure 5 This is a schematic diagram of the structure of a hard disk test device provided in an embodiment of the present application. Figure 5 The hard disk testing device 500 includes an acquisition module 501, a test module 502, a configuration module 503 and a generation module 504, wherein:
[0202] The acquisition module 501 is used to acquire test configuration information in response to a user's test instruction for a target hard disk, wherein the target hard disk includes an inner track and an outer track;
[0203] A testing module 502 is used to perform a flash stability test on the target hard disk according to the test configuration information to obtain test data of the target hard disk, wherein the test data includes an inner track tolerance time of the inner track and an outer track tolerance time of the outer track;
[0204] A configuration module 503, configured to configure hard disk parameters of the target hard disk according to the inner track tolerance time and the outer track tolerance time;
[0205] The generating module 504 is used to generate a test report of the target hard disk according to the test data.
[0206] Optionally, in the above device, the testing module 502 is specifically used for:
[0207] Determine the initial duration and interval increase amount according to the test configuration information;
[0208] According to the initial duration and the interval increase, the target hard disk is subjected to multiple flash disconnection processes until the external track tolerance duration is obtained;
[0209] According to the outer track tolerance time and the interval increase, the target hard disk is subjected to multiple flash cut processing until the inner track tolerance time is obtained.
[0210] Optionally, in the above device, the testing module 502 is specifically used for:
[0211] Determine the i-th interruption duration corresponding to the i-th flash interruption processing, wherein the first interruption duration is the initial duration, and when i is greater than or equal to 2, the i-th interruption duration is the i-1-th interruption duration plus the interval increase;
[0212] According to the i-th interruption duration, performing an i-th flash interruption process on the target hard disk to obtain an i-th data record of the target hard disk, and judging whether an external track of the target hard disk is interrupted according to the i-th data record;
[0213] Herein, the i is sequentially 1, 2, ... until it is determined according to the Mth data record that an external track of the target hard disk is interrupted, and the Mth interruption duration is determined as the external track tolerance duration.
[0214] Optionally, in the above device, the testing module 502 is specifically used for:
[0215] Determine the jth interruption duration corresponding to the jth flash interruption processing, wherein the first interruption duration is the external channel tolerance duration, and when j is greater than or equal to 2, the jth interruption duration is the j-1th interruption duration plus the interval increase amount;
[0216] According to the jth interruption duration, performing a jth flash interruption process on the target hard disk to obtain a jth data record of the target hard disk, and judging whether there is an interruption in the inner track of the target hard disk according to the jth data record;
[0217] The j is sequentially 1, 2, ... until it is determined according to the Nth data record that there is an interruption in the inner track of the target hard disk, and the Nth interruption duration is determined as the inner track tolerance duration.
[0218] Optionally, in the above device, the testing module 502 is specifically used for:
[0219] According to the i-th interruption duration, determining the i-th disconnection time and the i-th connection time of the target hard disk, the time interval between the i-th connection time and the i-th disconnection time being the i-th interruption duration;
[0220] According to the i-th disconnection time, disconnecting the target hard disk;
[0221] According to the i-th access time, access processing is performed on the target hard disk;
[0222] The flash disconnection process includes the disconnection process and the access process.
[0223] Optionally, the device configuration module 503 described above is specifically used for:
[0224] Determine a preset range smaller than the external track tolerance time as a first preset range, wherein the first preset range is used to indicate an interruption time range corresponding to the target hard disk not performing hard disk switching processing;
[0225] Determine a preset range that is greater than or equal to the external track tolerance time and less than the internal track tolerance time as a second preset range, wherein the second preset range is used to represent an interruption time range corresponding to the storage of data of the target hard disk to the internal track;
[0226] Determine a preset range greater than or equal to the inner track tolerance time as a third preset range, wherein the third preset range is used to represent an interruption time range corresponding to the entire disk switching process of the target hard disk;
[0227] The hard disk parameter includes the first preset range, the second preset range and the third preset range.
[0228] Optionally, the device as described above further includes a verification module 505, and the verification module 505 is used to:
[0229] Performing stability verification processing on the inner track tolerance time and the outer track tolerance time to obtain a verification result, wherein the verification result includes verification pass and verification fail;
[0230] When the verification result is verification failure, the target hard disk is subjected to a flash stability test according to the test configuration information, and the test data of the target hard disk is updated until the verification result corresponding to the updated inner track tolerance time and outer track tolerance time is verification passed.
[0231] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 , the electronic device 600 may include: a memory 601 , a processor 602 , and a transceiver 603 .
[0232] The memory 601 is used to store program instructions;
[0233] The processor 602 is used to execute the program instructions stored in the memory, so as to enable the electronic device 600 to execute the above method.
[0234] The transceiver 603 may include: a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, a transmitter, a transmission port, a transmission interface, or the like, and the receiver may also be referred to as a receiver, a reception port, a reception interface, or the like. Exemplarily, the memory 601, the processor 602, and the transceiver 603 are interconnected via a bus 604.
[0235] The embodiment of the present application also provides a computer program product, which can be executed by a processor. When the computer program product is executed, the above method can be implemented.
[0236] The hard disk testing device, electronic device, computer-readable storage medium and computer program product of the embodiments of the present application can execute the technical solutions shown in the above-mentioned hard disk testing method embodiments. Their implementation principles and beneficial effects are similar and will not be repeated here.
[0237] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0238] It should be further noted that, although the various steps in the flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flow chart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0239] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0240] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0241] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.
[0242] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0243] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0244] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0245] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for testing a hard disk, characterized in that: The method comprises: In response to a user's test instruction for a target hard disk, acquiring test configuration information, the target hard disk including an inner track and an outer track; According to the test configuration information, a flash stability test is performed on the target hard disk to obtain test data of the target hard disk, wherein the test data includes an inner track tolerance time of the inner track and an outer track tolerance time of the outer track; According to the inner track tolerance time and the outer track tolerance time, hard disk parameters of the target hard disk are configured; A test report of the target hard disk is generated according to the test data.
2. The method according to claim 1, characterized in that According to the test configuration information, a flash stability test is performed on the target hard disk to obtain test data of the target hard disk, including: Determine the initial duration and interval increase amount according to the test configuration information; According to the initial duration and the interval increase, the target hard disk is subjected to multiple flash disconnection processes until the external track tolerance duration is obtained; According to the outer track tolerance time and the interval increase, the target hard disk is subjected to multiple flash cut processing until the inner track tolerance time is obtained.
3. The method according to claim 2, characterized in that According to the initial duration and the interval increase, the target hard disk is subjected to multiple flash disconnection processes until the external track tolerance duration is obtained, including: Determine the i-th interruption duration corresponding to the i-th flash interruption processing, wherein the first interruption duration is the initial duration, and when i is greater than or equal to 2, the i-th interruption duration is the i-1-th interruption duration plus the interval increase; According to the i-th interruption duration, performing an i-th flash interruption process on the target hard disk to obtain an i-th data record of the target hard disk, and judging whether an external track of the target hard disk is interrupted according to the i-th data record; Herein, the i is sequentially 1, 2, ... until it is determined according to the Mth data record that an external track of the target hard disk is interrupted, and the Mth interruption duration is determined as the external track tolerance duration.
4. The method according to claim 2 or 3, characterized in that: According to the external track tolerance time and the interval increase, the target hard disk is subjected to multiple flash disconnection processes until the internal track tolerance time is obtained, including: Determine the jth interruption duration corresponding to the jth flash interruption processing, wherein the first interruption duration is the external channel tolerance duration, and when j is greater than or equal to 2, the jth interruption duration is the j-1th interruption duration plus the interval increase amount; According to the jth interruption duration, performing a jth flash interruption process on the target hard disk to obtain a jth data record of the target hard disk, and judging whether there is an interruption in the inner track of the target hard disk according to the jth data record; The j is sequentially 1, 2, ... until it is determined according to the Nth data record that there is an interruption in the inner track of the target hard disk, and the Nth interruption duration is determined as the inner track tolerance duration.
5. The method according to claim 2 or 3, characterized in that: According to the i-th interruption duration, performing an i-th flash interruption process on the target hard disk includes: According to the i-th interruption duration, determining the i-th disconnection time and the i-th connection time of the target hard disk, the time interval between the i-th connection time and the i-th disconnection time being the i-th interruption duration; According to the i-th disconnection time, disconnecting the target hard disk; According to the i-th access time, access processing is performed on the target hard disk; The flash disconnection process includes the disconnection process and the access process.
6. The method according to any one of claims 1 to 5, characterized in that: According to the inner track tolerance time and the outer track tolerance time, hard disk parameters of the target hard disk are configured, including: Determine a preset range smaller than the external track tolerance time as a first preset range, wherein the first preset range is used to indicate an interruption time range corresponding to the target hard disk not performing hard disk switching processing; Determine a preset range that is greater than or equal to the external track tolerance time and less than the internal track tolerance time as a second preset range, wherein the second preset range is used to represent an interruption time range corresponding to the storage of data of the target hard disk to the internal track; Determine a preset range greater than or equal to the inner track tolerance time as a third preset range, wherein the third preset range is used to represent an interruption time range corresponding to the entire disk switching process for the target hard disk; The hard disk parameter includes the first preset range, the second preset range and the third preset range.
7. The method according to any one of claims 1 to 5, characterized in that: After performing a flash stability test on the target hard disk according to the test configuration information to obtain test data of the target hard disk, the method further includes: Performing stability verification processing on the inner track tolerance time and the outer track tolerance time to obtain a verification result, wherein the verification result includes verification pass and verification fail; When the verification result is verification failure, the target hard disk is subjected to a flash stability test according to the test configuration information, and the test data of the target hard disk is updated until the verification result corresponding to the updated inner track tolerance time and outer track tolerance time is verification passed.
8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.