The invention relates to the technical field of data storage, in particular to a distributed multi-level caching and storage method based on cold and hot data
label identification, which comprises the following steps of: acquiring
access frequency and
access time locality of data blocks in real time, generating dynamic cold and hot
label values, and storing the dynamic cold and hot
label values into a
database; wherein the
access time locality is a standard deviation reciprocal of an access interval in the
current time window; the data blocks are distributed to different storage hierarchies according to the dynamic cold and hot label values H, meanwhile, a cross-hierarchy label
mirror image queue is established, and the label
mirror image queue records a pre-distributed address of a target hierarchy; and in a
source level keeping service state, writing the data block copy into a
target level address specified by the label
mirror image queue, and switching an access path in an atomized manner after writing is completed. According to the method,
delay jitter caused by burst migration is avoided, a continuous
physical space alignment strategy is adopted for the pre-allocated address, the fragment rate is reduced, the SSD sequential write-in performance is improved, migration operation is achieved, and resource switching is rapidly completed.