Data detection method and device, nonvolatile storage medium and computer equipment
By aggregating and judging the digital fingerprint of data in the cloud storage system and merging duplicate data, the problem of low storage space utilization caused by duplicate data in the cloud storage system is solved, and the saving and utilization rate of data storage space is achieved.
Patent Information
- Application Number
- CN202411073445.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-06
AI Technical Summary
The existence of duplicate data in cloud storage systems leads to low storage space utilization. The existing duplicate data deletion technology cannot be effectively applied in cloud storage environments, and cannot solve the problem of wasted storage space.
By obtaining file data cached by cloud storage systems and nodes, aggregating data that does not exist locally, generating a digital fingerprint list, judging and merging duplicate data, avoiding duplicate storage, and improving storage space utilization.
Effectively save data storage space, improve the storage space utilization of cloud storage systems, avoid the waste of storage of duplicate data, and achieve the reduction of data storage amount.
Smart Images

Figure CN119011673A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of cloud computing and big data, and in particular to a data detection method, device, non-volatile storage medium and computer equipment. Background Art
[0002] With the rapid development of information technology, the total amount of digital information has shown an explosive growth trend, and its growth rate has exceeded the growth rate of physical storage space, which makes how to reduce the amount of data storage a very important and practical issue. There are usually two technologies to reduce the amount of data storage, one is traditional data compression, and the other is the data deduplication technology (Data deduplication, Dedup) that has emerged in recent years. This technology can identify data units with the same content in the storage system and only save one copy, thereby reducing the space required for data storage.
[0003] Deduplication technology was first developed and applied in the field of backup storage, that is, the field of secondary storage. However, duplicate data also exists in cloud storage systems, which wastes a lot of storage space. When deduplication technology is adopted in the Internet environment, since the data stored in the cloud does not have data block locality, deduplication technology cannot be directly applied in indexing services, and the problem of wasted storage space cannot be solved.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a data detection method, apparatus, non-volatile storage medium and computer equipment to at least solve the technical problem of low storage space utilization caused by duplicate data in a cloud storage system.
[0006] According to one aspect of an embodiment of the present invention, a data detection method is provided, comprising: obtaining file data stored in a cloud storage system and file data cached in a first node, wherein the first node is located in the cloud storage system; aggregating data that is not local in the file data stored in the cloud storage system to obtain a target data set; generating a first list based on the target data set, wherein the first list includes digital fingerprints corresponding to the file data in the target data set; generating a second list based on the file data cached in the first node, wherein the second list includes digital fingerprints corresponding to the file data cached in the first node; determining whether the digital fingerprint in the second list is located in the first list; and merging the file data cached in the first node into the cloud storage system if the first digital fingerprint in the second list is located in the first list.
[0007] Optionally, before acquiring the file data cached in the first node, the method includes: selecting the first node according to a resource scheduling identifier method.
[0008] Optionally, after obtaining the target data set, the method includes: calculating a false positive rate of the target data set, wherein the false positive rate represents the probability of an error in the aggregation result; and determining that the target data set is correct when the false positive rate is lower than a preset threshold.
[0009] Optionally, merging the file data cached in the first node into the cloud storage system includes: storing a portion of the file data cached in the first node that is different from the file data in the cloud storage system into the cloud storage system.
[0010] Optionally, when none of the digital fingerprints in the second list are in the first list, the method includes: obtaining digital fingerprints corresponding to file data cached in nodes other than the first node in the cloud storage system; generating a list corresponding to the node based on the digital fingerprints corresponding to the file data cached in the node; determining whether the digital fingerprint in the list corresponding to the node is in the first list; and when there is a second node in the node and a second digital fingerprint in the list corresponding to the second node is in the first list, merging the file data cached in the node corresponding to the second digital fingerprint into the cloud storage system.
[0011] Optionally, when none of the digital fingerprints in the list corresponding to the node is located in the first list, the method includes: storing the first node and the file data cached in the node in a cloud storage system.
[0012] According to another aspect of an embodiment of the present invention, a data detection device is also provided, including: an acquisition module, used to acquire file data stored in a cloud storage system and file data cached in a first node, wherein the first node is located in the cloud storage system; an aggregation module, used to aggregate data that does not have locality in the file data stored in the cloud storage system to obtain a target data set; a first generation module, used to generate a first list based on the target data set, wherein the first list includes digital fingerprints corresponding to the file data in the target data set; a second generation module, used to generate a second list based on the file data cached in the first node, wherein the second list includes digital fingerprints corresponding to the file data cached in the first node; a judgment module, used to judge whether the digital fingerprint in the second list is located in the first list; and a merging module, which merges the file data cached in the first node into the cloud storage system if the first digital fingerprint in the second list is located in the first list.
[0013] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above data detection methods.
[0014] According to yet another aspect of an embodiment of the present invention, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is run, any one of the above data detection methods is executed.
[0015] According to yet another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the above data detection methods is implemented.
[0016] In an embodiment of the present invention, a data detection method is adopted, by obtaining file data stored in a cloud storage system and file data cached in a first node, wherein the first node is located in the cloud storage system; aggregating data that does not have locality in the file data stored in the cloud storage system to obtain a target data set; generating a first list based on the target data set, wherein the first list includes digital fingerprints corresponding to the file data in the target data set; generating a second list based on the file data cached in the first node, wherein the second list includes digital fingerprints corresponding to the file data cached in the first node; determining whether the digital fingerprint in the second list is located in the first list; if there is a first digital fingerprint in the second list that is located in the first list, merging the file data cached in the first node into the cloud storage system, thereby achieving the purpose of comparing the file data in the cache with the file data already existing in the cloud storage system and avoiding storing the same data in the cloud storage system again, thereby achieving the technical effect of saving data storage space, and further solving the technical problem of low storage space utilization due to duplicate data in the cloud storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 A hardware structure block diagram of a computer terminal for implementing a data detection method is shown;
[0019] Figure 2 is a flow chart of a data detection method provided according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of the structural relationship between a cloud storage system and nodes provided in an optional embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of an index service cache and pre-fetching workflow in a data detection method provided according to an optional embodiment of the present invention;
[0022] Figure 5 is a structural block diagram of a data detection device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] According to an embodiment of the present invention, a data detection method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0026] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a data detection method. Figure 1As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0027] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0028] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data detection method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the data detection method of the above-mentioned application is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0030] Figure 2 is a flow chart of a data detection method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0031] Step S201, obtaining file data stored in a cloud storage system and file data cached in a first node, wherein the first node is located in the cloud storage system.
[0032] In this step, the cloud storage system is a distributed data storage method that allows users to store data on remote servers instead of local devices. The node is a data storage unit in the cloud storage system, responsible for storing, managing and distributing data. Users can upload data to the node, and other users or applications can obtain data from the node. The node can cache file data as temporary storage to facilitate users to obtain data or store data in the cloud storage system. Among them, the first node can be the node with the strongest locality between the file data cached in all nodes and the file data in the cloud storage system.
[0033] Step S202: Aggregate the data that does not have locality in the file data stored in the cloud storage system to obtain a target data set.
[0034] In this step, the deduplication technology was initially applied to the local storage system. The data in the local storage has locality. It is possible to quickly detect whether there is duplicate data and process it based on the locality between the data. However, the data in the cloud storage system does not have locality due to various reasons. It is difficult to detect duplicate data in the storage based on locality, and it is also impossible to directly apply the deduplication technology, and it is difficult to process duplicate data in the storage. Therefore, this problem can be solved by aggregating the data in the cloud storage system that does not have data locality. Locality refers to the tendency of programs to access adjacent or close memory areas when accessing memory addresses in the field of computer science and programming. Specifically, it can be divided into temporal locality and spatial locality. Temporal locality means that when a certain data is accessed, it is likely to be accessed again in the near future; spatial locality means that the program tends to access adjacent locations in the memory. For example, if an array is accessed, it is likely to access other data in the array in sequence. The data locality here can be spatial locality.
[0035] There are three reasons why data locality does not exist in cloud storage systems: first, files are relatively small compared to disks, and may be stored in different physical locations during storage. Therefore, their locality may also be affected by the distributed storage of data; second, only modified files will be re-uploaded, not the entire disk, resulting in discontinuous distribution of data in the storage system, breaking the original locality of the data; finally, the upload order of multiple modified files may be different from the order in which they were last uploaded, resulting in data locality. The upload order is different from the order in which they were last uploaded, which may cause discontinuous distribution of data on physical storage, thus affecting locality. To aggregate data that does not have data locality in cloud storage systems, the k-means clustering model can be used. k-means clustering is an unsupervised learning clustering algorithm used to divide data into k categories or clusters. Its main idea is to divide data points into the nearest cluster center to achieve data grouping. It should be noted that the k-means clustering method is only an example and is not limited to this.
[0036] For example, when using the k-means clustering model for aggregation, the following steps can be taken: First, define the data in the cloud storage system as a sample dataset X (i) ={x1 (i) ,x2 (i) ,...,x n (i)}, where i = 1, 2, ..., m, m represents the number of samples, n represents the number of features, x n (i) Represents the feature value in each sample. Then set the clustering parameter, and divide the data blocks into three levels: A, B, and C based on the classification of data block application scenarios. A is a deterministic data block, which means a data block without locality, B is an uncertain data block, which means a data block with locality, and C is a non-existent data block, which means a data block that does not exist in the cloud storage system. Therefore, the clustering parameter can be set to 3.
[0037] Next, specify the class center. The number of clusters is 3. Therefore, 3 class centers need to be specified. There are two methods for selecting class centers: random method and maximum distance method. Among them, the maximum distance method randomly specifies a sample in the sample data set as the first class center, and then calculates the distance from the remaining samples to the sample, and selects the sample with the maximum distance as the second class center. This is repeated until 3 class centers are selected. Set the class center to C, C = {C1 i ,C2 i ,...,C n i}, i = 1, 2, 3, where C n iRepresents the i-th class center. The distance can be calculated using the Euclidean distance calculation formula, which is as follows:
[0038]
[0039] Among them, x i ,x j Representing two different samples, the Euclidean distance formula can be used to calculate the distance from each sample data to the three class centers in turn and assign them to the nearest cluster.
[0040] Finally, after all the sample data are distributed, it is necessary to update the class centers of the three types of data and calculate the mean of the sample data in each class as the new class center. The calculation formula is as follows:
[0041]
[0042] Among them, X represents the sample value in the class center, and n represents the number of samples.
[0043] Repeat the above allocation and update process. In order to ensure the classification quality, the class center will not change after multiple generations. You can determine whether to stop the iteration by specifying the number of iterations and setting the class center variation range. For example, when the method of specifying the number of iterations is adopted, the iteration is stopped when the number reaches the preset threshold; when the method of setting the class center variation range is adopted, the iteration is stopped when the distance between the new class center and the old class center is less than the preset threshold. After stopping the iteration, the sample data is assigned to the corresponding class according to the determined class center to obtain the classification result.
[0044] Step S203: Generate a first list based on the target data set, wherein the first list includes digital fingerprints corresponding to the file data in the target data set.
[0045] In this step, the file data in the target data set is encrypted with a digital fingerprint and a corresponding list is generated. Among them, a digital fingerprint is a technology used to identify and track digital files or data, which can be used for copyright protection, content identification and prevention of data tampering. For example, a digital fingerprint can be generated by a hash function, which is a mathematical function that can convert an input of any length into an output of a fixed length, called a hash value or hash summary. The hash value is very sensitive to the input data, and even a slight change will cause a significant change in the hash value. An ideal hash function should be able to generate a unique hash value for each different input, which makes the digital fingerprint unique. Therefore, the hash value corresponding to the file data in the target data set can be calculated as a digital fingerprint to form a digital fingerprint list, which has a one-to-one correspondence with the file data. The digital fingerprint can be used as an index when detecting the file data, which is conducive to improving the efficiency of detection.
[0046] Step S204: Generate a second list based on the file data cached in the first node, wherein the second list includes digital fingerprints corresponding to the file data cached in the first node.
[0047] In this step, the hash value corresponding to the file data cached in the first node can be calculated, and the hash value can be used as the digital fingerprint corresponding to the file data to form a digital fingerprint list, wherein the digital fingerprint in the digital fingerprint list is in a one-to-one correspondence with the data block corresponding to the file data in the cache of the first node. Generating the second list does not require comparing the contents of the file data one by one when performing duplicate file data detection in the future, but can determine whether the data is duplicated by comparing whether the digital fingerprints match, which can reduce the time consumption of data comparison and improve efficiency.
[0048] Step S205, determining whether the digital fingerprint in the second list is in the first list.
[0049] In this step, it is detected in turn whether the digital fingerprints in the second list are already in the first list, wherein the digital fingerprints and the file data are in a one-to-one correspondence. Therefore, it is detected whether the digital fingerprints in the second list are already in the first list, that is, it is detected whether the file data cached in the first node already exists in the cloud storage system. This can avoid repeatedly storing the file data cached in the node in the cloud storage system, resulting in a waste of storage space.
[0050] Step S206: When the first digital fingerprint in the second list is located in the first list, merge the file data cached in the first node into the cloud storage system.
[0051] In this step, when the first digital fingerprint exists in the second list and is located in the first list, it means that the file data corresponding to the first digital fingerprint in the node has been stored in the cloud storage system. Therefore, in order to avoid repeated storage of file data, other data in the first node cache that does not exist in the cloud storage system can be stored in the cloud storage system to achieve an update of the cloud storage system.
[0052] Figure 3 Schematic diagram of the structural relationship between the cloud storage system and nodes provided in an optional embodiment of the present invention. Figure 3As shown, the cloud storage system includes multiple nodes. When storing files in the cloud storage system, the files will be cached in the nodes first, that is, the file data cached in the nodes are the data to be stored in the cloud storage system. In order to avoid repeated storage of data, it is possible to first detect whether the file data cached in the node already exists in the cloud storage system. If the file data already exists, the file data cached by the node will no longer be stored in the cloud storage system, thereby preventing the files from being stored repeatedly in the cloud storage system, resulting in a waste of storage space in the cloud storage system. The technical effect of improving the utilization rate of storage space in the cloud storage system can be achieved, and the data storage capacity can be reduced to 1 / 20 or even 1 / 60 of the original.
[0053] Through the above steps, the purpose of comparing the file data in the cache with the file data already existing in the cloud storage system is achieved, and the same data is avoided from being stored in the cloud storage system again, thereby achieving the technical effect of saving data storage space, and further solving the technical problem of low storage space utilization caused by duplicate data in the cloud storage system.
[0054] As an optional embodiment, before acquiring the file data cached in the first node, the method includes: selecting the first node according to a resource scheduling identifier method.
[0055] Optionally, in a cloud storage system, different scheduling methods can be used to select nodes to perform tasks according to different task requirements. For example, a polling scheduling method can be used to select nodes in order. This method can achieve load balancing, but may not be optimized according to the actual performance and load status of the node; a random scheduling method can also be used to randomly select nodes to perform tasks. This method is simple and easy to implement, but it cannot guarantee load balancing and optimal performance; a minimum connection scheduling method can also be used to select the node with the least current connection number for data operations. This method helps to balance the load of the node, but may ignore the performance differences of the node. The above scheduling methods can all be used when selecting nodes, but in an embodiment of the present invention, the resource identifier scheduling method can be selected based on the similarity of the locality list, and the ID corresponding to the node is used for scheduling. Compared with other scheduling methods, it can more effectively select the node that is most likely to cache duplicate data, thereby improving data processing efficiency.
[0056] Among them, the resource control identifier (RCID) method is a system for resource scheduling and management, which mainly realizes the control, tracking and scheduling of resources by assigning a unique identifier to each resource. In an embodiment of the present invention, the locality lists stored in different nodes are different, and different IDs can be assigned to each node. Then, based on the locality list in the node cache, a suitable node ID is selected as the first node. For example, when selecting the first node, the locality list in the node cache can be compared with the locality list in the cloud storage system, and the node with the highest similarity to the locality list in the cloud storage system is selected as the first node. The scheduling of the first node can be achieved through the corresponding ID, which is conducive to the more efficient operation of the cache and pre-fetching technology. In the scheduling process, the scale of digital fingerprint data will reach several TB or even tens of TB. Traditional databases cannot meet the storage and fast search requirements of such large-scale data. Therefore, data block layering can be performed to complete the optimization process of cache and pre-fetching based on file locality.
[0057] First, the core application service topology can be mined and associated with the network topology by using the association between the database, middleware (software for communication and data exchange between different applications) and server basic monitoring indicators in the log service application database. The core application service topology is a graphical representation method used to show the performance indicator relationship between different servers and components such as databases, middleware, server CPU, memory, disk and processes. Secondly, a data set based on the first-layer core application service topology relationship can be mined from the log of each service, called the topology data set. These data record the monitoring data and operating health status between the server and the database, middleware, server CPU, memory, disk and process in different time dimensions. Then, after locating the network device through the first two layers, drill down to the board layer to obtain a more accurate root cause location source. The network device consists of multiple boards, each of which includes an independent CPU, memory, disk, etc. Finally, this problem can be solved by hierarchical indirect access according to data blocks. First, a unique identifier UID can be generated for the locality list to be found, and the UID can be used as the key and the list as the value, and stored in the DHT. Among them, "key" and "value" are usually used to describe key-value pairs data structures, such as dictionaries, hash tables, or maps. This data structure allows the storage and retrieval of data, where each data item consists of two parts: a key and a value. Key is a unique identifier that is used to index or find data. Value is the data associated with the key. In a key-value pair, the value is the data stored according to the key; secondly, the digital fingerprint is used as the key and the UID is used as the value and stored in the DHT. When reading the digital fingerprint, if it is found that the UID is obtained instead of the locality list, it is necessary to perform another DHT search with the UID as the key to obtain the corresponding locality list.
[0058] Among them, DHT is a distributed hash table, which refers to a list of digital fingerprints corresponding to the file data cached in all nodes in the cloud storage system, including the list corresponding to each node. In order to save the file locality information to the index service, when a digital fingerprint is stored in the DHT, the digital fingerprint is used as the key, and the list of all digital fingerprints with file locality with the key is called the locality list, and is stored as the value. When a large file appears, resulting in too many digital fingerprints in the locality list, the same locality list will be stored multiple times as the value, causing serious waste of DHT storage. The cache and pre-fetch nodes provide the same Key / Value access interface as the DHT. Similarly, the digital fingerprint is used as the key and its locality list is the value. In addition, due to the distributed characteristics of AegeanStore (cloud storage system), it is difficult for the database to guarantee the service quality from different network requests. Therefore, the digital fingerprints in the index service are stored by a one-hop distributed hash table, which improves the scalability and distributed access characteristics of the index storage.
[0059] As an optional embodiment, after obtaining the target data set, it includes: calculating the false positive rate of the target data set, wherein the false positive rate represents the probability of errors in the aggregation result; when the false positive rate is lower than a preset threshold, determining that the target data set is correct.
[0060] Optionally, in the indexing service, since a non-existent data block may be judged as an existing data block and removed, resulting in data loss, the Bloom filter (fast filtering module) false positive rate formula can be used to calculate the error rate of the aggregated data. According to the size of the error rate, it can be judged whether the aggregated data is correct, which is helpful to avoid deleting new data as duplicate data in the process of detecting duplicate data, thereby causing data loss. The false positive rate of the Bloom filter refers to the probability that an error may occur in the judgment of whether an element exists in a set. Since the Bloom filter is a memory data structure, its access speed and concurrency performance are very good, and after the optimization of file-based batch digital fingerprint search, the demand for the network is greatly reduced. Specifically, the false positive rate refers to the probability that an element is actually not in the set, but the element is mistakenly returned to exist in the set. For example, the false positive rate of the target data set refers to the probability that a data does not actually exist in the target data set, but the data is mistakenly divided into the target data set. The false positive rate mainly depends on two factors: the number of hash functions and the size of the bit array. Generally speaking, increasing the number of hash functions and the size of the bit array can reduce the false positive rate, but it will also increase the space and time complexity. The calculation formula for the Bloom filter false positive rate is as follows:
[0061]
[0062] Among them, R FP is the false positive rate, M is the size of the bit array, K is the number of hash functions, and N is the number of existing elements. As the number of elements N increases, the false positive rate R FPIt will also be improved. In order to ensure the operation efficiency, it is necessary to ensure that its false positive rate is lower than a certain threshold. When the false positive rate exceeds the preset threshold, it means that the result of the aggregation is wrong. The aggregation operation can be repeated, or the parameters in the aggregation operation can be adjusted, for example, the clustering parameters can be modified and the method of selecting the cluster center can be changed. In the embodiment of the present invention, the SHA-1 hash function can be used to calculate the digital fingerprint, and its size is 20B. When the data volume of the digital fingerprint in the index service grows to 100GB, the number of data blocks in the cloud storage system is 5000000000. If the average block size is 4KB, the storage scale reaches 20TB. If the number of hash functions is 3 and the maximum allowable false positive rate is 10%, it can be known by calculation that the required bit array is about 24GB. That is to say, the Bloom filter structure needs to use about 3GB of memory space for effective and fast data block filtering. Therefore, the Bloom filter module can meet the needs of data storage scales from tens of TB to hundreds of TB. If the data scale stored in the cloud storage system is further increased, technologies such as scalable Bloom filter and layered Bloom filter array can be used to improve the scalability of the module.
[0063] In addition, different methods can be used to detect the accuracy of the calculation results of the detection formula. For example, multiple calculations can be performed to avoid errors; the target results can be calculated by using different formulas, and the accuracy of the initial formula calculation results can be determined by comparing whether the two are consistent; the cell mutation algorithm can also be used to detect the accuracy of the calculation results. Compared with other detection methods, the cell mutation algorithm is adaptive and can maintain stability in the face of complex and dynamically changing environments, thereby reducing the risk of misjudgment and missed judgment. At the same time, the cell mutation algorithm does not require a large amount of computing resources and has advantages in computing cost and time.
[0064] The cell mutation algorithm is mainly used to solve optimization problems. It searches for the optimal solution in the solution space by simulating the growth and division process of biological cells. For example, to ensure the correctness of the result of the false positive rate calculation formula, the calculation process is transformed into an optimization problem, and the formula calculation result can be used as the optimization target of the cell mutation algorithm. Specifically, a fitness function can be defined, which evaluates the quality of individuals based on the difference between the formula calculation result and the expected result. Then, the cell mutation algorithm is used to search for the solution that makes the fitness function optimal.
[0065] Among them, the differential evolution algorithm (DE) is a type of cell mutation algorithm. The differential evolution algorithm includes mutation, crossover and selection operations. Among them, the mutation operation refers to the generation of new individuals by linear operations of multiple individual individuals within the species. There are many mutation operation strategies for the differential evolution algorithm, which can be adopted as follows: In the gth iteration, three individuals X are randomly selected from the population. p1 (g),X p2 (g),X p3 (g), and p1≠p2≠p3≠i, indicating that the three individuals are different and none of them is the individual X being evaluated. i (g), the generated mutation vector is: V i (g) = X p1 (g)+F·(X p2 (g)-X p3 (g)), where X p2 (g)-X p3 (g) represents the difference vector, and F represents the scaling factor. The scaling factor determines the size of the difference step of the population individuals. A smaller F can affect the differences between the population individuals, causing the algorithm results to fall into the local optimum. A larger F can enhance the global search ability of the algorithm, which is conducive to the search for the optimal solution, but it will affect the convergence speed of the algorithm. Therefore, F can generally be selected between [0, 2], usually 0.5.
[0066] In order to better select the value of F, we can use the method of adaptively adjusting F. For example, we can sort the three randomly selected individuals from best to worst to get X b ,X m ,X w and the corresponding fitness f b ,f m ,f w The mutation vector can be: V i =X b +F i (X m -X w ), where F i Represents the adaptive value of F. The value of F changes adaptively according to the two individuals that generate the difference vector: Among them, F l =0.1,F u =0.9.
[0067] There are many mutation strategies for differential evolution algorithms, which can be expressed as DE / a / b, where a represents the selection scheme for the mutated individual and b represents the number of differential vectors. For example, the above mutation strategy can be expressed as DE / rand / 1. Other common mutation strategies include: the mutation strategy expressed as DE / best / 1, with the mutation vector V i (g) = X best (g)+F·(X p1 (g)-X p2 (g)), where X best (g) represents the individual with the highest fitness in the gth generation; there is also a mutation strategy represented by DE / current-to-best / 1, and the mutation vector is V i (g) = X i (g)+F·(X best (g)-X i (g))+F·(X p1 (g)-X p2 (g)); there is also a mutation strategy represented by DE / best / 2, and the mutation vector is V i (g) = X best (g)+F·(X p1 (g)-X p2 (g))+F·(X p3 (g)-X p4 (g)).
[0068] As an optional embodiment, merging the file data cached in the first node into the cloud storage system includes: storing a portion of the file data cached in the first node that is different from the file data in the cloud storage system in the cloud storage system.
[0069] Optionally, when it is detected that there is already data in the cloud storage system in the file data cached by the node, a merge operation is performed. For example, part of the file data in the first node cache has already been stored in the cloud storage system, so this part of the data cannot be stored in the cloud storage system again to avoid duplicate storage of data, while the remaining file data that does not exist in the cloud storage system can be stored in the cloud storage system to avoid data loss caused by not storing new data.
[0070] As an optional embodiment, when none of the digital fingerprints in the second list are in the first list, the method includes: obtaining the digital fingerprints corresponding to the file data cached in the nodes other than the first node in the cloud storage system; generating a list corresponding to the node based on the digital fingerprints corresponding to the file data cached in the node; determining whether the digital fingerprint in the list corresponding to the node is in the first list; and when there is a second node in the node and there is a second digital fingerprint in the list corresponding to the second node that is in the first list, merging the file data cached in the node corresponding to the second digital fingerprint into the cloud storage system.
[0071] Optionally, after all file data cached in the first node have been detected, different processing is performed based on whether duplicate data exists. For example, non-duplicate data can be stored in the cloud storage system, while duplicate data will not be stored again. Continue to detect file data cached in other nodes to determine whether the file data cached in other nodes is in the cloud storage system. For example, calculate the hash value of the file data as the corresponding digital fingerprint, and then generate a list of digital fingerprints corresponding to the file data cached by each of the remaining nodes. Similarly, determine whether the digital fingerprints in the digital fingerprint lists of the remaining nodes already exist in the first list. When the second digital fingerprint exists in the first list, it means that the data block corresponding to the second digital fingerprint has been stored in the cloud storage system. In order to avoid duplicate storage of data, the remaining file data cached in the node corresponding to the second digital fingerprint is stored in the cloud storage system.
[0072] As an optional embodiment, when none of the digital fingerprints in the list corresponding to the node is located in the first list, the method includes: storing the first node and the file data cached in the node in a cloud storage system.
[0073] Optionally, each node digital fingerprint list is checked one by one. When no digital fingerprint exists in the first list in the digital fingerprint lists corresponding to all nodes, it means that the file data cached in the node is new data that has not been stored in the cloud storage system, and therefore, it can be stored in the cloud storage system. In addition, it indicates that a false positive has occurred. A false positive means that data that does not belong to the cloud storage system is classified as belonging to the cloud storage system in the aggregation result, resulting in the detection of new data that does not belong to the cloud storage system during the indexing process.
[0074] Figure 4 is a schematic diagram of an index service cache and pre-fetching workflow in a data detection method provided in an optional embodiment of the present invention, such as Figure 4As shown in the figure, when the digital fingerprint list of index search is assigned to a cache and pre-fetch node, the processing flow is as follows: for each digital fingerprint that is not marked as new, first search the digital fingerprint in the cache. If it hits, it means that the data block already exists in AegeanStore (cloud storage system). The digital fingerprint list of the file and the locality list in the cache are merged, and the block is marked as existing in the result. If it does not hit, search in the distributed hash table. If it hits, the locality list stored in the distributed hash table is added to the cache to complete the pre-fetching work. The subsequent processing is the same as when the cache hits; if it does not hit, it means that the data block is not in AegeanStore (cloud storage system), and a false positive occurs. Among them, AegeanStore refers to a distributed redundancy removal storage system in a wide area network environment, that is, a cloud storage system. Removing redundant data before uploading it to AegeanStore can improve the utilization of storage resources and network resources. Distributed hash table (DHT) refers to a list of digital fingerprints corresponding to file data cached in all nodes in the cloud storage system, including a list corresponding to each node. In addition, when the cache is full, the LRU (Least Recently Used) cache replacement strategy can be used to update the locality list of the digital fingerprint replaced from the cache to the distributed hash table. Service nodes in multiple caches and prefetch modules may process the same digital fingerprint at the same time, resulting in inconsistent locality lists, but the locality list is only used during prefetching and will not affect the correctness of the index service.
[0075] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the data detection method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention 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 is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), including a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0077] According to an embodiment of the present invention, a data detection device for implementing the above data detection method is also provided. Figure 5 is a structural block diagram of a data detection device provided according to an embodiment of the present invention, such as Figure 5 As shown, the data detection device includes: an acquisition module 51, an aggregation module 52, a first generation module 53, a second generation module 54, a judgment module 55 and a merging module 56. The data detection device is described below.
[0078] The acquisition module 51 is used to acquire the file data stored in the cloud storage system and the file data cached in the first node, wherein the first node is located in the cloud storage system.
[0079] The aggregation module 52 is connected to the acquisition module 51 and is used to aggregate the data without locality in the file data stored in the cloud storage system to obtain a target data set.
[0080] The first generating module 53 is connected to the aggregating module 52 and is used to generate a first list based on the target data set, wherein the first list includes digital fingerprints corresponding to the file data in the target data set.
[0081] The second generating module 54 is connected to the first generating module 53, and is used to generate a second list based on the file data cached in the first node, wherein the second list includes digital fingerprints corresponding to the file data cached in the first node.
[0082] The judging module 55 is connected to the second generating module 54 and is used to judge whether the digital fingerprint in the second list is in the first list.
[0083] The merging module 56 is connected to the judging module 55 , and merges the file data cached in the first node into the cloud storage system when the first digital fingerprint exists in the second list and is located in the first list.
[0084] Optionally, the acquisition module may be configured to select the first node according to a resource scheduling identifier method before acquiring the file data cached in the first node.
[0085] Optionally, the aggregation module can be used to calculate the false positive rate of the target data set after obtaining the target data set, wherein the false positive rate represents the probability of errors in the aggregation result; when the false positive rate is lower than a preset threshold, the target data set is determined to be correct.
[0086] Optionally, the merging module may be used to store the portion of the file data cached in the first node that is different from the file data in the cloud storage system into the cloud storage system.
[0087] Optionally, the device further includes a module that can be used for judgment, including: an acquisition unit, a generation unit, a judgment unit, and a merging unit. The acquisition unit is used to acquire the digital fingerprint corresponding to the file data cached in the nodes other than the first node in the cloud storage system; the generation unit is connected to the acquisition unit and is used to generate a list corresponding to the node based on the digital fingerprint corresponding to the file data cached in the node; the judgment unit is connected to the generation unit and is used to judge whether the digital fingerprint in the list corresponding to the node is in the first list; the merging unit is connected to the judgment unit and is used to merge the file data cached in the node corresponding to the second digital fingerprint into the cloud storage system when there is a second node in the node and the list corresponding to the second node has a second digital fingerprint in the first list.
[0088] Optionally, the above device further comprises a storage module, which is used to store the first node and the file data cached in the node into the cloud storage system when none of the digital fingerprints in the list corresponding to the node is located in the first list.
[0089] It should be noted that the acquisition module 51, aggregation module 52, first generation module 53, second generation module 54, judgment module 55 and merging module 56 correspond to steps S201 to S206 in the embodiment, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.
[0090] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.
[0091] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the data detection method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned data detection method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0092] By adopting an embodiment of the present invention, a data detection method is provided, which obtains file data stored in a cloud storage system and file data cached in a first node, wherein the first node is located in the cloud storage system; aggregates data that does not have locality in the file data stored in the cloud storage system to obtain a target data set; generates a first list based on the target data set, wherein the first list includes digital fingerprints corresponding to the file data in the target data set; generates a second list based on the file data cached in the first node, wherein the second list includes digital fingerprints corresponding to the file data cached in the first node; determines whether the digital fingerprint in the second list is located in the first list; if there is a first digital fingerprint in the second list that is located in the first list, merges the file data cached in the first node into the cloud storage system, thereby achieving the purpose of comparing the file data in the cache with the file data already existing in the cloud storage system and avoiding storing the same data in the cloud storage system again, thereby achieving the technical effect of saving data storage space, and further solving the technical problem of low storage space utilization due to duplicate data in the cloud storage system.
[0093] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0094] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the data detection method provided by the above embodiment.
[0095] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0096] An embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the data detection method provided in the above embodiment can be implemented.
[0097] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0098] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0101] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0103] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data detection method, characterized in that: include: Acquire file data stored in a cloud storage system and file data cached in a first node, wherein the first node is located in the cloud storage system; Aggregating data that does not have locality in the file data stored in the cloud storage system to obtain a target data set; Based on the target data set, generating a first list, wherein the first list includes digital fingerprints corresponding to the file data in the target data set; Based on the file data cached in the first node, generating a second list, wherein the second list includes digital fingerprints corresponding to the file data cached in the first node; Determine whether the digital fingerprint in the second list is in the first list; In the case that there is a first digital fingerprint in the second list located in the first list, the file data cached in the first node is merged into the cloud storage system.
2. The method according to claim 1, characterized in that Before obtaining the file data cached in the first node, the method includes: The first node is selected according to a resource scheduling identifier method.
3. The method according to claim 1, characterized in that After obtaining the target data set, the method includes: Calculating the false positive rate of the target data set, wherein the false positive rate represents the probability that an aggregation result is wrong; When the false positive rate is lower than a preset threshold, the target data set is determined to be correct.
4. The method according to claim 1, characterized in that: The step of merging the file data cached in the first node into the cloud storage system includes: The portion of the file data cached in the first node that is different from the file data in the cloud storage system is stored in the cloud storage system.
5. The method according to any one of claims 1 to 4, characterized in that When none of the digital fingerprints in the second list is in the first list, the method includes: Obtaining digital fingerprints corresponding to file data cached in nodes other than the first node in the cloud storage system; Generate a list corresponding to the node based on the digital fingerprint corresponding to the file data cached in the node; Determine whether the digital fingerprint in the list corresponding to the node is in the first list; In the case where there is a second node among the nodes and there is a second digital fingerprint in the list corresponding to the second node and located in the first list, the file data cached in the node corresponding to the second digital fingerprint is merged into the cloud storage system.
6. The method according to claim 5, characterized in that When none of the digital fingerprints in the list corresponding to the node is in the first list, it includes: The first node and the file data cached in the node are stored in the cloud storage system.
7. A data detection device, characterized in that: include: An acquisition module, used to acquire file data stored in the cloud storage system and file data cached in a first node, wherein the first node is located in the cloud storage system; An aggregation module, used for aggregating data that does not have locality in the file data stored in the cloud storage system to obtain a target data set; A first generating module, configured to generate a first list based on the target data set, wherein the first list includes digital fingerprints corresponding to file data in the target data set; A second generating module, configured to generate a second list based on the file data cached in the first node, wherein the second list includes digital fingerprints corresponding to the file data cached in the first node; A determination module, used to determine whether the digital fingerprint in the second list is in the first list; A merging module is configured to merge the file data cached in the first node into the cloud storage system when there is a first digital fingerprint in the second list and located in the first list.
8. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the data detection method according to any one of claims 1 to 6.
9. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor executes the data detection method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data detection method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Duplicated data deleting method applicable to cloud backup
CN101908077A
Data de-duplication method based on combination of similarity and locality
CN102222085A
Method, system and equipment for deduplication of large-scale data object storage
CN116756137A
