Multi-hard-disk coordinated data storage method and system, terminal and medium

By analyzing the wear sectors and storage data loss of hard disks, reasonably determining the priority of data migration, solving the problem of migration failure or data loss caused by insufficient storage space during coordinated storage data migration of multiple hard disks, and achieving balanced allocation of storage resources.

CN119828984AActive Publication Date: 2025-04-15SHENZHEN MACROFLASH TECH CO LTD

Patent Information

Application Number
CN202510302869.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-04-15
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

In the prior art, when multiple hard disks coordinate storage data migration, migration failure or data loss is likely to occur due to insufficient storage space.

Method used

The storage sector information of the hard disk is obtained through SMART information, the wear sector is analyzed, the hard disk analysis value is calculated, the hard disk is filtered, and the storage risk value is obtained through the loss of storage data in multiple historical cycles, and the data migration priority is reasonably determined.

Benefits of technology

It effectively avoids migration failure or data loss caused by insufficient storage space, and realizes balanced allocation of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119828984A_ABST
    Figure CN119828984A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-hard-disk coordinated data storage method and system, a terminal and a medium, and the method comprises the steps: obtaining hard disk information in a historical period through SMART information, carrying out the analysis processing of the hard disk information, obtaining a worn sector, carrying out the analysis of the worn sector, obtaining a hard disk analysis value, and reflecting the wear degree of the whole sector in a hard disk. Classifying and distinguishing the plurality of hard disks on the basis of the hard disk analysis values to obtain to-be-coordinated hard disks and normal hard disks, sorting according to the hard disk analysis values corresponding to the to-be-coordinated hard disks to obtain a to-be-coordinated table, analyzing historical storage information of the to-be-coordinated hard disks in a plurality of historical cycles in the to-be-coordinated table, and storing the historical storage information in the to-be-coordinated table. The storage risk value reflects the data storage stability degree of the to-be-coordinated hard disk in a plurality of historical periods through the storage risk value, and finally the coordinated hard disk in the to-be-coordinated table is determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and in particular to a data storage method, system, terminal and medium coordinated by multiple hard disks. Background Art

[0002] SMART is a hard disk health monitoring technology that can monitor the health status of hard disks in real time. When multi-hard disk coordinated storage data migration is required, the hard disks required for coordination are determined by analyzing the health status of the hard disks and the loss of stored data in the hard disks to be coordinated in multiple consecutive historical cycles. At the same time, the storage data in the hard disks required for coordination is further analyzed, and the results of the analysis are used as the basis for migration coordination priority to solve the migration failure or data loss caused by insufficient storage space during the coordinated hard disk data migration process.

[0003] In the prior art, when multiple hard disks coordinate the migration of storage data, there is a possibility of migration failure or data loss due to insufficient hard disk storage space. Therefore, the storage sector status of the hard disk is obtained and analyzed through SMART information to obtain a hard disk analysis value, which reflects the health status of the hard disk, and the hard disks to be coordinated are screened out. The storage risk value is obtained through the loss of data stored in the hard disks to be coordinated in multiple consecutive historical cycles, and the coordinated hard disks are further screened out. For the screened coordinated hard disks, the migration priority value is obtained by analyzing the access to the storage data of the coordinated hard disks in multiple consecutive historical cycles. At the same time, combined with the storage risk value, the problem of how to reasonably determine the data migration priority is solved. Finally, the priority migration data and the remaining storage capacity of the normal hard disk are compared and processed to solve the migration failure or data loss caused by insufficient storage space during the coordinated hard disk data migration process. Summary of the invention

[0004] The object of the present invention is to provide a multi-hard disk coordinated data storage method, system, terminal and medium to solve at least one of the above-mentioned prior art problems.

[0005] The purpose of the present invention can be achieved through the following technical solutions: In a first aspect, the present invention provides a data storage method for multiple hard disks coordination, comprising: Step 1: Obtain hard disk information in a historical period through SMART information, wherein the hard disk information includes storage sectors, and analyze and process the storage sectors to obtain wear sectors, and analyze the wear sectors in the hard disk to obtain the number of wear sectors and the wear degree value, and analyze and process the number of wear sectors and the wear degree value to output the hard disk analysis value; Step 2: Based on the hard disk analysis value, compare the hard disk analysis value with the hard disk analysis threshold. If the hard disk analysis value is less than or equal to the hard disk analysis threshold, it is marked as a normal hard disk. If the hard disk analysis value is greater than the hard disk analysis threshold, it is marked as a hard disk to be coordinated. Multiple hard disks to be coordinated are summarized to obtain a table to be coordinated. Based on the table to be coordinated, historical storage information of the hard disk to be coordinated in multiple continuous historical periods is obtained through SMART information, wherein the historical storage information includes storage loss frequency and storage loss amount. The storage loss frequency and the storage loss amount are analyzed to obtain a storage risk value, which is compared with the storage risk threshold. If the storage risk value is greater than the storage risk threshold, a migration coordination signal is generated to obtain a coordinated hard disk. Step 3: Based on the migration coordination signal, the storage data of the coordinated hard disk in multiple continuous historical periods is analyzed to obtain the data access value and the access stability value, the data access value and the access stability value are added and summed to obtain the migration priority value, and the migration priority value and the storage risk value are analyzed and processed to obtain the migration ranking value, and based on the migration ranking value, the coordinated hard disk is summarized to obtain the coordinated hard disk table; Step 4: In the coordination hard disk table, obtain the priority migration memory corresponding to the priority migration data in the coordination hard disk. At the same time, obtain the remaining storage capacity of the normal hard disk, and compare the priority migration memory corresponding to the storage data in the coordination hard disk with the remaining storage capacity of the normal hard disk to complete the storage data migration coordination work and solve the problem of coordinating hard disk data migration.

[0006] As a further solution of the present invention, the worn sectors are obtained by: Get the storage sectors of the hard disk through SMART information and analyze the storage sectors. The process is as follows: Divide the historical period into several analysis periods, obtain the reading speed of the storage sector in the analysis period, calculate the ratio of the reading speed of the storage sector in the analysis period to the reading speed threshold, and obtain the reading analysis value; The read analysis values ​​corresponding to all analysis periods are added and averaged to obtain the sector wear value; The sector wear value is compared with the sector wear threshold. If the sector wear value is greater than the sector wear threshold, that is, the storage sector analyzed in the hard disk is heavily worn, the storage sector with heavy wear in the hard disk is marked as a worn sector.

[0007] As a further solution of the present invention, the hard disk analysis value is obtained by: Count the number of worn sectors in the hard disk and calculate the ratio with the total number of storage sectors in the hard disk to obtain the number of worn sectors; Obtaining a sector wear value corresponding to the worn sector, subtracting the sector wear value corresponding to the worn sector from the sector wear threshold, and performing ratio calculation with the sector wear threshold to obtain a wear degree value; The hard disk analysis value is obtained by multiplying the number of worn sectors by the wear degree value.

[0008] As a further solution of the present invention, the risk value is stored The way to obtain is: Based on multiple continuous historical periods, any historical period is selected as the target period, and the target period is divided into several target time periods; Obtain the number of data losses within the target period, calculate the ratio of the number of data losses within the target period to the total number of data storage within the target period, and obtain the period loss frequency; Calculate the average of the period loss frequency in all target periods to obtain the storage loss frequency and mark it as ; Obtain the amount of data loss within the target period, calculate the ratio of the amount of data loss within the target period to the total amount of data stored within the target period, and obtain the amount of data loss during the period; Calculate the average of the number of period losses in all target periods to obtain the storage loss amount, which is marked as ; The loss frequency will be stored and storage loss Substituting into the formula: , calculate the cycle risk value ,in, , Expressed as a preset scaling factor; The cycle risk value corresponding to all historical cycles Add and average the values ​​to get the storage risk value .

[0009] As a further solution of the present invention, the migration priority value is obtained in the following manner: Based on multiple historical periods, any historical period is selected as the target period, and the target period is divided into several target time periods; Obtain the number of accesses to the stored data within the target period, calculate the ratio of the number of accesses to the stored data within the target period to the duration of the target period, and obtain the access frequency; Add up the access frequencies in all target time periods and take the average to get the data access value; The way to access stable values ​​is: A two-dimensional coordinate system is established, and the data access values ​​corresponding to the historical period are plotted on the Y axis of the two-dimensional coordinate system to obtain an access change curve; In the access change curve, the data access threshold is marked on the Y axis, and a straight line parallel to the X axis is drawn as the threshold reference line, where the threshold reference line intersects the access change curve; Extract the access change curve above the threshold reference line, obtain the number of access change curves above the threshold reference line, and obtain the out-of-bounds number; The over-limit quantity is calculated by ratioing the over-limit quantity to the over-limit quantity threshold to obtain the over-limit quantity ratio; The length of the access change curve above the threshold reference line is counted, and the ratio is calculated with the total length of the access change curve to obtain the over-boundary length value; The access stability value is obtained by multiplying the number of out-of-bounds and the out-of-bounds length.

[0010] As a further solution of the present invention, the migration ranking value is obtained by: The migration coordination value is compared with the migration coordination threshold, and the process is as follows; If the migration coordination value is greater than or equal to the migration coordination threshold, the analyzed storage data in the coordination hard disk is marked as priority migration data; Obtain the number of priority migration data, and calculate the ratio with the total amount of data stored in the coordinated hard disk to obtain the priority migration number; Obtain the priority migration amount memory, and calculate the ratio with the total memory of the data stored in the coordinated hard disk to obtain the priority migration memory; The migration ranking value is calculated by multiplying the number of priority migrations by the priority migration memory.

[0011] As a further solution of the present invention, in the coordination hard disk table, extract the first coordinated hard disk in the order, and obtain the priority migration memory corresponding to the first coordinated hard disk in the order ; The priority migration memory corresponding to the first coordinated hard disk in the sorting is compared with the remaining storage capacity of the normal hard disk. The process is as follows: If there is a normal hard disk whose remaining storage capacity is greater than or equal to the priority migration memory corresponding to the first coordinated hard disk in the order, the priority migration data in the first coordinated hard disk in the order is preferentially migrated to the normal hard disk; If there is no normal hard disk whose remaining storage capacity is greater than or equal to the priority migration memory corresponding to the first coordinated hard disk in the sorting order, the priority migration data in the first coordinated hard disk in the sorting order is compressed in the data memory, and the process is as follows: Compare the normal hard disks according to the remaining storage capacity of the normal hard disks, and sort them in descending order, extract the normal hard disk with the largest remaining storage capacity as the first normal migration hard disk of the sorted first coordination hard disk; The remaining storage capacity of the first normal migration hard disk is marked as , through the formula: , calculate and obtain the maximum value of the compressed memory of the priority migration data in the first coordinated hard disk; The priority migration data in all the coordinated hard disks in the coordinated hard disk table are traversed, and the data are analyzed and processed according to the order of the coordinated hard disks in the coordinated hard disk table until the coordination work of the priority migration data in all the coordinated hard disks in the coordinated hard disk table is completed.

[0012] In a second aspect, a data storage system coordinated by multiple hard disks includes: Hard disk wear assessment module: obtains hard disk information in the historical period through SMART information, where the hard disk information includes storage sectors, performs analysis and processing based on the storage sectors to obtain wear sectors, and analyzes the wear sectors in the hard disk to obtain the number of wear sectors and the wear degree value, analyzes and processes the number of wear sectors and the wear degree value, and outputs the hard disk analysis value; Analyze the hard disk coordination module: Based on the hard disk analysis value, compare the hard disk analysis value with the hard disk analysis threshold. If the hard disk analysis value is less than or equal to the hard disk analysis threshold, it is marked as a normal hard disk. If the hard disk analysis value is greater than the hard disk analysis threshold, it is marked as a hard disk to be coordinated. Multiple hard disks to be coordinated are summarized to obtain a table to be coordinated. Based on the table to be coordinated, the historical storage information of the hard disk to be coordinated in multiple continuous historical cycles is obtained through SMART information, wherein the historical storage information includes the storage loss frequency and the storage loss amount. The storage loss frequency and the storage loss amount are analyzed to obtain a storage risk value, which is compared with the storage risk threshold. If the storage risk value is greater than the storage risk threshold, a migration coordination signal is generated to obtain a coordinated hard disk. Storage data analysis module: Based on the migration coordination signal, the storage data of the coordinated hard disk in multiple continuous historical periods is analyzed to obtain the data access value and the access stability value, the data access value and the access stability value are added and summed to obtain the migration priority value, and the migration priority value and the storage risk value are analyzed and processed to obtain the migration ranking value, and based on the migration ranking value, the coordinated hard disk is summarized to obtain the coordinated hard disk table; Coordinated migration planning module: In the coordinated hard disk table, obtain the priority migration memory corresponding to the priority migration data in the coordinated hard disk, and at the same time, obtain the remaining storage capacity of the normal hard disk, and compare the priority migration memory corresponding to the storage data in the coordinated hard disk with the remaining storage capacity of the normal hard disk to complete the storage data migration coordination work and solve the problem of coordinated hard disk data migration.

[0013] In a third aspect, a multi-hard disk coordinated data storage terminal includes: The memory 302 and the processor 301 and the computer program 303 stored in the memory 302 implement the steps of the above method when the computer program 303 is executed on the processor 301 .

[0014] In a fourth aspect, a multi-hard disk coordinated data storage medium includes: When the computer program is executed by a processor, the steps of the above method are implemented.

[0015] Beneficial effects of the present invention: 1. The present invention obtains hard disk information within a historical period through SMART information, analyzes and processes the hard disk information to obtain worn sectors, and analyzes the worn sectors to obtain hard disk analysis values, thereby reflecting the degree of wear of the entire sector in the hard disk. At the same time, based on the hard disk analysis values, multiple hard disks are classified and distinguished to obtain hard disks to be coordinated and normal hard disks, and the hard disks to be coordinated are sorted according to the hard disk analysis values ​​corresponding to the hard disks to be coordinated to obtain a table to be coordinated, and then the historical storage information of the hard disks to be coordinated in the table to be coordinated in multiple historical periods is analyzed to obtain a storage risk value, and the data storage stability of the hard disks to be coordinated in multiple historical periods is reflected by the storage risk value, and finally the coordinated hard disks in the table to be coordinated are determined; 2. Based on the migration coordination signal, the present invention analyzes the storage data of the coordinated hard disk in multiple continuous historical periods to obtain the data access value and the access stability value, analyzes and processes the data access value and the access stability value to obtain the migration priority value, and analyzes and processes the migration priority value and the storage risk value to obtain the migration coordination value, thereby reflecting the migration priority of the data stored in the coordinated hard disk through the migration coordination value, sorting the coordinated hard disks to obtain the coordinated hard disk table, and then performing migration work on the storage data in the coordinated hard disk one by one according to the coordinated hard disk table; 3. The present invention obtains the priority migration memory corresponding to the priority migration data in the coordinated hard disk in the coordinated hard disk table, and at the same time obtains the remaining storage capacity of the normal hard disk, and compares the priority migration memory corresponding to the storage data in the coordinated hard disk with the remaining storage capacity of the normal hard disk, thereby avoiding migration failure or data loss caused by insufficient storage space during the coordinated hard disk data migration process according to the remaining storage space of the normal hard disk, and achieving balanced allocation of storage resources. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 It is a flow chart of the steps of selecting a coordinated hard disk in a multi-hard disk coordinated data storage method provided in the first embodiment of the present invention; Figure 2 It is a flow chart of the steps of data storage coordination in a multi-hard disk coordinated data storage method provided in the second and third embodiments of the present invention; Figure 3 It is a structural schematic diagram of a multi-hard disk coordinated data storage system provided by Embodiment 4 of the present invention; Figure 4 It is a structural schematic diagram of a multi-hard disk coordinated data storage device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0019] Embodiment 1 Figure 1 A flowchart of a multi-hard disk coordinated data storage method provided in the first embodiment of the present invention, the embodiment of the present invention can be applied to the wear degree of multiple sectors in a hard disk, and determine the wear degree of the entire hard disk sector. The multi-hard disk coordinated data storage method can be executed by a multi-hard disk coordinated data storage system, the multi-hard disk coordinated data storage system can be implemented by software and / or hardware, and the multi-hard disk coordinated data storage system can be configured in a multi-hard disk coordinated data storage device. Optionally, a multi-hard disk coordinated data storage device can be an electronic device, and the electronic device can be a notebook, a desktop computer, a smart tablet, etc., which is not limited by the embodiment of the present invention.

[0020] like Figure 1 As shown, a data storage method for multiple hard disks coordinated according to an embodiment of the present invention specifically includes the following steps: Step 1: Obtain hard disk information in a historical period through SMART information, wherein the hard disk information includes storage sectors, and analyze and process the storage sectors to obtain wear sectors, and analyze the wear sectors in the hard disk to obtain the number of wear sectors and the wear degree value, and analyze and process the number of wear sectors and the wear degree value to output the hard disk analysis value; In some embodiments, the storage sectors of the hard disk are obtained through SMART information, and the storage sectors are analyzed. The process is as follows: Divide the historical period into several analysis periods, obtain the reading speed of the storage sector in the analysis period, calculate the ratio of the reading speed of the storage sector in the analysis period to the reading speed threshold, and obtain the reading analysis value; The read analysis values ​​corresponding to all analysis periods are added and averaged to obtain the sector wear value; It should be noted that the historical period is divided into equal time intervals; The sector wear value is compared with the sector wear threshold as follows: If the sector wear value is greater than the sector wear threshold, that is, the storage sector analyzed in the hard disk is worn out, the storage sector with large wear in the hard disk is marked as a worn sector; If the sector wear value is less than or equal to the sector wear threshold, that is, the storage sector analyzed in the hard disk has less wear, the storage sector with less wear in the hard disk is marked as a normal sector; Count the number of worn sectors in the hard disk and calculate the ratio with the total number of storage sectors in the hard disk to obtain the number of worn sectors; Obtaining a sector wear value corresponding to the worn sector, subtracting the sector wear value corresponding to the worn sector from the sector wear threshold, and performing ratio calculation with the sector wear threshold to obtain a wear degree value; The number of worn sectors is multiplied by the wear degree value to obtain the hard disk analysis value; It can be understood that the meaning of the hard disk analysis value is: reflecting the degree of wear of the entire sector in the hard disk, that is, it intuitively presents the data storage stability of the hard disk in a quantitative way. Specifically, if this value is larger, it means that the proportion of worn sectors in the hard disk is higher, and the degree of wear of the worn sectors is greater, that is, the probability of data loss in the hard disk is greater. Conversely, if this value is smaller, it means that the proportion of worn sectors in the hard disk is lower, and the degree of wear of the worn sectors is smaller, that is, the probability of data loss in the hard disk is smaller. Step 2: Based on the hard disk analysis value, compare the hard disk analysis value with the hard disk analysis threshold. If the hard disk analysis value is less than or equal to the hard disk analysis threshold, it is marked as a normal hard disk. If the hard disk analysis value is greater than the hard disk analysis threshold, it is marked as a hard disk to be coordinated. Multiple hard disks to be coordinated are summarized to obtain a table to be coordinated. Based on the table to be coordinated, historical storage information of the hard disk to be coordinated in multiple continuous historical periods is obtained through SMART information, wherein the historical storage information includes storage loss frequency and storage loss amount. The storage loss frequency and the storage loss amount are analyzed to obtain a storage risk value, which is compared with the storage risk threshold. If the storage risk value is greater than the storage risk threshold, a migration coordination signal is generated to obtain a coordinated hard disk. In some embodiments, the hard disk analysis value is compared with the hard disk analysis threshold value, and the process is as follows; If the hard disk analysis value is greater than the hard disk analysis threshold, it means that the proportion of worn sectors in the hard disk is high and the degree of wear of the worn sectors is large, that is, the probability of data storage loss in the hard disk is high. The hard disk with a high probability of data storage loss is marked as a hard disk to be coordinated; If the hard disk analysis value is less than or equal to the hard disk analysis threshold, it means that the proportion of worn sectors in the hard disk is low and the degree of wear of the worn sectors is small, that is, the probability of data loss in the hard disk is small, and the hard disk with a small probability of data loss is marked as a normal hard disk; Obtain the hard disk analysis values ​​corresponding to the hard disks to be coordinated, compare the sizes, and sort them in descending order to obtain a table to be coordinated; Based on multiple continuous historical periods, any historical period is selected as the target period, and the target period is divided into several target time periods; It should be noted that the target period division method is consistent with the historical period division method; Obtain the number of data losses within the target period, calculate the ratio of the number of data losses within the target period to the total number of data storage within the target period, and obtain the period loss frequency; Calculate the average of the period loss frequency in all target periods to obtain the storage loss frequency and mark it as ; Obtain the amount of data loss within the target period, calculate the ratio of the amount of data loss within the target period to the total amount of data stored within the target period, and obtain the amount of data loss during the period; Calculate the average of the number of period losses in all target periods to obtain the storage loss amount, which is marked as ; The loss frequency will be stored and storage loss Substituting into the formula: , calculate the cycle risk value ,in, , is represented by a preset scaling factor, and The value is 3.2344, The value is 1.3576; The cycle risk value corresponding to all historical cycles Add and average the values ​​to get the storage risk value ; It can be understood that the storage risk value means: reflecting the stability of data storage of the hard disk to be coordinated in multiple historical periods. Specifically, the larger the value, the higher the frequency of data loss of the hard disk to be coordinated in multiple historical periods, the larger the amount of data loss, and the less stable the data storage of the hard disk to be coordinated. On the contrary, the smaller the value, the lower the frequency of data loss of the hard disk to be coordinated in multiple historical periods, the smaller the amount of data loss, and the more stable the data storage of the hard disk to be coordinated. The storage risk value is compared with the storage risk threshold as follows: If the storage risk value is greater than the storage risk threshold, it means that the hard disk to be coordinated has a high frequency of data loss in multiple historical periods and a large amount of data loss, and the hard disk to be coordinated has a high risk of data storage loss. A migration coordination signal is generated, and the hard disk to be coordinated corresponding to the migration coordination signal is marked as a coordination hard disk; If the storage risk value is less than or equal to the storage risk threshold, it means that the data loss frequency of the hard disk to be coordinated is low in multiple historical cycles, and the data loss amount is small, that is, the data storage loss risk of the hard disk to be coordinated is small, and a small loss risk signal is generated; The specific implementation scheme of the embodiment of the present invention is: obtaining hard disk information within a historical period through SMART information, analyzing and processing the hard disk information to obtain worn sectors, and analyzing the worn sectors to obtain hard disk analysis values, thereby reflecting the degree of wear of the entire sector in the hard disk, and at the same time, based on the hard disk analysis values, classifying and distinguishing multiple hard disks to obtain hard disks to be coordinated and normal hard disks, sorting them according to the size of the hard disk analysis values ​​corresponding to the hard disks to be coordinated, obtaining a table to be coordinated, and then analyzing the historical storage information of the hard disks to be coordinated in multiple historical periods in the table to be coordinated to obtain storage risk values, reflecting the data storage stability of the hard disks to be coordinated in multiple historical periods through the storage risk values, and finally determining the coordinated hard disks in the table to be coordinated.

[0021] Embodiment 2 like Figure 1-2 As shown, based on Example 1, a data storage method for multiple hard disk coordination described in an embodiment of the present invention includes: Step 3: Based on the migration coordination signal, the storage data of the coordinated hard disk in multiple continuous historical periods is analyzed to obtain the data access value and the access stability value, the data access value and the access stability value are analyzed and processed to obtain the migration priority value, and the migration priority value and the storage risk value are analyzed and processed to obtain the migration ranking value, and based on the migration ranking value, the coordinated hard disk is summarized to obtain the coordinated hard disk table; In some embodiments, based on multiple historical periods, a historical period is arbitrarily selected as a target period, and the target period is divided into a number of target time periods; It should be noted that the target period division method is consistent with the historical period division method; Obtain the number of accesses to the stored data within the target period, calculate the ratio of the number of accesses to the stored data within the target period to the duration of the target period, and obtain the access frequency; Add up the access frequencies in all target time periods and take the average to get the data access value; A two-dimensional coordinate system is established, in which the X-axis is the historical period and the Y-axis is the data access value. Multiple historical periods are sorted and marked on the X-axis of the two-dimensional coordinate system in a time series manner, and the data access values ​​corresponding to the historical periods are punctuated and drawn on the Y-axis of the two-dimensional coordinate system to obtain an access change curve; In the access change curve, the data access threshold is marked on the Y axis, and a straight line parallel to the X axis is drawn as the threshold reference line, where the threshold reference line intersects the access change curve; Extract the access change curve above the threshold reference line, obtain the number of access change curves above the threshold reference line, and obtain the out-of-bounds number; The over-limit quantity is calculated by ratioing the over-limit quantity to the over-limit quantity threshold to obtain the over-limit quantity ratio; It should be noted that the over-limit threshold is the total number of sub-curves that the access change curve is divided into after the access change curve intersects with the threshold reference line, with the intersection point as the reference point; The length of the access change curve above the threshold reference line is counted, and the ratio is calculated with the total length of the access change curve to obtain the over-boundary length value; The access stability value is obtained by multiplying the number of out-of-bounds and the out-of-bounds length value; The data access value and the access stability value are added together to obtain the migration priority value, which is marked as ; Will migrate the priority value and storage risk value Substituting into the formula: , calculate the migration coordination value ,in, , Expressed as a preset scale factor, The value is 2.554. The value is 6.375; It is understandable that the migration coordination value The meaning is: the migration priority of the data stored in the coordination hard disk is reflected by the historical access frequency and the stability of the access frequency of the data stored in the coordination hard disk. Specifically, if this value is larger, it means that the historical access frequency of the data stored in the coordination hard disk is higher and the access frequency is more stable. On the contrary, if this value is smaller, it means that the historical access frequency of the data stored in the coordination hard disk is lower and the access frequency is more unstable. The migration coordination value is compared with the migration coordination threshold, and the process is as follows; If the migration coordination value is greater than or equal to the migration coordination threshold, the analyzed storage data in the coordination hard disk is marked as priority migration data; If the migration coordination value is less than the migration coordination threshold, the analyzed storage data in the coordination hard disk is marked as non-priority migration data; Obtain the number of priority migration data, and calculate the ratio with the total amount of data stored in the coordinated hard disk to obtain the priority migration number; Obtain the priority migration amount memory, and calculate the ratio with the total memory of the data stored in the coordinated hard disk to obtain the priority migration memory; The number of priority migrations is multiplied by the priority migration memory to calculate the migration ranking value; Compare the migration sorting values ​​corresponding to the coordinated hard disks, and sort them in descending order of the migration sorting values ​​to obtain a coordinated hard disk table; The specific implementation scheme of the embodiment of the present invention is: based on the migration coordination signal, the storage data of the coordinated hard disk in multiple continuous historical periods is analyzed to obtain data access values ​​and access stability values, the data access values ​​and access stability values ​​are analyzed and processed to obtain migration priority values, and the migration priority values ​​and storage risk values ​​are analyzed and processed to obtain migration coordination values, thereby reflecting the migration priority of the data stored in the coordinated hard disk through the migration coordination value, sorting the coordinated hard disks to obtain a coordinated hard disk table, and then migrating the storage data in the coordinated hard disk one by one according to the coordinated hard disk table.

[0022] Embodiment 3 like Figure 1-2 As shown, based on Example 1 and Example 2, a data storage method for multiple hard disk coordination described in an embodiment of the present invention includes: Step 4: In the coordination hard disk table, obtain the priority migration memory corresponding to the priority migration data in the coordination hard disk, and at the same time, obtain the remaining storage capacity of the normal hard disk, and compare the priority migration memory corresponding to the storage data in the coordination hard disk with the remaining storage capacity of the normal hard disk, complete the storage data migration coordination work, and solve the problem of coordinating hard disk data migration; Exemplarily, in the coordination hard disk table, the first coordinated hard disk is extracted, and the priority migration memory corresponding to the first coordinated hard disk is obtained. ; The priority migration memory corresponding to the first coordinated hard disk in the sorting is compared with the remaining storage capacity of the normal hard disk. The process is as follows: If there is a normal hard disk whose remaining storage capacity is greater than or equal to the priority migration memory corresponding to the first coordinated hard disk in the order, the priority migration data in the first coordinated hard disk in the order is preferentially migrated to the normal hard disk; If there is no normal hard disk whose remaining storage capacity is greater than or equal to the priority migration memory corresponding to the first coordinated hard disk in the sorting order, the priority migration data in the first coordinated hard disk in the sorting order is compressed in the data memory, and the process is as follows: Compare the normal hard disks according to the remaining storage capacity of the normal hard disks, and sort them in descending order, extract the normal hard disk with the largest remaining storage capacity as the first normal migration hard disk of the sorted first coordination hard disk; The remaining storage capacity of the first normal migration hard disk is marked as , through the formula: , calculate and obtain the maximum value of the compressed memory of the priority migration data in the first coordinated hard disk; Traverse the priority migration data in all the coordinated hard disks in the coordinated hard disk table, analyze and process them according to the order of the coordinated hard disks in the coordinated hard disk table, until the coordination work of the priority migration data in all the coordinated hard disks in the coordinated hard disk table is completed; The specific implementation scheme of the embodiment of the present invention is: in the coordinated hard disk table, the priority migration memory corresponding to the priority migration data in the coordinated hard disk is obtained, and at the same time, the remaining storage capacity of the normal hard disk is obtained, and the priority migration memory corresponding to the storage data in the coordinated hard disk is compared with the remaining storage capacity of the normal hard disk, thereby avoiding migration failure or data loss caused by insufficient storage space during the coordinated hard disk data migration process according to the remaining storage space of the normal hard disk, and achieving balanced allocation of storage resources.

[0023] Embodiment 4 Reference Figure 3 Based on Example 1, Example 2 and Example 3, the embodiment of the present invention further provides a multi-hard disk coordinated data storage system, including: Hard disk wear assessment module: obtains hard disk information in the historical period through SMART information, where the hard disk information includes storage sectors, performs analysis and processing based on the storage sectors to obtain wear sectors, and analyzes the wear sectors in the hard disk to obtain the number of wear sectors and the wear degree value, analyzes and processes the number of wear sectors and the wear degree value, and outputs the hard disk analysis value; Analyze the hard disk coordination module: Based on the hard disk analysis value, compare the hard disk analysis value with the hard disk analysis threshold. If the hard disk analysis value is less than or equal to the hard disk analysis threshold, it is marked as a normal hard disk. If the hard disk analysis value is greater than the hard disk analysis threshold, it is marked as a hard disk to be coordinated. Multiple hard disks to be coordinated are summarized to obtain a table to be coordinated. Based on the table to be coordinated, the historical storage information of the hard disk to be coordinated in multiple continuous historical cycles is obtained through SMART information, wherein the historical storage information includes the storage loss frequency and the storage loss amount. The storage loss frequency and the storage loss amount are analyzed to obtain a storage risk value, which is compared with the storage risk threshold. If the storage risk value is greater than the storage risk threshold, a migration coordination signal is generated to obtain a coordinated hard disk. Storage data analysis module: Based on the migration coordination signal, the storage data of the coordinated hard disk in multiple continuous historical periods is analyzed to obtain the data access value and the access stability value, the data access value and the access stability value are added and summed to obtain the migration priority value, and the migration priority value and the storage risk value are analyzed and processed to obtain the migration ranking value, and based on the migration ranking value, the coordinated hard disk is summarized to obtain the coordinated hard disk table; Coordinated migration planning module: In the coordinated hard disk table, obtain the priority migration memory corresponding to the priority migration data in the coordinated hard disk, and at the same time, obtain the remaining storage capacity of the normal hard disk, and compare the priority migration memory corresponding to the storage data in the coordinated hard disk with the remaining storage capacity of the normal hard disk to complete the storage data migration coordination work and solve the problem of coordinated hard disk data migration.

[0024] Embodiment 5 Reference Figure 4 The embodiment of the present invention further provides a computer device 3, comprising: a memory 302 and a processor 301 and a computer program 303 stored in the memory 302. When the computer program 303 is executed on the processor 301, a multi-hard disk coordinated data storage method as described in any one of the above methods is implemented.

[0025] The computer device 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 4 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0026] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0027] In some embodiments, the memory 302 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 302 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 3. Further, the memory 302 may also include both an internal storage unit of the computer device 3 and an external storage device. The memory 302 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 302 may also be used to temporarily store data that has been output or is to be output.

[0028] Embodiment 6 An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements a multi-hard disk coordinated data storage method as described in any one of the above methods.

[0029] In this embodiment, if the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, USB flash drive, mobile hard disk, disk or optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0030] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0031] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0032] In the embodiments disclosed in the present application, it should be understood that the disclosed apparatus / terminal equipment and method can be implemented in other ways. For example, the apparatus / terminal equipment embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. One point, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.

[0033] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0034] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0035] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A data storage method for multi-hard disk coordination, characterized in that: The following steps are involved: Step 1: Obtain hard disk information in a historical period through SMART information, wherein the hard disk information includes storage sectors, and analyze and process the storage sectors to obtain wear sectors, and analyze the wear sectors in the hard disk to obtain the number of wear sectors and the wear degree value, and analyze and process the number of wear sectors and the wear degree value to output the hard disk analysis value; Step 2: Based on the hard disk analysis value, compare the hard disk analysis value with the hard disk analysis threshold. If the hard disk analysis value is less than or equal to the hard disk analysis threshold, it is marked as a normal hard disk. If the hard disk analysis value is greater than the hard disk analysis threshold, it is marked as a hard disk to be coordinated. Multiple hard disks to be coordinated are summarized to obtain a table to be coordinated. Based on the table to be coordinated, historical storage information of the hard disk to be coordinated in multiple continuous historical periods is obtained through SMART information, wherein the historical storage information includes storage loss frequency and storage loss amount. The storage loss frequency and the storage loss amount are analyzed to obtain a storage risk value, which is compared with the storage risk threshold. If the storage risk value is greater than the storage risk threshold, a migration coordination signal is generated to obtain a coordinated hard disk. Step 3: Based on the migration coordination signal, the storage data of the coordinated hard disk in multiple continuous historical periods is analyzed to obtain the data access value and the access stability value, the data access value and the access stability value are added and summed to obtain the migration priority value, and the migration priority value and the storage risk value are analyzed and processed to obtain the migration ranking value, and based on the migration ranking value, the coordinated hard disk is summarized to obtain the coordinated hard disk table; Step 4: In the coordination hard disk table, obtain the priority migration memory corresponding to the priority migration data in the coordination hard disk. At the same time, obtain the remaining storage capacity of the normal hard disk, and compare the priority migration memory corresponding to the storage data in the coordination hard disk with the remaining storage capacity of the normal hard disk to complete the storage data migration coordination work and solve the problem of coordinating hard disk data migration.

2. The method for storing data in a multi-hard disk coordination manner according to claim 1, characterized in that: The method of obtaining the wear sector is: Get the storage sectors of the hard disk through SMART information and analyze the storage sectors. The process is as follows: Divide the historical period into several analysis periods, obtain the reading speed of the storage sector in the analysis period, calculate the ratio of the reading speed of the storage sector in the analysis period to the reading speed threshold, and obtain the reading analysis value; The read analysis values ​​corresponding to all analysis periods are added and averaged to obtain the sector wear value; The sector wear value is compared with the sector wear threshold. If the sector wear value is greater than the sector wear threshold, that is, the storage sector analyzed in the hard disk is heavily worn, the storage sector with heavy wear in the hard disk is marked as a worn sector.

3. The data storage method of multiple hard disk coordination according to claim 1, characterized in that: The hard disk analysis value is obtained as follows: Count the number of worn sectors in the hard disk and calculate the ratio with the total number of storage sectors in the hard disk to obtain the number of worn sectors; Obtaining a sector wear value corresponding to the worn sector, subtracting the sector wear value corresponding to the worn sector from the sector wear threshold, and performing ratio calculation with the sector wear threshold to obtain a wear degree value; The hard disk analysis value is obtained by multiplying the number of worn sectors by the wear degree value.

4. The method for storing data in a multi-hard disk coordination manner according to claim 1, characterized in that: Storing Value at Risk The way to obtain is: Based on multiple continuous historical periods, any historical period is selected as the target period, and the target period is divided into several target time periods; Obtain the number of data losses within the target period, calculate the ratio of the number of data losses within the target period to the total number of data storage within the target period, and obtain the period loss frequency; Calculate the average of the period loss frequency in all target periods to obtain the storage loss frequency and mark it as ; Obtain the amount of data loss within the target period, calculate the ratio of the amount of data loss within the target period to the total amount of data stored within the target period, and obtain the amount of data loss during the period; Calculate the average of the number of period losses in all target periods to obtain the storage loss amount, which is marked as ; The loss frequency will be stored and storage loss Substituting into the formula: , calculate the cycle risk value ,in, , Expressed as a preset scaling factor; The cycle risk value corresponding to all historical cycles Add and average the values ​​to get the storage risk value .

5. The data storage method of multiple hard disk coordination according to claim 1, characterized in that: The migration priority value is obtained as follows: Based on multiple historical periods, any historical period is selected as the target period, and the target period is divided into several target time periods; Obtain the number of accesses to the stored data within the target period, calculate the ratio of the number of accesses to the stored data within the target period to the duration of the target period, and obtain the access frequency; Add up the access frequencies in all target time periods and take the average to get the data access value; The way to access stable values ​​is: A two-dimensional coordinate system is established, and the data access values ​​corresponding to the historical period are plotted on the Y axis of the two-dimensional coordinate system to obtain an access change curve; In the access change curve, the data access threshold is marked on the Y axis, and a straight line parallel to the X axis is drawn as the threshold reference line, where the threshold reference line intersects the access change curve; Extract the access change curve above the threshold reference line, obtain the number of access change curves above the threshold reference line, and obtain the out-of-bounds number; The over-limit quantity is calculated by ratioing the over-limit quantity to the over-limit quantity threshold to obtain the over-limit quantity ratio; The length of the access change curve above the threshold reference line is counted, and the ratio is calculated with the total length of the access change curve to obtain the over-bounded length value; The access stability value is obtained by multiplying the number of out-of-bounds and the out-of-bounds length.

6. The data storage method of multiple hard disk coordination according to claim 1, characterized in that: The migration sort value is obtained as follows: The migration coordination value is compared with the migration coordination threshold value, and the process is as follows; If the migration coordination value is greater than or equal to the migration coordination threshold, the analyzed storage data in the coordination hard disk is marked as priority migration data; Obtain the number of priority migration data, and calculate the ratio with the total amount of data stored in the coordinated hard disk to obtain the priority migration number; Obtain the priority migration amount memory, and calculate the ratio with the total memory of the data stored in the coordinated hard disk to obtain the priority migration memory; The migration ranking value is calculated by multiplying the number of priority migrations by the priority migration memory.

7. The data storage method of multiple hard disk coordination according to claim 1, characterized in that: In the coordination hard disk table, extract the first coordinated hard disk in the order, and obtain the priority migration memory corresponding to the first coordinated hard disk in the order ; The priority migration memory corresponding to the first coordinated hard disk in the sorting is compared with the remaining storage capacity of the normal hard disk. The process is as follows: If there is a normal hard disk whose remaining storage capacity is greater than or equal to the priority migration memory corresponding to the first coordinated hard disk in the order, the priority migration data in the first coordinated hard disk in the order is preferentially migrated to the normal hard disk; If there is no normal hard disk whose remaining storage capacity is greater than or equal to the priority migration memory corresponding to the first coordinated hard disk in the sorting order, the priority migration data in the first coordinated hard disk in the sorting order is compressed in the data memory, and the process is as follows: Compare the normal hard disks according to the remaining storage capacity of the normal hard disks, and sort them in descending order, extract the normal hard disk with the largest remaining storage capacity as the first normal migration hard disk of the sorted first coordination hard disk; The remaining storage capacity of the first normal migration hard disk is marked as , through the formula: , calculate and obtain the maximum value of the compressed memory of the priority migration data in the first coordinated hard disk; The priority migration data in all the coordinated hard disks in the coordinated hard disk table are traversed, and the data are analyzed and processed according to the order of the coordinated hard disks in the coordinated hard disk table until the coordination work of the priority migration data in all the coordinated hard disks in the coordinated hard disk table is completed.

8. A data storage system coordinated by multiple hard disks, characterized in that: The system is used to implement the multi-hard disk coordinated data storage method described in any one of claims 1 to 7, comprising: Hard disk wear assessment module: obtains hard disk information in the historical period through SMART information, where the hard disk information includes storage sectors, performs analysis and processing based on the storage sectors to obtain wear sectors, and analyzes the wear sectors in the hard disk to obtain the number of wear sectors and the wear degree value, analyzes and processes the number of wear sectors and the wear degree value, and outputs the hard disk analysis value; Analyze the hard disk coordination module: Based on the hard disk analysis value, compare the hard disk analysis value with the hard disk analysis threshold. If the hard disk analysis value is less than or equal to the hard disk analysis threshold, it is marked as a normal hard disk. If the hard disk analysis value is greater than the hard disk analysis threshold, it is marked as a hard disk to be coordinated. Multiple hard disks to be coordinated are summarized to obtain a table to be coordinated. Based on the table to be coordinated, the historical storage information of the hard disk to be coordinated in multiple continuous historical cycles is obtained through SMART information, wherein the historical storage information includes the storage loss frequency and the storage loss amount. The storage loss frequency and the storage loss amount are analyzed to obtain a storage risk value, which is compared with the storage risk threshold. If the storage risk value is greater than the storage risk threshold, a migration coordination signal is generated to obtain a coordinated hard disk. Storage data analysis module: Based on the migration coordination signal, the storage data of the coordinated hard disk in multiple continuous historical periods is analyzed to obtain the data access value and the access stability value, the data access value and the access stability value are added and summed to obtain the migration priority value, and the migration priority value and the storage risk value are analyzed and processed to obtain the migration ranking value, and based on the migration ranking value, the coordinated hard disk is summarized to obtain the coordinated hard disk table; Coordinated migration planning module: In the coordinated hard disk table, obtain the priority migration memory corresponding to the priority migration data in the coordinated hard disk, and at the same time, obtain the remaining storage capacity of the normal hard disk, and compare the priority migration memory corresponding to the storage data in the coordinated hard disk with the remaining storage capacity of the normal hard disk to complete the storage data migration coordination work and solve the problem of coordinated hard disk data migration.

9. A data storage terminal with multiple hard disks coordinated, characterized in that: A memory (302) and a processor (301) and a computer program (303) stored in the memory (302), when the computer program (303) is executed on the processor (301), implements the steps of the method according to any one of claims 1 to 7.

10. A data storage medium coordinated by multiple hard disks, characterized in that: When the multi-hard disk coordinated data storage system is executed by a processor, the steps of any method described in claims 1-7 are implemented.

Citation Information

Patent Citations

  • Data management method and system for solid state disk

    CN116737064A

  • Method and apparatus for automatically determining optimal access time of hard disk

    US20080010400A1

  • Apparatus, system, and method for managing storage capacity recovery

    US20130024641A1

Cited By

  • Data flow management system and method based on block chain technology

    CN120197232A

  • A data process management system and method based on blockchain technology

    CN120197232B