A data caching method, device and computer readable storage medium

By introducing an information collection and aggregation control module into the RAID card, the data caching process is optimized, the problem of redundant data interaction between the RAID card and the CPU is solved, and more efficient caching processing is achieved.

CN116166696BActive Publication Date: 2026-05-19SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
Filing Date
2022-12-09
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing data caching methods result in excessively redundant data interaction between the RAID card and the CPU, consuming processor resources and reducing caching efficiency.

Method used

The information collection module receives the cached information written by the IO port, sends an aggregation request to the aggregation control module, obtains the RAID card's configuration information and cache information, performs aggregation calculations based on the configuration information, and finally sends the aggregated cache information to the CPU and writes it to disk.

Benefits of technology

This reduces communication barriers between the RAID card and the CPU, lowers the CPU load, and improves cache efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116166696B_ABST
    Figure CN116166696B_ABST
Patent Text Reader

Abstract

The application discloses a data caching method and device and a computer readable storage medium, and relates to the field of electronic systems. Through the use of a RAID card comprising an information collection module and an aggregation control module, after receiving the caching information, the RAID card performs aggregation control according to a pre-written aggregation array, and then sends the processed caching information to the CPU, so that the caching information is written to the disk. Compared with the original scheme, the present scheme can preferentially combine a series of similar caching data, thereby reducing the communication obstacles between the RAID card and the CPU. Moreover, the caching data in the present scheme is aggregated by the RAID card, so that the CPU is not required to perform aggregation, thereby reducing the load of the CPU and further improving the efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic systems, and in particular to a data caching method, apparatus, and computer-readable storage medium. Background Technology

[0002] In recent years, with the rise of Redundant Arrays of Independent Disks (RAID), RAID cache technology has developed rapidly in disk storage technology, becoming a key factor in disk read / write speed and the core of the entire storage system. As a cache, the role of RAID cache is mainly reflected in two aspects: for write cache, the current IO write operation is completed once the data is written to the cache. For read cache, if the data being read is hit in the cache, it will greatly reduce the number of disk accesses and the access time.

[0003] Existing data caching methods typically involve the RAID card directly acquiring cache information, caching it, and then sending it to the Central Processing Unit (CPU) for processing. The CPU performs a series of aggregation, filtering, and clearing operations before finally writing the cached information to disk. However, this approach leads to excessively redundant data interaction between the RAID card and the CPU. For example, after receiving cached information n times, the RAID card must interact with the CPU n times, and the CPU's data processing consumes processor resources, thus reducing caching efficiency.

[0004] Given the above-mentioned technologies, finding a more efficient data caching method is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a data caching method, apparatus, and computer-readable storage medium to solve the problem that existing solutions result in excessively redundant data interaction between the RAID card and the CPU, and that the corresponding data processing by the CPU consumes processor resources, thereby reducing caching efficiency.

[0006] To address the aforementioned technical problems, this application provides a data caching method applied to a RAID card including an information collection module and an aggregation control module, the method comprising:

[0007] The information collection module receives the cached information written by the I / O port;

[0008] Send an aggregation request to the aggregation control module, and control the aggregation control module to obtain the configuration information of the RAID card and the cache information;

[0009] The aggregation array elements are obtained according to the configuration information, and the aggregation control module is controlled to perform corresponding aggregation operations on the configuration information according to the aggregation array elements.

[0010] The cached information after aggregation is sent to the CPU, and the cached information is written to disk.

[0011] Preferably, receiving the cached information written by the I / O port through the information collection module includes:

[0012] The system retrieves the running I / O port, and after reading the header of the cache information under the I / O port, it begins to cache the cache information.

[0013] After receiving the information body of the cached information and the information tail of the cached information, the caching process is terminated.

[0014] Preferably, after receiving the buffered information written by the I / O port through the information collection module, the method further includes:

[0015] Detect whether the cached information satisfies the aggregation rule, wherein the aggregation rule is a predefined rule for cached data defined by an algorithm;

[0016] If the cached information does not meet the aggregation rule, the cached information is directly sent to the CPU;

[0017] If the cached information satisfies the aggregation rule, then determine whether the aggregation array to which the aggregation array element belongs is empty;

[0018] If the aggregation array is empty, the cache information is sent directly to the CPU;

[0019] If the aggregation array is not empty, then proceed to the step of obtaining aggregation array elements according to the configuration information, and controlling the aggregation control module to perform corresponding aggregation operations on the configuration information according to the aggregation array elements.

[0020] Preferably, obtaining the aggregated array elements based on the configuration information includes:

[0021] The aggregation control module is controlled to perform tag lookup and detect whether a tag corresponding to the configuration information exists;

[0022] If so, an index number is generated, and the aggregate array element pointed to by the index number is read.

[0023] Preferably, detecting whether the cached information satisfies the aggregation rule includes:

[0024] The system detects whether the NSID identifier of the cached information has an aggregation operation, detects whether the number of disk LBAs on the current I / O port exceeds the aggregation window range, and detects whether the number of disk LBAs exceeds the cache preset value in the RAID card.

[0025] If all of the above conditions are met, it indicates that the cached information satisfies the aggregation rule;

[0026] If any of the above conditions are not met, it indicates that the cached information does not satisfy the aggregation rule.

[0027] Preferably, after controlling the aggregation control module to perform corresponding aggregation operations on the configuration information based on the aggregation array elements, the method further includes:

[0028] Determine whether the output data after the aggregation operation meets the aggregation output conditions;

[0029] If so, proceed to the step of sending the cached information after aggregation to the CPU.

[0030] Preferably, after sending the cached information after aggregation to the CPU and writing the cached information to disk, the method further includes:

[0031] If the disk write-to-disk completion information sent by the CPU is not detected within a preset time, an alarm will be triggered.

[0032] To address the aforementioned issues, this application also provides a data caching device applied to a RAID card including an information collection module and an aggregation control module, comprising:

[0033] The receiving module is used to receive buffered information written by the I / O port through the information collection module;

[0034] The acquisition module is used to send an aggregation request to the aggregation control module and control the aggregation control module to acquire the configuration information of the RAID card and the cache information;

[0035] The calculation module is used to obtain the aggregation array elements according to the configuration information, and control the aggregation control module to perform corresponding aggregation operations on the configuration information according to the aggregation array elements;

[0036] The sending module is used to send the cached information after aggregation to the CPU.

[0037] Preferably, the device further includes:

[0038] The detection module is used to detect whether the cached information meets the aggregation rule. The aggregation rule is a predefined rule for cached data defined by an algorithm. If the cached information does not meet the aggregation rule, the cached information is directly sent to the CPU. If the cached information meets the aggregation rule, the judgment module is triggered.

[0039] The first judgment module is used to determine whether the aggregation array is empty. If the aggregation array is empty, the cache information is sent directly to the CPU. If the aggregation array is not empty, the operation module is triggered.

[0040] Preferably, the device further includes;

[0041] The second judgment module is used to determine whether the output data after the aggregation operation meets the aggregation output conditions. If so, the sending module is triggered.

[0042] Preferably, the device further includes;

[0043] An alarm module is used to issue an alarm if the disk write-to-disk completion information sent by the CPU is not detected within a preset time.

[0044] To address the aforementioned problems, this application also provides another data caching device, comprising:

[0045] Memory, used to store computer programs;

[0046] A processor, used to implement the data caching method described above when executing the computer program.

[0047] To address the aforementioned problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the data caching method described above.

[0048] The data caching method provided in this application is applied to a RAID card. It receives cached information written to the I / O port through an information collection module, sends an aggregation request to the aggregation control module, and controls the aggregation control module to obtain the RAID card's configuration information and cached information. Based on the configuration information, it obtains the aggregation array elements and controls the aggregation control module to perform corresponding aggregation operations on the configuration information based on the aggregation array elements. The aggregated cached information is then sent to the CPU and finally written to disk. The solution provided in this application, by employing a RAID card that includes both an information collection module and an aggregation control module, enables the RAID card to perform aggregation control according to a pre-programmed aggregation array after receiving cached information, sending the processed cached information to the CPU, and finally writing it to disk. Compared to existing solutions, this solution can prioritize merging a series of similar cached data, thereby reducing communication barriers between the RAID card and the CPU. Furthermore, since the cached data in this solution is aggregated through the RAID card without CPU processing, the CPU load is reduced, further improving efficiency.

[0049] In addition, embodiments of this application also provide a data caching device and a computer-readable storage medium, which have the same effect as above. Attached Figure Description

[0050] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 A flowchart illustrating a data caching method provided in this application embodiment;

[0052] Figure 2 A schematic diagram illustrating the information collection and aggregation process provided in this application embodiment;

[0053] Figure 3 A schematic diagram of a data caching device provided in an embodiment of this application;

[0054] Figure 4 This is a schematic diagram of another data caching device provided in an embodiment of this application. Detailed Implementation

[0055] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0056] The core of this application is to provide a data caching method, apparatus, and computer-readable storage medium to solve the problem that existing solutions lead to excessively redundant data interaction between the RAID card and the CPU, and that the corresponding data processing by the CPU consumes processor resources, thereby reducing caching efficiency.

[0057] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0058] RAID is a technology that combines multiple independent physical hard drives in different ways to form a logical hard drive, thereby providing higher performance and data redundancy than a single hard drive. RAID cards are generally divided into two types: hardware RAID cards and software RAID cards. Hardware RAID implements RAID functionality using hardware; standalone RAID cards and RAID chips integrated into the motherboard are both hardware RAID. RAID cards that use software and the CPU refer to cards that use the CPU to perform common RAID calculations. Software RAID consumes more CPU resources, and most server devices use hardware RAID. To address the problem of excessive data interaction between RAID cards and the CPU, this application provides a data caching method. Figure 1 A flowchart of a data caching method provided in an embodiment of this application is shown below. Figure 1 As shown, the method includes:

[0059] S10: Receive buffered information written by the IO port through the information collection module;

[0060] Figure 2 A schematic diagram illustrating the information collection and aggregation principles provided for embodiments of this application. (For example...) Figure 2 As shown, to achieve information aggregation, it is first necessary to collect the cached information of the I / O port. Specifically, the information collection module receives the cached information written by the I / O port.

[0061] To enable the information collection module to receive cached information, as a preferred embodiment, the cached information is started after reading the header of the cached information under the running I / O port by calling the running I / O port; the cached information body is received and the cached information tail is received, and then the caching process ends.

[0062] Specifically, the corresponding method for accessing running I / O ports is generally achieved by reading the header of the cached information. In this embodiment, the header represents the header file containing the information. Generally, in an application development system, the actual logical implementation of a function is based on the hardware layer and is completed in the driver, functional layer programs, and user applications. The main function of the header file is to facilitate the reuse of global variables (functions) across multiple code files, prevent definition conflicts, and provide a description for each called function. It does not need to contain the program's logical implementation code; it only serves a descriptive role. The user program only needs to call the relevant functions or variables according to the interface declarations in the header file, and the linker will find the corresponding actual definition code in the library. Correspondingly, the footer is the end identifier for the corresponding information. The header and footer ensure the accuracy and efficiency of the information collection module in receiving I / O cached information.

[0063] S11: Send an aggregation request to the aggregation control module and control the aggregation control module to obtain the RAID card's configuration information and cache information;

[0064] Furthermore, an aggregation request is sent to the aggregation control module, which is then instructed to obtain the RAID card's configuration information and cache information to facilitate subsequent aggregation of cache information.

[0065] It should be noted that the aggregation control module in this embodiment is a component of the RAID card, and the aggregation control of aggregation requests is realized through this hardware area. The specific structural configuration of the aggregation control module is not limited in this embodiment; it can be a circuit integrated board, depending on the specific implementation.

[0066] S12: Obtain the aggregation array elements according to the configuration information, and control the aggregation control module to perform corresponding aggregation operations on the configuration information according to the aggregation array elements;

[0067] Aggregate array elements are stored in aggregate arrays. An aggregate array consists of array elements of depth m (m≥1), and each array element contains a tag and an AggContent. Read and write access operations for aggregate arrays are generated by the aggregation control module.

[0068] To obtain aggregated array elements, the aggregation control module is used to search for tags and check if a tag corresponding to the configuration information exists. If so, an index number is generated, and the aggregated array element pointed to by the index number is read.

[0069] Furthermore, the aggregation operation performs an aggregation operation on the AggContent in the aggregation object and the AggContent in the found aggregation array elements. If the aggregation result meets the aggregation output condition, the aggregated information is output. Otherwise, the aggregated information is stored in the aggregation array, and the aggregation operation result is output.

[0070] Specifically, the system checks whether the cached information meets the aggregation rules, which are predefined rules for cached data defined by an algorithm. If the cached information does not meet the aggregation rules, it is directly sent to the CPU. If the cached information meets the aggregation rules, it checks whether the aggregation array is empty. If the aggregation array is empty, it is directly sent to the CPU. If the aggregation array is not empty, it obtains the aggregation array elements according to the configuration information and controls the aggregation control module to perform corresponding aggregation operations on the configuration information according to the aggregation array elements.

[0071] In a preferred embodiment, the cache information is checked to see if it meets the aggregation rules. Specifically, this involves checking whether the NSID identifier of the cache information is eligible for aggregation, whether the number of Logical Block Addresses (LBAs) of the current I / O port exceeds the aggregation window range, and whether the number of disk LBAs exceeds the preset cache value in the RAID card. The NSID identifier is the Namespace ID of the current I / O operation and is consistent with the NSID in the header. If all the above conditions are met, the cache information meets the aggregation rules; if any of the above conditions are not met, the cache information does not meet the aggregation rules.

[0072] Furthermore, in specific implementation, to ensure the accuracy of the output data, after the aggregation control module performs corresponding aggregation operations on the configuration information based on the aggregation array elements, it further determines whether the output data after the aggregation operation meets the aggregation output conditions. If so, the subsequent step of sending the cached information after the aggregation operation to the CPU is initiated. The aggregation output conditions include the number of aggregated IOs exceeding a preset value, nonModifiedCont exceeding a preset value, the number of PhyDevHit values ​​of 1'b1 exceeding a preset value, and combinations thereof.

[0073] S13: Send the cached information after aggregation to the CPU and write the cached information to disk.

[0074] Finally, the cached information after aggregation is sent to the CPU to be written to disk, thus realizing the writing of cached information to disk.

[0075] In this embodiment, the data caching method is applied to a RAID card. An information collection module receives cached information written to the I / O port, sends an aggregation request to the aggregation control module, and controls the aggregation control module to obtain the RAID card's configuration information and cached information. Based on the configuration information, it obtains the aggregation array elements and controls the aggregation control module to perform corresponding aggregation operations on the configuration information based on the aggregation array elements. The aggregated cached information is then sent to the CPU and finally written to disk. The solution provided in this application, by employing a RAID card that includes both an information collection module and an aggregation control module, enables the RAID card to perform aggregation control according to a pre-programmed aggregation array after receiving cached information. The processed cached information is then sent to the CPU and finally written to disk. Compared to existing solutions, this solution can prioritize merging a series of similar cached data, thereby reducing communication barriers between the RAID card and the CPU. Furthermore, since the cached data in this solution is aggregated through the RAID card without CPU processing, the CPU load is reduced, further improving efficiency.

[0076] In addition, to ensure that the aggregated cache information is successfully written to disk, after sending the aggregated cache information to the CPU and writing the cache information to disk, the following steps are also included:

[0077] If no disk write completion information is detected from the CPU's cache information within the preset time, an alarm will be triggered.

[0078] In practice, if no cache information write-to-disk completion information is detected from the CPU within a preset time, an alarm will be triggered to prompt the user to check and process the cache information write-to-disk.

[0079] In the above embodiments, the data caching method has been described in detail. This application also provides embodiments corresponding to the data caching device. It should be noted that this application describes the embodiments of the device part from two perspectives: one is based on the functional module, and the other is based on the hardware.

[0080] Figure 3 This is a schematic diagram of a data caching device provided in an embodiment of this application. Figure 3 As shown, the device includes:

[0081] The receiving module 10 is used to receive the buffer information written by the IO port through the information collection module;

[0082] The acquisition module 11 is used to send an aggregation request to the aggregation control module and control the aggregation control module to obtain the configuration information and cache information of the RAID card;

[0083] The calculation module 12 is used to obtain the aggregation array elements according to the configuration information, and control the aggregation control module to perform corresponding aggregation operations on the configuration information according to the aggregation array elements.

[0084] The sending module 13 is used to send the cached information after aggregation to the CPU.

[0085] In a preferred embodiment, the device further includes:

[0086] The detection module is used to detect whether the cached information meets the aggregation rules. The aggregation rules are predefined rules for cached data defined by an algorithm. If the cached information does not meet the aggregation rules, it enters the sending module; if the cached information meets the aggregation rules, it enters the judgment module.

[0087] The first judgment module is used to determine whether the aggregation array is empty. If the aggregation array is empty, it enters the sending module; if the aggregation array is not empty, it enters the calculation module.

[0088] In a preferred embodiment, the device further includes;

[0089] The second judgment module is used to determine whether the output data after the aggregation operation meets the aggregation output conditions. If so, it enters the sending module.

[0090] In a preferred embodiment, the device further includes;

[0091] The alarm module is used to issue an alarm if no disk write completion information is detected from the CPU's cached information within a preset time.

[0092] The data caching device provided in this application receives cached information written to the I / O port through an information collection module, sends an aggregation request to the aggregation control module, and controls the aggregation control module to obtain the RAID card's configuration information and cached information. Based on the configuration information, it obtains the aggregation array elements and controls the aggregation control module to perform corresponding aggregation operations on the configuration information based on the aggregation array elements. The aggregated cached information is then sent to the CPU and finally written to disk. The solution provided in this application, by employing a RAID card that includes both an information collection module and an aggregation control module, enables the RAID card to perform aggregation control according to a pre-programmed aggregation array after receiving cached information, sending the processed cached information to the CPU and finally writing it to disk. Compared to existing solutions, this solution can prioritize merging a series of similar cached data, thereby reducing communication barriers between the RAID card and the CPU. Furthermore, since the cached data in this solution is aggregated through the RAID card without CPU processing, the CPU load is reduced, further improving efficiency.

[0093] Figure 4A schematic diagram of another data caching device provided in the embodiments of this application is shown below. Figure 4 As shown, the data caching device includes:

[0094] Memory 20 is used to store computer programs;

[0095] The processor 21 is configured to implement the steps of the data caching method mentioned in the above embodiments when executing a computer program.

[0096] The data caching device provided in this embodiment may include, but is not limited to, smartphones, tablets, laptops, or desktop computers.

[0097] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.

[0098] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 20 is used to store at least the following computer program 201, which, after being loaded and executed by the processor 21, is capable of implementing the relevant steps of the data caching method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, and the storage method may be temporary or permanent storage. The operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the data caching method.

[0099] In some embodiments, the data buffer device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.

[0100] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the data caching device and may include more or fewer components than illustrated.

[0101] The data caching device provided in this application includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: the data caching method involved in the above embodiments.

[0102] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.

[0103] The data caching device provided in this application includes a processor and a memory. When the data stored in the memory is executed by the processor, it can receive cached information written by the I / O port through the information collection module, send an aggregation request to the aggregation control module, and control the aggregation control module to obtain the configuration information and cached information of the RAID card. Based on the configuration information, it obtains the aggregation array elements and controls the aggregation control module to perform corresponding aggregation operations on the configuration information based on the aggregation array elements. The aggregated cached information is then sent to the CPU and finally written to disk. The solution provided in this application, by employing a RAID card including an information collection module and an aggregation control module, enables the RAID card to perform aggregation control according to a pre-programmed aggregation array after receiving cached information, sending the processed cached information to the CPU, and finally writing it to disk. Compared with the original solution, this solution can prioritize merging a series of similar cached data, thereby reducing communication barriers between the RAID card and the CPU. Furthermore, since the cached data in this solution is aggregated through the RAID card without CPU processing, the CPU load is reduced, further improving efficiency.

[0104] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiments.

[0105] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0106] Since the embodiments of the readable storage medium portion correspond to the embodiments of the method portion, the embodiments of the apparatus portion are described in the method portion description and will not be repeated here.

[0107] The computer-readable storage medium provided in this application, when the stored data is executed, can receive cached information written by the I / O port through the information collection module, send an aggregation request to the aggregation control module, and control the aggregation control module to obtain the configuration information and cached information of the RAID card. Based on the configuration information, it obtains the aggregation array elements, and controls the aggregation control module to perform corresponding aggregation operations on the configuration information based on the aggregation array elements. The aggregated cached information is then sent to the CPU and finally written to disk. The solution provided in this application, by employing a RAID card that includes both an information collection module and an aggregation control module, enables the RAID card to perform aggregation control according to a pre-programmed aggregation array after receiving cached information, sending the processed cached information to the CPU, and finally writing it to disk. Compared with the original solution, this solution can prioritize merging a series of similar cached data, thereby reducing communication barriers between the RAID card and the CPU. Furthermore, since the cached data in this solution is aggregated through the RAID card without CPU processing, the CPU load is reduced, further improving efficiency.

[0108] The foregoing has provided a detailed description of a data caching method, apparatus, and computer-readable storage medium provided in this application. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0109] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A data caching method, characterized in that, The method, applied to a RAID card including an information collection module and an aggregation control module, includes: The information collection module receives the cached information written by the I / O port; Send an aggregation request to the aggregation control module, and control the aggregation control module to obtain the configuration information of the RAID card and the cache information; The aggregation array elements are obtained according to the configuration information, and the aggregation control module is controlled to perform corresponding aggregation operations on the cached information according to the aggregation array elements. The cached information after aggregation is sent to the CPU, and the cached information is written to disk.

2. The data caching method according to claim 1, characterized in that, The process of receiving cached information written by the I / O port through the information collection module includes: The system retrieves the running I / O port, and after reading the header of the cache information under the I / O port, it begins to cache the cache information. After receiving the information body of the cached information and the information tail of the cached information, the caching process is terminated.

3. The data caching method according to claim 2, characterized in that, After receiving the buffered information written by the I / O port through the information collection module, the method further includes: Detect whether the cached information satisfies the aggregation rule, wherein the aggregation rule is a predefined rule for cached data defined by an algorithm; If the cached information does not meet the aggregation rule, the cached information is directly sent to the CPU; If the cached information satisfies the aggregation rule, then determine whether the aggregation array to which the aggregation array element belongs is empty; If the aggregation array is empty, the cache information is sent directly to the CPU; If the aggregation array is not empty, then proceed to the step of obtaining the aggregation array elements according to the configuration information, and controlling the aggregation control module to perform corresponding aggregation operations on the cached information according to the aggregation array elements.

4. The data caching method according to claim 3, characterized in that, The step of obtaining aggregated array elements based on the configuration information includes: The aggregation control module is controlled to perform tag lookup and detect whether a tag corresponding to the configuration information exists; If so, an index number is generated, and the aggregate array element pointed to by the index number is read.

5. The data caching method according to claim 3, characterized in that, The step of detecting whether the cached information satisfies the aggregation rules includes: The system detects whether the NSID identifier of the cached information has an aggregation operation, detects whether the number of disk LBAs on the current I / O port exceeds the aggregation window range, and detects whether the number of disk LBAs exceeds the cache preset value in the RAID card. If all of the above conditions are met, it indicates that the cached information satisfies the aggregation rule; If any of the above conditions are not met, it indicates that the cached information does not satisfy the aggregation rule.

6. The data caching method according to any one of claims 1 to 5, characterized in that, After controlling the aggregation control module to perform corresponding aggregation operations on the cached information based on the aggregation array elements, the method further includes: Determine whether the output data after the aggregation operation meets the aggregation output conditions; If so, proceed to the step of sending the cached information after aggregation to the CPU.

7. The data caching method according to claim 6, characterized in that, After sending the cached information after aggregation to the CPU and writing the cached information to disk, the process further includes: If the disk write-to-disk completion information sent by the CPU is not detected within a preset time, an alarm will be triggered.

8. A data caching device, characterized in that, RAID cards used in applications including information collection modules and aggregation control modules, including; The receiving module is used to receive buffered information written by the I / O port through the information collection module; The acquisition module is used to send an aggregation request to the aggregation control module and control the aggregation control module to acquire the configuration information of the RAID card and the cache information; The calculation module is used to obtain the aggregation array elements according to the configuration information, and control the aggregation control module to perform corresponding aggregation operations on the cached information according to the aggregation array elements; The sending module is used to send the cached information after aggregation to the CPU.

9. A data caching device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the data caching method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data caching method as described in any one of claims 1 to 7.