Data classified storage method and device, computer equipment, readable storage medium and program product

By predicting future access patterns and implementing dynamic heat management, the problem of mismatch between hot data storage units and access demands in complex environments is solved by the traditional LFU algorithm, achieving efficient data processing and storage resource optimization.

CN121560239APending Publication Date: 2026-02-24CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511760214.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Traditional LFU algorithms cannot effectively match hot data storage units with actual access needs in complex business environments, resulting in a low hot data hit rate. The system has to frequently retrieve data from high-latency storage units, reducing data processing efficiency.

Method used

By predicting future access patterns, dynamically evaluating and correcting heat values, the system enables proactive preloading of data to be accessed and capacity management of hot data storage units. This includes obtaining data block information to predict access times, correcting heat values, and adjusting hot data storage strategies in a timely manner.

Benefits of technology

It significantly improves the hit rate of hot data, reduces the frequency of data retrieval from high-latency storage units, and improves data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560239A_ABST
    Figure CN121560239A_ABST
Patent Text Reader

Abstract

The invention relates to a data classified storage method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: predicting a first target data block accessed in a preset future time period and an access moment prediction value of the first target data block according to data block information of an accessed data block in a current time period; under the condition that the first target data block is stored in the hot data storage unit, determining a correction factor according to the access moment predicted value, and correcting an initial heat value of the first target data block based on the correction factor to obtain a target heat value; and when the first target data block is not stored in the hot data storage unit and the time difference between the access moment predicted value and the current moment is smaller than a preset time difference threshold, storing the first target data block in the hot data storage unit, and moving the data block with the lowest target heat value in the hot data storage unit out of the hot data storage unit. By adopting the method, the data processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage technology, and in particular to a data classification and storage method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the rapid development of mobile internet services, backend storage systems face the challenge of explosive data growth. In real-world business scenarios, data access patterns exhibit significant imbalances: some frequently accessed data is frequently accessed, while a large amount of data remains idle for extended periods. To balance system performance and storage costs, tiered storage technology for hot and cold data has emerged. This technology places frequently accessed hot data in low-latency hot data storage units such as solid-state drives and memory, while migrating less frequently accessed cold data to high-capacity storage units, thereby achieving intelligent optimization and rational allocation of storage resources.

[0003] In traditional technologies, the LFU (Least Frequently Used) algorithm is widely used. The LFU algorithm classifies and stores data as hot or cold based on the historical cumulative access frequency of the data.

[0004] However, in complex real-world business environments, a mismatch often occurs between the data stored in hot data storage units and the actual requests. As a result, the "hot data," which should respond efficiently, cannot meet access demands in a timely manner, leading to a significantly lower-than-expected hot data hit rate. Consequently, the system is forced to frequently retrieve data from storage units with higher latency, resulting in increased data access latency and reduced data processing efficiency. Summary of the Invention

[0005] Therefore, it is necessary to provide a data classification and storage method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve data processing efficiency in response to the above-mentioned technical problems.

[0006] In a first aspect, this application provides a data classification and storage method, wherein the data is classified and stored in a memory, and the memory includes at least a hot data storage unit; the method includes:

[0007] Obtain the data block information of the data block accessed in the current time period, and predict the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information;

[0008] When the first target data block has been stored in the hot data storage unit, the correction factor corresponding to the first target data block is determined according to the predicted value of the access time, the initial heat value of the first target data block is obtained, and the initial heat value is corrected based on the correction factor to obtain the target heat value.

[0009] If the first target data block is not stored in the hot data storage unit, and the time difference between the predicted access time and the current time is less than the preset time difference threshold, the first target data block is stored in the hot data storage unit, and the data block with the lowest target heat value in the hot data storage unit is removed from the hot data storage unit.

[0010] In one embodiment, determining the correction factor corresponding to the first target data block based on the access time prediction value includes:

[0011] If the time difference between the predicted value at the access time and the current time is less than the preset time difference threshold, the positive correction factor of the first target data block is determined based on the time difference, and the target popularity value after correction based on the positive correction factor is greater than the initial popularity value before correction.

[0012] If the time difference between the predicted value at the access time and the current time is not less than the preset time difference threshold, the negative correction factor of the first target data block is determined based on the time difference. The target popularity value after correction based on the negative correction factor is less than the initial popularity value before correction.

[0013] In one embodiment, the positive correction factor is negatively correlated with the time difference, and the negative correction factor is positively correlated with the time difference;

[0014] The initial heat value is corrected based on a correction factor to obtain the target heat value, including:

[0015] If the time difference is less than the preset time difference threshold, add a positive correction factor to the initial popularity value to obtain the target popularity value;

[0016] If the time difference is not less than the preset time difference threshold, the initial heat value is subtracted from the negative correction factor to obtain the target heat value.

[0017] In one embodiment, before obtaining the initial heat value of the first target data block, the method further includes:

[0018] Determine the historical time window based on the current moment, and obtain the first historical access information of the hot data storage unit within the historical time window;

[0019] Based on the first historical access information, determine the initial heat value of each data block currently stored in the hot data storage unit.

[0020] In one embodiment, determining the initial heat value of each data block currently stored in the hot data storage unit based on first historical access information includes:

[0021] Based on the first historical access information, count the number of times each data block currently stored in the hot data storage unit was accessed in the preset historical time period;

[0022] The access counts are normalized to obtain the initial heat values ​​of each data block currently stored in the hot data storage unit.

[0023] In one embodiment, the first target data block and its access time prediction value are obtained by using a preset prediction model, which is pre-trained based on second historical access information of the memory; after predicting the access time prediction value of the first target data block to be accessed within a preset future time period, the method further includes:

[0024] After the real-time time reaches the preset future time period, detect the actual access time value of the second target data block and the second target data block within the preset future time period;

[0025] Based on the differences between the second target data block and the first target data block, as well as the differences between the actual value and the predicted value at the access time, the prediction model is iteratively optimized.

[0026] Secondly, this application also provides a data classification storage device, wherein data is classified and stored in a memory, and the memory includes at least a hot data storage unit; the device includes:

[0027] The prediction module is used to obtain the data block information of the data block accessed in the current time period, and predict the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information.

[0028] The heat value update module is used to determine the correction factor corresponding to the first target data block based on the predicted value at the access time when the first target data block has been stored in the hot data storage unit, obtain the initial heat value of the first target data block, correct the initial heat value based on the correction factor, and obtain the target heat value.

[0029] The data storage module is used to store the first target data block in the hot data storage unit when the first target data block is not stored in the hot data storage unit and the time difference between the predicted access time and the current time is less than a preset time difference threshold, and to remove the data block with the lowest target heat value from the hot data storage unit.

[0030] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0031] Obtain the data block information of the data block accessed in the current time period, and predict the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information;

[0032] When the first target data block has been stored in the hot data storage unit, the correction factor corresponding to the first target data block is determined according to the predicted value of the access time, the initial heat value of the first target data block is obtained, and the initial heat value is corrected based on the correction factor to obtain the target heat value.

[0033] If the first target data block is not stored in the hot data storage unit, and the time difference between the predicted access time and the current time is less than the preset time difference threshold, the first target data block is stored in the hot data storage unit, and the data block with the lowest target heat value in the hot data storage unit is removed from the hot data storage unit.

[0034] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0035] Obtain the data block information of the data block accessed in the current time period, and predict the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information;

[0036] When the first target data block has been stored in the hot data storage unit, the correction factor corresponding to the first target data block is determined according to the predicted value of the access time, the initial heat value of the first target data block is obtained, and the initial heat value is corrected based on the correction factor to obtain the target heat value.

[0037] If the first target data block is not stored in the hot data storage unit, and the time difference between the predicted access time and the current time is less than the preset time difference threshold, the first target data block is stored in the hot data storage unit, and the data block with the lowest target heat value in the hot data storage unit is removed from the hot data storage unit.

[0038] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0039] Obtain the data block information of the data block accessed in the current time period, and predict the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information;

[0040] When the first target data block has been stored in the hot data storage unit, the correction factor corresponding to the first target data block is determined according to the predicted value of the access time, the initial heat value of the first target data block is obtained, and the initial heat value is corrected based on the correction factor to obtain the target heat value.

[0041] If the first target data block is not stored in the hot data storage unit, and the time difference between the predicted access time and the current time is less than the preset time difference threshold, the first target data block is stored in the hot data storage unit, and the data block with the lowest target heat value in the hot data storage unit is removed from the hot data storage unit.

[0042] The aforementioned data classification and storage method, apparatus, computer equipment, computer-readable storage medium, and computer program product, by acquiring data block information of data blocks accessed in the current time period, and predicting the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information, achieves the prediction of future access patterns, breaking through the limitations of traditional technologies that rely solely on historical access records. Then, if the first target data block is already stored in the hot data storage unit, the initial heat value of the first target data block is obtained by determining the correction factor corresponding to the first target data block based on the predicted access time value, and the initial heat value is corrected based on the correction factor to obtain the target heat value. This achieves dynamic evaluation and real-time correction of the future heat value of existing hot data, ensuring that data that will be frequently accessed maintains a higher priority in the hot data storage unit. If the first target data block is not stored in the hot data storage unit, and the time difference between the predicted access time and the current time is less than a preset time difference threshold, then by storing the first target data block in the hot data storage unit and removing the data block with the lowest target heat value from the hot data storage unit, the system achieves forward-looking preloading of potential hot data that is about to be accessed, as well as capacity management of the hot data storage unit. In this way, through the above-mentioned prediction-based dynamic heat management and preloading mechanism, the hot data retained in the hot data storage unit can be more closely aligned with future actual access needs, significantly improving the hot data hit rate, reducing the frequency of data retrieval from high-latency storage units, thereby reducing overall data access latency and improving data processing efficiency. Attached Figure Description

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

[0044] Figure 1 This is a flowchart illustrating a data classification and storage method in one embodiment of this application;

[0045] Figure 2 This is a flowchart illustrating the process of determining the correction factor in one embodiment of this application;

[0046] Figure 3 This is a flowchart illustrating the process of determining the initial heat value in one embodiment of this application;

[0047] Figure 4 This is a structural block diagram of a data classification storage device in one embodiment of this application;

[0048] Figure 5 This is an internal structural diagram of a computer device in one embodiment of this application. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0050] With the rapid development of mobile internet services, backend storage systems face the challenge of explosive data growth. In real-world business scenarios, data access patterns exhibit significant imbalances: some frequently accessed data is frequently accessed, while a large amount of data remains idle for extended periods. To balance system performance and storage costs, tiered storage technology for hot and cold data has emerged. This technology places frequently accessed hot data in low-latency hot data storage units such as solid-state drives and memory, while migrating less frequently accessed cold data to high-capacity storage units, thereby achieving intelligent optimization and rational allocation of storage resources.

[0051] In traditional techniques, the LFU (Low-Frequency Activated) algorithm is widely used for classifying hot and cold data. The core principle of this algorithm is to make decisions based on the historical cumulative access frequency of data, assuming that data frequently accessed in the past is more likely to be accessed in the future. Specifically, the system maintains an access counter for each data block, incrementing the counter by 1 with each access. When space needs to be freed up, the data block with the smallest count is evicted.

[0052] However, in complex real-world application scenarios, the traditional LFU algorithm has several inherent defects, resulting in a significant discrepancy between the data in the hot data storage unit and the actual access requirements.

[0053] First, evaluation mechanisms based solely on cumulative frequency cannot effectively differentiate the timeliness of data. Data that was frequently accessed in the past but is no longer active recently will continue to occupy space in the hot data storage unit due to its high cumulative count, while newly generated hot data is difficult to enter the hot data storage unit in a timely manner due to insufficient historical count accumulation. Even if it does enter the hot data storage unit, it is easily eliminated before accumulating sufficient access volume.

[0054] Second, the design of the fixed counter lacks the ability to adapt to dynamic changes in access patterns. When the characteristics of the business load change, the algorithm needs a long learning period to complete the update of the hot dataset. During this period, the data retained in the hot data storage unit cannot match the actual access requirements.

[0055] Third, the LFU algorithm is based on a key assumption: future access demand for data is completely consistent with historical access frequency; that is, high historical access frequency guarantees high future access demand. However, data access patterns are far from singular and static. Different data items may follow drastically different lifecycles and access patterns. For example, some data may experience a surge in access frequency during a specific period, followed by a rapid decline; some data may exhibit periodic fluctuations or long-term trend changes. The static assumption of "history equals future" upon which the LFU algorithm relies is fundamentally mismatched with this dynamic, context-dependent real-world access pattern.

[0056] These defects directly lead to a lower-than-expected data hit rate in hot data storage units. The system has to frequently read data directly from high-latency, high-capacity storage units, which not only increases the latency of each data access but also consumes a large amount of system input / output resources due to frequent data migration operations, ultimately resulting in a decrease in overall data processing efficiency.

[0057] In one exemplary embodiment, a data classification and storage method is provided. This embodiment illustrates the application of this method to a terminal, wherein the terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. It is understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server.

[0058] In some feasible implementations, the terminal may have a built-in memory or be connected to an external memory via a communication interface, thereby enabling the classification and management of data in the memory.

[0059] The memory contains at least hot data storage units, and can also be configured with cold data storage units according to business needs, forming a hierarchical storage architecture.

[0060] Both hot and cold data storage units are storage media. Hot data storage units offer faster read / write speeds and lower latency, but have a higher unit storage cost. They are more suitable for storing frequently accessed data that requires rapid response and are a key component for ensuring the overall system's high performance. Cold data storage units, while slower in read / write speeds and with higher latency, offer higher storage density, lower unit storage cost, and greater data stability and durability. Therefore, they are suitable for storing cold or archived data with extremely low access frequency and insensitivity to response latency, fulfilling the core function of long-term data preservation and cost optimization.

[0061] In some feasible implementations, the hot data storage unit includes dynamic random access memory, solid-state drive, non-volatile memory, etc.

[0062] In some feasible implementations, cold data storage units include hard disk drives, tape libraries, cloud storage archiving services, etc.

[0063] In this embodiment, as Figure 1 As shown, the method includes steps 102-106. Wherein:

[0064] Step 102: Obtain the data block information of the data block accessed in the current time period, and predict the first target data block to be accessed in the preset future time period and the predicted access time of the first target data block based on the data block information.

[0065] In this context, a data block refers to the basic logical unit for data storage and management. It is a continuous sequence of fixed-size or variable-size data blocks that a file is divided into on physical storage. For example, a file with a size of 1MB (Megabyte) is considered as one data block in a storage system divided into 1MB blocks; in a system divided into 4KB (Kilobyte) blocks, it is considered as 256 data blocks.

[0066] Data block information can refer to a set of data used to describe the attributes of the data block being accessed in the current time period and its associated information. This may include, but is not limited to, the current access time, the historical access time of the accessed data block, the data block identifier of the accessed data block, the file identifier of the accessed data block, the file type corresponding to the accessed data block, the logical order of the accessed data block in the file, and the data block identifiers of other data blocks that have an access relationship with the accessed data block.

[0067] The current time period is a completed historical time window that includes and is immediately adjacent to the current moment. The data blocks accessed in the current time period can be one or more.

[0068] The preset future time period can be set in advance based on actual needs or test results to define the time range for prediction. In some feasible implementations, the preset future time period can be a time interval extending backward from the current moment.

[0069] For example, during the use of the hot data storage unit, data can be classified and stored in real time, periodically, or triggered to achieve continuous optimization and management of the stored content. In each data classification and storage process, the access logs for the current time window are first analyzed. From the access records within this time window, all accessed data blocks are identified, and then the data block information of these accessed data blocks is retrieved from the memory. Subsequently, this data block information is input into a pre-trained prediction model based on historical access information. The prediction model then predicts the first target data block to be accessed within a preset future time period and the predicted access time of the first target data block.

[0070] As an example, the predictive model can analyze the spatial locality (such as the probability of accessing adjacent blocks), temporal locality (such as periodic access patterns), and content correlation (such as access sequences triggered by specific business operations) of the currently accessed data block, and combine this with time series analysis algorithms to calculate the first target data block that is most likely to be accessed in a preset future time period. By statistical analysis and pattern recognition of historical access intervals, the model can estimate the specific time point at which the first target data block is expected to be accessed, and obtain the predicted access time value.

[0071] Step 104: If the first target data block has been stored in the hot data storage unit, determine the correction factor corresponding to the first target data block according to the access time prediction value, obtain the initial heat value of the first target data block, and correct the initial heat value based on the correction factor to obtain the target heat value.

[0072] The initial heat value can be a quantitative indicator that represents the frequency of historical access to a data block. It can be determined based on experience or historical access information, and this embodiment does not impose any restrictions on it.

[0073] The target heat value can refer to a composite heat index that comprehensively reflects the historical access frequency and future access urgency of a data block after the initial heat value is corrected by a correction factor.

[0074] As an example, the initial popularity value could be the total number of times a data block has been accessed within a preset historical period. The preset historical period could be all historical time before the current moment, or a period of time immediately preceding the current moment, etc.

[0075] As another example, the initial popularity value can also be the historical access frequency of a data block within a preset historical period.

[0076] The correction factor can refer to an adjustment coefficient determined based on the characteristics of data access time, used to dynamically adjust the initial heat value of data blocks. For example, for data predicted to be accessed in 10 seconds, the system may assign a correction factor of 1.5; while for data predicted to be accessed in 1 hour, it may only assign a correction factor of 1.1.

[0077] The method of correcting the initial heat value based on the correction factor can be achieved by performing at least one operation such as multiplication, division, addition, or subtraction between the correction factor and the initial heat value. This embodiment does not impose any limitations on this. For different operation methods, the calculation method and value range of the correction factor can be adjusted accordingly to ensure that the corrected target heat value accurately reflects the access priority of the data block in the preset future time period. For example, when using multiplication, the correction factor can be set as a gain coefficient greater than 1 and a loss coefficient between 0 and 1; when using addition, the correction factor can be designed as at least one of an increment value and a decrement value negatively correlated with the predicted access time.

[0078] The initial popularity value only reflects the cumulative popularity of a data block in a historical period and is difficult to reflect the time relevance of its access patterns. The target popularity value, by introducing a correction factor derived from the predicted value of access time, constructs a composite evaluation index that integrates historical access frequency and future time sensitivity, making the judgment of data value dynamic and forward-looking.

[0079] The target popularity value is used for managing data blocks in the hot data storage unit. As an example, the data blocks in the hot data storage unit can be sorted based on the target popularity value. The higher the target popularity value, the higher the ranking. When a new data block needs to be written to the hot data storage unit, the data blocks ranked lower will be discarded first.

[0080] In this way, storage management decisions based on target popularity values ​​can simultaneously consider both the historical and expected value of data. When hot data storage units undergo data replacement, the selection criterion shifts from simply "least historically used" to "lowest overall value." Furthermore, this mechanism effectively distinguishes between persistently hot data and periodically hot data, automatically reducing the evaluation value of historically hot data with no recent access predictions, while promptly increasing the cache priority of data with clear access expectations. This ensures that cached content always maintains an optimal match with the expected working set.

[0081] For example, after determining the first target data block, for each first target data block, it can first be matched with the data blocks already stored in the hot data storage unit to determine whether the first target data block is already stored in the hot data storage unit. If the first target data block is already stored in the hot data storage unit, then according to the preset mapping relationship between access time and correction factor, the correction factor corresponding to the predicted access time value of the first target data block is determined. Subsequently, the initial heat value of the first target data block is read, and the initial heat value is corrected based on the correction factor, and the correction result is determined as the target heat value. Through correction, the data block that is about to be accessed can obtain a higher priority in the heat ranking of the hot data storage unit, avoiding premature elimination due to low historical access frequency.

[0082] The mapping relationship between the preset access time and the correction factor can be a time decay function, a sigmoid function, a piecewise function, etc. For example, the closer the access time, the larger the correction factor; if the access time is too far away, the correction factor can be negative to reduce the priority of data blocks that are difficult to access in the short term in the popularity ranking.

[0083] Step 106: If the first target data block is not stored in the hot data storage unit and the time difference between the predicted access time and the current time is less than the preset time difference threshold, the first target data block is stored in the hot data storage unit, and the data block with the lowest target heat value in the hot data storage unit is removed from the hot data storage unit.

[0084] Among them, the preset time difference threshold can refer to a pre-set time threshold value, which is used to determine whether the data needs to be loaded into the hot storage in advance.

[0085] For example, if the first target data block is not stored in the hot data storage unit, the time difference between the predicted access time and the current time is first calculated. If the time difference between the predicted access time and the current time is greater than or equal to a preset time difference threshold, it indicates that the predicted access will occur in the future. In this case, the existing data distribution can be maintained, and data migration is not required, thereby avoiding unnecessary data migration overhead and system resource consumption. If the time difference between the predicted access time and the current time is less than the preset time difference threshold, it is determined to be an urgent access. In this case, the preloading and replacement process can be automatically triggered.

[0086] The preloading and replacement process includes scanning the target heat values ​​of all data blocks in the hot data storage unit, identifying one or more data blocks with the lowest target heat values, writing their contents back to the original storage location or cold data storage unit, and releasing the storage space occupied by them in the hot data storage unit; simultaneously, reading the complete content of the first target data block from the original storage location and writing it into the available space of the hot data storage unit. This replacement operation can pre-schedule high-urgency access data while maintaining the stable capacity of the hot data storage unit, thereby effectively reducing the data read latency that may occur when subsequent actual access occurs and improving the overall response performance of the storage system.

[0087] In some feasible implementations, after storing the first target data block into the hot data storage unit, an initial heat value can be assigned to the first target data block, and the initial heat value of the first target data block can be a preset minimum value, such as 0; and a correction factor corresponding to the first target data block can be determined according to the access time prediction value of the first target data block; then the initial heat value can be corrected based on the correction factor to obtain the target heat value of the first target data block.

[0088] In some feasible implementations, after each first target data block has been matched with all data blocks already stored in the hot data storage unit, data blocks that do not match any of the first target data blocks can be selected from the data blocks already stored in the hot data storage unit and identified as third target data blocks. Although these third target data blocks have already occupied high-speed storage resources, no access demand is predicted for them in a preset future time period. For these third target data blocks, a preset maximum correction factor can be used to reduce their initial heat value to obtain their final target heat value. The purpose of this preset maximum correction factor is to ensure that the correction magnitude for the third target data blocks far exceeds any reduction correction magnitude that might be applied to the first target data blocks. For example, suppose that when the first target data block is subjected to a reduction correction, the value range of its correction factor is (0, 1), and its correction method is to subtract a value greater than 0 and less than 1 from its initial heat value. In this case, the maximum value of the preset correction factor can be set to 1. This means that the initial heat value of the third target data block will be directly reduced by 1 during the correction process, thereby achieving a one-time strong and clear downgrade operation.

[0089] In the aforementioned data classification and storage method, by acquiring the data block information of the data blocks accessed in the current time period, and predicting the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information, the method achieves the prediction of future access patterns, breaking through the limitations of traditional technologies that rely solely on historical access records. Then, if the first target data block is already stored in the hot data storage unit, the method determines the correction factor corresponding to the first target data block based on the predicted access time, obtains the initial heat value of the first target data block, and corrects the initial heat value based on the correction factor to obtain the target heat value. This achieves dynamic evaluation and real-time correction of the future heat value of existing hot data, ensuring that data that will be frequently accessed maintains a higher priority in the hot data storage unit. If the first target data block is not stored in the hot data storage unit, and the time difference between the predicted access time and the current time is less than a preset time difference threshold, the method stores the first target data block in the hot data storage unit and removes the data block with the lowest target heat value from the hot data storage unit. This achieves forward-looking preloading of potential hot data that will be accessed and capacity management of the hot data storage unit. In this way, through the above-mentioned prediction-based dynamic heat management and preloading mechanism, the hot data stored in the hot data storage unit can be more closely aligned with future actual access needs, significantly improving the hot data hit rate, reducing the frequency of data retrieval from high-latency storage units, thereby reducing overall data access latency and improving data processing efficiency.

[0090] In one exemplary embodiment, such as Figure 2 As shown, the correction factor corresponding to the first target data block is determined based on the predicted access time value, including steps 202 to 206. Wherein:

[0091] Step 202: Determine whether the time difference between the predicted access time and the current time is less than the preset time difference threshold.

[0092] Step 204: If the time difference between the predicted value at the access time and the current time is less than the preset time difference threshold, determine the positive correction factor of the first target data block based on the time difference, and the target popularity value after correction based on the positive correction factor is greater than the initial popularity value before correction.

[0093] It should be noted that the traditional LFU algorithm mainly relies on historical access frequency. Its core flaw is that it cannot respond to the timeliness of data access. It cannot distinguish the value difference between data that was frequently accessed in the past but will not be accessed in the near future and data that is about to be accessed. This leads to a deviation between the popularity assessment and the actual access demand, thus affecting caching efficiency.

[0094] The positive correction factor can refer to a coefficient used to increase the initial heat value of a data block. When the positive correction factor corrects the initial heat value by multiplying it by the initial heat value, its value can be greater than 1. When the positive correction factor corrects the initial heat value by adding it to the initial heat value, its value can be greater than 0.

[0095] For example, if it is determined that the first target data block has been stored in the hot data storage unit, the time difference between the predicted access time and the current time can be calculated first. If the time difference between the predicted access time and the current time is less than a preset time difference threshold, it is determined to be an urgent access. In this case, the positive correction factor corresponding to the predicted access time of the first target data block is determined according to the preset mapping relationship between access time and positive correction factor.

[0096] Step 206: If the time difference between the predicted value at the access time and the current time is not less than the preset time difference threshold, determine the negative correction factor of the first target data block based on the time difference. The target heat value after correction based on the negative correction factor is less than the initial heat value before correction.

[0097] The negative correction factor can refer to a coefficient used to reduce the initial heat value of a data block. When the negative correction factor corrects the initial heat value by multiplying it, its value can be greater than 0 and less than 1. When the negative correction factor corrects the initial heat value by adding it to it, its value can be less than 0.

[0098] For example, if the time difference between the predicted access time and the current time is greater than or equal to a preset time difference threshold, it indicates that the predicted access will occur in the future. In this case, the negative correction factor corresponding to the predicted access time of the first target data block is determined according to the preset mapping relationship between the access time and the negative correction factor.

[0099] In this embodiment, a two-way dynamic adjustment of the heat value is implemented based on the urgency of data access. This identifies hot data with time-sensitive value, assigns higher heat priority to data blocks to be accessed in the short term, and reduces the priority of data to be accessed in the long term as needed. This improves the matching degree between the data distribution in the hot data storage unit and the actual access demand, thereby significantly improving the hot data hit rate. In practical applications, the memory can prepare for upcoming access requests in advance, greatly reducing the frequency of data retrieval from high-latency storage media, thereby effectively reducing data access latency and improving system response speed and overall processing efficiency.

[0100] In an exemplary embodiment, the positive correction factor is negatively correlated with the time difference, and the negative correction factor is positively correlated with the time difference; the initial popularity value is corrected based on the correction factor to obtain the target popularity value, including:

[0101] If the time difference is less than the preset time difference threshold, add a positive correction factor to the initial popularity value to obtain the target popularity value;

[0102] If the time difference is not less than the preset time difference threshold, the initial heat value is subtracted from the negative correction factor to obtain the target heat value.

[0103] It should be noted that using fixed positive and negative correction factors lacks a refined measure of access urgency.

[0104] The positive correction factor is negatively correlated with the time difference; that is, the closer the predicted access time is to the current time, the larger the positive correction factor value. This allows data blocks with high access urgency to be assigned a higher heat gain, thus significantly increasing their retention priority in hot data storage units. However, as the predicted access time moves further away, the positive correction factor value gradually decreases, and its effect on increasing heat value also weakens smoothly.

[0105] For example, when the time difference is less than a preset time difference threshold, after determining the positive correction factor, the initial popularity value can be added to the positive correction factor, and the sum of the two can be determined as the target popularity value. When the time difference is not less than the preset time difference threshold, after determining the negative correction factor, the initial popularity value can be subtracted from the negative correction factor, and the resulting difference can be determined as the target popularity value.

[0106] In some feasible implementations, the positive correction factor and the time difference are related by a first exponential function, where the dependent variable of the first exponential function is the positive correction factor and the independent variable is the time difference; the base of the first exponential function is greater than 1; the exponent of the first exponential function is determined by the time difference, the exponent is less than 0, and it is negatively correlated with the time difference.

[0107] As an example, the mapping relationship between the positive correction factor a1 and the time difference can be expressed as:

[0108]

[0109] Where (t1-t0) represents the time difference between the predicted access time t1 and the current time t0; α and τ1 are constants, which can be determined based on experience or by function fitting based on historical data. This embodiment does not impose any restrictions on them.

[0110] In some feasible implementations, the negative correction factor and the time difference are related by a second exponential function, where the dependent variable of the second exponential function is the negative correction factor and the independent variable is the time difference; the base of the second exponential function is less than 1; the exponent of the second exponential function is determined by the time difference, the exponent is greater than 0, and it is positively correlated with the time difference.

[0111] As an example, the mapping relationship between the negative correction factor b1 and the time difference can be expressed as:

[0112]

[0113] Where (t1-t0) represents the time difference between the predicted access time t1 and the current time t0; β and τ2 are constants, which can be determined based on experience or by function fitting based on historical data. This embodiment does not impose any restrictions on them.

[0114] The natural constraint of the function values ​​of the first and second exponential functions in the 0-1 interval allows the correction factor determined by the mapping to be of the same dimension as the initial heat value without additional normalization processing, thus enabling direct addition and subtraction operations.

[0115] In this embodiment, a gradual adjustment mechanism enables hot storage resources to be finely allocated according to the urgency of access. While maintaining system response speed, it avoids the problem of hot data storage units being over-occupied by long-term access data, thus realizing dynamic optimization of storage resources.

[0116] In one exemplary embodiment, such as Figure 3 As shown, before obtaining the initial heat value of the first target data block, the method further includes steps 302 to 304. Wherein:

[0117] Step 302: Determine the historical time window based on the current time and obtain the first historical access information of the hot data storage unit within the historical time window.

[0118] It's important to note that if the initial popularity value is determined based on accumulated global historical access information, this value is easily influenced by the continuous interference from access records of data blocks in the distant past. These outdated historical statistics, while no longer accurately reflecting the recent true activity level of data blocks, still significantly impact the popularity value, leading to distorted popularity assessments. This distortion further results in cache resources potentially being allocated to historically hot data rather than currently hot data, significantly reducing the accuracy of caching decisions and the effective utilization of storage resources.

[0119] A historical time window can be a fixed-length sliding time window that traces backward from the current moment. For example, a window defined as "the most recent hour" always actually covers the hour preceding the current moment. As the current moment progresses, this historical time window slides synchronously, with its start and end times continuously updated, but the window length remains constant. This mechanism ensures that the system always analyzes based on the latest, fixed-period historical data, thereby effectively capturing recent access patterns.

[0120] The first historical access information can refer to the set of access behavior records of the data blocks stored in the hot data storage unit within the historical time window, which may include, but is not limited to, at least one of the following: access timestamp sequence, access count, access type, and access source of each data block.

[0121] For example, the start time of the historical time window is first calculated based on the current time and the preset window duration. Then, the access records of all data blocks currently stored in the hot data storage unit within the historical time window are queried and read from the access log storage address. These collected access records, filtered by the time window, constitute the first historical access information.

[0122] Step 304: Determine the initial heat value of each data block currently stored in the hot data storage unit based on the first historical access information.

[0123] For example, after obtaining the first historical access information, the total number of accesses for each data block within the historical time window can be counted based on the first historical access information. Then, the total number of accesses can be directly used as the initial popularity value of each data block, or the access frequency of each data block can be further calculated or normalized, and the further processing result can be determined as the initial popularity value.

[0124] In this embodiment, by establishing a dynamic historical time window associated with the current moment, all outdated access records outside the historical time window are automatically excluded. This effectively filters out long-standing historical access information, ensuring that the calculation of the target popularity value relies only on the first historical access information that reflects the recent activity level of the data block. By establishing this time-sensitive filtering mechanism, the accuracy of the initial popularity value can be effectively improved, thereby enhancing the overall quality of subsequent popularity correction and caching decisions, and ultimately optimizing the hit rate of hot data storage units and the overall performance of the memory.

[0125] In an exemplary embodiment, determining the initial heat value of each data block currently stored in the hot data storage unit based on first historical access information includes:

[0126] Based on the first historical access information, the number of times each data block currently stored in the hot data storage unit is accessed during a preset historical period is counted; the access counts are normalized to obtain the initial heat value of each data block currently stored in the hot data storage unit.

[0127] It's important to note that the order of magnitude of access frequency varies significantly across different data blocks. Directly determining the initial access frequency as the initial popularity value will lead to a dilemma in subsequent adjustment processes. If the adjustment factor is designed to accommodate low-volume access data, its magnitude will be insufficient to effectively impact the popularity ranking of frequently accessed data, resulting in stagnant cached content. Conversely, if the adjustment factor is designed to adjust high-frequency data, its magnitude may easily completely overwrite the original popularity of low-frequency data, causing cache jitter. This difference in magnitude makes it difficult for a single adjustment strategy to achieve fair and effective dynamic adjustments across data with varying activity levels.

[0128] Normalization refers to the process of mapping a set of numerical values ​​to a specific standard interval through mathematical transformation, in order to eliminate the influence of dimensions and enhance data comparability. As an example, the min-max normalization method can be used to linearly transform all access counts to the interval [0,1].

[0129] For example, after obtaining the first historical access information, the access records in the first historical access information can be grouped according to the unique identifier of the data block. Then, the total number of access records for each data block group within a preset historical time period is counted, and this total number of access records is the access count of the corresponding data block. Furthermore, a predefined normalization algorithm is applied to transform these access counts to a standard range, and the transformation result is the initial popularity value.

[0130] In this embodiment, normalization mapping is used to uniformly map the access counts of each data block to a standardized interval, fundamentally eliminating the interference of magnitude differences on the correction process. This ensures that subsequent correction factors can have a comparable impact on all data on the same scale. This standardization mechanism ensures that the popularity value of both high-frequency and low-frequency data responds to the correction operation in a predictable and proportional manner, thereby significantly improving the robustness of the popularity correction mechanism and the fairness of caching decisions.

[0131] In an exemplary embodiment, the first target data block and its access time prediction value are obtained by using a preset prediction model, which is pre-trained based on the second historical access information of the memory; after predicting the access time prediction value of the first target data block to be accessed within a preset future time period, the method further includes:

[0132] After the real-time reaches the preset future time period, the actual access time of the second target data block and the second target data block actually accessed within the preset future time period is detected; based on the difference between the second target data block and the first target data block, and the difference between the actual access time and the predicted access time, the prediction model is iteratively optimized.

[0133] It should be noted that static prediction models have fixed parameters after deployment and cannot adapt to dynamic changes in data access patterns over time. As business load characteristics and user behavior patterns evolve, the patterns learned by the model based on outdated historical data will gradually become invalid, leading to a continuous decline in prediction accuracy, resulting in model performance degradation, and ultimately making it difficult to sustain the effects of prediction-based caching optimization.

[0134] The second historical access information refers to the set of historical data access records accumulated in the memory, which may include data block access sequences, access timestamps, access frequencies, etc. This second historical access information can be used as training samples to train the prediction model before its actual application, enabling the model to learn the inherent patterns and rules of data access. The fully trained prediction model is then integrated into the data classification and storage process to perform online prediction tasks.

[0135] To address the dynamic evolution of access patterns in the business environment, the system continuously collects newly generated access information during the online application of the prediction model, forming an incremental training dataset. Based on this incremental dataset, the prediction model can be periodically iteratively optimized and its parameters updated, enabling the model to adaptively track the latest changes in access patterns and ensuring the long-term effectiveness and accuracy of its predictive capabilities.

[0136] The second target data block can refer to the data block that has actually been accessed within a preset future time period.

[0137] The actual access time value can refer to the timestamp of the actual access operation that occurs in the second target data block within a preset future time period.

[0138] In some feasible implementations, the predictive model employs a recurrent neural network as its core architecture. The training data for the recurrent neural network originates from second historical access information and is organized on a daily basis. Training samples are input into the recurrent neural network in the form of a sequence of (timestamp, data block identifier).

[0139] Research has revealed that hot data often exhibits periodic access patterns, and data blocks demonstrate temporal dependencies. Periodic access patterns mean that many hot data points show access patterns with a daily cycle, meaning the probability of being accessed significantly increases within a specific time period of the day. Recurrent neural networks (RNNs) can identify and memorize such cross-period, fixed-time-point access patterns by processing sequentially organized data. Temporal dependencies between data blocks mean that different data blocks have sequential access relationships. Leveraging its internal state propagation mechanism, RNNs can effectively learn and memorize long-range or short-range dependencies in the data block access sequence, thereby predicting potentially accessed related data blocks after accessing a specific data block.

[0140] The advantage of recurrent neural networks (RNNs) lies in their ability to automatically extract complex access pattern features from a sequence of timestamps and data block identifiers without prior knowledge of the specific content or business semantics of the data blocks. These learned access patterns are then embedded in the network weights and internal states. This allows the trained model to accurately predict the most likely data blocks to be accessed in future time periods and their corresponding access times based on current access information or sequences.

[0141] For example, after the real-time reaches the end of a preset future time period, the complete access log for that preset future time period can be accessed to determine the set of all accessed second target data blocks and the actual access time of each access event for the second target data block. Then, a set similarity index is calculated to quantify the degree of overlap between the first and second target data block sets. For overlapping second target data blocks, the absolute or relative error between their predicted and actual access times is calculated. These difference indices are then periodically used as input to a loss function to update the internal parameters of the preset prediction model through a backpropagation algorithm. The optimized model parameters are persistently stored for use in the next round of prediction tasks.

[0142] In this embodiment, through a continuous iterative optimization process, the prediction model can dynamically track and adapt to changes in data access patterns, thereby maintaining and continuously improving its prediction accuracy, and providing a stable and reliable intelligent decision-making basis for the continuous optimization of storage system performance.

[0143] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0144] Based on the same inventive concept, this application also provides a data classification storage device for implementing the data classification storage method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data classification storage device embodiments provided below can be found in the limitations of the data classification storage method described above, and will not be repeated here.

[0145] In one exemplary embodiment, such as Figure 4 As shown, a data classification and storage device is provided, in which data is classified and stored in a memory, the memory including at least a hot data storage unit; the device includes: a prediction module 402, a heat value update module 404, and a data storage module 406, wherein:

[0146] Prediction module 402 is used to obtain data block information of data blocks accessed in the current time period, and predict the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information.

[0147] The heat value update module 404 is used to determine the correction factor corresponding to the first target data block according to the access time prediction value when the first target data block has been stored in the hot data storage unit, obtain the initial heat value of the first target data block, correct the initial heat value based on the correction factor, and obtain the target heat value.

[0148] The data storage module 406 is used to store the first target data block in the hot data storage unit when the first target data block is not stored in the hot data storage unit and the time difference between the predicted access time and the current time is less than a preset time difference threshold, and to remove the data block with the lowest target heat value from the hot data storage unit.

[0149] In an exemplary embodiment, the heat value update module 404 is further configured to:

[0150] If the time difference between the predicted value at the access time and the current time is less than the preset time difference threshold, the positive correction factor of the first target data block is determined based on the time difference, and the target popularity value after correction based on the positive correction factor is greater than the initial popularity value before correction.

[0151] If the time difference between the predicted value at the access time and the current time is not less than the preset time difference threshold, the negative correction factor of the first target data block is determined based on the time difference. The target popularity value after correction based on the negative correction factor is less than the initial popularity value before correction.

[0152] In an exemplary embodiment, the positive correction factor is negatively correlated with the time difference, and the negative correction factor is positively correlated with the time difference; the heat value update module 404 is also used for:

[0153] If the time difference is less than the preset time difference threshold, add a positive correction factor to the initial popularity value to obtain the target popularity value;

[0154] If the time difference is not less than the preset time difference threshold, the initial heat value is subtracted from the negative correction factor to obtain the target heat value.

[0155] In an exemplary embodiment, the data classification storage device further includes an initial popularity value determination module; before obtaining the initial popularity value of the first target data block, the initial popularity value determination module is configured to:

[0156] Determine the historical time window based on the current moment, and obtain the first historical access information of the hot data storage unit within the historical time window;

[0157] Based on the first historical access information, determine the initial heat value of each data block currently stored in the hot data storage unit.

[0158] In one exemplary embodiment, the initial heat value determination module is further configured to:

[0159] Based on the first historical access information, count the number of times each data block currently stored in the hot data storage unit was accessed in the preset historical time period;

[0160] The access counts are normalized to obtain the initial heat values ​​of each data block currently stored in the hot data storage unit.

[0161] In an exemplary embodiment, the data classification storage device further includes an optimization module; the first target data block and the predicted access time of the first target data block are predicted using a preset prediction model, which is pre-trained based on the second historical access information of the memory; after predicting the first target data block and the predicted access time of the first target data block to be accessed within a preset future time period, the optimization module is used to:

[0162] After the real-time time reaches the preset future time period, detect the actual access time value of the second target data block and the second target data block within the preset future time period;

[0163] Based on the differences between the second target data block and the first target data block, as well as the differences between the actual value and the predicted value at the access time, the prediction model is iteratively optimized.

[0164] Each module in the aforementioned data classification and storage device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0165] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a data classification and storage method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0166] Those skilled in the art will understand that Figure 5The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0167] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0168] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0169] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0170] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0171] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0172] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0173] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data classification and storage method, characterized in that, Data is categorized and stored in a memory, the memory including at least a hot data storage unit; the method includes: Obtain the data block information of the data block accessed in the current time period, and predict the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information; When the first target data block has been stored in the hot data storage unit, the correction factor corresponding to the first target data block is determined according to the access time prediction value, the initial heat value of the first target data block is obtained, and the initial heat value is corrected based on the correction factor to obtain the target heat value. If the first target data block is not stored in the hot data storage unit, and the time difference between the predicted access time and the current time is less than a preset time difference threshold, the first target data block is stored in the hot data storage unit, and the data block with the lowest target heat value in the hot data storage unit is removed from the hot data storage unit.

2. The method according to claim 1, characterized in that, The step of determining the correction factor corresponding to the first target data block based on the access time prediction value includes: If the time difference between the predicted access time and the current time is less than a preset time difference threshold, a positive correction factor for the first target data block is determined based on the time difference, and the target popularity value after correction based on the positive correction factor is greater than the initial popularity value before correction. If the time difference between the predicted access time and the current time is not less than a preset time difference threshold, a negative correction factor for the first target data block is determined based on the time difference. The target popularity value after correction based on the negative correction factor is less than the initial popularity value before correction.

3. The method according to claim 2, characterized in that, The positive correction factor is negatively correlated with the time difference, and the negative correction factor is positively correlated with the time difference; The step of correcting the initial heat value based on the correction factor to obtain the target heat value includes: If the time difference is less than a preset time difference threshold, the initial heat value is added to the positive correction factor to obtain the target heat value; If the time difference is not less than a preset time difference threshold, the initial heat value is subtracted from the negative correction factor to obtain the target heat value.

4. The method according to claim 1, characterized in that, Before obtaining the initial heat value of the first target data block, the method further includes: Determine the historical time window based on the current time, and obtain the first historical access information of the hot data storage unit in the historical time window; Based on the first historical access information, the initial heat value of each data block currently stored in the hot data storage unit is determined.

5. The method according to claim 4, characterized in that, Determining the initial heat value of each data block currently stored in the hot data storage unit based on the first historical access information includes: Based on the first historical access information, the number of times each data block currently stored in the hot data storage unit is accessed during a preset historical period is counted; The access counts are normalized to obtain the initial heat value of each data block currently stored in the hot data storage unit.

6. The method according to any one of claims 1 to 5, characterized in that, The first target data block and the predicted access time of the first target data block are obtained by using a preset prediction model, which is trained in advance based on the second historical access information of the memory. After predicting the first target data block to be accessed within a preset future time period and the predicted access time of the first target data block, the method further includes: After the real-time time reaches the preset future time period, detect the second target data block that was actually accessed within the preset future time period and the actual value of the access time of the second target data block; The prediction model is iteratively optimized based on the difference between the second target data block and the first target data block, and the difference between the actual access time and the predicted access time.

7. A data classification and storage device, characterized in that, Data is categorized and stored in a memory, the memory including at least a hot data storage unit; the device includes: The prediction module is used to obtain data block information of data blocks accessed in the current time period, and predict the first target data block to be accessed in a preset future time period and the predicted access time of the first target data block based on the data block information. The heat value update module is used to determine the correction factor corresponding to the first target data block according to the access time prediction value when the first target data block has been stored in the hot data storage unit, obtain the initial heat value of the first target data block, and correct the initial heat value based on the correction factor to obtain the target heat value. The data storage module is configured to store the first target data block in the hot data storage unit when the first target data block is not stored in the hot data storage unit and the time difference between the predicted access time and the current time is less than a preset time difference threshold, and to remove the data block with the lowest target heat value from the hot data storage unit.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.