Data processing method and device for solid state disk

By comprehensively considering the various factors of data storage blocks in a solid-state drive, accurately locate and migrate easily damaged data blocks, the premature damage caused by frequent access and writing in a solid-state drive is solved, extending the service life of the solid-state drive and improving the stability and reliability of the storage device.

CN119883140AActive Publication Date: 2025-04-25SHENZHEN WEIKEWEIYE ELECTRONIC TECH CO LTD

Patent Information

Application Number
CN202510365375.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-04-25
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

Some blocks of solid-state drives are frequently accessed and written due to the underlying hardware characteristics and system operation uncertainty, which leads to premature damage, shortening the service life of the solid-state drive and affecting the stability and reliability of the storage device.

Method used

By comprehensively considering the memory amount and access frequency of the data storage blocks in the data storage allocation pool, the read frequency of data and the data writing frequency, as well as the remaining write times of the remaining memory block and the physical location of the storage block, the target memory block and its internal target migration data are accurately positioned, and the appropriate data migration block is found, and the target migration data is migrated from the easily damaged target memory block to a more suitable data migration block.

Benefits of technology

It effectively avoids frequent access and writing problems of specific blocks caused by underlying hardware characteristics and system operation uncertainty, disperses data writing operations, avoids the risk of premature damage to some blocks due to excessive use, extends the service life of the solid-state drive, and improves the stability and reliability of storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883140A_ABST
    Figure CN119883140A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a data processing method and device for a solid state disk, and the method comprises the steps: obtaining a target storage block in a data storage distribution pool based on the memory amount and the accessed frequency of each data storage block in the data storage distribution pool of the solid state disk; obtaining target migration data in the target storage block based on the read frequency and the data writing frequency of each piece of data in the target storage block; determining a data migration block in the remaining storage blocks based on the remaining writable frequency of each data storage block in the remaining storage blocks and the physical position of the storage block; migrating the target migration data into a data migration block from the target storage block; after migration of the target migration data is completed, the target storage block is moved out of the data storage distribution pool of the solid state disk, and the state of the target storage block is marked as a forbidden state. According to the embodiment, the service life of the solid state disk is prolonged, and the stability and reliability of the storage device are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data processing method and device for a solid state hard disk. Background Art

[0002] With the development of solid-state drive (SSD) storage technology, SSDs have the advantages of fast read and write speed, strong shock resistance, low power consumption, etc., so SSDs are widely used. In SSD technology, in order to increase the stability and reliability of storage devices, it is crucial to ensure the long life and reliability of SSDs.

[0003] At present, in order to extend the service life of solid-state drives, the existing mainstream method is to use an algorithm to evenly distribute data on each block of the flash memory chip. The existing method has alleviated the problem of excessive writing of some blocks to a certain extent, but in actual use, due to the underlying hardware characteristics and the uncertainty of system operation, even under the uniform distribution algorithm, some blocks of the flash memory chip will be frequently accessed and written in certain scenarios, which will cause these blocks to be damaged prematurely, greatly shortening the overall service life of the solid-state drive and affecting the stability and reliability of the storage device. Summary of the invention

[0004] The present invention provides a data processing method and device for a solid state hard disk, which are used to extend the service life of the solid state hard disk and improve the stability and reliability of a storage device.

[0005] In a first aspect, the present invention provides a data processing method for a solid state drive, comprising: Based on the memory amount and access frequency of each data storage block in the data storage allocation pool of the solid state drive, obtaining a target storage block in the data storage allocation pool; Based on the reading frequency and data writing frequency of each data in the target storage block, acquiring the target migration data in the target storage block; Determine the data migration blocks in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the physical location of the storage blocks; the remaining storage blocks are data storage blocks in the data storage allocation pool except the target storage blocks; Migrating the target migration data from the target storage block to the data migration block; After the migration of the target migration data is completed, the target storage block is moved out of the data storage allocation pool, and the state of the target storage block is marked as a disabled state.

[0006] In a second aspect, the present invention further provides a data processing device for a solid state hard disk, which is applied to the data processing method for a solid state hard disk as described in the first aspect; the data processing device for the solid state hard disk comprises: A storage block positioning module, used for acquiring a target storage block in the data storage allocation pool of the solid state drive based on the memory amount and access frequency of each data storage block in the data storage allocation pool of the solid state drive; A migration data locating module, configured to obtain target migration data in the target storage block based on a reading frequency and a data writing frequency of each data in the target storage block; A matching module, configured to determine a data migration block in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the physical location of the storage blocks; the remaining storage blocks are data storage blocks in the data storage allocation pool except the target storage blocks; A data migration module, used for migrating the target migration data from the target storage block to the data migration block; The storage block processing module is used to move the target storage block out of the data storage allocation pool and mark the state of the target storage block as disabled after the migration of the target migration data is completed.

[0007] In a third aspect, the present invention further provides an electronic device, comprising: a memory for storing a computer software program; a processor for reading and executing the computer software program, thereby implementing any of the above-mentioned methods for processing data of a solid-state hard disk.

[0008] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, wherein the storage medium stores a computer software program, and when the computer software program is executed by a processor, the solid-state hard disk data processing method as described in any one of the above-mentioned methods is implemented.

[0009] In a fifth aspect, the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for processing data of a solid-state hard disk.

[0010] The data processing method for a solid-state hard disk provided by an embodiment of the present invention comprehensively considers the memory capacity and access frequency of data storage blocks in a data storage allocation pool, the data reading frequency and data writing frequency, and the remaining writable times of the remaining storage blocks and the physical positions of the storage blocks, so as to accurately locate the target storage block and the target migration data therein, and find a suitable data migration block. By migrating the target migration data from a vulnerable target storage block to a more suitable data migration block, the frequent access and writing problems of specific blocks caused by the underlying hardware characteristics and the uncertainty of system operation are effectively avoided, the data writing operations are effectively dispersed, and the risk of premature damage of some blocks due to excessive use is avoided, thereby extending the overall service life of the solid-state hard disk and improving the stability and reliability of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a flow chart of a data processing method for a solid state drive provided by an embodiment of the present invention; Figure 2 is a structural diagram of a data processing device for a solid state hard disk provided by an embodiment of the present invention; Figure 3 An embodiment diagram of an electronic device provided by an embodiment of the present invention; Figure 4 An embodiment diagram of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0012] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0013] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0014] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present invention.

[0015] Optional, see Figure 1 As shown, Figure 1 : is a flow chart of the data processing method of the solid state hard disk provided by the present invention. The execution subject of the data processing method of the solid state hard disk in the embodiment of the present invention is a data processing device. Therefore, the data processing method of the solid state hard disk includes: Step 10: Based on the memory capacity and access frequency of each data storage block in the data storage allocation pool of the solid state drive, obtain a target storage block in the data storage allocation pool.

[0016] Optionally, the data processing device traverses the data storage allocation pool of the solid state drive to obtain memory information of each data storage block in the data storage allocation pool, and the memory amount can be recorded in bytes, kilobytes, megabytes, etc. At the same time, the data processing device records the access frequency of each data storage block, such as the number of accesses within a certain time period (such as 1 hour, 1 day, etc.).

[0017] Further, the data processing device determines the target storage block in the data storage allocation pool according to the preset rules by combining the two factors of memory capacity and access frequency, as described in steps 101 to 104. For example, the evaluation formula of the preset rules is target value = memory capacity Access frequency coefficient + access frequency The memory capacity coefficient is calculated, and then the data storage block with the largest target value is selected as the target storage block.

[0018] In one embodiment, there are three data storage blocks in the data storage allocation pool of the solid state drive: Storage block A: The memory capacity is 100MB and has been accessed 50 times in the past day. Storage block B: The memory capacity is 200MB and has been accessed 30 times in the past day. Storage block C: The memory capacity is 150MB and has been accessed 40 times in the past day. Set the access frequency coefficient to 0.6 and the memory capacity coefficient to 0.4. The target value of storage block A is: , the target value of storage block B is: , the target value of storage block C is: Since the target value of storage block B is the largest, the data processing device determines storage block B as the target storage block.

[0019] Step 20: acquiring target migration data in the target storage block based on the reading frequency and data writing frequency of each data in the target storage block.

[0020] Furthermore, the data processing device analyzes the target storage block, records the read frequency of each data in the target storage block, that is, the number of times the data is read within a certain period of time, and records the data write frequency of each data, that is, the number of times the data is written within a certain period of time.

[0021] Furthermore, the data processing device determines the target migration data in the target storage block by combining the two factors of the read frequency and the data write frequency according to the preset rule, as described in step 201 to step 204. For example, the preset rule may be that the data with a read frequency higher than a certain threshold and a data write frequency higher than a certain threshold is used as the target migration data; or an evaluation formula is set to calculate the migration priority of each data, and the data with a high priority is selected as the target migration data.

[0022] In one embodiment, the read frequency threshold is 8 times, the data write frequency threshold is 4 times, and there are three data in the target storage block (storage block B): Data D1: read 10 times in the past day, and the data write frequency is 5 times. Data D2: read 3 times in the past day, and the data write frequency is 2 times. Data D3: read 20 times in the past day, and the data write frequency is 15 times. According to the above thresholds, the read frequency (10 times) of data D1 is higher than 8 times, and the data write frequency (5 times) is higher than 4 times, and the read frequency (20 times) of data D3 is higher than 8 times, and the data write frequency (15 times) is higher than 4 times, so the data processing device determines data D1 and data D3 as target migration data.

[0023] Step 30: Determine a data migration block in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the physical location of the storage blocks.

[0024] Furthermore, the data processing device obtains all remaining storage blocks, wherein the remaining storage blocks are data storage blocks in the data storage allocation pool except the target storage block.

[0025] For each remaining storage block, the data processing device obtains its remaining write count information, which is usually recorded by the management mechanism of the solid-state drive. At the same time, the data processing device obtains the physical location information of each remaining storage block, such as the specific address location of the storage block in the solid-state drive chip.

[0026] Furthermore, the data processing device determines the data migration block among the remaining storage blocks by combining two factors, namely, the remaining number of write times and the physical location of the storage block, according to a preset rule. The preset rule includes, for example, giving priority to selecting a storage block with a large number of remaining write times and a physical location close to the target storage block (to reduce data transmission delay) as the data migration block; or setting an evaluation formula to calculate the migration suitability of each remaining storage block, and selecting a storage block with a high suitability as the data migration block.

[0027] In one embodiment, the weight of the remaining number of writes is set to 0.6, the weight of the physical location is set to 0.4, and the preset rule is to give priority to storage blocks with more remaining writes and closer physical locations. There are three data storage blocks (storage blocks A, B, and C) in the data storage allocation pool. Storage block B has been determined as the target storage block, and the remaining storage blocks are storage block A and storage block C. Storage block A: The remaining number of writes is 1000 times, and the physical location is 5 storage units away from the target storage block B. Storage block C: The remaining number of writes is 800 times, and the physical location is 2 storage units away from the target storage block B. The migration suitability of storage block A is: , the migration suitability of storage block C is: Since the migration suitability of storage block A is higher, the data processing device determines storage block A as the data migration block.

[0028] Step 40: Migrate the target migration data from the target storage block to the data migration block.

[0029] Furthermore, the data processing device locates the storage position of the target migration data in the target storage block, reads the content of the target migration data, and locates the free storage position of the data migration block.

[0030] Furthermore, the data processing device writes the read target migration data into an idle storage location of the data migration block to complete the data migration operation.

[0031] In one embodiment, the target storage block is storage block B, the target migration data is data D2, and the data migration block is storage block A. The data processing device first finds the storage address of data D2 in storage block B and reads the content of data D2. Then, a free storage area in storage block A is found, and the content of data D2 is written into the free area, thereby completing the operation of migrating data D2 from storage block B to storage block A.

[0032] Step 50: After the migration of the target migration data is completed, the target storage block is moved out of the data storage allocation pool, and the state of the target storage block is marked as disabled.

[0033] Further, after the data processing device confirms that the target migration data has been successfully migrated to the data migration block, the target storage block is removed from the data storage allocation pool of the solid-state drive so that it no longer participates in subsequent data storage allocation operations. At the same time, the data processing device marks the state of the target storage block as a disabled state, for example, a state identification bit is set in the management system of the solid-state drive, and its value is set to a specific value indicating disabled. Continuing with the above embodiment, the target storage block is storage block B. After confirming that data D2 has been successfully migrated from storage block B to storage block A, the relevant information of storage block B is deleted from the data storage allocation pool management list of the solid-state drive. Then a specific value (such as 0 for disabled) is written to the state identification bit of storage block B, indicating that storage block B is in a disabled state and can no longer be used to store data.

[0034] The implementation of the present invention comprehensively considers the memory capacity and access frequency of data storage blocks in the data storage allocation pool, the data reading frequency and data writing frequency, and the remaining writable times of the remaining storage blocks and the physical positions of the storage blocks, accurately locates the target storage block and the target migration data therein, and finds a suitable data migration block. By migrating the target migration data from the vulnerable target storage block to a more suitable data migration block, the frequent access and writing problems of specific blocks caused by the underlying hardware characteristics and system operation uncertainty are effectively avoided, the data writing operations are effectively dispersed, and the risk of premature damage of some blocks due to excessive use is avoided, thereby extending the overall service life of the solid-state hard disk and improving the stability and reliability of the storage device.

[0035] In one embodiment, the description of steps 101 to 104 is as follows: Step 101 : for each data storage block in the data storage allocation pool, a change trend analysis is performed based on the memory amount at adjacent time points to obtain the memory change trend of each data storage block.

[0036] Optionally, corresponding to each data storage block in the data storage allocation pool, the data processing device obtains the amount of memory at adjacent time points, and performs a change trend analysis based on the amount of memory at adjacent time points to obtain a memory change trend of each data storage block, wherein the specific formula of the memory change trend is as follows: .

[0037] in, Indicates The memory change trend of the data storage block, and Respectively represent Data storage blocks are stored at adjacent time points and The amount of memory.

[0038] Step 102 , performing periodic analysis based on the access frequencies at adjacent time points to determine a periodicity index of the access frequency of each data storage block.

[0039] Further, the data processing device obtains the access frequency density of each data storage block at adjacent time points and the average value of the access frequency density of each data storage block to perform periodic analysis and determine the periodicity index of the access frequency of each data storage block. The specific formula is as follows: .

[0040] in, Indicates A periodic indicator of how often a data storage block is accessed. represents the number of adjacent time points, Indicates The data storage block is in The access frequency density of the access frequency at adjacent time points, Indicates The average value of the access frequency density of the data storage blocks, Represents the first The main frequency components of the access frequency of the data storage block, Indicates adjacent time points.

[0041] Step 103 : determining the trend entropy of the memory change trend of each data storage block based on the probability that the memory change trend of each data storage block is within a preset interval within a first preset time period.

[0042] Further, the data processing device determines the trend entropy of the memory change trend of each data storage block according to the probability that the memory change trend of each data storage block is within the preset interval within the first preset time period. , where trend entropy The specific formula is as follows: .

[0043] in, Indicates The trend entropy of the memory change trend of the data storage block, Indicates the first preset time period The number of time intervals within Indicates The data storage block is in The probability that the memory change trend is within a specific range within a time interval.

[0044] Step 104 determines a target storage block in the data storage allocation pool based on the periodicity index, memory change trend and trend entropy of each data storage block.

[0045] Further, the data processing device determines the target storage block in the data storage allocation pool according to the periodic index, memory change trend and trend entropy of each data storage block, as described in steps 1041 to 1044.

[0046] The embodiment of the present invention comprehensively considers the memory capacity and access frequency of the data storage block in the data storage allocation pool to accurately locate the target storage block with damage risk, so that the target migration data inside the target storage block can be subsequently migrated to a more suitable data migration block, effectively avoiding the frequent access and writing problems of specific blocks caused by the underlying hardware characteristics and system operation uncertainty, effectively dispersing data writing operations, avoiding the risk of premature damage of some blocks due to excessive use, thereby extending the overall service life of the solid-state hard disk and improving the stability and reliability of the storage device.

[0047] In one embodiment, the description of steps 1041 to 1044 is as follows: Step 1041 , for each data storage block, activity analysis is performed according to the periodicity index, memory change trend and trend entropy to obtain the activity index of each data storage block.

[0048] Furthermore, for each data storage block, the data processing device performs activity analysis according to the periodicity index, memory change trend and trend entropy to obtain the activity index of each data storage block. The specific formula is as follows: .in, Indicates Activity index of a data storage block.

[0049] Step 1042 : Determine candidate storage blocks in the data storage allocation pool based on the activity index of each data storage block.

[0050] Furthermore, an activity threshold is set in the embodiment of the present invention. Therefore, the data processing device compares the activity index of each data storage block with the activity threshold, and selects data storage blocks with activity indexes higher than the activity threshold as candidate storage blocks in the data storage allocation pool.

[0051] Step 1043, performing consistency analysis based on the memory change trend and periodicity index of each candidate storage block to obtain the consistency index of each candidate storage block.

[0052] Furthermore, the data processing device performs consistency analysis according to the memory change trend and periodicity index of each candidate storage block to obtain the consistency index of each candidate storage block. The specific formula is as follows: .

[0053] in, Indicates The consistency index of candidate storage blocks, Indicates The candidate storage block is in Memory change trends at different time scales, Indicates The candidate storage block is in The periodicity index of the access frequency in the time scale, Indicates The average value of the memory change trend of candidate storage blocks, Indicates The average value of the periodicity index of candidate storage blocks, Represents the number of time scales.

[0054] Step 1044 , determine the candidate storage blocks in the data storage allocation pool whose activity index is greater than the first preset activity threshold and whose consistency index is less than the preset consistency threshold as target storage blocks.

[0055] Furthermore, the data processing device determines, as the target storage block, a candidate storage block in the data storage allocation pool whose activity index is greater than a first preset activity threshold and whose consistency index is less than a preset consistency threshold.

[0056] The embodiment of the present invention comprehensively considers the memory capacity and access frequency of the data storage blocks in the data storage allocation pool to accurately locate the target storage blocks with damage risks, so that the target migration data inside the target storage blocks can be subsequently migrated to more suitable data migration blocks, effectively dispersing data write operations, avoiding the risk of premature damage of some blocks due to excessive use, thereby extending the overall service life of the solid-state hard disk and improving the stability and reliability of the storage device.

[0057] In one embodiment, the description of steps 201 to 204 is as follows: Step 201 : For each data in the target storage block, activity analysis is performed according to the reading frequency and the data writing frequency to obtain the data activity of each data.

[0058] Optionally, for each data in the target storage block, the data processing device performs activity analysis according to the read frequency and the data write frequency to obtain the data activity of each data. The specific formula is as follows: .

[0059] in, Indicates The data activity of each data, Indicates The frequency with which data is read, Indicates The data writing frequency of each data.

[0060] Step 202: Determine an activity threshold of data in a target storage block based on data activity.

[0061] Furthermore, the data processing device determines the activity threshold of the target storage block data according to the data activity of each data. The specific formula is as follows: .in, represents the activity threshold, Indicates the total number of data in the target storage block. Indicates the standard deviation of data activity.

[0062] Step 203 , performing a first data screening based on the activity threshold and the data activity of each data, and obtaining intermediate candidate data whose data activity is greater than the activity threshold.

[0063] Furthermore, the data processing device performs a first data screening according to the activity threshold and the data activity of each data, screens out the data in the target storage block whose data activity is greater than the activity threshold, and obtains the intermediate candidate data in the target storage block.

[0064] Step 204 , performing a second data screening based on the data creation time of each intermediate candidate data to obtain the target migration data in the target storage block.

[0065] Furthermore, the data processing device performs a second data screening according to the data creation time of each intermediate candidate data to obtain the target migration data in the target storage block, such as step 2041 to step 2044.

[0066] The embodiment of the present invention accurately locates the target migration data according to the data reading frequency and the data writing frequency, so that the target migration data can be accurately migrated to a more suitable data migration block, effectively dispersing the data writing operation, avoiding the risk of premature damage of some blocks due to excessive use, thereby extending the overall service life of the solid-state hard disk and improving the stability and reliability of the storage device.

[0067] In one embodiment, the description of steps 2041 to 2044 is as follows: Step 2041, based on the data creation time and current time of each intermediate candidate data, and the maximum and minimum time of all data creation times in the target storage block, determine the data aging degree of each intermediate candidate data.

[0068] Optionally, the data processing device obtains the data creation time and current time of each intermediate candidate data, and the maximum time value and the minimum time value of the data creation time in the target storage block.

[0069] Furthermore, the data processing device determines the data aging degree of each intermediate candidate data according to the data creation time and current time of each intermediate candidate data, and the maximum and minimum time of all data creation times in the target storage block. The specific formula is as follows: .

[0070] in, Indicates The data aging degree of the intermediate candidate data, Indicates The current time of the intermediate candidate data, Indicates The data creation time of the intermediate candidate data, Indicates the maximum value of the creation time of all data in the target storage block. Indicates the minimum value of the creation time of all data in the target storage block.

[0071] Step 2042: Perform association analysis based on the correlation of the intermediate candidate data in business logic to obtain the business logic correlation between the intermediate candidate data.

[0072] Further, the data processing device performs association analysis based on the correlation of the intermediate candidate data in the business logic to obtain the business logic correlation between the intermediate candidate data. The intermediate candidate data and the If the intermediate candidate data is relevant in business logic, then The intermediate candidate data and the The business logic correlation between the intermediate candidate data . If The intermediate candidate data and the There is no correlation between the intermediate candidate data in business logic. .

[0073] Step 2043: Perform association activity analysis based on the business logic association between the intermediate candidate data and the data activity index of each intermediate candidate data to obtain the association activity of each intermediate candidate data.

[0074] Furthermore, the data processing device performs association activity analysis according to the business logic association between the intermediate candidate data and the data activity index of each intermediate candidate data to obtain the association activity of each intermediate candidate data. The specific formula is as follows: .

[0075] in, Indicates The associated activity of the intermediate candidate data, No. The data activity of each data, Indicates the number of intermediate candidate data.

[0076] Step 2044: determine the intermediate candidate data in the target storage block whose data aging degree is greater than the preset aging degree and whose associated activity is greater than the second preset activity threshold as the target migration data.

[0077] Furthermore, the data processing device determines the intermediate candidate data in the target storage block whose data aging degree is greater than a preset aging degree and whose associated activity is greater than a second preset activity threshold as the target migration data, wherein the second preset activity threshold is set according to actual conditions.

[0078] The embodiment of the present invention accurately locates the target migration data, and thus can accurately migrate the target migration data to a more appropriate data migration block, effectively dispersing data write operations, avoiding the risk of premature damage of some blocks due to excessive use, thereby extending the overall service life of the solid-state drive and improving the stability and reliability of the storage device.

[0079] In one embodiment, the description of steps 301 to 304 is as follows: Step 301 : determining a fluctuation value of the number of writes of each data storage block according to a change in the number of remaining writes of each data storage block within a second preset time period.

[0080] Optionally, for each data storage block in the remaining storage blocks, the data processing device first calculates the remaining writable number of each data storage block in the second preset time period according to the standard deviation and the average value of the remaining writable number of each data storage block in the second preset time period. The standard deviation of the value is then divided by the remaining number of writes that can be made to each data storage block within the second preset time period. The average value of the write times of each data storage block is obtained. .

[0081] Step 302: Determine the proximity between each data storage block and the target storage block according to the first storage block physical position of each data storage block and the second storage block physical position of the target storage block.

[0082] Further, the data processing device determines the proximity between each data storage block and the target storage block according to the first storage block physical position of each data storage block and the second storage block physical position of the target storage block. , where the physical location of the storage block is the coordinate location in the data storage allocation pool, and therefore, can be calculated using the distance formula between two points.

[0083] Step 303 , analyzing the variation trend of the remaining number of write times of each data storage block over time through linear regression, and obtaining the write times trend coefficient of each data storage block.

[0084] Furthermore, the data processing device analyzes each data storage block by linear regression. The remaining number of write times changes over time, and the write times trend coefficient of each data storage block is obtained. If the time series is , the corresponding remaining number of write times is , using the least squares method to fit the straight line ,in, It is the write count trend coefficient , write times trend coefficient The specific formula is: .

[0085] in, represents the number of time points, Indicates a point in time, Indicates Data storage blocks are stored at a point in time The remaining number of write times.

[0086] Step 304 determines the data migration blocks in the remaining storage blocks based on the write count fluctuation value, the write count trend coefficient, and the proximity of each data storage block to the target storage block.

[0087] Further, the data processing device determines the data migration blocks in the remaining storage blocks according to the write count fluctuation value, write count trend coefficient and position proximity of each data storage block to the target storage block, as described in steps 3041 to 3044.

[0088] The embodiment of the present invention can accurately find a suitable data migration block according to the remaining writable times of the remaining storage blocks and the physical positions of the storage blocks, so that the target migration data can be accurately migrated to the data migration block, effectively avoiding the frequent access and writing problems of specific blocks caused by the underlying hardware characteristics and system operation uncertainties, effectively dispersing data writing operations, avoiding the risk of premature damage of some blocks due to excessive use, thereby extending the overall service life of the solid-state hard disk and improving the stability and reliability of the storage device.

[0089] In one embodiment, the description of steps 3041 to 3044 is as follows: Step 3041, a neighborhood centered on each data storage block, based on the number of other data storage blocks in the neighborhood and the area size of the neighborhood, determines the neighborhood density of each data storage block at a physical location.

[0090] Optionally, the data processing device stores each data block A preset range centered on the The neighborhood density of each data storage block at the physical location is determined according to the number of other data storage blocks in the neighborhood and the size of the neighborhood. The specific formula is as follows: .

[0091] in, Indicates The neighborhood density of a data storage block at a physical location, Indicates The number of other data storage blocks within a data storage block indicates the area size of the neighborhood.

[0092] Step 3042, based on the write count trend coefficient and neighborhood density of each data storage block, combined with the first interval coefficient corresponding to the fluctuation value interval of the write count fluctuation value and the second interval coefficient corresponding to the proximity interval of the position proximity, determine the comprehensive evaluation coefficient of each data storage block.

[0093] Further, the data processing device determines the fluctuation value interval of the write count fluctuation value of each data storage block, and determines the value corresponding to the fluctuation value interval as the first interval coefficient corresponding to the fluctuation value interval of the write count fluctuation value of each data storage block. At the same time, the proximity interval of the position proximity of each data storage block is determined, and the value corresponding to the proximity interval is determined as the second interval coefficient corresponding to the proximity interval of the position proximity of each data storage block.

[0094] Furthermore, the data processing device determines the comprehensive evaluation coefficient of each data storage block according to the write count trend coefficient and the neighborhood density of each data storage block, combined with the first interval coefficient corresponding to the fluctuation value interval of the write count fluctuation value and the second interval coefficient corresponding to the proximity interval of the position proximity, and the specific formula is: .

[0095] in, Indicates The comprehensive evaluation coefficient of the data storage block is Indicates The first interval coefficient corresponding to the fluctuation value interval in which the fluctuation value of the number of write times of a data storage block is located, Indicates The second interval coefficient corresponds to the proximity interval of the proximity of the positions of the data storage blocks.

[0096] Step 3043, sort the comprehensive evaluation coefficient of each data storage block in descending order of value.

[0097] Step 3044: determine the data storage block with a preset position before the comprehensive evaluation coefficient is sorted in the remaining storage blocks as a data migration block.

[0098] Furthermore, the data processing device sorts the comprehensive evaluation coefficient of each data storage block in descending order of value, and determines the data storage block with a preset position before the comprehensive evaluation coefficient is sorted in the remaining storage blocks as the data migration block.

[0099] The embodiment of the present invention accurately finds the appropriate data migration block, and thus can accurately migrate the target migration data to the data migration block, effectively avoiding the frequent access and writing problems of specific blocks caused by the underlying hardware characteristics and system operation uncertainties, effectively dispersing data writing operations, and avoiding the risk of premature damage of some blocks due to excessive use, thereby extending the overall service life of the solid-state hard disk and improving the stability and reliability of the storage device.

[0100] Furthermore, the data processing system of the solid state drive provided by the present invention is described below. The data processing system of the solid state drive described below and the data processing method of the solid state drive described above can be referred to each other. Figure 2 , Figure 2 : is a structural diagram of a data processing device for a solid state hard disk provided by the present invention, and the data processing device for a solid state hard disk comprises: The storage block positioning module 210 is used to obtain a target storage block in the data storage allocation pool based on the memory amount and access frequency of each data storage block in the data storage allocation pool of the solid state drive; The migration data positioning module 220 is used to obtain the target migration data in the target storage block based on the reading frequency and data writing frequency of each data in the target storage block; The matching module 230 is used to determine the data migration blocks in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the proximity to the physical location of the target storage block; the remaining storage blocks are the data storage blocks in the data storage allocation pool except the target storage blocks; The data migration module 240 is used to migrate the target migration data from the target storage block to the data migration block; The storage block processing module 250 is used to move the target storage block out of the data storage allocation pool and mark the state of the target storage block as disabled after the migration of the target migration data is completed.

[0101] The embodiment of the present invention comprehensively considers the memory capacity and access frequency of data storage blocks in the data storage allocation pool, the data reading frequency and data writing frequency, and the remaining writable times of the remaining storage blocks and the physical positions of the storage blocks, accurately locates the target storage block and the target migration data therein, and finds a suitable data migration block. By migrating the target migration data from the vulnerable target storage block to a more suitable data migration block, the frequent access and writing problems of specific blocks caused by the underlying hardware characteristics and system operation uncertainty are effectively avoided, the data writing operations are effectively dispersed, and the risk of premature damage of some blocks due to excessive use is avoided, thereby extending the overall service life of the solid-state hard disk and improving the stability and reliability of the storage device.

[0102] See also Figure 3 , Figure 3 FIG. 1 is an embodiment diagram of an electronic device provided by an embodiment of the present invention. Figure 3 As shown, an embodiment of the present invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, the following steps are implemented: Based on the memory amount and access frequency of each data storage block in the data storage allocation pool of the solid state drive, obtaining a target storage block in the data storage allocation pool; Based on the reading frequency and data writing frequency of each data in the target storage block, obtaining the target migration data in the target storage block; Determine the data migration blocks in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the proximity to the physical location of the target storage block; the remaining storage blocks are the data storage blocks in the data storage allocation pool except the target storage blocks; Migrate the target migration data from the target storage block to the data migration block; After the migration of the target migration data is completed, the target storage block is moved out of the data storage allocation pool, and the state of the target storage block is marked as disabled.

[0103] See also Figure 4 , Figure 4 Detailed description of an embodiment of a computer-readable storage medium provided by an embodiment of the present invention. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400, on which a computer program 311 is stored. When the computer program 311 is executed by a processor, the following steps are implemented: Based on the memory amount and access frequency of each data storage block in the data storage allocation pool of the solid state drive, obtaining a target storage block in the data storage allocation pool; Based on the reading frequency and data writing frequency of each data in the target storage block, obtaining the target migration data in the target storage block; Determine the data migration blocks in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the proximity to the physical location of the target storage block; the remaining storage blocks are the data storage blocks in the data storage allocation pool except the target storage blocks; Migrate the target migration data from the target storage block to the data migration block; After the migration of the target migration data is completed, the target storage block is moved out of the data storage allocation pool, and the state of the target storage block is marked as disabled.

[0104] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the data processing method of the solid-state hard disk provided by the above methods, the method comprising: Based on the memory amount and access frequency of each data storage block in the data storage allocation pool of the solid state drive, obtaining a target storage block in the data storage allocation pool; Based on the reading frequency and data writing frequency of each data in the target storage block, obtaining the target migration data in the target storage block; Determine the data migration blocks in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the proximity to the physical location of the target storage block; the remaining storage blocks are the data storage blocks in the data storage allocation pool except the target storage blocks; Migrate the target migration data from the target storage block to the data migration block; After the migration of the target migration data is completed, the target storage block is moved out of the data storage allocation pool, and the state of the target storage block is marked as disabled.

[0105] The system embodiment described above is merely illustrative, wherein 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 they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data processing method for a solid state hard disk, characterized in that: include: Based on the memory amount and access frequency of each data storage block in the data storage allocation pool of the solid state drive, obtaining a target storage block in the data storage allocation pool; Based on the reading frequency and data writing frequency of each data in the target storage block, acquiring the target migration data in the target storage block; Determine the data migration blocks in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the physical location of the storage blocks; the remaining storage blocks are data storage blocks in the data storage allocation pool except the target storage blocks; Migrating the target migration data from the target storage block to the data migration block; After the migration of the target migration data is completed, the target storage block is moved out of the data storage allocation pool, and the state of the target storage block is marked as a disabled state.

2. The method for processing data of a solid state drive according to claim 1, characterized in that: The memory amount and access frequency of each data storage block in the data storage allocation pool based on the solid state drive, and obtaining the target storage block in the data storage allocation pool, include: For each data storage block in the data storage allocation pool, performing a change trend analysis according to the memory amount at adjacent time points to obtain a memory change trend of each data storage block; Perform periodic analysis based on the access frequencies at adjacent time points to determine the periodicity index of the access frequency of each data storage block; Determine the trend entropy of the memory change trend of each data storage block based on the probability that the memory change trend of each data storage block is within a preset interval within a first preset time period; Based on the periodic index, memory change trend and trend entropy of each data storage block, a target storage block in the data storage allocation pool is determined.

3. The method for processing data of a solid state hard disk according to claim 2, characterized in that: The step of determining the target storage block in the data storage allocation pool based on the periodic index, memory change trend and trend entropy of each data storage block includes: For each data storage block, activity analysis is performed based on periodic indicators, memory change trends, and trend entropy to obtain activity indicators for each data storage block; Determine candidate storage blocks in the data storage allocation pool based on the activity index of each data storage block; Perform consistency analysis based on the memory change trend and periodicity index of each candidate storage block to obtain the consistency index of each candidate storage block; A candidate storage block in the data storage allocation pool whose activity index is greater than a first preset activity threshold and whose consistency index is less than a preset consistency threshold is determined as the target storage block.

4. The method for processing data of a solid state drive according to claim 1, characterized in that: The acquiring the target migration data in the target storage block based on the reading frequency and the data writing frequency of each data in the target storage block comprises: For each data in the target storage block, activity analysis is performed according to a reading frequency and a data writing frequency to obtain data activity of each data; Determine an activity threshold of the data in the target storage block based on the data activity of each data; Performing a first data screening based on the activity threshold and the data activity of each data to obtain intermediate candidate data whose data activity is greater than the activity threshold; A second data screening is performed based on the data creation time of each intermediate candidate data to obtain the target migration data in the target storage block.

5. The method for processing data of a solid state hard disk according to claim 4, characterized in that: The second data screening based on the data creation time of each intermediate candidate data to obtain the target migration data in the target storage block includes: Determine the data aging degree of each intermediate candidate data based on the data creation time and current time of each intermediate candidate data, and the maximum and minimum time of all data creation times in the target storage block; Perform association analysis based on the relevance of the intermediate candidate data in business logic to obtain the business logic correlation between the intermediate candidate data; Based on the business logic association between the intermediate candidate data and the data activity index of each intermediate candidate data, an association activity analysis is performed to obtain the association activity of each intermediate candidate data; The intermediate candidate data in the target storage block whose data aging degree is greater than a preset aging degree and whose associated activity is greater than a second preset activity threshold is determined as the target migration data.

6. The method for processing data of a solid state hard disk according to claim 1, characterized in that: The step of determining the data migration blocks in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the physical location of the storage blocks comprises: For each data storage block in the remaining storage blocks, determine a write count fluctuation value of each data storage block according to a change in the remaining write count of each data storage block within a second preset time period; the change includes a standard deviation and an average value; Determine the proximity between each data storage block and the target storage block according to a first storage block physical position of each data storage block and a second storage block physical position of the target storage block; By analyzing the changing trend of the remaining number of write times of each data storage block over time through linear regression, a write times trend coefficient of each data storage block is obtained; Based on the write count fluctuation value, the write count trend coefficient and the position proximity of each data storage block to the target storage block, a data migration block in the remaining storage blocks is determined.

7. The method for processing data of a solid state hard disk according to claim 6, characterized in that: The determining of the data migration blocks in the remaining storage blocks based on the write count fluctuation value, the write count trend coefficient and the position proximity between each data storage block and the target storage block comprises: Taking each data storage block as the neighborhood, a preset range as the center is used as the neighborhood, and determining the neighborhood density of each data storage block at the physical location based on the number of other data storage blocks in the neighborhood and the area size of the neighborhood; Based on the write count trend coefficient and neighborhood density of each data storage block, combined with the first interval coefficient corresponding to the fluctuation value interval of the write count fluctuation value and the second interval coefficient corresponding to the proximity interval of the position proximity, determine the comprehensive evaluation coefficient of each data storage block; The comprehensive evaluation coefficient of each data storage block is sorted in descending order of value; The data storage block with a preset position before the comprehensive evaluation coefficient is sorted in the remaining storage blocks is determined as the data migration block.

8. A data processing device for a solid state hard disk, characterized in that: A data processing method for a solid state hard disk as claimed in any one of claims 1 to 7; the data processing device of the solid state hard disk comprises: A storage block positioning module, used for acquiring a target storage block in the data storage allocation pool of the solid state drive based on the memory amount and access frequency of each data storage block in the data storage allocation pool of the solid state drive; A migration data locating module, configured to obtain target migration data in the target storage block based on a reading frequency and a data writing frequency of each data in the target storage block; A matching module, configured to determine a data migration block in the remaining storage blocks based on the remaining writable times of each data storage block in the remaining storage blocks and the physical location of the storage blocks; the remaining storage blocks are data storage blocks in the data storage allocation pool except the target storage blocks; A data migration module, used for migrating the target migration data from the target storage block to the data migration block; The storage block processing module is used to move the target storage block out of the data storage allocation pool and mark the state of the target storage block as disabled after the migration of the target migration data is completed.

9. An electronic device, comprising: Memory for storing computer software programs; A processor, used to read and execute the computer software program, characterized in that when the processor executes the computer software program, it implements the data processing method of the solid state drive as claimed in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer software program stored therein, characterized in that: When the computer software program is executed by the processor, the data processing method of the solid state drive according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Intelligent garbage collection method and device compatible with NVMe solid state disk

    CN112463057A

  • Partition storage method based on solid state disk and solid state disk

    CN116880757A

  • Data block hierarchical storage method and device, computer equipment and storage medium

    CN118034593A

  • Solid state disk wear leveling method, device and equipment and readable storage medium

    CN118227051A

  • Data transfer method and system, and device and medium

    WO2022171000A1

Cited By

  • Method and device for improving read-write performance of solid state disk and computer equipment

    CN120872258A

  • A method, device and computer equipment for improving read-write performance of a solid state disk

    CN120872258B