Cold and hot data distribution method and device, equipment and storage medium
By identifying the data storage intervals where the storage space overlaps in multiple versions of metadata, and separating hot and cold based on the number of overlaps and writing time, the problem of large resource overhead of data separation in the prior art is solved, and efficient data separation is achieved.
Patent Information
- Application Number
- CN202510205273.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-05-30
AI Technical Summary
The algorithms and processes for realizing the hot and cold separation function of data in the prior art are complex, resulting in high consumption of resources such as CPU and memory, which increases the system burden.
By identifying the target storage intervals where storage space overlaps in the multi-version metadata corresponding to the target data set, the number of overlaps and writing time of each interval are obtained, and the data is separated based on this information.
Without adding additional resource overhead, the separation of hot and cold during data relocation will reduce the resource overhead of hot and cold separation of data and reduce the system burden.
Smart Images

Figure CN120066416A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data storage, and in particular, to a method, apparatus, device, and storage medium for cold and hot data diversion. Background Art
[0002] Data cold and hot separation is a data management strategy aimed at classifying data into "hot data" and "cold data" according to the access frequency and business importance of the data, and storing them on different storage media respectively. Hot data refers to data that is frequently accessed or modified, and is usually stored on high-performance storage devices; while cold data refers to data that is not frequently accessed or does not change frequently, and is usually stored on low-cost storage devices.
[0003] In a distributed storage system, in order to improve data processing performance, data is usually first written into a cache pool and then relocated from the cache pool to a data pool as needed. The cache pool can be understood as a data cache space in memory, which is used to cache frequently accessed data pages to improve query performance and reduce disk I / O operations. The data pool usually refers to the physical or logical storage space for storing data, such as a disk.
[0004] Currently, when relocating data, data can be first separated into cold and hot data, and then relocated to the corresponding hot data pool or cold data pool. However, the algorithms and processes for implementing the data cold and hot separation function in the current technology are relatively complex, resulting in more consumption of resources such as CPU and memory, a large resource overhead, and an increased system burden. Summary of the Invention
[0005] In order to solve the above technical problems, the present disclosure provides a method, apparatus, device, and storage medium for cold and hot data diversion.
[0006] The first aspect of the present disclosure provides a method for cold and hot data diversion, including:
[0007] Identifying target storage intervals with overlapping storage spaces among multiple data storage intervals included in the multi-version metadata corresponding to the target data set;
[0008] For each target storage interval, obtaining the overlapping times of the target storage interval and obtaining the write duration of the target data within the target storage interval;
[0009] For each target storage interval, based on the overlapping times of the target storage interval and the write duration of the target data within the target storage interval, separating the target data within the target storage interval into cold and hot data.
[0010] The second aspect of the present disclosure provides a cold and hot data diversion apparatus, including:
[0011] An identification module, configured to identify a target storage range with overlapping storage spaces among multiple data storage ranges included in the multi-version metadata corresponding to the target data set;
[0012] A first acquisition module, configured to, for each target storage range, acquire the overlapping times of the target storage range and acquire the writing duration of the target data within the target storage range;
[0013] A separation module, configured to, for each target storage range, perform cold and hot separation on the target data within the target storage range based on the overlapping times of the target storage range and the writing duration of the target data within the target storage range.
[0014] A third aspect of the present disclosure provides a computer device, including a memory and a processor. Among them, a computer program is stored in the memory. When the computer program is executed by the processor, the cold and hot data shunting method in the first aspect above can be implemented.
[0015] A fourth aspect of the present disclosure provides a computer-readable storage medium. A computer program is stored in the storage medium. When the computer program is executed by the processor, the cold and hot data shunting method in the first aspect above can be implemented.
[0016] The technical solution provided by the present disclosure has the following advantages compared with the prior art:
[0017] The present disclosure identifies a target storage range with overlapping storage spaces among multiple data storage ranges included in the multi-version metadata corresponding to the target data set; for each target storage range, acquires the overlapping times of the target storage range and acquires the writing duration of the target data within the target storage range; for each target storage range, performs cold and hot separation on the target data within the target storage range based on the overlapping times of the target storage range and the writing duration of the target data within the target storage range. The present disclosure directly utilizes the characteristics of the existing multi-version metadata of the data to determine the overlapping times of the data storage range and the writing duration of the data, and then comprehensively performs cold and hot separation on the data according to the overlapping times of the storage range and the writing duration of the data. It can achieve cold and hot separation during data relocation without increasing additional resource overhead, greatly reducing the resource overhead of data cold and hot separation and reducing the system burden. Description of the Drawings
[0018] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0019] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0020] Figure 1 is a flowchart of a hot and cold data diversion method provided by an embodiment of the present disclosure;
[0021] Figure 2 is a flowchart of another hot and cold data diversion method provided by an embodiment of the present disclosure;
[0022] Figure 3 is a flowchart of yet another hot and cold data diversion method provided by an embodiment of the present disclosure;
[0023] Figure 4 is a schematic structural diagram of a hot and cold data diversion device provided by an embodiment of the present disclosure;
[0024] Figure 5 is a schematic structural diagram of a computer device provided by an embodiment of the present disclosure. Detailed implementation manners
[0025] In order to more clearly understand the above-mentioned objects, features and advantages of the present disclosure, the following will further describe the solutions of the present disclosure. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
[0026] In the following description, many specific details are set forth to facilitate a thorough understanding of the present disclosure, but the present disclosure can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all of the embodiments.
[0027] It should be understood that the steps recorded in the method embodiments of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0028] It should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0029] It should be noted that the modifiers "a" and "multiple" mentioned in this disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless expressly stated otherwise in the context, it should be construed as "one or more".
[0030] The hot and cold data diversion method provided by an embodiment of the present disclosure can be executed by a computer device, which can be understood as any device with processing and computing capabilities. The device may include, but is not limited to, mobile terminals such as smart phones, laptop computers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable devices, etc., and fixed electronic devices such as digital TVs, desktop computers, and smart home devices.
[0031] To better understand the inventive concept of the embodiment of the present disclosure, the technical solutions of the embodiment of the present disclosure will be described below in conjunction with exemplary embodiments.
[0032] Figure 1 is a flowchart of a hot and cold data diversion method provided by an embodiment of the present disclosure, which can be executed by a computer device, as Figure 1 shown, the hot and cold data diversion method provided in this embodiment includes the following steps:
[0033] Step 110: Identify a target storage interval with overlapping storage spaces among multiple data storage intervals included in the multi-version metadata corresponding to the target data set.
[0034] In the embodiment of the present disclosure, the target data set can be understood as a set of multiple data.
[0035] Metadata, also known as intermediate data or relay data, is data about data. It mainly describes information about the properties of data and is used to support functions such as indicating storage locations, historical data, resource searches, and file records.
[0036] Each data in the target data set has corresponding multi-version metadata. Multi-version metadata refers to multiple versions of metadata.
[0037] The multi-version metadata corresponding to the target data set can be understood as multiple versions of metadata corresponding to the target data set. This approach allows users to view or use different versions of metadata at different time points, thus better managing and analyzing data.
[0038] Multi-version metadata can be understood as metadata generated based on the Multi-Version Concurrency Control (MVCC) mechanism. The core idea of the multi-version mechanism is to create a new data version for each modification operation instead of directly modifying the original data. In this way, each transaction can operate on its own data version, thus achieving concurrent reading and writing without interfering with each other. When a transaction is committed, the new version of the data will replace the old version, thus ensuring data consistency. The multi-version mechanism is a concurrency control mechanism. By saving multiple versions of metadata, the multi-version mechanism enables different transactions to access their respective data snapshot versions, thus avoiding direct data conflicts and lock contention and improving the concurrency performance and throughput of the system.
[0039] In the embodiments of the present disclosure, one version of the metadata includes a data storage range, and this data storage range is used to store the original data described by the metadata. The multi-version metadata contains multiple data storage ranges.
[0040] Among the data storage ranges included in the multi-version metadata corresponding to the target data set, the computer device can identify target storage ranges with overlapping storage spaces, and the target storage ranges are the overlapping ranges. For example, the target data set can be stored in a cache pool. The target storage range can be one or multiple.
[0041] In some embodiments, the computer device can identify target storage ranges with overlapping storage spaces in the data storage ranges included in the multi-version metadata corresponding to the target data set at every preset time period.
[0042] The preset time period can be set as needed and is not limited here.
[0043] Step 120: For each target storage range, obtain the overlapping times of the target storage range and obtain the writing duration of the target data within the target storage range.
[0044] In the embodiments of the present disclosure, for each target storage interval, the computer device may obtain the overlapping times of the target storage interval and the writing duration of the target data within the target storage interval.
[0045] The writing duration of the target data within the target storage interval can be understood as the duration for writing the target data into the target storage interval.
[0046] In some embodiments, for each target storage interval, the computer device may obtain the number of metadata versions to which the target storage interval belongs; and determine the number of metadata versions to which the target storage interval belongs as the overlapping times of the target storage interval.
[0047] For example, when the number of metadata versions to which target storage interval A belongs is 3, the overlapping times of target storage interval A is 3 times.
[0048] In some embodiments, for each target storage interval, the computer device may obtain the writing time of the target data within the target storage interval; and determine the time difference between the writing time and the current time as the writing duration of the target data.
[0049] Step 130: For each of the target storage intervals, based on the overlapping times of the target storage interval and the writing duration of the target data within the target storage interval, perform hot-cold separation on the target data within the target storage interval.
[0050] In the embodiments of the present disclosure, for each target storage interval, the computer device may perform hot-cold separation on the target data within the target storage interval based on the overlapping times of the target storage interval and the writing duration of the target data within the target storage interval, that is, determine whether the target data belongs to hot data or cold data, and move the target data from the cache pool to the hot data pool corresponding to the hot data or the cold data pool corresponding to the cold data.
[0051] Hot data can be understood as data that is frequently accessed or modified, and is usually stored on high-performance storage devices.
[0052] Cold data can be understood as data that is not frequently accessed or does not frequently change, and is usually stored on low-cost storage devices.
[0053] Thus, the characteristics of the existing multi-version metadata of the data can be directly utilized to determine the overlapping times of the data storage interval and the writing duration of the data, and then the data is comprehensively subjected to hot-cold separation according to the overlapping times of the storage interval and the writing duration of the data, so that hot-cold separation during data relocation can be achieved without increasing additional resource overhead, greatly reducing the resource overhead of data hot-cold separation and reducing the system burden.
[0054] Figure 2 This is a flowchart of a hot and cold data shunting method provided by an embodiment of the present disclosure. This method can be executed by a computer device, such as Figure 2 As shown, the hot and cold data shunting method provided in this embodiment includes the following steps:
[0055] Step 210: Identify target storage intervals with overlapping storage spaces among multiple data storage intervals included in the multi-version metadata corresponding to the target data set.
[0056] Step 220: For each target storage interval, obtain the overlapping times of the target storage interval and obtain the write duration of the target data within the target storage interval.
[0057] Step 230: For each target storage interval, based on the overlapping times of the target storage interval and the write duration of the target data within the target storage interval, determine whether the target data within the target storage interval is hot data or cold data.
[0058] In an embodiment of the present disclosure, for each target storage interval, the computer device can determine whether the target data within the target storage interval is hot data or cold data based on the overlapping times of the target storage interval and the write duration of the target data within the target storage interval.
[0059] Step 240: When the target data is hot data, migrate the target data to a preset hot data pool.
[0060] In an embodiment of the present disclosure, the preset hot data pool can be understood as a data pool that is pre-set for storing hot data.
[0061] When the target data within the target storage interval is hot data, it indicates that the target data in this target storage interval is frequently accessed or modified. Then, the computer device can migrate the target data to the preset hot data pool. For example, the target data can be migrated from the cache pool to the preset hot data pool.
[0062] Step 250: When the target data is cold data, migrate the target data to a preset cold data pool.
[0063] In an embodiment of the present disclosure, the preset cold data pool can be understood as a data pool that is pre-set for storing cold data.
[0064] When the target data within the target storage interval is cold data, it indicates that the target data within this target storage interval is not frequently accessed or does not change frequently. Then, the computer device can migrate the target data to the preset cold data pool. For example, the target data can be migrated from the cache pool to the preset cold data pool.
[0065] Step 260: When the target data is neither hot data nor cold data, no processing is performed on the target data.
[0066] In the embodiments of the present disclosure, when the target data in the target storage range is neither hot data nor cold data, the computer device may not process the target data. That is to say, the target data is still stored in the original storage device (such as the cache pool).
[0067] Thus, the characteristics of the existing multi-version metadata of the data can be directly utilized to determine the overlapping times of the data storage ranges and the writing duration of the data, and then the hot and cold separation of the data can be comprehensively performed according to the overlapping times of the storage ranges and the writing duration of the data. The hot and cold separation during data relocation can be achieved without increasing additional resource overhead, greatly reducing the resource overhead of data hot and cold separation and reducing the system burden.
[0068] Figure 3 is a flowchart of a hot and cold data diversion method provided by an embodiment of the present disclosure. This method can be executed by a computer device, such as Figure 3 As shown, the hot and cold data diversion method provided in this embodiment includes the following steps:
[0069] Step 310: In the multiple data storage ranges included in the multi-version metadata corresponding to the target data set, identify the target storage range with overlapping storage spaces.
[0070] Step 320: For each target storage range, obtain the overlapping times of the target storage range and obtain the writing duration of the target data in the target storage range.
[0071] Step 330: When the overlapping times of the target storage range are greater than or equal to the preset times threshold, determine that the target data in the target storage range is hot data.
[0072] In the embodiments of the present disclosure, the preset times threshold can be set as needed, for example, 3 times, which is not limited here.
[0073] When the overlapping times of the target storage range are greater than or equal to the preset times threshold, it indicates that the data in the target storage range is frequently accessed or modified. Then the computer device can determine that the target data in the target storage range is hot data.
[0074] Step 340: When the overlapping times of the target storage range are less than the preset times threshold and the writing duration of the target data in the target storage range is greater than or equal to the preset duration threshold, determine that the target data is cold data.
[0075] In the embodiments of the present disclosure, the preset duration threshold can be set as needed, for example, one day, which is not limited here.
[0076] When the number of overlaps of the target storage interval is less than the preset number threshold and the write duration of the target data in the target storage interval is greater than or equal to the preset duration threshold, it indicates that the target data in the target storage interval is not frequently accessed or will not change frequently. Then the computer device can determine that the target data in the target storage interval is cold data.
[0077] Step 350, when the number of overlaps of the target storage interval is less than the preset number threshold and the write duration of the target data in the target storage interval is less than the preset duration threshold, determine that the target data is neither hot data nor cold data.
[0078] In the embodiments of the present disclosure, when the number of overlaps of the target storage interval is less than the preset number threshold and the write duration of the target data in the target storage interval is less than the preset duration threshold, it indicates that the target data in the target storage interval has just been written and is not frequently accessed or will not change frequently. Then the computer device can determine that the target data does not belong to hot data and cold data.
[0079] Step 360, when the target data is hot data, migrate the target data to the preset hot data pool.
[0080] Step 370, when the target data is cold data, migrate the target data to the preset cold data pool.
[0081] Step 380, when the target data is neither hot data nor cold data, do not process the target data.
[0082] Thus, the characteristics of the existing multi-version metadata of the data can be directly utilized to determine the number of overlaps of the data storage interval and the write duration of the data, and then the data is separated into hot and cold according to the comprehensive number of overlaps of the storage interval and the write duration of the data. The separation of hot and cold during data relocation can be achieved without increasing additional resource overhead, greatly reducing the resource overhead of data hot and cold separation and reducing the system burden.
[0083] In some embodiments of the present disclosure, after the above-mentioned hot and cold separation of the target data in the target storage interval, the computer device can, in response to the completion of the hot and cold separation of the target data, obtain the actual storage interval of the target data; update the current storage interval in the metadata of the target data to the actual storage interval.
[0084] Thus, the metadata of the data can be updated in a timely manner after the data migration is completed.
[0085] Figure 4 It is a schematic structural diagram of a hot and cold data shunting device provided by an embodiment of the present disclosure. This device can be understood as the above-mentioned computer device or some functional modules in the above-mentioned computer device. As Figure 4 shown, the hot and cold data shunting device 400 includes:
[0086] An identification module 410, configured to identify a target storage interval with overlapping storage spaces among multiple data storage intervals included in multi-version metadata corresponding to a target data set;
[0087] A first acquisition module 420, configured to, for each of the target storage intervals, acquire the overlapping times of the target storage interval and acquire the write duration of target data within the target storage interval;
[0088] A separation module 430, configured to, for each of the target storage intervals, perform hot and cold separation on the target data within the target storage interval based on the overlapping times of the target storage interval and the write duration of the target data within the target storage interval.
[0089] Optionally, the above-mentioned first acquisition module includes:
[0090] A first acquisition sub-module, configured to acquire the number of metadata versions to which the target storage interval belongs;
[0091] A first determination sub-module, configured to determine the number of metadata versions to which the target storage interval belongs as the overlapping times of the target storage interval.
[0092] Optionally, the above-mentioned first acquisition module includes:
[0093] A second acquisition sub-module, configured to acquire the write time of the target data within the target storage interval;
[0094] A second determination sub-module, configured to determine the time difference between the write time and the current time as the write duration of the target data.
[0095] Optionally, the above-mentioned separation module includes:
[0096] A judgment sub-module, configured to judge whether the target data within the target storage interval is hot data or cold data based on the overlapping times of the target storage interval and the write duration of the target data within the target storage interval;
[0097] A first migration sub-module, configured to, when the target data is hot data, migrate the target data to a preset hot data pool;
[0098] A second migration sub-module, configured to, when the target data is cold data, migrate the target data to a preset cold data pool;
[0099] A processing sub-module, configured to, when the target data is neither hot data nor cold data, not process the target data.
[0100] Optionally, the above-mentioned judgment sub-module includes:
[0101] A first determination unit, configured to determine the target data as hot data when the overlap count of the target storage interval is greater than or equal to a preset count threshold.
[0102] A second determination unit, configured to determine the target data as cold data when the overlap count of the target storage interval is less than the preset count threshold and the write duration of the target data in the target storage interval is greater than or equal to a preset duration threshold.
[0103] A third determination unit, configured to determine that the target data is neither hot data nor cold data when the overlap count of the target storage interval is less than the preset count threshold and the write duration of the target data in the target storage interval is less than the preset duration threshold.
[0104] Optionally, the hot and cold data shunting device includes:
[0105] A second acquisition module, configured to acquire the actual storage interval of the target data in response to completion of hot and cold separation of the target data.
[0106] An update module, configured to update the current storage interval in the metadata of the target data to the actual storage interval.
[0107] Optionally, the recognition module includes:
[0108] A recognition sub-module, configured to identify a target storage interval with overlapping storage spaces in the data storage intervals included in the multi-version metadata corresponding to the target data set at every preset duration.
[0109] The hot and cold data shunting device provided by the embodiments of the present disclosure can implement the method of any of the above embodiments, and its execution manner and beneficial effects are similar, which will not be elaborated here.
[0110] The embodiments of the present disclosure further provide a computer device, which includes a processor and a memory. Among them, a computer program is stored in the memory, and when the computer program is executed by the processor, the method of any of the above embodiments can be implemented, and its execution manner and beneficial effects are similar, which will not be elaborated here.
[0111] Figure 5 is a schematic structural diagram of a computer device provided by the embodiments of the present disclosure. As Figure 5 shown, the computer device 500 may include a processor 510 and a memory 520. Among them, a computer program 521 is stored in the memory 520, and when the computer program 521 is executed by the processor 510, the method provided by any of the above embodiments can be implemented, and its execution manner and beneficial effects are similar, which will not be elaborated here.
[0112] Of course, for simplicity,Figure 5 Only some of the components related to the present invention in the computer device 500 are shown, and components such as buses, input / output interfaces, input devices, and output devices are omitted. In addition, according to specific application scenarios, the computer device 500 may further include any other appropriate components.
[0113] Embodiments of the present disclosure provide a computer-readable storage medium storing a computer program, which when executed by a processor, can implement the methods of any of the above embodiments. Their execution manners and beneficial effects are similar and will not be elaborated here.
[0114] The above computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0115] The above computer program may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer device, partially on the user device, executed as an independent software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device or server.
[0116] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.
[0117] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the foregoing description, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various features that are described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0118] The foregoing is only a specific implementation manner of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but rather should be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for separating cold and hot data, characterized in that: include: Among the multiple data storage intervals included in the multi-version metadata corresponding to the target data set, identifying a target storage interval with overlapping storage space; For each of the target storage intervals, obtaining the number of overlaps of the target storage intervals and obtaining the writing duration of the target data in the target storage interval; For each of the target storage intervals, based on the number of overlaps of the target storage intervals and the writing duration of the target data in the target storage intervals, the target data in the target storage intervals are separated into cold and hot parts.
2. The method according to claim 1, characterized in that The obtaining the number of overlaps of the target storage interval includes: Obtaining the number of metadata versions to which the target storage interval belongs; The number of metadata versions to which the target storage interval belongs is determined as the number of overlaps of the target storage interval.
3. The method according to claim 1, characterized in that The obtaining the writing duration of the target data in the target storage interval includes: Obtaining the writing time of the target data in the target storage interval; The time difference between the write time and the current time is determined as the write duration of the target data.
4. The method according to claim 1, characterized in that The step of performing cold and hot separation on the target data in the target storage interval based on the number of overlaps of the target storage interval and the writing duration of the target data in the target storage interval includes: Based on the number of overlaps of the target storage intervals and the writing duration of the target data in the target storage intervals, determining whether the target data in the target storage intervals is hot data or cold data; When the target data is hot data, the target data is migrated to a preset hot data pool; When the target data is cold data, migrating the target data into a preset cold data pool; When the target data is neither hot data nor cold data, the target data is not processed.
5. The method according to claim 4, characterized in that The determining whether the target data in the target storage interval is hot data or cold data based on the number of overlaps of the target storage interval and the writing duration of the target data in the target storage interval includes: When the number of overlaps of the target storage intervals is greater than or equal to a preset number threshold, determining that the target data is hot data; When the number of overlaps of the target storage interval is less than a preset number threshold and the writing time of the target data in the target storage interval is greater than or equal to a preset time threshold, determining that the target data is cold data; When the number of overlaps of the target storage interval is less than a preset number threshold and the writing duration of the target data in the target storage interval is less than a preset duration threshold, it is determined that the target data is neither hot data nor cold data.
6. The method according to claim 1, characterized in that After the target data in the target storage interval is separated into hot and cold data, the method further includes: In response to completion of the hot and cold separation of the target data, obtaining an actual storage interval of the target data; The current storage interval in the metadata of the target data is updated to the actual storage interval.
7. The method according to claim 1, characterized in that The step of identifying a target storage interval having overlapping storage space among a plurality of data storage intervals included in the multi-version metadata corresponding to the target data set includes: At preset time intervals, a target storage interval with overlapping storage space is identified in the data storage intervals included in the multi-version metadata corresponding to the target data set.
8. A cold and hot data diversion device, characterized in that: include: An identification module, used for identifying a target storage interval with overlapping storage space among multiple data storage intervals included in the multi-version metadata corresponding to the target data set; A first acquisition module, configured to acquire, for each target storage interval, the number of overlaps of the target storage intervals and the writing duration of the target data in the target storage interval; The separation module is used to separate the target data in each target storage interval into cold and hot ones based on the number of overlaps of the target storage intervals and the writing duration of the target data in the target storage intervals.
9. A computer device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the hot and cold data separation method as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the hot and cold data separation method according to any one of claims 1 to 7 is implemented.