Data management method, device, equipment and storage medium

By using preset fingerprint code calculation rules and fingerprint table comparison mechanisms in the all-flash storage system, the retrieval process when writing data is optimized, solving the problem of long retrieval time caused by deleting fingerprint tables, and achieving performance improvement and timeliness. Delay reduced.

CN115048064BActive Publication Date: 2024-10-15INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210906726.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2024-10-15
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

In an all-flash storage system, as the amount of written data increases, the number of fingerprint codes in the deduplication fingerprint table increases, resulting in a long retrieval time when data is written, affecting performance. The existing technology causes fingerprint table space to be lost through conventional full table retrieval. Huge, the delay increases.

Method used

Calculate the current fingerprint code through the preset fingerprint code calculation rules and compare it with the first fingerprint table. If the comparison is successful, the information will be modified. If the comparison fails, it will be sent to the second fingerprint table for storage. Real-time monitoring of hard disk busyness , perform deduplication operations and heat value management based on the comparison results, and optimize the hierarchical management of the fingerprint table.

Benefits of technology

It saves retrieval time and delay, improves data writing performance, improves the hit rate of fingerprint tables through heat value hierarchical management, reduces the number of deduplicated fingerprint tables, and reduces data writing delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048064B_ABST
    Figure CN115048064B_ABST
Patent Text Reader

Abstract

The present application discloses a data management method, device, equipment and storage medium, which relates to the field of computer technology and is used to solve the shortcomings of long retrieval time and performance impact when writing data, including: receiving data written by the front end, and calculating the data through preset fingerprint calculation rules to obtain the current fingerprint code; comparing the current fingerprint code with the fingerprint code in the first fingerprint table; if the comparison is successful, determining the fingerprint code obtained by comparison in the first fingerprint table as the first fingerprint code, and modifying the information corresponding to the first fingerprint code; if the comparison fails, sending the current fingerprint code to the second fingerprint table and storing it. The present application performs the first retrieval by comparing the current fingerprint code with the fingerprint code in the first fingerprint table. When the first comparison fails, the fingerprint code is directly sent to the second fingerprint table. If the first comparison is successful, there is no need to perform subsequent retrieval operations, which saves retrieval time and delay and improves performance.
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 management method, device, equipment and storage medium. Background Art

[0002] With the rapid development of computer applications, the requirements for data storage capacity and data usage performance are becoming higher and higher. In an all-flash storage system, the deduplication function can save a lot of hard disk capacity and save costs for enterprises. However, as the amount of written data increases, the fingerprint codes in the deduplication fingerprint table will become more and more, resulting in a long time to retrieve the deduplication data block when writing data, affecting performance. The prior art only implements the ability to assign fingerprint codes to written data, and when writing data, a conventional full-table search is performed to determine whether to perform deduplication. When a large amount of data is written, the fingerprint table space will become huge, resulting in a longer real-time search time, which in turn leads to an increase in latency. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a data management method, device, equipment and storage medium, which can save retrieval time and delay and improve performance. The specific scheme is as follows:

[0004] In a first aspect, the present application discloses a data management method, comprising:

[0005] Receive the data written by the front end, and calculate the data according to the preset fingerprint calculation rules to obtain the current fingerprint code;

[0006] Compare the current fingerprint code with the fingerprint codes in the first fingerprint table;

[0007] If the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified;

[0008] If the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored.

[0009] Optionally, calculating the data using a preset fingerprint calculation rule to obtain a current fingerprint code includes:

[0010] Storing the data and dividing the data into a preset number of data blocks;

[0011] Each data block is calculated according to a preset fingerprint calculation rule to obtain a corresponding current fingerprint.

[0012] Optionally, if the comparison is successful, determining the fingerprint code obtained by comparison in the first fingerprint table as the first fingerprint code, and modifying the information corresponding to the first fingerprint code, includes:

[0013] If the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code;

[0014] Obtaining a first physical address of the first fingerprint code;

[0015] Creating a mapping relationship between the first physical address and the data block corresponding to the current fingerprint code to obtain a first mapping relationship;

[0016] The first heat value corresponding to the first fingerprint code is increased by one to obtain an updated first heat value, and write completion information is returned.

[0017] Optionally, if the comparison fails, sending the current fingerprint code to a second fingerprint table and storing it includes:

[0018] If the comparison fails, the current fingerprint code is sent to the second fingerprint table;

[0019] Storing the current fingerprint code in the second fingerprint table to obtain a corresponding second physical address;

[0020] A mapping relationship between the second physical address and the data block corresponding to the current fingerprint code is created to obtain a second mapping relationship.

[0021] Optionally, after sending the current fingerprint code to the second fingerprint table and storing it if the comparison fails, the method further includes:

[0022] Monitor the busyness of the system hard disk in real time and determine whether the current busyness is lower than the preset busyness threshold;

[0023] If the current busyness is lower than the preset busyness threshold, comparing the current fingerprint code with the fingerprint code in the second fingerprint table to obtain a corresponding comparison result;

[0024] If the comparison result is successful, a preset deduplication operation is performed;

[0025] If the comparison result is a comparison failure, then keep it.

[0026] Optionally, if the comparison result is successful, performing a preset deduplication operation includes:

[0027] If the comparison result is successful, the fingerprint code obtained by comparison in the second fingerprint table is determined as the second fingerprint code;

[0028] Deleting the current fingerprint code and the corresponding second physical address in the second fingerprint table, and disconnecting the second mapping relationship;

[0029] Obtaining a third physical address corresponding to the second fingerprint code;

[0030] Creating a mapping relationship between the third physical address and the data block corresponding to the current fingerprint code to obtain a third mapping relationship;

[0031] The second heat value corresponding to the second fingerprint code is increased by one to obtain an updated second heat value.

[0032] Optionally, after adding one to the second heat value corresponding to the second fingerprint code to obtain an updated second heat value, the method further includes:

[0033] Determining whether the updated second heat value is the maximum heat value in the second fingerprint table;

[0034] If the updated second heat value is the maximum heat value in the second fingerprint table, obtaining the minimum heat value in the first fingerprint table to obtain a target heat value;

[0035] Determining whether the updated second heat value is greater than the target heat value;

[0036] If the updated second heat value is greater than the target heat value, replacing the target heat value and the corresponding second target information in the first fingerprint table with the updated second heat value and the corresponding first target information;

[0037] The target heat value and the corresponding second target information are stored in the target position of the second fingerprint table.

[0038] In a second aspect, the present application discloses a data management device, comprising:

[0039] The fingerprint code acquisition module is used to receive the data written by the front end and calculate the data according to the preset fingerprint code calculation rules to obtain the current fingerprint code;

[0040] A fingerprint code comparison module, used to compare the current fingerprint code with the fingerprint codes in the first fingerprint table;

[0041] an information modification module, configured to determine the fingerprint code obtained by the comparison in the first fingerprint table as the first fingerprint code if the comparison is successful, and to modify the information corresponding to the first fingerprint code;

[0042] The fingerprint code sending module is used to send the current fingerprint code to the second fingerprint table and store it if the comparison fails.

[0043] In a third aspect, the present application discloses an electronic device, comprising:

[0044] Memory, used to store computer programs;

[0045] The processor is used to execute the computer program to implement the steps of the data management method disclosed above.

[0046] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the data management method disclosed above is implemented.

[0047] It can be seen that the present application provides a data management method, including: receiving data written by the front end, and calculating the data through a preset fingerprint calculation rule to obtain a current fingerprint; comparing the current fingerprint with the fingerprint in the first fingerprint table; if the comparison is successful, determining the fingerprint obtained by comparison in the first fingerprint table as the first fingerprint, and modifying the information corresponding to the first fingerprint; if the comparison fails, sending the current fingerprint to the second fingerprint table and storing it. It can be seen that the present application performs the first search by comparing the current fingerprint with the fingerprint in the first fingerprint table. When the first comparison fails, the fingerprint is directly sent to the second fingerprint table. If the first comparison is successful, there is no need to perform subsequent search operations, which saves search time and delay and improves performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0049] Figure 1 A flow chart of a data management method disclosed in this application;

[0050] Figure 2 A flow chart of a specific data management method disclosed in this application;

[0051] Figure 3 A flow chart of a specific data management method disclosed in this application;

[0052] Figure 4 A flow chart of a specific data management method disclosed in this application;

[0053] Figure 5 A schematic diagram of the structure of the data management device provided for this application;

[0054] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

[0055] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] At present, with the rapid development of computer applications, the requirements for data storage capacity and data usage performance are getting higher and higher. In an all-flash storage system, the deduplication function can save a lot of hard disk capacity and save costs for enterprises. However, as the amount of written data increases, the fingerprint codes of the deduplication fingerprint table will become more and more, resulting in a long retrieval time for deduplicated data blocks when data is written, affecting performance. The prior art only implements the ability to assign fingerprint codes to written data, and when writing data, a conventional full-table search is performed to determine whether to perform deduplication. When a large amount of data is written, the fingerprint table space will become huge, resulting in a longer real-time retrieval time, which in turn leads to an increase in latency. To this end, the present application provides a data management method that can save retrieval time and latency, and improve performance.

[0057] The embodiment of the present invention discloses a data management method, see Figure 1 As shown, the method includes:

[0058] Step S11: receiving data written by the front end, and calculating the data by using a preset fingerprint calculation rule to obtain a current fingerprint.

[0059] In this embodiment, the data written by the front end is received, and the data is calculated by the preset fingerprint code calculation rules to obtain the current fingerprint code. It is understandable that after receiving the data written by the front end, the aforementioned written data is processed by the preset fingerprint code calculation rules to obtain the corresponding current fingerprint code. It should be pointed out that one data can obtain multiple current fingerprint codes after the above processing.

[0060] Step S12: Compare the current fingerprint code with the fingerprint codes in the first fingerprint table.

[0061] In this embodiment, after the data is calculated by the preset fingerprint calculation rule and the current fingerprint is obtained, the current fingerprint is compared with the fingerprints in the first fingerprint table. It can be understood that the above multiple current fingerprints are compared with all the fingerprints in the first fingerprint table in turn.

[0062] Step S13: If the comparison is successful, the fingerprint code obtained by comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified.

[0063] In this embodiment, after the current fingerprint code is compared with the fingerprint code in the first fingerprint table, if the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified. It can be understood that if the comparison is successful, it indicates that the current fingerprint code is a known fingerprint code with high popularity, so the fingerprint code successfully compared in the first fingerprint table is determined as the first fingerprint code, and because the fingerprint code is received again at this time, the popularity of the first fingerprint code is increased by 1. It should be pointed out that in the first fingerprint table, all fingerprint codes can be sorted according to the size of the popularity value. Therefore, after the popularity of the first fingerprint code increases by 1, the updated popularity value of the first fingerprint code is compared with the popularity values ​​of other fingerprint codes in the first fingerprint table, and the position of the first fingerprint code is adjusted accordingly according to the comparison result.

[0064] It is understandable that the fingerprint code heat index is introduced and the different fingerprint codes are managed in a hierarchical manner, the fingerprint codes are sorted according to heat, and the fingerprint codes are divided into the first fingerprint table and the second fingerprint table respectively. The first fingerprint table can also be called the first-level fingerprint table, and the second fingerprint table can also be called the second-level fingerprint table, and the first-level fingerprint table has a higher priority than the second-level fingerprint table. High heat fingerprint codes are stored in the first-level fingerprint table, and low heat fingerprint codes are stored in the second-level fingerprint table.

[0065] Step S14: If the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored.

[0066] In this embodiment, after the current fingerprint code is compared with the fingerprint codes in the first fingerprint table, if the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored. If the comparison fails, it indicates that the current fingerprint code is a non-hot fingerprint code, so the current fingerprint code is stored in the second fingerprint table and the heat value is set to 1.

[0067] It can be understood that this solution includes a real-time deduplication data processing module, a background deduplication data processing module, and a fingerprint code hierarchical management module. Among them, the real-time deduplication data processing module: after the front-end data is written, the storage receives the data and divides the data into several data blocks, and calculates the fingerprint code for each data block, and compares the above fingerprint code with the fingerprint code in the first-level fingerprint table. Background deduplication data processing module: post-processes the fingerprint code sent to the second-level fingerprint table and its corresponding data. Fingerprint table hierarchical management module: This module is used to maintain the fingerprint table system to ensure the stable operation of the fingerprint table. This solution relates to the field of computer technology, and in particular to resource optimization and performance improvement of storage products. The above three modules can solve the problem of long retrieval time caused by the existing excessive deduplication table. At the same time, the fingerprint hierarchical management based on the heat value improves the hit rate of the fingerprint in the first-level fingerprint table, thereby improving the performance, reducing the number of fingerprints in the real-time deduplication fingerprint table, reducing data writing delays, and improving real-time performance.

[0068] It can be seen that the present application provides a data management method, including: receiving data written by the front end, and calculating the data through a preset fingerprint calculation rule to obtain a current fingerprint; comparing the current fingerprint with the fingerprint in the first fingerprint table; if the comparison is successful, determining the fingerprint obtained by comparison in the first fingerprint table as the first fingerprint, and modifying the information corresponding to the first fingerprint; if the comparison fails, sending the current fingerprint to the second fingerprint table and storing it. It can be seen that the present application performs the first search by comparing the current fingerprint with the fingerprint in the first fingerprint table. When the first comparison fails, the fingerprint is directly sent to the second fingerprint table. If the first comparison is successful, there is no need to perform subsequent search operations, which saves search time and delay and improves performance.

[0069] See also Figure 2 As shown, the embodiment of the present invention discloses a data management method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.

[0070] Step S21: storing the data and dividing the data into a preset number of data blocks.

[0071] In this embodiment, the data is stored and divided into a preset number of data blocks. Figure 3As shown, after receiving the data written by the front end, the data is first stored in the real-time deduplication data processing module, and then the data is scanned and segmented to obtain a preset number of data blocks. It can be understood that the data is segmented according to the data segmentation rules, for example, according to the size of the data block. It should be pointed out that deduplication is duplicate data deletion, which is a technology for saving storage space. Usually, there are a lot of duplicate data in the data storage pool, and deduplication is a technology for finding and processing these duplicate data.

[0072] Step S22: Calculate each of the data blocks using a preset fingerprint calculation rule to obtain a corresponding current fingerprint.

[0073] In this embodiment, after the data is divided into a preset number of data blocks, each data block is calculated using a preset fingerprint calculation rule to obtain a corresponding current fingerprint. It can be understood that the preset fingerprint calculation rule is used to calculate all the data blocks obtained by the above division in turn to obtain a current fingerprint (hash value) corresponding to each data block.

[0074] Step S23: Compare the current fingerprint code with the fingerprint codes in the first fingerprint table.

[0075] In this embodiment, each data block is calculated by a preset fingerprint calculation rule, and after obtaining the corresponding current fingerprint, the fingerprint is compared with the fingerprint in the first-level fingerprint table (i.e., the first fingerprint table). It can be understood that since the priority of the first fingerprint table is higher than that of the second fingerprint table, and the lowest heat value in the first fingerprint table is greater than the highest heat value in the second fingerprint table, the current fingerprint is first compared with the fingerprint in the first fingerprint table to determine whether the current fingerprint is a high heat fingerprint.

[0076] It is understandable that if the first fingerprint table is not full, it indicates that the second fingerprint table is empty, and if the second fingerprint table is not empty, it indicates that the first fingerprint table must be full. It should be pointed out that the capacity of the first fingerprint table is limited to ensure that real-time deduplication data can complete fingerprint search in a very short time. For example, the capacity of the first-level fingerprint table is limited to 50M.

[0077] Step S24: if the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified.

[0078] In this embodiment, the current fingerprint code is compared with the fingerprint code in the first fingerprint table. If a fingerprint code that is exactly the same as the current fingerprint code is compared in the first fingerprint table, the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified. It can be understood that if the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, the first physical address of the first fingerprint code is obtained, a mapping relationship between the first physical address and the data block corresponding to the current fingerprint code is created to obtain a first mapping relationship, the first heat value corresponding to the first fingerprint code is increased by one to obtain the updated first heat value, and the write completion information is returned.

[0079] Step S25: If the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored.

[0080] For the specific content of the above step S25, reference may be made to the corresponding content disclosed in the above embodiments, which will not be repeated here.

[0081] It can be seen that the embodiment of the present application stores the data and divides the data into a preset number of data blocks; calculates each of the data blocks according to a preset fingerprint code calculation rule to obtain a corresponding current fingerprint code; compares the current fingerprint code with the fingerprint code in the first fingerprint table; if the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified; if the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored, and fingerprints are hierarchically managed based on heat values, thereby improving the hit rate of fingerprints in the first-level fingerprint table, improving performance, and reducing data writing latency.

[0082] See also Figure 4 As shown, the embodiment of the present invention discloses a data management method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.

[0083] Step S31: receiving data written by the front end, and calculating the data by using a preset fingerprint calculation rule to obtain a current fingerprint.

[0084] Step S32: Compare the current fingerprint code with the fingerprint codes in the first fingerprint table.

[0085] Step S33: If the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified.

[0086] Step S34: If the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored.

[0087] In this embodiment, the current fingerprint code is compared with the fingerprint codes in the first fingerprint table. If a fingerprint code that is completely identical to the current fingerprint code is not compared in the first fingerprint table, the comparison fails, and the current fingerprint code is sent to the second fingerprint table. It can be understood that after the current fingerprint code is sent to the second fingerprint table, the current fingerprint code is stored in the second fingerprint table to obtain the corresponding second physical address, and a mapping relationship between the second physical address and the data block corresponding to the current fingerprint code is created to obtain a second mapping relationship.

[0088] Step S35: monitor the busyness of the system hard disk in real time, and determine whether the current busyness is lower than a preset busyness threshold.

[0089] In this embodiment, after the current fingerprint code and its corresponding data are sent to the second fingerprint table (i.e., the secondary fingerprint table) and stored, the busyness of the system hard disk is monitored in real time, and it is determined whether the current busyness is lower than the preset busyness threshold. It is understandable that the fingerprint code and its corresponding data sent to the secondary fingerprint table are post-processed by the deduplication data background processing module. Specifically, the busyness of the system hard disk is monitored in real time, and it is determined whether the current busyness is lower than the preset busyness threshold. After the current fingerprint code and its corresponding data are stored, the above data are not processed first. The busyness of the system hard disk is monitored in real time, and it is determined whether to start processing the current fingerprint code and its corresponding data based on the busyness of the current system hard disk and the preset busyness threshold.

[0090] Step S36: If the current busyness is lower than the preset busyness threshold, the current fingerprint code is compared with the fingerprint codes in the second fingerprint table to obtain a corresponding comparison result.

[0091] In this embodiment, the busyness of the system hard disk is monitored in real time, and after determining whether the current busyness is lower than the preset busyness threshold, if the current busyness is lower than the preset busyness threshold, the current fingerprint code is compared with the fingerprint code in the second fingerprint table to obtain the corresponding comparison result. It can be understood that if the current busyness is lower than the preset busyness threshold, it indicates that the current system pressure is not high, and the current fingerprint code and its corresponding data can be post-processed. If the current busyness is greater than or equal to the preset busyness threshold, it indicates that the current system pressure is high, and the current fingerprint code and its corresponding data will not be processed. If the current busyness is lower than the preset busyness threshold, the current fingerprint code is compared with the fingerprint code in the second fingerprint table to obtain the corresponding comparison result. For example, when it is detected that the system hard disk busyness is lower than 50%, the secondary fingerprint table starts to compare the newly added fingerprint code (i.e., the current fingerprint code) with all other fingerprint codes. Figure 3As shown, if the comparison result is a comparison failure, it indicates that the current fingerprint code is a fingerprint code received for the first time and the heat value is 0, the second physical address generated when storing the current fingerprint code, and the second mapping relationship between the second physical address and the data block corresponding to the current fingerprint code are maintained, and the heat value is set to 1.

[0092] Step S37: If the comparison result is successful, a preset deduplication operation is performed.

[0093] In this embodiment, if the comparison result is a successful comparison, a preset deduplication operation is performed. It can be understood that if the comparison result is a successful comparison, it indicates that the current fingerprint code is not a fingerprint code received for the first time and the heat is not 0, and the preset deduplication operation is performed at this time. Specifically, if the comparison result is a successful comparison, the fingerprint code obtained by comparison in the second fingerprint table is determined as the second fingerprint code, the current fingerprint code and the corresponding second physical address in the second fingerprint table are deleted, and the second mapping relationship is disconnected, the third physical address corresponding to the second fingerprint code is obtained, and a mapping relationship between the third physical address and the data block corresponding to the current fingerprint code is created to obtain a third mapping relationship, and the second heat value corresponding to the second fingerprint code is increased by one to obtain an updated second heat value.

[0094] It can be understood that when the newly added fingerprint code is successfully compared with any fingerprint, the physical address bit corresponding to the newly added fingerprint is recycled, that is, the current fingerprint code and the corresponding second physical address in the second fingerprint table are deleted, and the mapping relationship between the data block and the physical address is adjusted to the physical address corresponding to another fingerprint, that is, the second mapping relationship is disconnected, and at the same time, a third mapping relationship between the third physical address and the data block corresponding to the current fingerprint code is created to complete the fingerprint deduplication operation, and the heat value of the fingerprint (that is, the second fingerprint code) is +1.

[0095] It should be pointed out that after completing the above-mentioned preset deduplication operation, the fingerprint table system is maintained by the fingerprint table hierarchical management module to ensure the stable operation of the fingerprint table. Specifically, it is determined whether the updated second heat value is the maximum heat value in the second fingerprint table. If the updated second heat value is the maximum heat value in the second fingerprint table, the minimum heat value in the first fingerprint table is obtained to obtain the target heat value, and it is determined whether the updated second heat value is greater than the target heat value. If the updated second heat value is greater than the target heat value, the target heat value and the corresponding second target information in the first fingerprint table are replaced with the updated second heat value and the corresponding first target information, and the target heat value and the corresponding second target information are stored in the target position in the second fingerprint table.

[0096] It can be understood that, it is determined whether the second heat value after the update is the maximum heat value in the second fingerprint table. If the second heat value after the update is the maximum heat value in the second fingerprint table, it indicates that the maximum heat value in the secondary fingerprint table has changed. At this time, the maximum fingerprint heat in the secondary fingerprint table and the minimum heat value in the primary fingerprint table are compared. If the maximum fingerprint heat in the secondary fingerprint table is greater than the minimum fingerprint heat in the primary fingerprint table, the fingerprint code undergoes a hierarchical change, and the high-heat fingerprint code rises to the primary fingerprint table, and the low-heat fingerprint code drops to the secondary fingerprint table, ensuring that the fingerprint code corresponding to the data with the highest deduplication ratio is always covered in the primary fingerprint table.

[0097] This solution effectively reduces the time of real-time fingerprint comparison and the delay of real-time I / O (Input / Output) by processing the fingerprint table in a hierarchical manner. In addition, by introducing the fingerprint heat value and giving priority to high-heat fingerprints, the effectiveness of fingerprint processing can be improved, the system burden can be reduced, and the data hit rate and performance can be improved. In the ever-expanding use of all-flash storage, it can save disk space and improve performance, and it is critical and suitable for promotion.

[0098] For the specific contents of the above steps S31 to S33, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be repeated here.

[0099] It can be seen that the embodiment of the present application receives the data written by the front end, and calculates the data through the preset fingerprint calculation rule to obtain the current fingerprint code; compares the current fingerprint code with the fingerprint code in the first fingerprint table; if the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified; if the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored; the busyness of the system hard disk is monitored in real time, and it is determined whether the current busyness is lower than the preset busyness threshold; if the current busyness is lower than the preset busyness threshold, the current fingerprint code is compared with the fingerprint code in the second fingerprint table to obtain a corresponding comparison result; if the comparison result is a successful comparison, a preset deduplication operation is performed, and an indicator of fingerprint code heat and a method of hierarchical management of different fingerprint codes are introduced to solve the problem of long retrieval time caused by the existing excessive deduplication table, effectively reduce delay, and at the same time, the fingerprint hierarchical management based on heat improves the read and write hit rate of the fingerprint code and its corresponding data in the first-level fingerprint table, thereby improving performance.

[0100] See also Figure 5 As shown, the embodiment of the present application also discloses a data management device, including:

[0101] The fingerprint code acquisition module 11 is used to receive the data written by the front end and calculate the data according to the preset fingerprint code calculation rules to obtain the current fingerprint code;

[0102] A fingerprint code comparison module 12, used to compare the current fingerprint code with the fingerprint codes in the first fingerprint table;

[0103] An information modification module 13, configured to determine the fingerprint code obtained by the comparison in the first fingerprint table as the first fingerprint code if the comparison is successful, and to modify the information corresponding to the first fingerprint code;

[0104] The fingerprint code sending module 14 is used to send the current fingerprint code to the second fingerprint table and store it if the comparison fails.

[0105] It can be seen that the present application provides a data management method, including: receiving data written by the front end, and calculating the data through a preset fingerprint calculation rule to obtain a current fingerprint; comparing the current fingerprint with the fingerprint in the first fingerprint table; if the comparison is successful, determining the fingerprint obtained by comparison in the first fingerprint table as the first fingerprint, and modifying the information corresponding to the first fingerprint; if the comparison fails, sending the current fingerprint to the second fingerprint table and storing it. It can be seen that the present application performs the first search by comparing the current fingerprint with the fingerprint in the first fingerprint table. When the first comparison fails, the fingerprint is directly sent to the second fingerprint table. If the first comparison is successful, there is no need to perform subsequent search operations, which saves search time and delay and improves performance.

[0106] In some specific embodiments, the fingerprint code acquisition module 11 specifically includes:

[0107] A data storage unit, used for storing the data;

[0108] A data segmentation unit, used for segmenting the data into a preset number of data blocks;

[0109] The fingerprint code calculation unit is used to calculate each of the data blocks according to a preset fingerprint code calculation rule to obtain a corresponding current fingerprint code.

[0110] In some specific embodiments, the fingerprint code comparison module 12 specifically includes:

[0111] The first comparison unit is used to compare the current fingerprint code with the fingerprint codes in the first fingerprint table.

[0112] In some specific embodiments, the information modification module 13 specifically includes:

[0113] A first fingerprint code determining unit, configured to determine the fingerprint code obtained by the comparison in the first fingerprint table as a first fingerprint code if the comparison is successful;

[0114] A first physical address acquiring unit, used to acquire a first physical address of the first fingerprint code;

[0115] A first mapping relationship creating unit, configured to create a mapping relationship between the first physical address and the data block corresponding to the current fingerprint code, so as to obtain a first mapping relationship;

[0116] A first heat value updating unit, configured to add one to the first heat value corresponding to the first fingerprint code to obtain an updated first heat value;

[0117] The write completion information returning unit is used to return the write completion information.

[0118] In some specific embodiments, the fingerprint code sending module 14 specifically includes:

[0119] A fingerprint code sending unit, used for sending the current fingerprint code to a second fingerprint table if the comparison fails;

[0120] a second physical address acquiring unit, configured to store the current fingerprint code in the second fingerprint table to obtain a corresponding second physical address;

[0121] a second mapping relationship creating unit, configured to create a mapping relationship between the second physical address and the data block corresponding to the current fingerprint code, so as to obtain a second mapping relationship;

[0122] A busyness monitoring unit is used to monitor the busyness of the system hard disk in real time;

[0123] A busyness determination unit, used to determine whether the current busyness is lower than a preset busyness threshold;

[0124] a second comparison unit, configured to compare the current fingerprint code with the fingerprint codes in the second fingerprint table to obtain a corresponding comparison result if the current busyness is lower than the preset busyness threshold;

[0125] A comparison failure unit, used for maintaining if the comparison result is a comparison failure;

[0126] A second fingerprint code determining unit, configured to determine the fingerprint code obtained by comparison in the second fingerprint table as a second fingerprint code if the comparison result is successful;

[0127] A second physical address deleting unit, used to delete the current fingerprint code and the corresponding second physical address in the second fingerprint table;

[0128] A second mapping relationship disconnecting unit, used to disconnect the second mapping relationship;

[0129] A third physical address obtaining unit, used to obtain a third physical address corresponding to the second fingerprint code;

[0130] a third mapping relationship creating unit, configured to create a mapping relationship between the third physical address and the data block corresponding to the current fingerprint code, so as to obtain a third mapping relationship;

[0131] A second heat value updating unit, configured to add one to the second heat value corresponding to the second fingerprint code to obtain an updated second heat value;

[0132] an updated second heat value judging unit, used to judge whether the updated second heat value is the maximum heat value in the second fingerprint table;

[0133] a target heat value acquisition unit, configured to acquire the minimum heat value in the first fingerprint table if the updated second heat value is the maximum heat value in the second fingerprint table, so as to obtain a target heat value;

[0134] a target heat value determination unit, configured to determine whether the updated second heat value is greater than the target heat value;

[0135] an updated second heat value replacement unit, configured to replace the target heat value and the corresponding second target information in the first fingerprint table with the updated second heat value and the corresponding first target information if the updated second heat value is greater than the target heat value;

[0136] The target heat value storage unit is used to store the target heat value and the corresponding second target information into the target position in the second fingerprint table.

[0137] Furthermore, an embodiment of the present application also provides an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0138] Figure 6 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data management method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0139] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0140] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0141] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the data management method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0142] Furthermore, an embodiment of the present application also discloses a storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the data management method disclosed in any of the aforementioned embodiments are implemented.

[0143] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0144] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0145] The above is a detailed introduction to a data management method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a person skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A data management method, It is characterized in that include: Receive the data written by the front end, and calculate the data according to the preset fingerprint calculation rules to obtain the current fingerprint code; Compare the current fingerprint code with the fingerprint codes in the first fingerprint table; If the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code, and the information corresponding to the first fingerprint code is modified; If the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored; If the comparison fails, the current fingerprint code is sent to the second fingerprint table and stored, including: If the comparison fails, the current fingerprint code is sent to the second fingerprint table; Storing the current fingerprint code in the second fingerprint table to obtain a corresponding second physical address; Creating a mapping relationship between the second physical address and the data block corresponding to the current fingerprint code to obtain a second mapping relationship; After sending the current fingerprint code to the second fingerprint table and storing it if the comparison fails, the method further includes: Monitor the busyness of the system hard disk in real time and determine whether the current busyness is lower than the preset busyness threshold; If the current busyness is lower than the preset busyness threshold, the current fingerprint code is compared with the fingerprint code in the second fingerprint table to obtain a corresponding comparison result; the fingerprint code in the second fingerprint table is the fingerprint code stored in the secondary fingerprint table before the current fingerprint code is stored in the secondary fingerprint table; If the comparison result is successful, a preset deduplication operation is performed; If the comparison result is a comparison failure, then keep it.

2. The data management method according to claim 1, It is characterized in that The calculating the data by using a preset fingerprint calculation rule to obtain a current fingerprint code includes: Storing the data and dividing the data into a preset number of data blocks; Each data block is calculated according to a preset fingerprint calculation rule to obtain a corresponding current fingerprint.

3. The data management method according to claim 2, It is characterized in that If the comparison is successful, determining the fingerprint code obtained by comparison in the first fingerprint table as the first fingerprint code, and modifying the information corresponding to the first fingerprint code, including: If the comparison is successful, the fingerprint code obtained by the comparison in the first fingerprint table is determined as the first fingerprint code; Obtaining a first physical address of the first fingerprint code; Creating a mapping relationship between the first physical address and the data block corresponding to the current fingerprint code to obtain a first mapping relationship; The first heat value corresponding to the first fingerprint code is increased by one to obtain an updated first heat value, and write completion information is returned.

4. The data management method according to claim 1, It is characterized in that If the comparison result is successful, a preset deduplication operation is performed, including: If the comparison result is successful, the fingerprint code obtained by comparison in the second fingerprint table is determined as the second fingerprint code; Deleting the current fingerprint code and the corresponding second physical address in the second fingerprint table, and disconnecting the second mapping relationship; Obtaining a third physical address corresponding to the second fingerprint code; Creating a mapping relationship between the third physical address and the data block corresponding to the current fingerprint code to obtain a third mapping relationship; The second heat value corresponding to the second fingerprint code is increased by one to obtain an updated second heat value.

5. The data management method according to claim 4, It is characterized in that After adding one to the second heat value corresponding to the second fingerprint code to obtain an updated second heat value, the method further includes: Determining whether the updated second heat value is the maximum heat value in the second fingerprint table; If the updated second heat value is the maximum heat value in the second fingerprint table, obtaining the minimum heat value in the first fingerprint table to obtain a target heat value; Determining whether the updated second heat value is greater than the target heat value; If the updated second heat value is greater than the target heat value, replacing the target heat value and the corresponding second target information in the first fingerprint table with the updated second heat value and the corresponding first target information; The target heat value and the corresponding second target information are stored in the target position of the second fingerprint table.

6. A data management device, It is characterized in that include: The fingerprint code acquisition module is used to receive the data written by the front end and calculate the data according to the preset fingerprint code calculation rules to obtain the current fingerprint code; A fingerprint code comparison module, used to compare the current fingerprint code with the fingerprint codes in the first fingerprint table; an information modification module, configured to determine the fingerprint code obtained by the comparison in the first fingerprint table as the first fingerprint code if the comparison is successful, and to modify the information corresponding to the first fingerprint code; A fingerprint code sending module, used for sending the current fingerprint code to a second fingerprint table and storing it if the comparison fails; The fingerprint code sending module specifically includes: A fingerprint code sending unit, used for sending the current fingerprint code to a second fingerprint table if the comparison fails; a second physical address acquiring unit, configured to store the current fingerprint code in the second fingerprint table to obtain a corresponding second physical address; a second mapping relationship creating unit, configured to create a mapping relationship between the second physical address and the data block corresponding to the current fingerprint code, so as to obtain a second mapping relationship; After sending the current fingerprint code to the second fingerprint table and storing it if the comparison fails, the device further includes: A busyness monitoring unit is used to monitor the busyness of the system hard disk in real time; A busyness determination unit, used to determine whether the current busyness is lower than a preset busyness threshold; a second comparison unit, configured to compare the current fingerprint code with the fingerprint code in the second fingerprint table to obtain a corresponding comparison result if the current busyness is lower than the preset busyness threshold; the fingerprint code in the second fingerprint table is the fingerprint code stored in the secondary fingerprint table before the current fingerprint code is stored in the secondary fingerprint table; The comparison failure unit is used to maintain if the comparison result is a comparison failure.

7. An electronic device, It is characterized in that include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the data management method according to any one of claims 1 to 5.

8. A computer-readable storage medium, It is characterized in that Used to store computer programs; wherein, when the computer program is executed by a processor, the data management method according to any one of claims 1 to 5 is implemented.