A multi-level cache data processing method and device based on a compute-in-memory architecture
Patent Information
- Application Number
- CN202511249079.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2045-09-03
AI Technical Summary
[0003]本发明提供了一种基于存算分离架构的多级缓存数据处理方法及装置,以解决现有不能准确且简单地对视频异常进行检测的问题
本发明通过构建多级缓存结构,并结合合理的数据缓存策略和调度算法,来提高缓存命中率并降低数据访问延迟,从而提升存算分离架构下的数据处理效率,继而大大提升了用户体验。
Smart Images

Figure CN121387771B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing technology, and in particular to a multi-level cache data processing method and apparatus based on a storage-compute separation architecture. Background Technology
[0002] With the rapid development of information technology, data volume is exploding, and traditional in-memory computing architectures are gradually revealing numerous problems when facing large-scale data processing. For example, in in-memory computing architectures, computing resources and storage resources are tightly coupled, causing the I / O performance of storage devices to become a bottleneck in data processing, making it difficult to meet the real-time and high-concurrency application requirements. In contrast, a compute-decentralized architecture separates computing nodes and storage nodes, allowing data interaction via a network to achieve independent expansion of computing and storage resources and improve resource utilization. However, in compute-decentralized architectures, there is significant latency in data transmission between computing and storage nodes, severely impacting data processing efficiency. While caching technology is an effective means of solving data access latency problems, existing caching technologies have low cache hit rates in compute-decentralized architectures, failing to fully leverage the acceleration effect of caching and thus struggling to meet the speed requirements of complex business scenarios. Therefore, how to achieve high-speed data processing in a compute-decentralized architecture has become an urgent problem to be solved. Summary of the Invention
[0003] This invention provides a multi-level cache data processing method and apparatus based on a storage-compute separation architecture to solve the problem that existing methods cannot accurately and easily detect video anomalies.
[0004] In a first aspect, the present invention provides a multi-level cache data processing method based on a storage-compute separation architecture. The method includes: setting a first-level buffer for each computing node in the computing engine, all first-level buffers forming a first-level buffer zone; and setting a second-level cache for each storage node in the storage engine, all second-level caches forming a second-level cache area. Based on the historical data access patterns of the current computing node and its current business needs, predict the data that the computing node will access. Store the predicted data that will be accessed in the first-level buffer under the computing node, and store the intermediate data that the computing node may call in the second-level buffer. The intermediate data is data whose call frequency is greater than a preset call frequency threshold. When a compute node requests data, it retrieves the data according to a preset data retrieval principle. If the data is retrieved from a storage node, the retrieval frequency of the data is determined. If the retrieval frequency of the data is greater than a preset retrieval frequency threshold, the data is stored in the secondary cache.
[0005] Optionally, when a storage node updates data, the updated data is first synchronized in the corresponding secondary cache under that storage node, and then the data that needs to be updated to the primary cache is gradually synchronized to the corresponding primary cache.
[0006] Optionally, the data retrieval principle is to retrieve data sequentially from the first-level buffer, the second-level cache, and the storage node under the computing node.
[0007] Optionally, when a computing node requests data, the data is retrieved according to a preset data retrieval principle, including: when a computing node requests data, it first searches for the data in the corresponding first-level buffer under that computing node. If the data is found, it is returned to the computing node; otherwise, it searches for the data in the second-level cache. If the data is found in the second-level cache, it is returned to the computing node; otherwise, it searches for the data in the storage node and returns the data to the computing node.
[0008] Optionally, when the storage space of the first-level cache or the second-level cache is insufficient, cached data is evicted according to the preset data eviction policy.
[0009] Optionally, cached data can be evicted according to a preset data eviction policy, including: For the first-level cache, an eviction algorithm based on a combination of access time and access frequency is used, prioritizing the eviction of data with the earliest access time and the lowest access frequency. For the second-level cache, a data eviction algorithm is adopted that combines the least recently used (-2) improved algorithm with data popularity.
[0010] Optionally, two timestamps are maintained for each cached data, recording the most recent access time and the penultimate access time of the data, as well as the access frequency of the data and the number of times it is accessed by the computing node. Furthermore, a collaborative mechanism is established between the first-level cache and the second-level cache to periodically exchange metadata of the cached data, which includes the data's storage location, access time, access frequency, and data popularity. When the space of the second-level cache node is insufficient, the data in the cache is traversed to find the set of data with the second-to-last access time. In this set, the data with the lowest data popularity is selected for eviction. If there are data with the same popularity, the data item with the longest storage time is evicted.
[0011] Optionally, when data in a storage node is updated, the storage node sends a data update notification to its secondary cache. The secondary cache updates its own cached data and synchronizes the update information to the primary cache node. The primary cache determines whether it needs to update its own cached data based on the update information, and updates the data when it determines that an update is needed.
[0012] Secondly, the present invention provides a multi-level cache data processing apparatus based on a storage-compute separation architecture for implementing any of the methods described above, comprising: The configuration unit is used to configure a first-level buffer for each computing node in the computing engine, and all first-level buffers form a first-level buffer. It also configures a second-level cache for each storage node in the storage engine, and all second-level caches form a second-level cache area. The storage unit is used to predict the data that the computing node will access based on the historical data access patterns and current business needs of the current computing node, store the predicted data to be accessed in the first-level buffer under the computing node, and store the intermediate data that the computing node may call in the second-level cache, wherein the intermediate data is data whose call frequency is greater than a preset call frequency threshold. The processing unit is used to retrieve data according to a preset data retrieval principle when the computing node requests data. When the data is retrieved from the storage node, the unit determines the data retrieval frequency and stores the data in the secondary cache when the data retrieval frequency is greater than a preset retrieval frequency threshold.
[0013] Thirdly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the methods described above.
[0014] The beneficial effects of this invention are as follows: This invention improves cache hit rate and reduces data access latency by constructing a multi-level cache structure and combining it with reasonable data caching strategies and scheduling algorithms, thereby enhancing data processing efficiency under the storage-compute separation architecture and greatly improving user experience.
[0015] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0016] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating a multi-level cache data processing method based on a storage-compute separation architecture provided in an embodiment of the present invention. Figure 2This is a flowchart illustrating another multi-level cache data processing method based on a storage-compute separation architecture provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of a multi-level cache data processing device based on a storage-compute separation architecture provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of another multi-level cache data processing device based on a storage-compute separation architecture provided in an embodiment of the present invention. Detailed Implementation
[0017] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of the invention.
[0018] Existing caching technologies, under a compute-decentralized architecture, suffer from low cache hit rates, failing to fully leverage the acceleration capabilities of caching and struggling to meet the speed requirements of complex business scenarios. In distributed big data processing scenarios, a compute-decentralized architecture decouples compute nodes from storage clusters via a high-speed network. Existing caching technologies typically deploy caches locally on compute nodes (such as Java heap caches or local SSD caches). However, when handling real-time analysis tasks involving petabytes of data (e.g., real-time user behavior analysis on e-commerce platforms), the following problems arise: First, cross-node data access leads to cache invalidation: compute nodes need to frequently read data from different partitions in the storage cluster, while local caches can only store a small amount of hot data. Access to a large amount of non-hot data results in network transmission latency due to cache misses (e.g., even on a 10Gbps network, a single data retrieval still requires millisecond-level latency). Second, cache consistency overhead squeezes and accelerates the process: when data is updated in the storage cluster (e.g., real-time log appending), compute node caches need to frequently synchronize with the storage side. Consistency maintenance operations (e.g., locking mechanisms, version comparisons) consume a lot of CPU resources, causing the cache hit rate to drop from the ideal 70% to below 30%. Third, there is insufficient multi-level cache coordination: although some systems design storage-side caching (e.g., HDFS Blocks), The cache is combined with the compute-side cache, but due to the lack of a unified scheduling strategy, data is often loaded repeatedly or missing in the two-level cache. For example, the data requested by the compute node may already exist in the storage node cache, but the cross-node access path is not hit, so the data needs to be read from the disk a second time.
[0019] To address the aforementioned problems, embodiments of the present invention provide a multi-level cache data processing method based on a storage-compute separation architecture, see [link to relevant documentation]. Figure 1 The method described in this embodiment of the invention includes: S101. Set up a first-level buffer for each computing node in the computing engine, and all first-level buffers form a first-level buffer. Set up a second-level cache for each storage node in the storage engine, and all second-level caches form a second-level cache area. See Figure 2 and Figure 3 The system architecture of this invention includes a compute engine (comprising all compute nodes), a first-level buffer, a second-level cache, and a storage engine, forming a compute-storage separation system. The multi-level cache includes a first-level cache located near the compute nodes and a second-level cache located near the storage nodes. In this embodiment, the first-level cache minimizes data access latency for compute nodes, improving the real-time performance of data processing. Due to its proximity to the compute nodes, data transmission is extremely fast, allowing compute nodes to acquire data with near-zero latency. The second-level cache primarily serves as a data buffer and filter. Its storage capacity is typically larger than the first-level cache, storing more intermediate data and data that is accessed less frequently but may still be retrieved. On one hand, when the data requested by a compute node is not in the first-level cache, the second-level cache can act as an intermediate layer, attempting to respond to the request first, thereby reducing the number of times data is read directly from the storage nodes, reducing network transmission pressure and data read latency. On the other hand, the second-level cache, through caching and management of data, retains hot data (i.e., data frequently accessed by multiple compute nodes), avoiding repeated readings of this data from the storage nodes and improving the overall system's data read efficiency. In addition, the second-level cache can also buffer data updates on storage nodes. After data updates on storage nodes, data synchronization is first completed in the second-level cache, and then the updates are gradually synchronized to the first-level cache, ensuring data consistency while reducing the impact of data updates on data access on compute nodes.
[0020] S102. Based on the historical data access patterns of the current computing node and its current business needs, predict the data that the computing node will access soon, store the predicted data that will be accessed in the first-level buffer under the computing node, and store the intermediate data that the computing node may call in the second-level buffer, wherein the intermediate data is data whose call frequency is greater than a preset call frequency threshold. Specifically, in this embodiment of the invention, when a storage node updates data, the updated data is first synchronized in the corresponding secondary cache of the storage node, and then the data that needs to be updated to the primary cache is gradually synchronized to the corresponding primary cache.
[0021] S103. When a computing node requests data, the data is retrieved according to the preset data retrieval principle. If the data is retrieved from a storage node, the retrieval frequency of the data is determined. If the retrieval frequency of the data is greater than the preset retrieval frequency threshold, the data is stored in the secondary cache.
[0022] In specific implementation, the data retrieval principle of this embodiment of the invention is to retrieve data sequentially from the first-level buffer, the second-level cache, and the storage node under the computing node.
[0023] In other words, in this embodiment of the invention, when a computing node requests data, it first searches for the data in the corresponding first-level buffer under that computing node. If the data is found, it is returned to the computing node. Otherwise, it searches for the data in the second-level buffer. If the data is found in the second-level buffer, it is returned to the computing node. Otherwise, it searches for the data in the storage node and returns the data to the computing node.
[0024] It should be noted that, in this embodiment of the invention, when the data call frequency is greater than a preset call frequency threshold, the data is stored in the secondary cache. The specific storage principle can be based on the remaining storage space of each secondary cache. For example, the data to be stored can be stored in the secondary cache with the largest remaining space, thereby better ensuring the utilization rate of each secondary cache and improving the user experience.
[0025] In general, the method described in this embodiment of the invention improves cache hit rate and reduces data access latency by constructing a multi-level cache structure and combining it with reasonable data caching strategies and scheduling algorithms, thereby improving data processing efficiency under the storage-compute separation architecture and greatly enhancing the user experience.
[0026] In practical implementation, to better improve user experience, this embodiment of the invention evicts cached data according to a preset data eviction principle when the storage space of the first-level cache or the second-level cache is insufficient. Specifically, for the first-level cache, an eviction algorithm based on a combination of access time and access frequency is used to prioritize the eviction of data with the earliest access time and the lowest access frequency; for the second-level cache, an eviction algorithm based on a combination of a least recently used (-2) improved algorithm and data popularity is used for data eviction.
[0027] Specifically, in this embodiment of the invention, two timestamps are maintained for each cached data, recording the most recent access time and the penultimate access time of the data, respectively. The access frequency and the number of times the data is accessed by the compute nodes are also recorded. A collaborative mechanism is established between the first-level cache and the second-level cache to periodically exchange metadata about the cached data. This metadata includes the data's storage location, access time, access frequency, and data popularity. When the second-level cache node space is insufficient, the data in the cache is traversed to find the set of all data with the earliest penultimate access time. Within this set, the data with the lowest popularity is selected for eviction. If data with the same popularity exists, the data item with the longest storage time is evicted.
[0028] Furthermore, when data in a storage node is updated, the storage node sends a data update notification to its secondary cache. The secondary cache updates its own cached data and synchronizes the update information to the primary cache node. The primary cache determines whether it needs to update its own cached data based on the update information, and updates the data if necessary. This ensures that the updated data can be efficiently retrieved by the compute nodes.
[0029] See Figure 2 Data prefetching and Level 1 cache processing: The compute node predicts the data to be accessed based on historical data access patterns and current business needs, and sends a data prefetch request to the Level 2 cache; After receiving the prefetch request, the Level 2 cache node first checks whether the target data exists in its own cache. If it exists, it transmits the data to the Level 1 cache; if it does not exist, it reads the target data from the storage node, stores it in its own cache, and then transmits it to the Level 1 cache node; After receiving the data, the Level 1 cache node stores it in its cache and marks the access time and access frequency of the data.
[0030] In other words, in this embodiment of the invention, the computing node analyzes data access over a period of time and discovers that sales data for certain specific time periods are accessed concentratedly every morning. Therefore, before the business begins that morning, the computing node sends a prefetch request to the second-level cache, requesting to prefetch sales data for the relevant time periods. Upon receiving the request, the second-level cache node checks its own cache and finds that some data already exists. It then transmits the existing data to the first-level cache. For data that does not exist, it reads it from the storage node, stores it in its own cache, and then transmits it to the first-level cache. Upon receiving the data, the first-level cache records the first access time of each piece of data and initializes the access frequency to 1.
[0031] The specific data access and cache update in this embodiment of the invention are as follows: When a computing node needs to access data, it first queries the first-level cache. If the target data exists in the first-level cache, it directly reads the data and updates the access time and access frequency of the data. If the target data does not exist in the first-level cache, it sends a data request to the second-level cache. After receiving the request, the second-level cache checks its own cache. If the target data exists, it transmits the data to the first-level cache, stores the data, and makes it available for the computing node to read. At the same time, it updates the access time and access frequency of the data. If the target data does not exist in the second-level cache either, it reads the data from the storage node, stores the data in both the second-level and first-level caches, and then makes it available for the computing node to read. It also updates the access time and access frequency of the data.
[0032] In specific implementation, in this embodiment of the invention, when a computing node starts performing big data analysis and needs to access a certain sales data, it first queries the first-level cache. If the data exists, it is read directly, the access frequency is incremented by 1, and the access time is updated to the current time. If the data does not exist in the first-level cache, a request is sent to the second-level cache. The second-level cache checks its own cache; if it exists, it is transmitted to the first-level cache, which stores it and makes it available for the computing node to read, while updating the data's access time and access frequency. If the data does not exist in the second-level cache either, it is read from the storage node, stored in both the second-level and first-level caches, and then made available for the computing node to read, with relevant information updated.
[0033] The cache data eviction strategy of this invention is as follows: When the storage space of the first-level cache or the second-level cache is insufficient, cache data eviction is required. For the first-level cache, an eviction algorithm based on a combination of access time and access frequency is adopted, prioritizing the eviction of data with the earliest access time and lowest access frequency. For the second-level cache, an eviction algorithm based on a combination of LRU-2 (Least Recently Used - 2, an improved algorithm) and data popularity is adopted. The specific process is as follows: In specific implementation, this embodiment of the invention maintains two timestamps for each cached data item, recording the most recent access time and the penultimate access time of the data item, and also recording the access frequency of the data and the number of times it is accessed by multiple computing nodes, thereby calculating the data popularity.
[0034] When the space of the second-level cache node is insufficient, iterate through the cached data items and first find the set of all data items whose second-to-last access time is the earliest.
[0035] Within this set, the data items with the lowest data popularity are further filtered out and eliminated. If data items with the same popularity exist, the data item with the longest storage time is eliminated.
[0036] Specifically, as business operations progress, the storage space of the Level 1 cache will gradually become insufficient. At this point, the Level 1 cache evaluates the cached data according to an eviction algorithm based on a combination of access time and access frequency, prioritizing the eviction of data that has been accessed the longest and has consistently low access frequency. For the Level 2 cache, when storage space is insufficient, an eviction algorithm based on a combination of LRU-2 and data popularity is used. For example, at a certain moment, the Level 2 cache traverses the cached data items and finds the set of data items with the second-to-last access time. Data A and data B are in this set. Data A has an access frequency of 5 and has been accessed by 2 compute nodes, while data B has an access frequency of 3 and has been accessed by 1 compute node. After calculation, data A has a higher popularity than data B, so data B is prioritized for eviction. If data A and data B have the same popularity, and data B has been stored for a longer time, then data B is evicted.
[0037] Cached data eviction strategy: A collaborative mechanism is established between the first-level cache and the second-level cache to periodically exchange metadata of cached data, including data storage location, access time, access frequency, data popularity, etc. When data in the storage node is updated, the storage node sends a data update notification to the second-level cache node. The second-level cache node updates its own cached data and synchronizes the update information to the first-level cache node. The first-level cache node determines whether it needs to update its own cached data based on the update information.
[0038] Specifically, in this embodiment of the invention, the first-level cache and the second-level cache can be set to exchange metadata of cached data every certain period of time (e.g., 10 minutes) so that both parties can understand the status of each other's cached data. When a certain sales data in the storage node is updated (e.g., the incorrect sales amount is corrected), the storage node sends an update notification to the second-level cache. After the second-level cache updates its own cached data, it synchronizes the update information to the first-level cache. The first-level cache determines whether it needs to update the corresponding data in its own cache based on the update information.
[0039] Through the above methods, the multi-level caching acceleration method based on the storage-compute separation architecture of this invention can effectively improve the cache hit rate, reduce data access latency, improve data processing efficiency, and meet the needs of complex business scenarios such as big data analysis.
[0040] This invention improves cache hit rate. Specifically, by constructing a multi-level cache structure including a first-level cache and a second-level cache, combined with a data prefetching mechanism, it can more accurately predict and cache data that computing nodes may access, thereby improving cache hit rate, reducing the number of times data is read from storage nodes, and reducing data access latency. Secondly, this invention optimizes cache data management: because it employs different cache data eviction strategies, it designs eviction algorithms based on access time and frequency, and based on data popularity and storage time, respectively, to ensure that the most valuable data is always stored in the cache, improving cache space utilization. The introduction of an eviction algorithm combining LRU-2 and data popularity can more accurately identify no longer important data in the second-level cache, avoiding the accidental deletion of data that may still be frequently accessed. Furthermore, this invention enhances cache collaboration capabilities: the collaboration mechanism between the first-level and second-level caches, as well as the data synchronization mechanism with storage nodes, ensures the consistency and validity of cached data, avoids calculation errors caused by data inconsistency, and improves the overall performance and stability of the caching system. In addition, the method described in the embodiments of the present invention can improve data processing efficiency: the multi-level caching acceleration method of the present invention can effectively reduce the transmission latency of data between computing nodes and storage nodes under the storage-compute separation architecture, improve data read and write speed, thereby significantly improving data processing efficiency and meeting the needs of real-time and high-concurrency data processing in complex business scenarios.
[0041] Accordingly, embodiments of the present invention provide a multi-level cache data processing apparatus based on a storage-compute separation architecture for implementing any of the methods described above, see [link to previous document]. Figure 4 The device includes: The configuration unit is used to configure a first-level buffer for each computing node in the computing engine, and all first-level buffers form a first-level buffer. It also configures a second-level cache for each storage node in the storage engine, and all second-level caches form a second-level cache area. The storage unit is used to predict the data that the computing node will access based on the historical data access patterns and current business needs of the current computing node, store the predicted data to be accessed in the first-level buffer under the computing node, and store the intermediate data that the computing node may call in the second-level cache, wherein the intermediate data is data whose call frequency is greater than a preset call frequency threshold. The processing unit is used to retrieve data according to a preset data retrieval principle when the computing node requests data. When the data is retrieved from the storage node, the unit determines the data retrieval frequency and stores the data in the secondary cache when the data retrieval frequency is greater than a preset retrieval frequency threshold.
[0042] In other words, the device described in this embodiment of the invention improves the cache hit rate and reduces data access latency by constructing a multi-level cache structure and combining it with reasonable data caching strategies and scheduling algorithms, thereby improving the data processing efficiency under the storage-compute separation architecture and greatly enhancing the user experience.
[0043] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method described in any of the embodiments of the present invention.
[0044] The relevant content of the device embodiment and storage medium embodiment of the present invention can be understood by referring to the method embodiment of the present invention, and will not be discussed in detail here.
[0045] For a detailed understanding, please refer to the embodiments of the method of this invention; they will not be discussed in detail here.
[0046] Although preferred embodiments of the invention have been disclosed for illustrative purposes, those skilled in the art will recognize that various modifications, additions, and substitutions are possible, and therefore the scope of the invention should not be limited to the embodiments described above.
Claims
1. A multi-level cache data processing method based on a storage-compute separation architecture, characterized in that, The method includes: Each compute node in the compute engine is assigned a first-level buffer, and all first-level buffers form a first-level buffer. Similarly, each storage node in the storage engine is assigned a second-level cache, and all second-level caches form a second-level cache area. Based on the historical data access patterns of the current computing node and its current business needs, predict the data that the computing node will access. Store the predicted data that will be accessed in the first-level buffer under the computing node, and store the intermediate data that the computing node may call in the second-level buffer. The intermediate data is data whose call frequency is greater than a preset call frequency threshold. When a compute node requests data, it retrieves the data according to a preset data retrieval principle. If the data is retrieved from a storage node, the retrieval frequency of the data is determined. If the retrieval frequency of the data is greater than a preset retrieval frequency threshold, the data is stored in the secondary cache. When a storage node updates data, the updated data is first synchronized to the corresponding secondary cache under that storage node, and then the data that needs to be updated to the primary cache is gradually synchronized to the corresponding primary cache. The data retrieval principle is to retrieve data sequentially from the first-level buffer, the second-level cache, and the storage node under the computing node.
2. The method according to claim 1, characterized in that, When a compute node requests data, the data is retrieved according to a preset data retrieval principle, including: When a compute node requests data, it first searches for the data in the corresponding first-level buffer under that compute node. If the data is found, it is returned to the compute node. Otherwise, it searches for the data in the second-level cache. If the data is found in the second-level cache, it is returned to the compute node. Otherwise, it searches for the data in the storage node and returns the data to the compute node.
3. The method according to claim 1, characterized in that, When the storage space of the first-level cache or the second-level cache is insufficient, cached data will be evicted according to the preset data eviction policy.
4. The method according to any one of claims 1-3, characterized in that, Cache data is evicted according to preset data eviction principles, including: For the first-level cache, an eviction algorithm based on a combination of access time and access frequency is used, prioritizing the eviction of data with the earliest access time and the lowest access frequency. For the second-level cache, a data eviction algorithm is adopted that combines the least recently used (-2) improved algorithm with data popularity.
5. The method according to claim 4, characterized in that, Two timestamps are maintained for each cached data, recording the most recent access time and the penultimate access time of the data, as well as the access frequency of the data and the number of times it is accessed by the computing node. A collaborative mechanism is established between the first-level cache and the second-level cache to periodically exchange the metadata of the cached data, which includes the data's storage location, access time, access frequency, and data popularity. When the space of the second-level cache node is insufficient, the data in the cache is traversed to find the set of data with the second-to-last access time. In this set, the data with the lowest data popularity is selected for eviction. If there are data with the same popularity, the data item with the longest storage time is evicted.
6. The method according to claim 5, characterized in that, When data in a storage node is updated, the storage node sends a data update notification to its secondary cache. The secondary cache updates its own cached data and synchronizes the update information to the primary cache node. The primary cache determines whether it needs to update its own cached data based on the update information, and updates the data if it does.
7. A multi-level cache data processing apparatus based on a storage-compute separation architecture for implementing the method of any one of claims 1-6, characterized in that, include: The configuration unit is used to configure a first-level buffer for each computing node in the computing engine, and all first-level buffers form a first-level buffer. It also configures a second-level cache for each storage node in the storage engine, and all second-level caches form a second-level cache area. The storage unit is used to predict the data that the computing node will access based on the historical data access patterns of the current computing node and its current business needs, store the predicted data to be accessed in the first-level buffer under the computing node, and store the intermediate data that the computing node may call in the second-level cache, wherein the intermediate data is data whose call frequency is greater than a preset call frequency threshold. The processing unit is used to retrieve data according to a preset data retrieval principle when the computing node requests data. When the data is retrieved from the storage node, the unit determines the data retrieval frequency and stores the data in the secondary cache when the data retrieval frequency is greater than a preset retrieval frequency threshold.
8. A computer-readable storage medium storing a computer program, wherein the program, when executed by a processor, implements the multi-level cache data processing method based on a storage-compute separation architecture as described in any one of claims 1-6.
Citation Information
Patent Citations
Multi-grade caching data storage, inquiry, scheduling and processing method and device
CN108132958A
Cache replacement method and device, and system
WO2025044128A1