A distributed multi-level cache and storage method based on cold and hot data tag identification

By using a two-dimensional tag generation and tag mirroring queue mechanism, combined with access frequency and temporal locality to generate dynamic hot and cold tag values, the problem of resource allocation imbalance and migration delay in multi-level caching and storage management is solved, achieving efficient and uninterrupted data migration and consistency assurance.

CN120973308BActive Publication Date: 2026-07-07WUHAN SPARK ZHONGDA INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN SPARK ZHONGDA INFORMATION TECH CO LTD
Filing Date
2025-08-05
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing multi-level caching and storage management methods lack effective modeling of the temporal locality, burstiness, and volatility of data access, leading to unbalanced resource allocation, affecting cache hit rate and business continuity, and posing a risk of data inconsistency during migration.

Method used

A dual-dimensional tag generation mechanism is adopted, which combines access frequency and temporal locality to generate dynamic hot and cold tag values, establishes a tag mirror queue, realizes uninterrupted migration, and ensures smooth data transition through sharded incremental replication and atomic switching.

Benefits of technology

It enables adaptive adjustment of resource allocation based on changes in system activity, improves cache hit rate, reduces migration latency, and ensures continuity of high-concurrency services and data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973308B_ABST
    Figure CN120973308B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data storage, and particularly relates to a distributed multi-level cache and storage method based on hot and cold data label identification, comprising the following steps: collecting the access frequency and access time locality of a data block in real time to generate a dynamic hot and cold label value, wherein the access time locality is the reciprocal of the standard deviation of the access interval in the current time window; distributing the data block to different storage levels according to the dynamic hot and cold label value H, and simultaneously establishing a label mirror queue across the levels, which records the pre-allocated address of the target level; under the service state of the source level, writing a data block copy to the target level address specified by the label mirror queue, and atomically switching the access path after the writing is completed. The present application avoids the delay jitter caused by burst migration, adopts a continuous physical space alignment strategy for the pre-allocated address, reduces the fragmentation rate, improves the sequential write performance of the SSD, and realizes fast resource switching of the migration operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage technology, and in particular to a distributed multi-level caching and storage method based on cold and hot data tag identification. Background Technology

[0002] With the widespread application of data centers, cloud storage platforms, and distributed computing systems, the hot and cold distribution characteristics of data access in storage systems are becoming increasingly prominent. In order to improve storage performance and resource utilization efficiency, more and more systems are adopting multi-level storage architectures, such as combining memory (DRAM), solid-state drives (SSDs), and hard disk drives (HDDs) to build a tiered caching and storage system to achieve a balance between different performance-cost ratios.

[0003] Existing multi-level caching and storage management methods mostly classify data blocks into hot and cold categories based on static or single-dimensional characteristics (such as access frequency) and determine their level accordingly. However, in real-world business scenarios, data access exhibits significant temporal locality, burstiness, and volatility. Judging hot and cold status solely based on access frequency is insufficient: the lack of modeling for access time distribution means that frequently accessed data blocks in a short period are not identified as hotspots, affecting cache hit rates; the tiering strategy lacks adaptability, and fixed thresholds cannot be dynamically adjusted according to changes in overall system activity, easily leading to resource allocation imbalances, such as memory overflows or long-term accumulation of active data in HDDs; traditional tier migration methods often employ full replication and blocking switching, resulting in unavailable services during migration, impacting the continuity of high-concurrency businesses; if concurrent writes occur during migration, the lack of an efficient synchronization mechanism may lead to inconsistencies between source and target replicas, increasing data integrity risks. Summary of the Invention

[0004] This invention provides a distributed multi-level caching and storage method based on hot and cold data tag identification. It supports dynamic hot and cold data identification, has predictive migration capabilities, and enables smooth data migration without interruption. This distributed multi-level caching and storage method meets the high-performance access requirements and reliability assurance requirements in large-scale data environments.

[0005] A distributed multi-level caching and storage method based on hot and cold data tag identification includes the following steps:

[0006] S1, Two-dimensional label generation: Real-time collection of data block access frequency and access time locality to generate dynamic hot and cold label values ​​H, where access time locality is the reciprocal of the standard deviation of the access interval within the current time window;

[0007] S2, Hierarchical collaborative decision-making: Based on the dynamic cold and hot tag value H, data blocks are allocated to memory, SSD or HDD levels, and a cross-level tag mirror queue is established. The tag mirror queue records the pre-allocated address of the target level.

[0008] S3, Uninterrupted Migration Execution: When a data block needs to be migrated across levels, while maintaining service at the source level, a copy of the data block is written to the target level address specified by the tag mirror queue. After the writing is completed, the access path is switched atomically.

[0009] Optionally, the acquisition of access frequency in S1 includes setting a sliding time window, counting the number of times a data block is accessed within the sliding time window, and calculating the access frequency per unit time as the ratio of the number of accesses to the sliding time window.

[0010] Optionally, the calculation of access time locality in S1 includes obtaining the timestamp sequence of all access events within the sliding event window, calculating the set of adjacent access time differences, calculating the standard deviation of the set of adjacent access time differences, and defining access time locality as the reciprocal of the standard deviation.

[0011] Optionally, the tag mirror queue is a data structure used to record and manage cross-level migration preparation information in advance. Its purpose is to prepare the address and path for the future migration of data blocks without interrupting the current data service. It is like a "migration reservation book" or "pre-migration list", which records information such as which data blocks are about to be migrated, where they are to be migrated, and the addresses that have been reserved.

[0012] Supporting uninterrupted migration, the mirror queue allocates addresses to the target layer before migration begins. Therefore, data blocks can be silently copied to the target layer while services continue at the source layer, achieving "hot migration." Traditional migration operations often require address allocation and path establishment only after migration is triggered, while the mirror queue completes these tasks in advance, allowing the migration process to simply switch access points, significantly reducing latency. The queue records which data blocks' tag values ​​are continuously rising or falling, providing a basis for the system to dynamically adjust layer distribution. These dynamic hot / cold tag values ​​are generated based on access frequency and temporal locality, and are represented as follows:

[0013] H = F·log2(1+L);

[0014] Where H is the dynamic hot and cold tag value, L is the access time locality, reflecting the access frequency and time clustering, F is the access frequency, and log2 represents the logarithmic function, used to suppress the nonlinear amplification of L.

[0015] Optionally, S2 includes setting dual thresholds: setting a first threshold θ1 for allocation to the memory level and setting a second threshold θ2 for allocation to the HDD level, and performing hierarchical allocation.

[0016] When H≥θ2, it is allocated to the memory level;

[0017] When θ2≤H<θ1, it is allocated to the SSD level;

[0018] When H < θ2, it is assigned to the HDD level.

[0019] Optionally, S2 further includes defining a tag value change slope k, which is determined by calculating the change trend of hot and cold tag values ​​of a data block over recent periods. The tag mirroring queue includes:

[0020] For data blocks with continuously increasing H values, physical addresses are pre-allocated at higher levels;

[0021] For data blocks with continuously decreasing H values, physical addresses are pre-allocated at a lower level.

[0022] Optionally, the pre-allocated address includes:

[0023] Allocate contiguous physical space in the free blocks at the target level;

[0024] Write the pre-allocated address into the tag mirror queue metadata and associate it with the identifier of the source-level data block.

[0025] Optionally, S3 specifically includes:

[0026] S31, Incremental Replication Phase:

[0027] While continuing to process read and write requests at the source level, asynchronous replication of data block replicas is initiated;

[0028] The data block is divided into fixed-size migration units and sequentially written to the target level address specified by the tag mirroring queue;

[0029] S32, Write Operation Synchronization: Perform double write operations on write requests that occur during the migration process;

[0030] S33, Atomic Switching: When all migration units have been copied and the redo log is empty, update the global routing table metadata; switch the data block access path to the target level address through atomic operations.

[0031] Optionally, the execution of the double-write operation includes:

[0032] Simultaneously update the source-level data and the corresponding migration units at the target level;

[0033] Double write operations on unmigrated units are recorded in the redo log.

[0034] Optionally, S3 further includes, after a successful switchover, deactivating the service status of the source-level data block and releasing the source-level storage space after a delayed heartbeat period.

[0035] Optionally, the following feedback will be triggered after the access path is switched:

[0036] Global routing table update → new access requests are redirected to the new level;

[0037] Access events at the new level become the input source for calculating S1 hot and cold label values;

[0038] a) Write the new level physical address back to the cold and hot tag database, replacing the original storage location record;

[0039] b) Reset the access statistics window for this data block and clear the historical access event queue;

[0040] c) Adjust the sliding window duration W based on the new layer media type, and then recalculate the H value:

[0041] Memory layer: W = 10s;

[0042] SSD layer: W = 30s;

[0043] HDD layer: W = 90s.

[0044] The beneficial effects of this invention are:

[0045] This invention introduces a dual-dimensional tag generation mechanism that comprehensively considers the access frequency and access time locality of data blocks to dynamically calculate hot and cold tag values. Based on this, a dynamic threshold algorithm based on the global distribution mean and standard deviation is used to manage data blocks in a hierarchical manner. Compared with the traditional static strategy, this mechanism can adaptively adjust the allocation boundary according to changes in system popularity, effectively alleviate memory congestion during peak periods and resource waste during off-peak periods, reduce SSD utilization fluctuations, and improve the overall access hit rate.

[0046] This invention constructs a tag mirroring queue mechanism based on the trend changes of hot and cold tag values, enabling early identification of data block popularity and pre-allocation of physical addresses at the target level. By introducing a tag value slope judgment standard and combining it with continuous rising / falling trends to automatically trigger migration preparation, it avoids latency jitter caused by sudden migration. The pre-allocated address adopts a continuous physical space alignment strategy to reduce fragmentation rate, improve SSD sequential write performance, and enable rapid resource switching during migration operations.

[0047] This invention proposes a non-disruptive migration execution mechanism that supports uninterrupted read and write services during migration. It employs a combination of sharded incremental replication, dual-write synchronization, and atomic switching to achieve smooth data block transitions. Write conflicts are resolved through vector clocks, redo logs ensure compensatory writes for unsynchronized operations, and the RAFT protocol guarantees strong consistency during routing table switching. Ultimately, in a real-world high-concurrency video stream editing scenario, it achieves "zero frame rate drop," resolving issues such as stuttering, frame drops, or data inconsistencies during data hot migration in existing systems. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Fig. 1 This is a schematic diagram of the method flow according to an embodiment of the present invention;

[0050] Fig. 2 This is a schematic diagram of the method execution logic in an embodiment of the present invention. Detailed Implementation

[0051] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. For some well-known technologies, those skilled in the art may also use other alternative methods to implement the invention. Moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.

[0052] like Figs. 1-2 As shown, a distributed multi-level caching and storage method based on hot and cold data tag identification includes the following steps:

[0053] S1, Two-dimensional label generation: Real-time collection of data block access frequency and access time locality to generate dynamic hot and cold label values ​​H, where access time locality is the reciprocal of the standard deviation of the access interval within the current time window;

[0054] S2, Hierarchical collaborative decision-making: Based on the dynamic hot and cold tag value H, data blocks are allocated to memory, SSD or HDD levels, and a cross-level tag mirroring queue is established. The tag mirroring queue records the pre-allocated address of the target level.

[0055] S3, Uninterrupted Migration Execution: When a data block needs to be migrated across levels, while maintaining service at the source level, a copy of the data block is written to the target level address specified by the tag mirror queue. After the writing is completed, the access path is switched atomically.

[0056] S1 specifically includes:

[0057] S11, Access Frequency F Collection: Set a time window W, count the total number of times the target data block is accessed N within the time window, and calculate the access frequency per unit time. Where F is the access frequency, N is the number of accesses within the window, and W is the sliding time window length, which is dynamically set according to the storage level.

[0058] Memory layer W = 10s, SSD layer W = 30s, HDD layer W = 120s.

[0059] S12, Calculation of Temporal Locality of Access L: Obtain the timestamp sequence {t1,t2,…,t} of all access events within the time window W. n}, Calculate the set of time differences between adjacent visits:

[0060] Δ={Δt1=t2-t1, Δt2=t3-t2,…,Δt n-1 =t n -t n-1}; The standard deviation of Δ is calculated using the Welford online iterative algorithm, yielding:

[0061]

[0062] Where Δ is the set of time differences between adjacent visits, σ ​​is the standard deviation, which measures the dispersion of time intervals, q is the number of elements in the set Δ, and ε is a division-to-zero constant, set to 10. -6 Seconds, ensure σ Δ When L = 0, it is meaningful. L represents the locality of access time. The larger the value, the stronger the time concentration (i.e., dense local access).

[0063] S13, Dynamic hot and cold tag value H generation: Generate dynamic hot and cold tag values ​​based on access frequency and temporal locality.

[0064] H = F·log2(1+L);

[0065] Where H is the dynamic hot and cold tag value, which comprehensively reflects the frequency of access and the degree of time clustering, and log2 represents the logarithmic function with base 2, which is used to suppress the nonlinear amplification of L and avoid extreme fluctuations that cause tag jumps.

[0066] S2 specifically includes:

[0067] S21, Dynamic Hierarchical Allocation: Based on the magnitude of the label value H and its distribution within the system, a dynamic threshold is set: θ1=μ+2σ H θ2=μ-σ H ;

[0068] Where μ represents the mean value of H for all data blocks in the current system, and σ H θ1 represents the standard deviation of all H values ​​in the current system, θ2 represents the lower threshold (first threshold) for allocation to the memory level, and θ2 represents the upper threshold (second threshold) for allocation to the HDD level.

[0069] The data block allocation strategy is implemented based on the above thresholds:

[0070]

[0071] The mean and standard deviation of the label values ​​H of all current data blocks can be used to dynamically characterize the distribution of the hot and cold states of the entire system, where μ represents the current overall "average heat level" and σ represents the mean and standard deviation of the label values ​​H of all current data blocks. H Indicates the degree of difference between hot and cold (the greater the fluctuation range, the higher the σ). H The larger (the larger).

[0072] Distinguish clearly between "hot," "warm," and "cold" data:

[0073] H≥μ+2σ H The data block with a significantly higher heat level than the average is considered an extremely hot data block and should be placed in the memory with the fastest response time.

[0074] H<μ-σ H The data block is significantly lower than the average heat level and is considered an extremely cold data block. It should be placed in the lowest-cost HDD.

[0075] μ-σ H ≤H<μ+2σ H Data blocks in the middle fluctuation range are classified as warm data blocks and placed in an SSD to balance cost and performance.

[0076] System load and access patterns fluctuate significantly over time, and fixed thresholds can easily lead to: memory overflow or cold data being mistakenly left in the high-speed layer during peak periods, idle resources during off-peak periods, and excessive migration; dynamic threshold mechanisms can adapt to the system status in real time, improving the robustness of the strategy.

[0077] S22, Tag image queue generation:

[0078] Tag mirror queue is a data structure used to record and manage cross-level migration preparation information in advance. Its purpose is to prepare the address and path for the future migration of data blocks without interrupting the current data service. It is like a "migration reservation book" or "pre-migration list", which records which data blocks are about to be migrated, where they are to be migrated, and the addresses that have been reserved.

[0079] Supporting uninterrupted migration, the mirror queue allocates addresses to the target layer before migration begins. Therefore, data blocks can be silently copied to the target layer while services continue at the source layer, achieving "hot migration." Traditional migration operations often require address allocation and path establishment only after migration is triggered, while the mirror queue completes these tasks in advance, allowing the migration process to simply switch access points, significantly reducing latency. The queue records which data blocks' tag values ​​are continuously increasing or decreasing in temperature, providing a basis for the system to dynamically adjust layer distribution.

[0080] Queue content example (structure):

[0081] Each tag image queue record contains:

[0082] Data block identifier (source location, such as the xth segment and yth block of an SSD);

[0083] Pre-migration target address (the specific location of the target memory level or HDD);

[0084] Migration status (e.g., "pre-allocated", "completed", "invalid").

[0085] The tag mirroring queue generation process is as follows: When the hot and cold tag values ​​H of a data block show a continuous fluctuation trend, physical space is pre-allocated at the target level to trigger the generation of the tag mirroring queue.

[0086] Define the slope of the label value change as: Among them, H t H is the H value for the current period. t-3 The value of H is the value before the first three cycles, and k is the average growth or decline rate.

[0087] The judgment criteria are as follows:

[0088]

[0089] Calculating the trend (i.e., "slope") of tag values ​​over multiple consecutive periods is to capture the continuous changes in data block popularity, rather than occasional fluctuations. If the popularity value of a data block continues to rise, it may soon reach the migration threshold and need to be moved to faster storage in advance; if it continues to fall, it may be quickly downgraded and moved to slower and cheaper storage. By observing the trend over multiple periods rather than a single value, misjudgments can be reduced, and migration "jitter" can be avoided. The tag mirror queue pre-allocates target-level addresses, reserving space for data blocks in advance when the trend is obvious, avoiding delays caused by requesting addresses when actually migrating. It supports uninterrupted migration; when the data block truly meets the migration conditions, the address switching path recorded in the queue can be used directly to achieve a smooth transition. The "slope trend judgment + mirror queue recording" method enables early identification of data hot and cold changes and pre-allocation of resources, which is a key foundation for achieving efficient, seamless, and multi-level data management.

[0090] S23, Pre-allocated address management, manages the target-level addresses for the data blocks to be migrated:

[0091] Reserve space in the free contiguous blocks at the target level:

[0092] Memory layer: aligned to 4KB;

[0093] SSD layer: aligned to 1MB;

[0094] HDD layer: Aligned to 4MB.

[0095] Write the pre-allocated address into the tag mirror queue as key-value pairs:

[0096] Mapping format: <source level identifier, target level address>;

[0097] This queue storage structure is lightweight, with each mapping entry occupying only 16 bytes, effectively supporting efficient indexing and migration path switching under millions of data blocks.

[0098] S3 specifically includes:

[0099] S31, Incremental Replication Phase: While continuously providing read and write services at the source level, an asynchronous replica replication process is initiated, dividing the target data block into fixed-size migration units, denoted as: U = {u1, u2, ..., u...} c}; • Each migration unit u i Sequentially write to the target address range pre-allocated by the tag mirroring queue; where, u i Let be the i-th migration unit. The unit size depends on the migration path: 128KB for the memory layer and 1MB for the SSD / HDD layer. c is the number of units that need to be migrated in the data block, which is equal to the total size of the data block divided by the size of each migration unit.

[0100] S32, Write Operation Synchronization: During migration, if a migration unit is being written to, a double write operation is performed.

[0101] S321, Simultaneously write the user's write request:

[0102] Source level original position;

[0103] The corresponding migration unit address in the target level.

[0104] S322, If the write request is applied to a cell that has not yet been migrated, the operation is written to the redo log:

[0105] Where RedoLog represents the set of redo logs, u j This indicates a migration unit that has not yet been copied; op represents the write operation content; t represents the operation timestamp; U copied This represents the set of cells that have been copied.

[0106] S33, Atomization Switching:

[0107] When both of the following conditions are met:

[0108] Condition 1: All migration units have been copied.

[0109] Condition 1: The redo log is empty (all delayed writes have been synchronized);

[0110] Then, an atomic switch operation is performed to update the global routing table:

[0111] Global Route[B id `TargetLayerAddress` indicates that the access path of the data block is updated in the system to the new target layer address. Global Route is a global routing table that stores the current location of each data block; Bid is the unique identifier of the data block (Block ID); TargetLayerAddress is the pre-allocated physical address of the data block in the target storage layer. The expression means: update the access path of the data block Bid to its new address, that is, "switch access path". This update operation is performed based on the consensus protocol (RAFT), ensuring that more than half of the nodes confirm consistency.

[0112] S34, resource cleanup, after successful switch:

[0113] The source-level data block is marked as read-only;

[0114] Delay the release of its physical space, with a release time of:

[0115] T release =T switch +3·T heartbeat Among them, T switch To switch completion time, T heartbeat This indicates the current heartbeat cycle of the system, which is 200ms by default and is dynamically adjusted based on network conditions.

[0116] A heartbeat cycle refers to the periodic interval at which nodes or components in a distributed system send status signals, or "heartbeats," to each other. It's used to check if nodes are online, determine if communication is normal, and coordinate resource status or task execution. In non-disruptive migration schemes, the heartbeat cycle controls when resources are released. For example, after a data block is successfully migrated from SSD to memory, the copy on the SSD is not immediately deleted. Instead, three heartbeat cycles are waited to confirm system stability and the absence of network jitter or anomalies before resources are safely released.

[0117] The following feedback is triggered after the access path is switched:

[0118] Global routing table update → new access requests are redirected to the new level;

[0119] Access events at the new level become the input source for calculating S1 hot and cold label values;

[0120] a) Write the new level physical address back to the cold and hot tag database, replacing the original storage location record;

[0121] b) Reset the access statistics window for this data block and clear the historical access event queue;

[0122] c) Adjust the sliding window duration W based on the new layer media type, and then recalculate the H value:

[0123] Memory layer: W = 10s;

[0124] SSD layer: W = 30s;

[0125] HDD layer: W = 90s.

[0126] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.

[0127] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A distributed multi-level caching and storage method based on hot and cold data tag identification, characterized in that, Includes the following steps: S1, Two-dimensional label generation: Real-time acquisition of data block access frequency and access time locality to generate dynamic hot and cold label values. The access temporal locality is the reciprocal of the standard deviation of the access interval within the current time window; S2, Hierarchical Collaborative Decision-Making: Based on dynamic hot and cold label values Data blocks are allocated to memory, SSD, or HDD levels, and a cross-level tag mirroring queue is established, which records the pre-allocated address of the target level. S2 also includes defining the slope of the label value change. slope of label value change The tag mirroring queue is determined by calculating the changing trends of hot and cold tag values ​​of a data block over recent periods. The queue includes: right Data blocks with continuously increasing values ​​are pre-allocated physical addresses at higher levels; right Data blocks with continuously decreasing values ​​are pre-allocated physical addresses at lower levels; S3, Uninterrupted migration execution: When a data block needs to be migrated across levels, while maintaining service at the source level, a copy of the data block is written to the target level address specified by the tag mirror queue. After the writing is completed, the access path is switched atomically. S3 specifically includes: S31, Incremental Replication Phase: While continuing to process read and write requests at the source level, asynchronous replication of data block replicas is initiated; The data block is divided into fixed-size migration units and sequentially written to the target level address specified by the tag mirroring queue; S32, Write Operation Synchronization: Perform double write operations on write requests that occur during the migration process; S33, Atomic Switching: When all migration units have been copied and the redo log is empty, update the global routing table metadata; switch the data block access path to the target level address through atomic operations.

2. The distributed multi-level caching and storage method based on cold and hot data tag identification according to claim 1, characterized in that, The acquisition of access frequency in S1 includes setting a sliding time window, counting the number of times a data block is accessed within the sliding time window, and calculating the access frequency per unit time as the ratio of the number of accesses to the sliding time window.

3. The distributed multi-level caching and storage method based on cold and hot data tag identification according to claim 2, characterized in that, The calculation of access time locality in S1 includes obtaining the timestamp sequence of all access events within the sliding event window, calculating the set of adjacent access time differences, calculating the standard deviation of the set of adjacent access time differences, and defining access time locality as the reciprocal of the standard deviation.

4. The distributed multi-level caching and storage method based on cold and hot data tag identification according to claim 3, characterized in that, The dynamic hot and cold tag values ​​are generated based on access frequency and temporal locality, and are represented as follows: ; in, For dynamic hot and cold label values, This represents access time locality, reflecting the frequency and temporal clustering of accesses. A higher value indicates stronger temporal concentration. ; It is the standard deviation of the set of differences between adjacent visits, measuring the dispersion of time intervals. To prevent division by zero constant, This indicates temporal locality of access. For access frequency, and ; This refers to the number of times the item is accessed within the window. The sliding time window length is dynamically set based on the storage hierarchy: memory layer SSD layer HDD layer , Represents the logarithmic function, used for suppression Nonlinear amplification.

5. A distributed multi-level caching and storage method based on cold and hot data tag identification according to claim 1, characterized in that, S2 includes dual threshold settings, setting a first threshold for allocation to the memory level. And setting a second threshold for allocation to the HDD level. To perform hierarchical allocation: when When needed, it is allocated to the memory hierarchy; when When needed, it is allocated to the SSD tier; when At that time, it is allocated to the HDD level.

6. The distributed multi-level caching and storage method based on cold and hot data tag identification according to claim 1, characterized in that, The pre-allocated address includes: Allocate contiguous physical space in the free blocks at the target level; Write the pre-allocated address into the tag mirror queue metadata and associate it with the identifier of the source-level data block.

7. A distributed multi-level caching and storage method based on cold and hot data tag identification according to claim 1, characterized in that, The execution of the double-write operation includes: Simultaneously update the source-level data and the corresponding migration units at the target level; Double write operations on unmigrated units are recorded in the redo log.

8. The distributed multi-level caching and storage method based on cold and hot data tag identification according to claim 1, characterized in that, S3 also includes, after a successful switchover, removing the service status of the source-level data block and releasing the source-level storage space after a delayed heartbeat period.