A cache data management method, system and storage medium

By listening and managing cache tasks in a distributed storage cluster, detecting their integrity, and recovering lost cache tasks after node failure, the problem of poor cache data management in the existing technology is solved, and the efficiency of data storage and system stability are improved.

CN113568932BActive Publication Date: 2025-03-14JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110656323.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-11
Publication Date
2025-03-14
Estimated Expiration
2041-06-11

AI Technical Summary

Technical Problem

In the prior art, there is a lack of effective management methods for cached data in distributed storage clusters, resulting in data loss in node failures, and fluctuations in cluster networks lead to data security and performance problems.

Method used

By listening to cache tasks for each node in the distributed storage cluster, push them to the cache queue to detect integrity, and parse and classify the complete cache tasks, and send them to the database or distributed cache cluster for storage. Meanwhile, when a node fails, the lost cache tasks are obtained from the database and/or distributed cache cluster.

Benefits of technology

Ensure the integrity of cached task information, avoid data loss due to network jitter or delay, improve data storage efficiency, and ensure the integrity and stability of node recovery after failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113568932B_ABST
    Figure CN113568932B_ABST
Patent Text Reader

Abstract

The present invention provides a cache data management method, system and storage medium, the method comprising: monitoring the cache tasks of each node in a distributed storage cluster; in response to monitoring that several nodes have cache tasks, pushing each cache task to a cache queue in sequence, and detecting the integrity of each cache task in the cache queue; in response to detecting that a cache task is complete, parsing the complete cache task and classifying it based on the parsing result, and sending the classified cache tasks to a database or a distributed cache cluster for storage; in response to a node corresponding to the complete cache task being repaired after a failure, obtaining the cache tasks lost by the node that has been repaired after the failure from the database and / or the distributed cache cluster. The present invention ensures the integrity of cache task information, improves the efficiency of data storage, and ensures the stability of distributed storage cluster failure recovery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of storage technology, and in particular to a cache data management method, system and storage medium. Background Art

[0002] Distributed storage is currently widely used on the Internet. It has good scalability and low cost, and is therefore often used to build enterprise-level storage capabilities. Distributed refers to a unique type of system architecture that consists of a group of computer nodes that communicate over a network and work in coordination to complete a common task.

[0003] In the current distributed storage cluster environment, there is a lack of good management methods for cached data. If a node fails, part of the cached data of the node will be lost. When the node is repaired, the data cannot be automatically restored. Since the scenario is more complex in the cluster environment, the amount of data and the number of nodes that need to be managed are large, large-scale failures will seriously affect the user's data security. In addition, cluster network fluctuations will cause large delays and lead to data loss, which will have a serious impact on the data security and performance of the entire cluster. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a cache data management method, system and storage medium to solve the problem of lack of a good management method for cache data in the prior art.

[0005] Based on the above purpose, the present invention provides a cache data management method, comprising the following steps:

[0006] Monitor the cache tasks of each node in the distributed storage cluster;

[0007] In response to monitoring that several nodes have cache tasks, each cache task is pushed to the cache queue in sequence, and the integrity of each cache task is detected in the cache queue;

[0008] In response to detecting that a cache task is complete, the complete cache task is parsed and classified based on the parsing result, and the classified cache tasks are respectively sent to a database or a distributed cache cluster for storage;

[0009] In response to a node among the nodes corresponding to the complete cache task being repaired after a failure, the cache tasks lost by the node that has been repaired after the failure are obtained from the database and / or the distributed cache cluster.

[0010] In some embodiments, in response to monitoring that several nodes have cache tasks, pushing each cache task to the cache queue in sequence includes:

[0011] In response to monitoring that several nodes have cache tasks, an identification number is assigned to each cache task and pushed to the cache queue in sequence.

[0012] In some embodiments, in response to a node among the nodes corresponding to the complete cache task being repaired after a failure, obtaining the cache task lost by the node repaired after the failure from the database and / or the distributed cache cluster includes:

[0013] In response to a node among the nodes corresponding to the complete cache task being repaired after a failure, the cache tasks lost by the node that has been repaired after the failure are obtained from the database and / or the distributed cache cluster according to the identification number.

[0014] In some embodiments, detecting the integrity of each cache task in the cache queue includes:

[0015] In the cache queue, the integrity of each cache task is detected by identifying the data length and the information of the header data and the tail data.

[0016] In some embodiments, in response to detecting that a cache task is complete, parsing the complete cache task and classifying it based on the parsing result, and sending the classified cache tasks to a database or a distributed cache cluster for storage respectively includes:

[0017] In response to detecting that a cache task is complete, parsing the complete cache task according to the data block size, and classifying the parsed cache tasks consisting of large data blocks into a first category, and classifying the parsed cache tasks consisting of small data blocks into a second category;

[0018] The cache tasks belonging to the first category are sent to the distributed cache cluster for temporary storage, and the cache tasks belonging to the second category are sent to the database for storage.

[0019] In some embodiments, the method further comprises:

[0020] In response to detecting that a cache task is incomplete, the incomplete cache task is removed from the cache queue, and the corresponding node is notified to resend the incomplete cache task.

[0021] In some embodiments, the method further comprises:

[0022] In response to a node failure, a failure notification is sent to the distributed storage cluster.

[0023] In some embodiments, the method further comprises:

[0024] The cache task that needs to be encrypted in the complete cache task is identified through the cache basic library, and the cache task that needs to be encrypted is encrypted.

[0025] Another aspect of the present invention further provides a cache data management system, comprising:

[0026] A cache task monitoring module is configured to monitor cache tasks of each node in the distributed storage cluster;

[0027] A cache task detection module, configured to push each cache task to a cache queue in sequence in response to monitoring that a plurality of nodes have cache tasks, and detect the integrity of each cache task in the cache queue;

[0028] a cache task classification module configured to, in response to detecting that a cache task is complete, parse the complete cache task and classify it based on the parsing result, and send the classified cache tasks to a database or a distributed cache cluster for storage; and

[0029] The cache task acquisition module is configured to, in response to a node corresponding to the complete cache task being repaired after a failure, acquire from the database and / or the distributed cache cluster the cache tasks lost by the node that has been repaired after the failure.

[0030] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions implement any one of the above methods when executed.

[0031] According to another aspect of the present invention, a computer device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, any one of the above methods is executed.

[0032] The present invention has at least the following beneficial technical effects:

[0033] The present invention monitors the cache tasks of each node in the distributed storage cluster, and when it monitors that several nodes have cache tasks, pushes each cache task to the cache queue in sequence, and then detects the integrity of each cache task in the cache queue, so as to ensure that complete cache task information is screened out, and effectively alleviate the situation where cache task information is lost due to network jitter or large delay of the distributed storage cluster; by parsing and classifying the complete cache tasks, cache task information can be stored in parallel, which improves the efficiency of data storage. Normally, when a node fails, the cache task is lost, and when the node returns to normal, the cache task cannot be restored. Therefore, the present invention is configured to obtain the cache tasks lost by the node repaired after the failure from different storage devices, so as to ensure the integrity and stability of the nodes of the distributed storage cluster after recovery from the failure. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0035] Figure 1 A schematic diagram of a cache data management method provided according to an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of a cache data management system / device provided according to an embodiment of the present invention;

[0037] Figure 3 A schematic diagram of a computer-readable storage medium for implementing a cache data management method according to an embodiment of the present invention;

[0038] Figure 4 The present invention is a schematic diagram of the hardware structure of a computer device for executing a cache data management method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0040] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are intended to distinguish two non-identical entities or non-identical parameters with the same name. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, other steps or units inherent to a process, method, system, product or device that includes a series of steps or units.

[0041] Based on the above purpose, a first aspect of an embodiment of the present invention provides an embodiment of a cache data management method. Figure 1 FIG. 1 is a schematic diagram of an embodiment of a cache data management method provided by the present invention. Figure 1 As shown, the embodiment of the present invention includes the following steps:

[0042] Step S10: monitoring the cache tasks of each node in the distributed storage cluster;

[0043] Step S20: in response to monitoring that several nodes have cache tasks, push each cache task to the cache queue in sequence, and detect the integrity of each cache task in the cache queue;

[0044] Step S30: In response to detecting that a cache task is complete, the complete cache task is parsed and classified based on the parsing result, and the classified cache tasks are respectively sent to a database or a distributed cache cluster for storage;

[0045] Step S40: In response to a node among the nodes corresponding to the complete cache task being repaired after a failure, the cache tasks lost by the node that has been repaired after the failure are obtained from the database and / or the distributed cache cluster.

[0046] The embodiment of the present invention monitors the cache tasks of each node in the distributed storage cluster, and when it monitors that several nodes have cache tasks, pushes each cache task to the cache queue in sequence, and then detects the integrity of each cache task in the cache queue, thereby ensuring that complete cache task information is screened out, effectively alleviating the situation where cache task information is lost due to network jitter or large delays in the distributed storage cluster; by parsing and classifying complete cache tasks, cache task information can be stored in parallel, thereby improving the efficiency of data storage. Normally, when a node fails, the cache task is lost, and when the node returns to normal, the cache task cannot be restored. Therefore, the present invention is configured to obtain the cache tasks lost by the node that is repaired after the failure from different storage devices, thereby ensuring the integrity and stability of the nodes of the distributed storage cluster after recovery from the failure.

[0047] In some embodiments, in response to monitoring that several nodes have cache tasks, pushing each cache task to the cache queue in sequence includes: in response to monitoring that several nodes have cache tasks, assigning an identification number to each cache task and pushing it to the cache queue in sequence.

[0048] In some embodiments, in response to a node corresponding to the complete cache task being repaired after a failure, obtaining the cache tasks lost by the node that has been repaired after a failure from a database and / or a distributed cache cluster includes: in response to a node corresponding to the complete cache task being repaired after a failure, obtaining the cache tasks lost by the node that has been repaired after a failure from a database and / or a distributed cache cluster according to an identification number.

[0049] In the above embodiment, the cache task is transmitted in segments in the network, so an identification number is assigned to each cache task entering the cache queue. When the repaired node needs to restore cache data after a failure, the cache task in the database and distributed cache cluster can be identified by the identification number.

[0050] In some embodiments, detecting the integrity of each cache task in the cache queue includes: detecting the integrity of each cache task in the cache queue by identifying the data length and information of the header data and the tail data.

[0051] In some embodiments, the method further includes: in response to detecting that a cache task is incomplete, removing the incomplete cache task from the cache queue, and notifying a corresponding node to resend the incomplete cache task.

[0052] In the above embodiment, cache integrity detection is included in the cache queue. Specifically, by detecting the data length of each cache task and the tag information of the header data and the tail data of the cache task, it is possible to know whether the cache task is complete, thereby ensuring the reliability of the cache task. When it is detected that the cache task is incomplete, the cache task is discarded, and the corresponding node is notified to resend the incomplete cache task.

[0053] In some embodiments, in response to detecting that a cache task is complete, the complete cache task is parsed and classified based on the parsing results, and the classified cache tasks are sent to a database or a distributed cache cluster for storage, respectively, including: in response to detecting that a cache task is complete, the complete cache task is parsed according to the data block size, and the parsed cache tasks composed of large data blocks are classified into a first category, and the parsed cache tasks composed of small data blocks are classified into a second category; the cache tasks belonging to the first category are sent to the distributed cache cluster for temporary storage, and the cache tasks belonging to the second category are sent to the database for storage.

[0054] In this embodiment, the cache task can be parsed through the cache tag information of the cache task, and the parsed cache task is either composed of large data blocks or small data blocks. Regarding the size of the data block, a threshold range is set in advance for the storage capacity occupied by the data block, and the large data block and the small data block belong to different ranges of storage capacity values.

[0055] In some embodiments, the method further includes: in response to a node failure, issuing a failure notification to the distributed storage cluster.

[0056] In this embodiment, in order to better manage the cache data of the distributed storage cluster, a fault notification process is set.

[0057] In some embodiments, the method further includes: identifying, through a cache base library, cache tasks that need to be encrypted in the complete cache task, and encrypting the cache tasks that need to be encrypted.

[0058] In this embodiment, the cache basic library can identify the cache tasks that need to be encrypted in the cache tasks. If it is identified that a complete cache task needs to be encrypted, it will be encrypted. Correspondingly, when the cache task that the node to be repaired after a failure needs to obtain is encrypted, it needs to decrypt the encrypted cache task before the node can obtain it. This method further ensures the security of cache task information and is conducive to the secure management of distributed storage clusters.

[0059] A second aspect of the embodiments of the present invention further provides a cache data management system. Figure 2 FIG. 1 is a schematic diagram of an embodiment of a cache data management system provided by the present invention. Figure 2 As shown, a cache data management system includes: a cache task monitoring module 10, configured to monitor the cache tasks of each node in a distributed storage cluster; a cache task detection module 20, configured to push each cache task to a cache queue in sequence in response to monitoring that several nodes have cache tasks, and detect the integrity of each cache task in the cache queue; a cache task classification module 30, configured to parse the complete cache tasks and classify them based on the parsing results in response to detecting that a cache task is complete, and send the classified cache tasks to a database or a distributed cache cluster for storage; and a cache task acquisition module 40, configured to obtain, from a database and / or a distributed cache cluster, the cache tasks lost by the node that has been repaired after a failure in the node corresponding to the complete cache task.

[0060] The cache data management system of the embodiment of the present invention monitors the cache tasks of each node in the distributed storage cluster, and when it monitors that several nodes have cache tasks, it pushes each cache task to the cache queue in sequence, and then detects the integrity of each cache task in the cache queue, so as to ensure that the complete cache task information is screened out, and effectively alleviate the situation where the cache task information is lost due to the network jitter of the distributed storage cluster or when there is a large delay; by parsing and classifying the complete cache tasks, the cache task information can be stored in parallel, which improves the efficiency of data storage. Normally, when a node fails, the cache task is lost, and when the node returns to normal, the cache task cannot be restored. Therefore, the present invention is configured to obtain the cache tasks lost by the node that is repaired after the failure from different storage devices, so as to ensure the integrity and stability of the nodes of the distributed storage cluster after recovery from the failure.

[0061] In some embodiments, the cache task monitoring module 10 includes a cache queue module configured to, in response to monitoring that several nodes have cache tasks, assign an identification number to each cache task and push it to the cache queue in sequence.

[0062] In some embodiments, the cache task acquisition module 40 is configured to respond to a node corresponding to the complete cache task being repaired after a failure, and obtain the cache tasks lost by the repaired node after the failure from the database and / or distributed cache cluster according to the identification number.

[0063] In some embodiments, the cache task detection module 20 includes an integrity detection module configured to detect the integrity of each cache task in the cache queue by identifying the data length and information of the header data and the tail data.

[0064] In some embodiments, the cache task classification module 30 is configured to parse the complete cache task according to the data block size in response to detecting that a cache task is complete, and classify the parsed cache tasks composed of large data blocks into a first category, and classify the parsed cache tasks composed of small data blocks into a second category; send the cache tasks belonging to the first category to the distributed cache cluster for temporary storage, and send the cache tasks belonging to the second category to the database for storage.

[0065] In some embodiments, the system further includes a task resending module configured to, in response to detecting that a cache task is incomplete, remove the incomplete cache task from the cache queue and notify a corresponding node to resend the incomplete cache task.

[0066] In some embodiments, the system further includes a fault notification module configured to issue a fault notification to the distributed storage cluster in response to a node failure.

[0067] In some embodiments, the system further includes an encryption module configured to identify cache tasks that need to be encrypted in the complete cache task through a cache basic library, and to encrypt the cache tasks that need to be encrypted.

[0068] A third aspect of the embodiments of the present invention further provides a computer-readable storage medium. Figure 3 FIG. 1 is a schematic diagram showing a computer-readable storage medium for implementing a cache data management method according to an embodiment of the present invention. Figure 3 As shown, the computer readable storage medium 3 stores computer program instructions 31, and when the computer program instructions 31 are executed by the processor, the following steps are implemented:

[0069] In some embodiments, in response to monitoring that several nodes have cache tasks, pushing each cache task to the cache queue in sequence includes: in response to monitoring that several nodes have cache tasks, assigning an identification number to each cache task and pushing it to the cache queue in sequence.

[0070] In some embodiments, in response to a node corresponding to the complete cache task being repaired after a failure, obtaining the cache tasks lost by the node that has been repaired after a failure from a database and / or a distributed cache cluster includes: in response to a node corresponding to the complete cache task being repaired after a failure, obtaining the cache tasks lost by the node that has been repaired after a failure from a database and / or a distributed cache cluster according to an identification number.

[0071] In some embodiments, detecting the integrity of each cache task in the cache queue includes: detecting the integrity of each cache task in the cache queue by identifying the data length and information of the header data and the tail data.

[0072] In some embodiments, in response to detecting that a cache task is complete, the complete cache task is parsed and classified based on the parsing results, and the classified cache tasks are sent to a database or a distributed cache cluster for storage, respectively, including: in response to detecting that a cache task is complete, the complete cache task is parsed according to the data block size, and the parsed cache tasks composed of large data blocks are classified into a first category, and the parsed cache tasks composed of small data blocks are classified into a second category; the cache tasks belonging to the first category are sent to the distributed cache cluster for temporary storage, and the cache tasks belonging to the second category are sent to the database for storage.

[0073] In some embodiments, the steps further include: in response to detecting that a cache task is incomplete, removing the incomplete cache task from the cache queue, and notifying a corresponding node to resend the incomplete cache task.

[0074] In some embodiments, the steps further include: in response to a node failure, sending a failure notification to the distributed storage cluster.

[0075] In some embodiments, the step further includes: identifying the cache tasks that need to be encrypted in the complete cache task through the cache basic library, and encrypting the cache tasks that need to be encrypted.

[0076] It should be understood that, in the absence of mutual conflicts, all the embodiments, features and advantages described above for the cache data management method according to the present invention are also applicable to the cache data management system and storage medium according to the present invention.

[0077] A fourth aspect of the embodiments of the present invention further provides a computer device, including a memory 402 and a processor 401, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method of any one of the above embodiments is implemented.

[0078] like Figure 4FIG. 1 is a schematic diagram of the hardware structure of a computer device for executing a cache data management method according to an embodiment of the present invention. Figure 4 Taking the computer device shown in FIG. 4 as an example, the computer device includes a processor 401 and a memory 402, and may also include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected via a bus or other means. Figure 4 The bus connection is taken as an example. The input device 403 can receive input digital or character information, and generate key signal input related to user settings and function control of the cache data management system. The output device 404 can include display devices such as display screens.

[0079] The memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the cache data management method in the embodiment of the present application. The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the use of the cache data management method, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 402 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the local module 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.

[0080] The processor 401 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 402, that is, implements the cache data management method of the above method embodiment.

[0081] Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. As an example and not by way of limitation, a nonvolatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. A volatile memory may include a random access memory (RAM), which may act as an external cache memory. As an example and not by way of limitation, RAM may be obtained in a variety of forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.

[0082] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0083] The various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein may be implemented or executed using the following components designed to perform the functions herein: a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and / or any other such configuration.

[0084] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0085] It should be understood that, as used herein, the singular form "a" or "an" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the items listed in association. The serial numbers of the embodiments disclosed in the above embodiments of the present invention are for description only and do not represent the advantages and disadvantages of the embodiments.

[0086] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A cache data management method, characterized in that: The following steps are involved: Monitor the cache tasks of each node in the distributed storage cluster, wherein the cache tasks are composed of large data blocks or small data blocks after parsing; In response to monitoring that several nodes have cache tasks, push each cache task to a cache queue in sequence, and detect the integrity of each cache task in the cache queue; In response to detecting that a cache task is complete, the complete cache task is parsed and classified based on the parsing result, and the classified cache tasks are respectively sent to a database or a distributed cache cluster for storage; In response to a node among the nodes corresponding to the complete cache task being repaired after a failure, obtaining, from the database and / or the distributed cache cluster, cache tasks lost by the node that has been repaired after the failure; Wherein, detecting the integrity of each cache task in the cache queue includes: detecting the integrity of each cache task by identifying the data length and the information of the header data and the tail data in the cache queue; in response to detecting that a cache task is incomplete, removing the incomplete cache task from the cache queue, and notifying the corresponding node to resend the incomplete cache task; In response to detecting that a cache task is complete, the complete cache task is parsed and classified based on the parsing results, and the classified cache tasks are sent to the database or distributed cache cluster for storage respectively, including: in response to detecting that a cache task is complete, the complete cache task is parsed according to the data block size, and the parsed cache tasks composed of large data blocks are classified into a first category, and the parsed cache tasks composed of small data blocks are classified into a second category; the cache tasks belonging to the first category are sent to the distributed cache cluster for temporary storage, and the cache tasks belonging to the second category are sent to the database for storage.

2. The method according to claim 1, characterized in that In response to monitoring that several nodes have cache tasks, pushing each cache task to the cache queue in sequence includes: In response to monitoring that several nodes have cache tasks, an identification number is assigned to each cache task and pushed to the cache queue in sequence.

3. The method according to claim 2, characterized in that In response to a node among the nodes corresponding to the complete cache task being repaired after a failure, obtaining from the database and / or the distributed cache cluster the cache task lost by the node that has been repaired after the failure includes: In response to a node among the nodes corresponding to the complete cache task being repaired after a failure, the cache task lost by the node that has been repaired after the failure is obtained from the database and / or the distributed cache cluster according to the identification number.

4. The method according to claim 1, characterized in that: Also includes: In response to a node failure, a failure notification is sent to the distributed storage cluster.

5. The method according to claim 1, characterized in that Also includes: The cache tasks that need to be encrypted in the complete cache tasks are identified through the cache basic library, and the cache tasks that need to be encrypted are encrypted.

6. A cache data management system, characterized in that: include: A cache task monitoring module, configured to monitor cache tasks of each node in the distributed storage cluster, wherein the cache tasks are composed of large data blocks or small data blocks after parsing; A cache task detection module, configured to push each cache task to a cache queue in sequence in response to monitoring that a plurality of nodes have cache tasks, and detect the integrity of each cache task in the cache queue; a cache task classification module configured to, in response to detecting that a cache task is complete, parse the complete cache task and classify it based on the parsing result, and send the classified cache tasks to a database or a distributed cache cluster for storage; and A cache task acquisition module, configured to, in response to a node among the nodes corresponding to the complete cache task being repaired after a failure, acquire from the database and / or the distributed cache cluster the cache tasks lost by the node that has been repaired after the failure; The cache task detection module is further configured to detect the integrity of each cache task in the cache queue by identifying the data length and the information of the header data and the tail data; in response to detecting that a cache task is incomplete, the incomplete cache task is removed from the cache queue, and the corresponding node is notified to resend the incomplete cache task; The cache task classification module is also configured to parse the complete cache task in response to detecting that a cache task is complete and classify the tasks based on the parsing results, and send the classified cache tasks to the database or distributed cache cluster for storage, including: in response to detecting that a cache task is complete, parsing the complete cache task according to the data block size, and classifying the parsed cache tasks composed of large data blocks into a first category, and classifying the parsed cache tasks composed of small data blocks into a second category; sending the cache tasks belonging to the first category to the distributed cache cluster for temporary storage, and sending the cache tasks belonging to the second category to the database for storage.

7. A computer-readable storage medium, characterized in that: Computer program instructions are stored, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Poll based cache event notifications in a distributed cache

    US20100106915A1

  • Last writers of datasets in storage array errors

    US20180032397A1