Data processing method, device, equipment and storage medium

By detecting the remaining space of the disk cache in a storage-intensive instance and using asynchronous threads to process data, the stability and efficiency of SSD storage hotspot data are solved, and the stability of SSD interface performance and the user experience improvement of OLAP query are achieved. .

CN113296686BActive Publication Date: 2024-12-31ALIBABA CLOUD COMPUTING CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010479589.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-29
Publication Date
2024-12-31
Estimated Expiration
2040-05-29

AI Technical Summary

Technical Problem

In storage-intensive examples, when SSD stores hotspot data, the transmission data is poor and has low efficiency, resulting in jitter in disk interface performance, extending data query time, and affecting user experience.

Method used

By detecting the remaining storage space in the disk cache, using asynchronous threads to process the target data to free up storage space, the stability of the SSD disk interface performance is achieved, and dynamic expansion or shrinkage is supported to avoid blocking read and write operations.

Benefits of technology

It improves the stability and efficiency of data transmission, improves the user experience of OLAP query, maintains the performance stability of the SSD disk interface, and supports cache performance when SSD capacity changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113296686B_ABST
    Figure CN113296686B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a data processing method, device, equipment and storage medium, the method may include: first, when reading or writing first data of a first storage block in a disk cache, determining whether the remaining storage space of the disk cache is less than the preset storage space, the first storage block is the storage block most recently added to the disk cache; then, when the remaining storage space of the disk cache is less than the preset storage space, processing the target data stored in the first class interface through an asynchronous thread to release the storage space of the disk cache occupied by the target data. Thus, the stability of the transmitted data is guaranteed and the data transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data processing method, device, equipment and storage medium. Background Art

[0002] Analytic DB (ADB) is a cloud computing service for real-time OLAP analysis of massive data. It can perform instant multi-dimensional analysis and data exploration on hundreds of billions of data in milliseconds. ADB instances can be divided into storage-intensive instances. In the storage-intensive instance scenario, each worker node in the cluster has a local solid-state drive (SSD) to store hot data.

[0003] However, when SSD is used to store hot data, the data in the SSD is removed after the hot data is fully stored. This will block normal read and write operations, causing performance jitter of the SSD disk interface; in addition, in the case of high concurrency, the performance of the SSD disk interface will decline more significantly, prolonging the data query time. As a result, the efficiency of data transmission is reduced, seriously affecting the user's query experience. Summary of the invention

[0004] One or more embodiments of the present invention describe a data processing method, apparatus, device and storage medium to solve the problem of poor stability and low efficiency of data transmission when using SSD to store hot data in the related art.

[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0006] According to a first aspect, a data processing method is provided, which may include:

[0007] In the case of reading or writing first data of a first storage block in the disk cache, determining whether the remaining storage space of the disk cache is less than the preset storage space, the first storage block being the storage block most recently added to the disk cache;

[0008] When the remaining storage space of the disk cache is less than the preset storage space, the target data stored in the first type interface is processed through an asynchronous thread to release the storage space of the disk cache occupied by the target data. The first type interface corresponds to the disk cache.

[0009] According to a second aspect, a data processing device is provided, which may include:

[0010] a detection module, configured to determine whether a remaining storage space of the disk cache is less than a preset storage space when first data of a first storage block is read or written in the disk cache, the first storage block being a storage block most recently added to the disk cache;

[0011] The processing module is used to process the target data stored in the first type interface through an asynchronous thread to release the storage space of the disk cache occupied by the target data when the remaining storage space of the disk cache is less than the preset storage space. The first type interface corresponds to the disk cache.

[0012] According to a third aspect, a computing device is provided, the device comprising at least one processor and a memory, the memory being used to store computer program instructions, and the processor being used to execute the program in the memory to control the computing device to implement the data processing method as shown in the first aspect.

[0013] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. If the computer program is executed in a computer, the computer is caused to execute the data processing method shown in the first aspect.

[0014] In the embodiment of the present invention, during the time period of reading or writing the first data of the new first storage block in the disk cache, the remaining storage space of the disk cache is detected, and normal read and write operations are not blocked. While maintaining the stable performance of the SSD disk interface, the local SSD disk capacity expansion or contraction is better supported, and the performance of the disk cache is ensured not to decrease with the change of the SSD capacity, and it has good stability. In addition, the embodiment of the present invention adopts an asynchronous thread to process the target data stored in the first type of interface, which ensures the stability of the interface transmission related to the disk cache, and can also effectively improve the continuous storage of data, effectively improve the stability and efficiency of data transmission, thereby improving the user experience of OLAP queries under tiered storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present invention may be better understood from the following description of specific embodiments of the present invention in conjunction with the accompanying drawings, wherein the same or similar reference numerals represent the same or similar features.

[0016] Figure 1 A schematic diagram showing an architecture of tiered storage according to an embodiment;

[0017] Figure 2 A schematic diagram showing an architecture of an SSD in a tiered storage according to an embodiment is shown;

[0018] Figure 3 A flow chart showing a data processing method according to an embodiment;

[0019] Figure 4 A structural schematic diagram showing a method for implementing data processing according to an embodiment is shown;

[0020] Figure 5 A structural block diagram of a data processing device according to an embodiment is shown;

[0021] Figure 6 A schematic diagram of the structure of a computing device according to an embodiment is shown. DETAILED DESCRIPTION

[0022] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.

[0023] 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 the existence of any such measured 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 "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0024] Currently, ADB instances can be divided into storage-intensive instances and compute-intensive instances. Storage-intensive instances can be implemented through tiered storage solutions. Storage-intensive instances can expand the storage limit of a single instance by more than 10 times to more than 10 terabytes (TB). Therefore, in storage-intensive instances, how to effectively use local SSD disks to cache hot data, improve storage and data reading efficiency, and improve the user experience of storage-intensive instances becomes the key.

[0025] The usual algorithm for caching data is applicable under the premise that the size of the cache is fixed. This cannot effectively support the dynamic adjustment of the cache size. In addition, when the cache eliminates the stored data, it will block normal read and write operations, resulting in cache interface performance jitter. The performance degradation will be more obvious under high concurrency conditions, which will have a serious impact on the user's query experience.

[0026] In order to solve the above technical problems, an embodiment of the present invention provides a data processing method, device, equipment and storage medium, as shown below.

[0027] The embodiment of the present invention provides a data processing method, which implements an efficient least recently used (LRU) cache algorithm for hierarchical storage, so that the LRU cache algorithm can be efficiently dynamically scaled and an efficient asynchronous batch elimination strategy can be implemented, and when the cache algorithm eliminates data, the performance of the SSD and the interface related to the SSD is guaranteed to be stable, thereby ensuring the data query performance under the OLAP workload.

[0028] Combine the following Figure 1-Figure 2 A schematic diagram illustrating the architecture of data processing provided by an embodiment of the present invention.

[0029] like Figure 1 As shown, the hierarchical storage in the computing device mainly includes three layers, namely, the memory layer is the first layer (such as the Memory Block Cache in the figure), the SSD layer is the second layer, and the remote file system layer is the third layer.

[0030] Among them, Figure 1 As shown in the figure, SSD is used as a local cache disk. A logical mapping is established based on SSD, namely, the cache in the SSD layer. The remote data files are divided into 128K blocks, each 128K is a storage block. The size of the SSD disk determines the number of blocks. The number of blocks can be increased or decreased. For example, when the user's instance specifications are upgraded or downgraded, the number of blocks will increase or decrease. It can be understood that each block stores data.

[0031] Based on this, Figure 2 As shown in the figure, any read (file, offset, len) of the remote file system layer will try to store the remotely read data in the mapped cache of the SSD layer. Figure 2The SSD Cache shown in Figure 1. As the cache mapped by the SSD layer, the next time the same storage block is read, it no longer needs to be read remotely. Therefore, efficient management of the cache in the SSD is the key to performance.

[0032] Then, the data processing proposed in the embodiment of the present invention is performed based on the structure composed of the first type interface and the second type interface. Among them, the first type interface includes a first storage queue interface (such as an Access queue structure) and a second storage queue interface (such as an LRU queue structure). The Access queue can be used to access historical records and count the number of times the data is accessed each time. The LRU queue can be used to sort the data in the order of access. The second type of interface (such as Hash Map, Search Map, etc.) is used to record all keys and node positions in the queue, and find the location of the storage block corresponding to the key in the Access queue structure or the LRU queue structure according to the key stored in the Map to speed up data query. Here, the interface in the embodiment of the present invention can also be other interfaces that can realize the queue function, or can realize instantiation of the interface. For example, the first type of interface can also be a linked list, etc.

[0033] Based on this, the data processing method provided by the embodiment of the present invention is based on the above architecture. Figure 3-Figure 4 The data processing method provided by the embodiment of the present invention is further explained.

[0034] Figure 3 A flow chart of a data processing method according to an embodiment is shown.

[0035] like Figure 3 As shown, the method may include steps 310 to 320: first, in step 310, when reading or writing first data of a first storage block in a disk cache, determining whether the remaining storage space of the disk cache is less than a preset storage space, the first storage block being the storage block most recently added to the disk cache; second, in step 320, when the remaining storage space of the disk cache is less than the preset storage space, processing the target data stored in the first class interface through an asynchronous thread to release the storage space of the disk cache occupied by the target data.

[0036] The following are detailed descriptions of the above steps:

[0037] First, step 310 is involved. In the embodiment of the present invention, it may be a case where a new first storage block is detected to be added to the disk cache and the first data is written to the first storage block, or it may be a case where the first data in the first storage block that was most recently added to the disk cache is read. Here, it should be noted that the disk cache may include a cache disk that establishes a mapping relationship with the SSD.

[0038] Wherein, in the case where it is detected that a new first storage block is added to the disk cache and the first data is written in the first storage block, before the step of determining whether the remaining storage space of the disk cache is less than the preset storage space, the data processing method may further include:

[0039] The first storage block is added to the first storage queue interface or the second storage queue interface, and the first key identifier corresponding to the first storage block is added to the second type interface. Here, the position where the first storage block stores the first data in the first storage queue or the second storage queue can be determined according to the first key identifier recorded by the second type interface, and the second type interface corresponds to the disk cache.

[0040] For example, Figure 4 As shown, the first storage queue interface is an Access queue structure, the second storage queue interface is an LRU queue structure, and the second type of interface is a Hash Map. Each time a new first storage block is added or the first data in the most recently added block is read as shown above, the block is placed at the head of the Access queue first, and the key of the block is placed in the Hash Map. The Hash Map determines that the block is in the Access queue by recording the key.

[0041] Here, the data stored in the Access queue in the embodiment of the present invention is generally less hot than the data stored in the LRU queue, so the data stored in the LRU queue is also called hot data, and the data stored in the Access queue is called cold data.

[0042] Then, step 320 is involved, wherein, in the case where the remaining storage space of the disk cache is less than the preset storage space, it is determined whether the key identifier in the second type interface meets the preset condition, and the key identifier may include the first key identifier;

[0043] When the key identifier meets the preset conditions, the target data stored in the first type of interface is processed through the asynchronous thread.

[0044] The preset conditions mentioned above include at least one of the following: the number of key identifiers is greater than or equal to the preset number, and the number of searches for the second key identifier in the key identifier is greater than or equal to the preset number of searches. Here, the second key identifier can be any key identifier in the second type of interface, and it can be understood that the second key identifier can be the first key identifier designed above.

[0045] Based on these two preset conditions, two asynchronous threads are provided in the embodiment of the present invention to process the target data stored in the first type of interface, as shown below:

[0046] (1) when the key identifier satisfies that the quantity value of the key identifier is greater than or equal to the preset quantity value, removing target data in at least one second storage block in the order from the tail of the first storage queue interface to the head of the first storage queue interface;

[0047] In the case where it is determined that the first storage queue interface satisfies the preset removal condition, removing the target data in at least one third storage block in the order from the tail of the second storage queue interface to the head of the second storage queue interface;

[0048] The target data includes data whose reading times within a preset time are less than a preset threshold.

[0049] For example, following the example involved in the above step 310, it is detected whether the number of keys in the Hash Map is greater than or equal to the preset number value. If the number of keys is greater than or equal to the preset number value, the tail node in the Access queue and / or LRU queue can be removed. Among them, the removal order can be to eliminate from the tail of the Access queue, that is, from the cold data first. If there is nothing to be removed in the Access queue, the data at the tail of the LRU queue is removed. Here, the removal principle is to remove the data or the block storing the data whose number of reads is less than the preset threshold within the preset time.

[0050] (2) when the key identifier satisfies that the search number of the second key identifier in the key identifier is greater than or equal to the preset search number, determining whether the location where the second storage block corresponding to the second key identifier is stored is located at the first storage queue interface;

[0051] In a case where the second storage block is stored at the first storage queue interface, the target data in the second storage block is moved from the first storage queue interface to the second storage queue interface.

[0052] Here, there is another possibility, that is, when the second storage block is stored at the second storage queue interface, the target data in the second storage block is moved from the current storage position of the second storage queue interface to the head of the second storage queue interface.

[0053] For example, following the example involved in the above step 310, when the search times of any key in the Hash Map is greater than or equal to the preset search times, determine whether the block corresponding to the key is in the Access queue. If it is in the Access queue, the block corresponding to the key is transferred from the Access queue to the LRU queue (tail) as hot data. Similarly, the key corresponding to the hot data can be called a hot key. If it is not in the Access queue but in the LRU queue, the block corresponding to the key is moved from the current storage position of the LRU queue to the head of the LRU queue to improve the level of hot data.

[0054] Among them, in a possible instance, before moving the target data in the second storage block from the current storage position of the second storage queue interface to the head of the second storage queue interface, the data processing may also include: determining whether the free storage capacity of the second storage queue interface meets the preset capacity.

[0055] Based on this, when the free storage capacity of the second storage queue interface meets the preset capacity, the data of the fourth storage block at the tail of the second storage queue interface is moved to the head of the first storage queue interface, and the target data in the second storage block is moved from the current storage position of the second storage queue interface to the head of the second storage queue interface.

[0056] Furthermore, when moving data of the fourth storage block at the tail of the second storage queue interface to the head of the first storage queue interface, the number of accesses to the fourth storage block stored in the second storage queue interface can also be cleared to ensure storage space of the second storage queue interface.

[0057] For example, following the example in (2) above, when it is detected that the capacity of the LRU queue has reached the upper limit, the tail node in the LRU queue is moved to the head of the Access queue, and the access count recorded for the block in the LRU queue is cleared.

[0058] Therefore, the embodiment of the present invention proposes an efficient Cache algorithm for hierarchical storage, and the algorithm adds an asynchronous elimination strategy, that is, the Cache capacity is checked every time a new Block is read or written. If the currently detected Cache capacity exceeds the preset value of the total capacity of the Cache, an asynchronous thread will perform an asynchronous elimination operation on the data in the background, and a batch of cold data will be eliminated at a time through the method in step 320. This asynchronous elimination will not block the current read and write threads, and thus has no effect on the current query performance. In addition, it can also efficiently cache hot data queried by users, and can efficiently support the expansion and contraction of local SSD disks, and ensure that the performance of the Cache does not decrease with the change of SSD capacity, showing better stability compared with the current algorithm. In addition, when facing data queries of a large number of data tables such as Hash Map, it can also ensure that the Cache is not polluted.

[0059] In addition, based on the above data processing method, the embodiment of the present invention also provides a data processing device. Figure 5 Provide detailed explanation.

[0060] Figure 5 A structural block diagram of a data processing device according to an embodiment is shown.

[0061] like Figure 5 As shown, the data processing device 50 may specifically include:

[0062] A detection module 501 is used to determine whether the remaining storage space of the disk cache is less than the preset storage space when first data of a first storage block is read or written in the disk cache, the first storage block being the storage block most recently added to the disk cache;

[0063] The processing module 502 is used to process the target data stored in the first type interface through an asynchronous thread to release the storage space of the disk cache occupied by the target data when the remaining storage space of the disk cache is less than the preset storage space. The first type interface corresponds to the disk cache.

[0064] In addition, the data processing device 50 in the embodiment of the present invention may also include a generation module 503, which is used to add the first storage block to the first storage queue interface or the second storage queue interface when the first type of interface includes a first storage queue interface and a second storage queue interface, and add the first key identifier corresponding to the first storage block to the second type of interface, so as to determine the position of the first storage block storing the first data in the first storage queue or the second storage queue according to the first key identifier recorded in the second type of interface, and the second type of interface corresponds to the disk cache.

[0065] In the embodiment of the present invention, the processing module 502 can be specifically used to determine whether the key identifier in the second type interface meets the preset condition when the remaining storage space of the disk cache is less than the preset storage space, and the key identifier includes the first key identifier;

[0066] When the key identifier meets the preset conditions, the target data stored in the first type of interface is processed through an asynchronous thread;

[0067] The preset condition includes at least one of the following: the number of key identifiers is greater than or equal to a preset number, and the number of searches for the second key identifier in the key identifiers is greater than or equal to a preset number.

[0068] Based on this, in a possible embodiment, the processing module 502 may be specifically configured to, when the key identifier satisfies that the quantity value of the key identifier is greater than or equal to the preset quantity value, remove the target data in the at least one second storage block in the order from the tail of the first storage queue interface to the head of the first storage queue interface;

[0069] In the case where it is determined that the first storage queue interface satisfies the preset removal condition, removing the target data in at least one third storage block in the order from the tail of the second storage queue interface to the head of the second storage queue interface;

[0070] The target data includes data whose reading times within a preset time are less than a preset threshold.

[0071] In addition, in another possible embodiment, the processing module 502 may be specifically configured to determine whether the location where the second storage block corresponding to the second key identifier is stored is located at the first storage queue interface when the key identifier satisfies that the search number of the second key identifier in the key identifier is greater than or equal to the preset search number;

[0072] In a case where the second storage block is stored at the first storage queue interface, the target data in the second storage block is moved from the first storage queue interface to the second storage queue interface.

[0073] Similarly, the processing module 502 can also be used to move the target data in the second storage block from the current storage position of the second storage queue interface to the head of the second storage queue interface when the second storage block is stored at the second storage queue interface.

[0074] Furthermore, the data processing device 50 in the embodiment of the present invention may also include a judgment module 504, which is used to determine whether the free storage capacity of the second storage queue interface meets the preset capacity. Based on this, the processing module 502 can be specifically used to move the data of the fourth storage block located at the tail of the second storage queue interface to the head of the first storage queue interface, and move the target data in the second storage block from the current storage position of the second storage queue interface to the head of the second storage queue interface when the free storage capacity of the second storage queue interface meets the preset capacity. In addition, the processing module 502 can also be used to clear the number of accesses to the fourth storage block stored in the second storage queue interface.

[0075] In summary, in the embodiment of the present invention, during the time period of reading or writing the first data of the new first storage block in the disk cache, the remaining storage space of the disk cache is detected, which will not block normal read and write operations. While maintaining the stable performance of the SSD disk interface, it better supports the expansion or reduction of the local SSD disk, and ensures that the performance of the disk cache does not decrease with the change of the SSD capacity, and has good stability. In addition, the embodiment of the present invention uses an asynchronous thread to process the target data stored in the first type of interface, which ensures the stability of the interface transmission related to the disk cache, and can also effectively improve the continuous storage of data, effectively improve the stability and efficiency of data transmission, thereby improving the user experience of OLAP queries under tiered storage.

[0076] Figure 6 A schematic diagram of the structure of a computing device according to an embodiment is shown.

[0077] like Figure 6 1 is a structural diagram of an exemplary hardware architecture of a computing device capable of implementing a data processing method and a data processing apparatus according to an embodiment of the present invention.

[0078] The device may include a processor 601 and a memory 602 storing computer program instructions.

[0079] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0080] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 602 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 602 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 602 is a non-volatile solid-state memory. In a particular embodiment, the memory 602 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0081] The processor 601 implements any one of the data processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 602 .

[0082] The transceiver 603 is mainly used to implement the communication between the devices in the embodiments of the present invention or with other devices.

[0083] In one example, the device may further include a bus 604. Figure 6 As shown, the processor 601, the memory 602 and the transceiver 603 are connected via a bus 604 and communicate with each other.

[0084] Bus 604 includes hardware, software or both. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, multi-channel architecture (MCA) bus, peripheral control interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 603 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0085] In addition, an embodiment of the present invention further provides a computer-readable storage medium corresponding to the above-mentioned data processing method. In a possible embodiment, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed in a computer, the computer executes the data processing method involved in the embodiment of the present invention.

[0086] It should be clear that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.

[0087] Those skilled in the art can clearly understand that the method process of the present invention is not limited to the specific steps described and shown. Any technician familiar with the technical field, after understanding the spirit of the present invention, can make various changes, modifications and additions, or equivalent substitutions and change the order of steps within the technical scope disclosed by the present invention. These modifications or substitutions should be included in the protection scope of the present invention.

Claims

1. A data processing method, comprising: In the case of reading or writing first data of a first storage block in a disk cache, determining whether a remaining storage space of the disk cache is less than a preset storage space, the first storage block being a storage block most recently added to the disk cache; In the case where the remaining storage space of the disk cache is less than the preset storage space, the target data stored in the first type of interface is processed through an asynchronous thread to release the storage space of the disk cache occupied by the target data, the first type of interface corresponds to the disk cache; the target data includes data read a number of times less than a preset threshold within a preset time; Wherein, the first type of interface includes a first storage queue interface and a second storage queue interface; Before determining whether the remaining storage space of the disk cache is less than the preset storage space, the method further includes: The first storage block is added to the first storage queue interface or the second storage queue interface, and the first key identifier corresponding to the first storage block is added to the second type interface, so as to determine the position where the first storage block stores the first data in the first storage queue or the second storage queue according to the first key identifier recorded by the second type interface, and the second type interface corresponds to the disk cache.

2. The method according to claim 1, wherein: When the remaining storage space of the disk cache is less than the preset storage space, processing the target data stored in the first type of interface through an asynchronous thread includes: In a case where the remaining storage space of the disk cache is less than the preset storage space, determining whether the key identifier in the second type of interface meets a preset condition, the key identifier including the first key identifier; When the key identifier satisfies a preset condition, the target data stored in the first type of interface is processed through an asynchronous thread; The preset condition includes at least one of the following: the number of the key identifiers is greater than or equal to a preset number, and the number of searches for the second key identifier among the key identifiers is greater than or equal to a preset number.

3. The method according to claim 2, wherein: When the key identifier satisfies a preset condition, processing the target data stored in the first type interface through an asynchronous thread includes: When the key identifier satisfies that the quantity value of the key identifier is greater than or equal to a preset quantity value, removing target data in at least one second storage block in an order from the tail of the first storage queue interface to the head of the first storage queue interface; When it is determined that the first storage queue interface satisfies a preset removal condition, target data in at least one third storage block is removed in order from the tail of the second storage queue interface to the head of the second storage queue interface.

4. The method according to claim 2, wherein: The processing of the target data stored in the first type of interface by the asynchronous thread includes: In a case where the key identifier satisfies that the search number of the second key identifier in the key identifier is greater than or equal to the preset search number, determining whether the location where the second storage block corresponding to the second key identifier is stored is located at the first storage queue interface; In a case where the second storage block is stored at the first storage queue interface, target data in the second storage block is moved from the first storage queue interface to the second storage queue interface.

5. The method according to claim 4, wherein: The method further comprises: In a case where the second storage block is stored at the second storage queue interface, the target data in the second storage block is moved from the current storage position of the second storage queue interface to the head of the second storage queue interface.

6. The method according to claim 5, wherein: Before moving the target data in the second storage block from the current storage position of the second storage queue interface to the head of the second storage queue interface, the method further includes: Determining whether the free storage capacity of the second storage queue interface meets a preset capacity; The moving the target data in the second storage block from the current storage position of the second storage queue interface to the head of the second storage queue interface comprises: When the free storage capacity of the second storage queue interface meets the preset capacity, the data of the fourth storage block at the tail of the second storage queue interface is moved to the head of the first storage queue interface, and the target data in the second storage block is moved from the current storage position of the second storage queue interface to the head of the second storage queue interface.

7. The method according to claim 6, wherein: The method further comprises: The number of accesses to the fourth storage block stored in the second storage queue interface is cleared.

8. A data processing device, comprising: a detection module, configured to determine whether a remaining storage space of a disk cache is less than a preset storage space when first data of a first storage block is read or written in the disk cache, the first storage block being a storage block most recently added to the disk cache; a processing module, configured to process target data stored in a first-class interface through an asynchronous thread to release the storage space of the disk cache occupied by the target data when the remaining storage space of the disk cache is less than a preset storage space, wherein the first-class interface corresponds to the disk cache; the target data includes data read a number of times less than a preset threshold within a preset time; A generation module is used to add a first storage block to the first storage queue interface or the second storage queue interface when the first type of interface includes a first storage queue interface and a second storage queue interface, and add a first key identifier corresponding to the first storage block to the second type of interface, so as to determine the position of the first storage block storing the first data in the first storage queue or the second storage queue according to the first key identifier recorded in the second type of interface, and the second type of interface corresponds to the disk cache.

9. A computing device, wherein: The device comprises at least one processor and a memory, wherein the memory is used to store computer program instructions, and the processor is used to execute the program in the memory to control the computing device to implement any one of the data processing methods in claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, wherein: If the computer program is executed in a computer, the computer is caused to execute any one of the data processing methods according to claims 1-7.

Citation Information

Patent Citations

  • Reading files stored on a storage system

    CN103917962A

  • Method and device for writing data into cache

    CN104238962A

  • Distributed block storage-based virtual disk layered cache design method

    CN107168657A

  • Data scheduling method and intelligent servo cluster

    CN108243228A

  • Method for managing magnetic disk array buffer storage

    CN1862475A