Data hot and cold analysis methods, apparatus, equipment and computer-readable storage media
By identifying the correlation and access time information in data access operations, the problem of low efficiency in separating hot and cold data in existing technologies is solved, and more efficient hierarchical storage of hot and cold data is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MIGU DIGITAL MEDIA CO LTD
- Filing Date
- 2022-07-14
- Publication Date
- 2026-04-21
AI Technical Summary
Existing cold and hot data separation technologies cannot effectively identify related data of the same type, resulting in low efficiency of cold and hot data tiered storage.
By registering data access operations, identifying sets of data logical objects with access relevance, recording the access time information of data blocks, and analyzing the access time information of data logical object sets, we can analyze their hot and cold data and then perform reasonable hot and cold data separation.
It improves the rationality of hot and cold data identification and the efficiency of hierarchical storage, and achieves more accurate separation and storage of hot and cold data.
Smart Images

Figure CN115185461B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage technology, and in particular to a method, apparatus, device, and computer-readable storage medium for hot and cold data analysis. Background Technology
[0002] With the continuous development of IT systems and the increasing importance of informatization, these systems store large amounts, even massive amounts, of business data. Over time, older data is accessed less and less frequently, with only a few queries or even none at all; this data is typically referred to as cold data. Conversely, data accessed more frequently is called hot data. Cold data is large in volume and rarely accessed; if left unprocessed, it will occupy a significant amount of storage space and computing resources. Therefore, it is necessary to separate and process hot and cold data.
[0003] Existing hot and cold data separation technologies primarily identify hot and cold data by judging the access frequency and I / O count of data blocks. This approach identifies and separates the hot and coldness of data at the physical storage level. However, in reality, data is not completely independent; a large number of data are interconnected. This method of treating data blocks as independent units for hot and cold data separation cannot perform overall hot and cold separation of related data of the same type, resulting in low efficiency in tiered storage of hot and cold data. Summary of the Invention
[0004] The main objective of this invention is to provide a method, apparatus, device, and computer-readable storage medium for hot and cold data analysis. It aims to propose a hot and cold data analysis scheme based on data correlation, improve the rationality of hot and cold data identification, and thus improve the efficiency of hierarchical storage of hot and cold data.
[0005] To achieve the above objectives, the present invention provides a method for hot and cold data analysis, the method comprising the following steps:
[0006] The data logical objects to be accessed in each data access operation are registered, and a set of data logical objects is determined based on the registered data logical object information. A set of data logical objects includes a group of data logical objects that have access relevance.
[0007] Record the first access time information corresponding to the data block actually accessed by each of the aforementioned data access operations;
[0008] Based on the first access time information of each data block corresponding to the data logical object in the data logical object set, the second access time information corresponding to the data logical object set is obtained statistically.
[0009] The first data hot / cold analysis result corresponding to the data logical object set is obtained based on the second access time information.
[0010] Optionally, the step of registering the data logical objects to be accessed by each data access operation and determining the data logical object set based on the registered data logical object information includes:
[0011] Register the main data logical object to be accessed by each data access operation and the related data logical objects corresponding to the main data logical object;
[0012] The master data logical object and the related data logical object registered for the same data access operation are grouped into the same set of data logical objects;
[0013] For any first data access operation in each of the data access operations, if it is determined that the related data logic object registered by a second data access operation is the same as the main data logic object registered by the first data access operation, then the main data logic object and the related data logic object registered by the first data access operation and the second data access operation are assigned to the same set of data logic objects.
[0014] Optionally, the step of recording the first access time information corresponding to the data block actually accessed by each of the data access operations includes:
[0015] Record the access information when each of the data access operations actually accesses the data block, wherein the access information includes the time when the data block is accessed;
[0016] The first access count of the data block is calculated based on the access information recorded each time the data block is accessed, and the first access count is used as the first access time information corresponding to the data block.
[0017] The step of obtaining the second access time information corresponding to the data logical object set based on the first access time information of each data block corresponding to the data logical object in the data logical object set includes:
[0018] The first access count of each data block corresponding to the data logical object in the data logical object set is accumulated to obtain the second access count corresponding to the data logical object set, and the second access count is used as the second access time information corresponding to the data logical object set.
[0019] Optionally, the step of counting the first access count of the data block based on the access information recorded each time the data block is accessed includes:
[0020] The number of first accesses of the data block in multiple historical time periods at different distances from the current time is calculated based on the access information recorded each time the data block is accessed.
[0021] The step of summing the first access count of each data block corresponding to the data logical object in the data logical object set to obtain the second access count corresponding to the data logical object set includes:
[0022] The first access counts of each data block corresponding to the data logical object in the data logical object set within the same historical time period are summed to obtain the second access counts of the data logical object set within each historical time period.
[0023] The step of obtaining the first data hot / cold analysis result corresponding to the data logical object set based on the second access time information includes:
[0024] The second access counts of multiple sets of data logical objects within the same historical time period are compared to calculate the percentage of access counts of each set of data logical objects within each historical time period.
[0025] The data popularity of the data logical object set is calculated based on the percentage of accesses to the data logical object set in each of the historical time periods, and the first data hot / cold analysis result corresponding to the data logical object set is determined based on the data popularity.
[0026] Optionally, the step of calculating the data popularity corresponding to the data logical object set based on the proportion of access times of the data logical object set in each of the historical time periods includes:
[0027] The data popularity of the data logical object set is obtained by weighting and summing the percentage of accesses of the data logical object set in each of the historical time periods according to the weights corresponding to each historical time period. The weight of the historical time period that is further away from the current time is smaller.
[0028] Optionally, the step of determining the first data hot / cold analysis result corresponding to the data logical object set based on the data heat includes:
[0029] When the data popularity corresponding to the data logic object set is less than a first preset threshold, the data logic object set is determined to be cold data;
[0030] When the data popularity corresponding to the data logic object set is greater than or equal to the first preset threshold, the data logic object set is determined to be hot data.
[0031] Optionally, after the step of calculating the first data hot / cold analysis results corresponding to the data logical object set based on the second access time information, the method further includes:
[0032] When the first data hot and cold analysis result indicates that the data logical object set is cold data, the third access time information corresponding to the data logical object in the data logical object set is obtained by statistical analysis based on the first access time information of each data block corresponding to the data logical object in the data logical object set.
[0033] Based on the third access time information, the second data hot / cold analysis result corresponding to the data logical object in the data logical object set is obtained;
[0034] Each data block corresponding to each data logical object in the data logical object set, which is cold data, is migrated to a preset low-speed storage device. When it is determined from the second data cold and hot analysis result that there is a target data logical object belonging to hot data in the data logical object set, the data block corresponding to the target data logical object is cached from the preset low-speed storage device into memory.
[0035] To achieve the above objectives, the present invention also provides a data hot and cold analysis device, the data hot and cold analysis device comprising:
[0036] The registration module is used to register the data logical objects to be accessed in each data access operation, and to determine the data logical object set based on the registered data logical object information. A set of data logical objects includes a group of data logical objects with access relevance.
[0037] The recording module is used to record the first access time information corresponding to the data block actually accessed by each of the data access operations;
[0038] The statistics module is used to obtain the second access time information corresponding to the data logic object set based on the first access time information of each data block corresponding to the data logic object in the data logic object set.
[0039] The analysis module is used to analyze the second access time information to obtain the first data hot / cold analysis result corresponding to the data logical object set.
[0040] To achieve the above objectives, the present invention also provides a data hot and cold analysis device, the data hot and cold analysis device comprising:
[0041] To achieve the above objectives, the present invention also provides a data hot and cold analysis device, the data hot and cold analysis device comprising: a memory, a processor, and a data hot and cold analysis program stored in the memory and executable on the processor, wherein the data hot and cold analysis program, when executed by the processor, implements the steps of the data hot and cold analysis method as described above.
[0042] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a data hot and cold analysis program, which, when executed by a processor, implements the steps of the data hot and cold analysis method described above.
[0043] In this embodiment of the invention, by registering the data logical objects to be accessed by each data access operation, a set of data logical objects is determined based on the registered data logical object information. A set of data logical objects includes a group of data logical objects with access correlation. First access time information corresponding to the data blocks actually accessed by each data access operation is recorded. Second access time information corresponding to the set of data logical objects is statistically obtained based on the first access time information of each data block corresponding to the data logical objects in the set. First hot / cold data analysis results are obtained based on the second access time information. This embodiment of the invention implements a hot / cold data analysis scheme based on data correlation. It treats a group of data logical objects with access correlation as a whole set of data logical objects, and statistically analyzes the overall access time information of the set of data logical objects based on the access time information recorded for the actual accessed data blocks. This allows for the analysis of the overall hot / cold nature of the set of data logical objects, rather than simply identifying the hot / cold nature of data from the physical storage level of data blocks. This improves the rationality of hot / cold data identification and thus improves the efficiency of hierarchical storage of hot / cold data. Attached Figure Description
[0044] Figure 1 This is a schematic diagram of the hardware operating environment involved in the embodiments of the present invention;
[0045] Figure 2 This is a flowchart illustrating the first embodiment of the data hot and cold analysis method of the present invention;
[0046] Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the data hot and cold analysis device of the present invention.
[0047] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0048] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0049] like Figure 1 As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.
[0050] It should be noted that the data hot and cold analysis device in this embodiment of the invention can be a smartphone, personal computer, server, or other device, and no specific limitation is made here. At least one first camera unit is installed at the entrance of the cleaning area of the construction site, and at least one second camera unit is installed at the exit of the cleaning area.
[0051] like Figure 1 As shown, the data hot / cold analysis device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0052] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the data hot and cold analysis device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0053] like Figure 1 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a data hot / cold analysis program. The operating system is a program that manages and controls the device's hardware and software resources, supporting the operation of the data hot / cold analysis program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the data hot / cold analysis program stored in the memory 1005 and perform the following operations:
[0054] The data logical objects to be accessed in each data access operation are registered, and a set of data logical objects is determined based on the registered data logical object information. A set of data logical objects includes a group of data logical objects that have access relevance.
[0055] Record the first access time information corresponding to the data block actually accessed by each of the aforementioned data access operations;
[0056] Based on the first access time information of each data block corresponding to the data logical object in the data logical object set, the second access time information corresponding to the data logical object set is obtained statistically.
[0057] The first data hot / cold analysis result corresponding to the data logical object set is obtained based on the second access time information.
[0058] Furthermore, the operation of registering the data logical objects to be accessed in each data access operation and determining the set of data logical objects based on the registered data logical object information includes:
[0059] Register the main data logical object to be accessed by each data access operation and the related data logical objects corresponding to the main data logical object;
[0060] The master data logical object and the related data logical object registered for the same data access operation are grouped into the same set of data logical objects;
[0061] For any first data access operation in each of the data access operations, if it is determined that the related data logic object registered by a second data access operation is the same as the main data logic object registered by the first data access operation, then the main data logic object and the related data logic object registered by the first data access operation and the second data access operation are assigned to the same set of data logic objects.
[0062] Furthermore, the operation of recording the first access time information corresponding to the data block actually accessed by each of the data access operations includes:
[0063] Record the access information when each of the data access operations actually accesses the data block, wherein the access information includes the time when the data block is accessed;
[0064] The first access count of the data block is calculated based on the access information recorded each time the data block is accessed, and the first access count is used as the first access time information corresponding to the data block.
[0065] The operation of obtaining the second access time information corresponding to the data logical object set based on the first access time information of each data block corresponding to the data logical object in the data logical object set includes:
[0066] The first access count of each data block corresponding to the data logical object in the data logical object set is accumulated to obtain the second access count corresponding to the data logical object set, and the second access count is used as the second access time information corresponding to the data logical object set.
[0067] Furthermore, the operation of counting the first access count of the data block based on the access information recorded each time the data block is accessed includes:
[0068] The number of first accesses of the data block in multiple historical time periods at different distances from the current time is calculated based on the access information recorded each time the data block is accessed.
[0069] The operation of accumulating the first access count of each data block corresponding to the data logical object in the data logical object set to obtain the second access count corresponding to the data logical object set includes:
[0070] The first access counts of each data block corresponding to the data logical object in the data logical object set within the same historical time period are summed to obtain the second access counts of the data logical object set within each historical time period.
[0071] The operation of obtaining the first data hot / cold analysis result corresponding to the data logical object set based on the second access time information includes:
[0072] The second access counts of multiple sets of data logical objects within the same historical time period are compared to calculate the percentage of access counts of each set of data logical objects within each historical time period.
[0073] The data popularity of the data logical object set is calculated based on the percentage of accesses to the data logical object set in each of the historical time periods, and the first data hot / cold analysis result corresponding to the data logical object set is determined based on the data popularity.
[0074] Furthermore, the operation of calculating the data popularity corresponding to the data logical object set based on the proportion of access times of the data logical object set in each of the historical time periods includes:
[0075] The data popularity of the data logical object set is obtained by weighting and summing the percentage of accesses of the data logical object set in each of the historical time periods according to the weights corresponding to each historical time period. The weight of the historical time period that is further away from the current time is smaller.
[0076] Furthermore, the operation of determining the first data hot / cold analysis result corresponding to the data logical object set based on the data heat includes:
[0077] When the data popularity corresponding to the data logic object set is less than a first preset threshold, the data logic object set is determined to be cold data;
[0078] When the data popularity corresponding to the data logic object set is greater than or equal to the first preset threshold, the data logic object set is determined to be hot data.
[0079] Furthermore, after calculating the first data hot / cold analysis results corresponding to the data logical object set based on the second access time information, the processor 1001 can also call the data hot / cold analysis program stored in the memory 1005 to perform the following operations:
[0080] When the first data hot and cold analysis result indicates that the data logical object set is cold data, the third access time information corresponding to the data logical object in the data logical object set is obtained by statistical analysis based on the first access time information of each data block corresponding to the data logical object in the data logical object set.
[0081] Based on the third access time information, the second data hot / cold analysis result corresponding to the data logical object in the data logical object set is obtained;
[0082] Each data block corresponding to each data logical object in the data logical object set, which is cold data, is migrated to a preset low-speed storage device. When it is determined from the second data cold and hot analysis result that there is a target data logical object belonging to hot data in the data logical object set, the data block corresponding to the target data logical object is cached from the preset low-speed storage device into memory.
[0083] Based on the above structure, various embodiments of the hot and cold data analysis method are proposed.
[0084] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the data hot and cold analysis method of the present invention.
[0085] This invention provides an embodiment of a data hot and cold analysis method. It should be noted that although the flowchart shows a logical order, in some cases, the steps shown or described may be executed in a different order. In this embodiment, the executing entity of the data hot and cold analysis method can be a smartphone, personal computer, server, or other device; no limitation is imposed in this embodiment. For ease of description, the following omits the description of the executing entity in each embodiment. In this embodiment, the data hot and cold analysis method includes the following steps:
[0086] Step S10: Register the data logical objects to be accessed for each data access operation, and determine the data logical object set based on the registered data logical object information. A set of data logical objects includes a group of data logical objects with access relevance.
[0087] Data access operations refer to the operations performed on stored data. These are typically triggered by business systems; for example, a reading system's operation to retrieve a user's historical reading records is a data access operation. A data logical object is a concept corresponding to a data block. A data block corresponds to an actual storage address within a physical storage space, while a data logical object is at the logical level and is abstract. A data logical object is an independent unit accessed by a data access operation. What it specifically represents is related to the business logic of the business system. For example, in a reading system, a data logical object accessed by a data access operation could be a reading record corresponding to a specific user ID. A data logical object corresponds to at least one data block in the physical storage space.
[0088] In this embodiment, before accessing data, the data logical objects to be accessed by the data access operation are registered (or recorded). The registered information is referred to as data logical object information. In a specific implementation, the registered data logical object information for a data access operation may include the name of the data logical object to be accessed, or it may include the access operation type. In a specific implementation, registration can be done in a table format; for example, one or more rows in a table can be used to register the data logical object information corresponding to a data access operation. A data access operation may access multiple data logical objects, such as a main data logical object and related data logical objects. Data logical objects accessed by the same data access operation can be considered to have access correlation, or, when different data access operations access the same data logical object, the data logical objects accessed by different data access operations can also be considered to have access correlation. Therefore, in this embodiment, based on the registered data logical object information, data logical objects with access correlation can be grouped into a set of data logical objects. For example, if a data access operation needs to access two logical data objects, DataObjectA and DataObjectB, then these two logical data objects, DataObjectA and DataObjectB, can be grouped into the same set of logical data objects.
[0089] Further, in one embodiment, step S10 includes:
[0090] Step S101: Register the main data logical object to be accessed for each data access operation and the related data logical objects corresponding to the main data logical object;
[0091] In this embodiment, the data logic object to be accessed in the data access operation may include a main data logic object and related data logic objects corresponding to the main data logic object. There is an access dependency between the main data logic object and the related data logic objects. For example, the related data logic object may be accessed incidentally while the main data logic object is being accessed, or the related data logic object may be accessed some time after the main data logic object is accessed, or the related data logic object may be accessed with a high probability after the main data logic object is accessed. The specific scenario can be determined based on the business processing logic of the business system, and this embodiment does not impose any restrictions.
[0092] It is possible to register the main data logical object to be accessed for each data access operation and the related data logical objects corresponding to that main data logical object.
[0093] Step S102: The master data logical object and the related data logical object registered for the same data access operation are divided into the same data logical object set;
[0094] When partitioning a set of data logical objects, the main data logical object and related data logical objects registered for the same data access operation can be grouped into the same set of data logical objects. For example, if the main data logical object to be accessed in a data access operation is DataObjectA, and the related data logical object is DataObjectB, then DataObjectA and DataObjectB can be grouped into the same set of data logical objects.
[0095] Step S103: For any first data access operation among the data access operations, if it is determined that the related data logic object registered by a second data access operation is the same as the main data logic object registered by the first data access operation, then the main data logic object and the related data logic object registered by the first data access operation and the second data access operation are assigned to the same set of data logic objects.
[0096] For any one of the data access operations (hereinafter referred to as the first data access operation for distinction), if there is another data access operation (hereinafter referred to as the second data access operation) among the data access operations, and the related data logical objects registered by the second data access operation are the same as the main data logical objects registered by the first data access operation, then all the main data logical objects and related data logical objects registered by the first data access operation and the second data access operation can be divided into the same set of data logical objects.
[0097] For example, the table below exemplifies data logical object information registered in a tabular format.
[0098]
[0099] There are a total of 3 data access operations, numbered Daid_xxx1, Daid_xxx2 and Daid_xxx3.
[0100] The main data logical object DataObjectA of data access operation Daid_xxx1 is the same as the related data logical object DataObjectA of data access operation Daid_xxx2. Therefore, the data logical objects DataObjectA, DataObjectB, DataObjectC, DataObjectD, and DataObjectE in data access operations Daid_xxx1 and Daid_xxx2 are grouped into the same set of data logical objects, which can be denoted as Loigc_DataObject_Dxxx1_Dxxx2. Data access operation Daid_xxx3 is independent of other data access operations. The three logical objects accessed by this operation, DataObjectF, DataObjectG, and DataObjectH, are grouped into the same set of data logical objects, which can be denoted as Loigc_DataObject_Dxxx3.
[0101] Step S20: Record the first access time information corresponding to the data block actually accessed by each data access operation;
[0102] The data access operation actually accesses the data block corresponding to the data logical object. In this embodiment, when a data block is accessed, the access time information corresponding to the data block is recorded (hereinafter referred to as the first access time information for distinction). The first access time information is information related to the time when the data block is accessed, but in this embodiment, there is no limitation on what information it specifically includes. For example, in one embodiment, it may be the number of accesses obtained by counting the number of times the data block is accessed by each data access operation, or it may be the frequency of the data block being accessed within a certain period of time calculated based on the number of accesses.
[0103] Step S30: Based on the first access time information of each data block corresponding to the data logical object in the data logical object set, the second access time information corresponding to the data logical object set is statistically obtained.
[0104] There is a correspondence between data blocks and data logical objects. Therefore, for each data logical object, it is possible to determine which data blocks correspond to the data logical objects in that data logical object set. Based on the first access time information corresponding to these data blocks, the second access time information corresponding to that data logical object set can be statistically obtained. Specifically, obtaining the second access time information based on the first access time information can be achieved by accumulating the access times of each data block. In specific implementations, the specific operation method of this accumulation operation varies depending on the information content contained in the first access time information. For example, when the first access time information is the number of accesses to a data block, the access times of each data block can be added together to obtain the total number of accesses to the data logical object set, and this total number of accesses can be used as the second access time information. Alternatively, when the first access time information is the access frequency of a data block, the access frequencies of each data block can be added together or averaged to obtain the total access frequency of the data logical object set.
[0105] Step S40: Analyze the second access time information to obtain the first data hot / cold analysis result corresponding to the data logical object set.
[0106] The process of analyzing each set of data logical objects is the same, so the following explanation will use a set of data logical objects as an example.
[0107] After obtaining the second access time information corresponding to the data logical object set, the data hot / cold analysis result (hereinafter referred to as the first data hot / cold analysis result for distinction) can be obtained based on the second access time information. Specifically, the first data hot / cold analysis result can indicate whether the data logical object set is cold or hot data, or in other embodiments, it can indicate the level of heat of the data logical object set. This embodiment does not limit the specific form of the data hot / cold analysis result.
[0108] The specific analysis method used to obtain the hot / cold data analysis result based on the second access time information is not limited in this embodiment, and the analysis method used will also differ depending on the information content contained in the second access time information. For example, in one embodiment, when the second access time information is the access frequency of a set of data logical objects, the access frequency can be compared with a threshold. If it is greater than the threshold, the set of data logical objects is determined to be hot data; if it is not greater than the threshold, the set of data logical objects is determined to be cold data.
[0109] It should be noted that the first access time information is related to the time when the data block is accessed, and can reflect the frequency of the data block being accessed. The second access time information is obtained by statistics based on the first access time information. Therefore, the second access time information can characterize the frequency of the data logical object set as a whole being accessed. Based on the second access time information, the hot and cold analysis results of the data logical object set can be obtained.
[0110] After determining the first data hot and cold analysis result of the data logical object set, the data logical object set can be subjected to corresponding data layer storage processing according to the first data hot and cold analysis result. For example, when the first data hot and cold data analysis result is that the data logical object set is cold data, the data blocks corresponding to the data logical objects in the data logical object set are migrated to a low-speed storage device. The low-speed storage device can be a device that is slower than the storage device currently storing the data blocks.
[0111] In this embodiment, by registering the data logical objects to be accessed by each data access operation, a set of data logical objects is determined based on the registered data logical object information. A set of data logical objects includes a group of data logical objects with access correlation. First access time information corresponding to the data blocks actually accessed by each data access operation is recorded. Second access time information corresponding to the data logical object set is statistically obtained based on the first access time information of each data block corresponding to the data logical objects in the set. First hot / cold data analysis results are obtained based on the second access time information. This embodiment implements a hot / cold data analysis scheme based on data correlation. It treats a group of data logical objects with access correlation as a whole set of data logical objects. Based on the access time information recorded for the actual accessed data blocks, it statistically analyzes the overall hot / cold nature of the data logical object set, rather than solely identifying the hot / cold nature of data from the physical storage level of data blocks. This improves the rationality of hot / cold data identification and thus improves the efficiency of hierarchical storage of hot / cold data.
[0112] Based on the first embodiment described above, a second embodiment of the cold and heat data analysis method of the present invention is proposed. In this embodiment, step S20 includes:
[0113] Step S201: Record the access information when each data access operation actually accesses the data block, wherein the access information includes the time when the data block is accessed;
[0114] In this embodiment, access information can be recorded when each data access operation actually accesses a data block. This access information may include the time when the data block is accessed. In other embodiments, the access information may also include the type of access operation when the data block is accessed, i.e., whether it is a read or a write operation.
[0115] Step S202: Calculate the first access count of the data block based on the access information recorded each time the data block is accessed, and use the first access count as the first access time information corresponding to the data block;
[0116] Based on the access information recorded each time a data block is accessed, the number of accesses to that data block can be counted (hereinafter referred to as the first access count for distinction), and this first access count is used as the first access time information corresponding to that data block. In a specific implementation, the first access count can refer to the total number of times the data block has been accessed since the business system was started, or it can be the number of times the data block has been accessed within different time periods since the business system was started, or it can be divided into the number of times the data block has been accessed by read operations and the number of times it has been accessed by write operations since the business system was started. The specific settings can be configured as needed and are not limited in this embodiment. For example, when write and read operations in the business system have the same impact on the popularity of the evaluation data, they do not need to be counted separately; conversely, when the impacts are different, they can be counted separately. Similarly, when accesses in different time periods of the business system have the same impact on the popularity of the evaluation data, only a single total can be counted without dividing by time period; conversely, when the impacts are different, they can be counted separately.
[0117] Step S30 includes:
[0118] Step S301: The first access count of each data block corresponding to the data logical object in the data logical object set is accumulated to obtain the second access count corresponding to the data logical object set, and the second access count is used as the second access time information corresponding to the data logical object set.
[0119] When the first access time information is the first access count of a data block, the first access counts of each data block corresponding to the data logical object in the data logical object set can be accumulated to obtain the access count corresponding to the data logical object set (hereinafter referred to as the second access count for distinction). The second access count is used as the second access time information corresponding to the data logical object set. It should be noted that when the first access count includes multiple different counts, such as the access counts corresponding to read operation types and the access counts corresponding to write operation types, the same counts of each data block can be accumulated to obtain multiple different counts for the data logical object. That is, for example, the access counts corresponding to read operation types of each data block are accumulated to obtain the access count corresponding to read operation types of the data logical object set, and the access counts corresponding to write operation types of each data block are accumulated to obtain the access count corresponding to write operation types of the data logical object set.
[0120] Furthermore, when the second access time information is the second access count corresponding to the data logical object set, there are many ways to analyze the first data hot / cold analysis result of the data logical object set based on the second access count, and this embodiment does not impose any limitations. For example, in one embodiment, when the first access count represents the total number of times a data block has been accessed since the business system started, and the second access count represents the total number of times the data logical object set has been accessed since the business system started, the second access count of the data logical object set can be compared with a threshold. When it is greater than the threshold, the data logical object set is determined to be hot data; when it is less than or equal to the threshold, the data logical object set is determined to be cold data.
[0121] Further, in one embodiment, the step S202 of counting the first access count of the data block based on the access information recorded each time the data block is accessed includes:
[0122] Step S2021: Based on the access information recorded each time the data block is accessed, count the number of first accesses of the data block in multiple historical time periods at different distances from the current time.
[0123] In this implementation, the business logic of the business system generally considers data that has been accessed frequently recently as hot data. Data that has been accessed frequently a long time ago, even if it has been accessed frequently, cannot be considered hot data. Based on this specific situation, the number of times the data block is accessed can be counted in multiple historical time periods at different distances from the current time according to the access information recorded each time the data block is accessed. That is, the number of accesses is counted separately for each time period.
[0124] The historical time period from the current moment refers to a certain duration of historical time calculated based on the current moment. For example, the most recent hour and the most recent day are two historical time periods of different distances, with the most recent hour being more recent and the most recent day being more distant. The number of historical time periods is not limited in this implementation and can be set as needed. The durations spanned by each historical time period can be the same or different. However, considering that the business logic of the business system generally assumes that access operations occurring further back in time have less impact on data popularity assessment, the durations spanned by each historical time period can be non-linearly decreased from distant to recent. For example, historical time periods such as the most recent year, the most recent 6 months, the most recent 3 months, the most recent 1 month, the most recent 1 week, the most recent 1 day, and the most recent 1 hour can be set. It should be noted that there are no overlapping time periods between the historical time periods. For example, the most recent year refers to a period of more than 6 months within one year from the current moment, and the same applies to other historical time periods.
[0125] It should be noted that, in specific implementations, while counting the number of accesses in different time periods, it is also possible to count them separately by different operation types. That is, the number of times the data block is accessed as a read operation type and the number of times it is accessed as a write operation type in each historical time period are counted separately.
[0126] It should be noted that the current moment refers to the moment when hot and cold data analysis is required. In a specific implementation, the stored data can be analyzed sequentially for hot and cold data at regular intervals. However, when counting the access count of data blocks, the count can be performed in real time or sequentially at regular intervals, with the current moment being the time of the count. When hot and cold data analysis is needed, the results obtained so far are retrieved. For example, when counting the access count of a data block in real time, when access to a data block is detected, the access count within the most recent hour is incremented by 1. After one hour, the access count within the most recent day is incremented by 1, while the access count within the most recent hour within the past year is decremented by 1. It should be noted that, in a specific implementation, to avoid wasting computing resources, the access count of data blocks can be counted sequentially at regular intervals, such as every hour.
[0127] The step S301, which involves summing the first access counts of each data block corresponding to a data logical object in the data logical object set to obtain the second access counts corresponding to the data logical object set, includes:
[0128] Step S3011: The first access count of each data block corresponding to the data logical object in the data logical object set within the same historical time period is accumulated separately to obtain the second access count of the data logical object set within each historical time period.
[0129] Accordingly, for a set of data logical objects, the first access counts of each data block corresponding to a data logical object within the same historical time period can be summed separately to obtain the second access counts of the data logical object set within each historical time period. For example, assuming there are 3 data blocks corresponding to a data logical object in the set of data logical objects, and the historical time period is set to 6, the access counts of the 3 data blocks in the first historical time period are added together to obtain the access count of the data logical object set within the first historical time period. The access counts of the 3 data blocks in the second historical time period are added together to obtain the access count of the data logical object set within the second historical time period, and so on, to obtain the access counts of the data logical object set within each of the 6 historical time periods.
[0130] After obtaining the second access count of the data logical object set in each historical time period, there are many ways to analyze the hot and cold data of the data logical object set based on the second access count, and this is not limited here. For example, in one embodiment, the second access count of the data logical object set in each historical time period can be weighted and averaged. The weights corresponding to each historical time period can be preset, with lower weights for older historical time periods and higher weights for more recent historical time periods, to conform to the actual business logic that access operations occurring in more distant times have less impact on data popularity. The result obtained by weighted averaging is compared with a threshold. If it is greater than the threshold, the data logical object set is determined to be hot data; if it is less than or equal to the threshold, the data logical object set is determined to be cold data.
[0131] Further, in one embodiment, step S40 includes:
[0132] Step S401: Compare the second access counts of multiple data logical object sets within the same historical time period to calculate the access count percentage of each data logical object set in each historical time period.
[0133] Considering that in the business logic of a business system, the relative number of data accesses generally better reflects the data's access frequency, this implementation compares the second access counts of multiple data logical object sets within the same historical time period, calculating the percentage of each data logical object set's second access count within that historical time period relative to the total number of second accesses for all data logical object sets within that historical time period (hereinafter referred to as the access count percentage). For a single data logical object set, an access count percentage is calculated for each historical time period.
[0134] Step S402: Calculate the data popularity corresponding to the data logical object set based on the percentage of accesses to the data logical object set in each of the historical time periods, and determine the first data hot / cold analysis result corresponding to the data logical object set based on the data popularity.
[0135] The data popularity of a data logical object set is calculated based on the percentage of accesses within each historical time period. The specific calculation method is not limited in this implementation and can be set according to the specific business logic of the business system. For example, the percentage of accesses within each historical time period can be added together or averaged to obtain the data popularity of the data logical object set. Higher data popularity indicates a more popular data logical object set.
[0136] This implementation does not limit the specific method of determining the first data hot / cold analysis result corresponding to the data logical object set based on data popularity. For example, data popularity can be mapped to a popularity level, and the popularity level can be used as the first data hot / cold analysis result of the data logical object set.
[0137] Further, in one embodiment, the step S402 of calculating the data popularity corresponding to the data logical object set based on the proportion of access frequency of the data logical object set in each of the historical time periods includes:
[0138] Step S4021: The percentage of accesses to the data logical object set in each of the historical time periods is weighted and summed according to the weights corresponding to each of the historical time periods to obtain the data popularity of the data logical object set. The weight of the historical time period that is further away from the current time is smaller.
[0139] Considering that business logic in business systems generally means that access operations occurring further back in time have less impact on data popularity, we can set weights for each historical time period, with the weights of historical time periods further back from the current time being set smaller. The percentage of accesses to the data logic object set within each historical time period is weighted and summed according to the weights of the corresponding historical time periods, and the result is used as the data popularity of the data logic object set.
[0140] By statistically analyzing the number of accesses to a set of logical objects in multiple historical time periods at varying distances from the current time, and calculating the percentage of accesses to the set of logical objects in each historical time period, the data popularity of the set of logical objects is obtained by weighting and summing the percentages of accesses in each historical time period according to the weight of the corresponding historical time period. The weight of historical time periods further from the current time is set smaller, so that the calculation of the data popularity of the set of logical objects is more in line with the actual business logic of the business system, and thus the data hot and cold analysis results obtained are more reasonable.
[0141] Further, in one embodiment, step S402, which involves determining the first data hot / cold analysis result corresponding to the data logical object set based on the data heat, includes:
[0142] Step S4022: When the data heat corresponding to the data logical object set is less than a first preset threshold, the data logical object set is determined as cold data.
[0143] Step S4023: When the data heat corresponding to the data logic object set is greater than or equal to the first preset threshold, the data logic object set is determined as hot data.
[0144] In this embodiment, the set of data logical objects can be compared with a first preset threshold to determine whether the set of data logical objects is hot data or cold data. The first preset threshold can be set as needed and is not limited in this embodiment.
[0145] Furthermore, based on the first and / or second embodiments described above, a third embodiment of the data hot and cold analysis method of the present invention is proposed. In this embodiment, after step S40, the method further includes:
[0146] Step S50: When the first data hot and cold analysis result indicates that the data logical object set is cold data, the third access time information corresponding to the data logical object in the data logical object set is statistically obtained based on the first access time information of each data block corresponding to the data logical object in the data logical object set.
[0147] When the first data hot / cold analysis result of the data logical object set is that the data logical object set is cold data, the data blocks corresponding to the data logical objects in the data logical object set can be migrated to low-speed storage devices. Based on this, further analysis can be performed on the data logical objects in the data logical object set to determine whether there is local hot data in the data logical object set that is considered cold data in terms of overall access volume. When local hot data exists, caching can be used to improve the access efficiency when the local hot data is accessed.
[0148] Specifically, access time information (hereinafter referred to as third access time information) corresponding to the data logical objects in the data logical object set can be calculated based on the first access time information of the data blocks corresponding to the data logical objects in the data logical object set. The specific implementation method for calculating the third access time information based on the first access time information can refer to the specific implementation method for calculating the second access time information based on the first access time information, and will not be repeated here.
[0149] Step S60: Based on the third access time information, analyze and obtain the second data hot / cold analysis result corresponding to the data logical object in the data logical object set;
[0150] The specific implementation method for obtaining the data hot and cold analysis results (hereinafter referred to as the second data hot and cold analysis results) corresponding to the data logical objects in the data logical object set based on the third access time information analysis can refer to the specific implementation method for obtaining the first data hot and cold analysis results of the data logical object set based on the second access time information analysis, which will not be elaborated here.
[0151] Step S70: Migrate each data block corresponding to each data logical object in the data logical object set that is cold data to a preset low-speed storage device. When it is determined from the second data hot and cold analysis result that there is a target data logical object belonging to hot data in the data logical object set, cache the data block corresponding to the target data logical object from the preset low-speed storage device into memory.
[0152] The data blocks corresponding to each data logical object in the data logical object set, which is considered cold data, are migrated to a preset low-speed storage device. This preset low-speed storage device can be a local storage device or a remote storage device; "low-speed" refers to its speed relative to the storage device currently storing the data block.
[0153] When the results of the second data hot and cold analysis determine that there is a data logical object belonging to hot data in the data logical object set (hereinafter referred to as the target data logical object for distinction), it indicates that the target data logical object is local hot data in the data logical object set. The data block corresponding to the target data logical object can be cached from the preset low-speed storage device into memory to improve the access efficiency of the target data logical object.
[0154] Furthermore, in one embodiment, when a target data logical object cached in memory is not accessed within a preset time period, the data corresponding to the target data logical object can be deleted from memory.
[0155] It is understandable that since the set of data logical objects that are cold data has been migrated to the low-speed storage device as a whole, when the local hot data is not actually accessed and is regarded as cold data, it is not necessary to perform the operation of migrating the local hot data to the low-speed storage device again. It is only necessary to delete the local hot data cached in memory, thereby improving the efficiency of cold data migration, that is, improving the efficiency of tiered storage of hot and cold data.
[0156] The following example illustrates the hot and cold analysis process of a set of data logical objects and data logical objects.
[0157] The number of accesses to the recorded data blocks is shown in the table below:
[0158] Data block address Access count for read operation type Number of accesses for write operation type DB0001 R{a}{b}{c}{d}{e}{f}{g} W{a}{b}{c}{d}{e}{f}{g} DB0002 R{a}{b}{c}{d}{e}{f}{g} W{a}{b}{c}{d}{e}{f}{g} …… R{a}{b}{c}{d}{e}{f}{g} W{a}{b}{c}{d}{e}{f}{g}
[0159] The numbers {a}{b}{c}{d}{e}{f}{g} above represent the number of visits in the last year, the last 6 months, the last 3 months, the last 1 month, the last 1 week, the last 1 day, and the last 1 hour, respectively.
[0160] Based on the number of accesses to the data blocks, the number of accesses to each logical data object is calculated:
[0161] Data logical object Access count for read operation type Number of accesses for write operation type DataObjectA R{a}{b}{c}{d}{e}{f}{g} W{a}{b}{c}{d}{e}{f}{g} DataObjectB R{a}{b}{c}{d}{e}{f}{g} W{a}{b}{c}{d}{e}{f}{g} …… R{a}{b}{c}{d}{e}{f}{g} W{a}{b}{c}{d}{e}{f}{g}
[0162] Based on the access count of the data blocks, the access count of each data logical object set is calculated:
[0163]
[0164] To ensure the objectivity of the statistics and avoid statistical bias caused by partial and uneven access, different weights are assigned to different historical time periods:
[0165] Time period a b c d e f g Weight 1 2 4 8 16 24 45
[0166] The data access ratio of the data logical object set is calculated as (number of accesses / total number of accesses of all data logical object sets) * 100. That is, in the specific implementation, the access ratio is not necessarily expressed as a percentage.
[0167]
[0168] Calculate the data popularity of a set of logical data objects:
[0169] Data logical object set read Write Data popularity Loigc_DataObject_Dxxx3 42.45 16.74 59.19 Loigc_DataObject_Dxxx1_Dxxx2 3 0 3
[0170] Calculate the data popularity of logical data objects:
[0171]
[0172] The above data shows the data popularity at the data logic object set level:
[0173] Loigc_DataObject_Dxxx1_Dxxx is less than Loigc_DataObject_Dxxx3
[0174] Loigc_DataObject_Dxxx1_Dxxx2 can be considered to be in a cold data state. In addition to using relative comparison to distinguish between hot and cold data, logical data objects with a data heat value below a specified threshold can also be classified as cold data.
[0175] Data popularity within a data logical object set:
[0176] DataObjectD>DataObjectC>DataObjectB>DataObjectA
[0177] DataObjectA, DataObjectB, and DataObjectC can be considered to be in a cold data state, while DataObjectD is in a locally hot data state.
[0178] Logical data objects DataObjectA, DataObjectB, DataObjectC, and DataObjectD can be added to the cold data migration queue for subsequent migration processing. DataObjectD is a relatively hot local data within the overall cold data; it is added to the cache queue for subsequent data caching processing. The cold data migration queue is read, and the cold data in the queue is migrated to low-speed storage devices. Data in the buffer queue is read and cached in memory.
[0179] Furthermore, embodiments of the present invention also propose a data hot and cold analysis device, referring to... Figure 3 The data hot and cold analysis device includes:
[0180] The registration module 10 is used to register the data logical objects to be accessed in each data access operation, and to determine the data logical object set based on the registered data logical object information. A set of data logical objects includes a group of data logical objects with access relevance.
[0181] Recording module 20 is used to record the first access time information corresponding to the data block actually accessed by each of the data access operations;
[0182] The statistics module 30 is used to obtain the second access time information corresponding to the data logic object set based on the first access time information of each data block corresponding to the data logic object in the data logic object set.
[0183] Analysis module 40 is used to analyze and obtain the first data hot and cold analysis result corresponding to the data logical object set based on the second access time information.
[0184] Furthermore, the registration module 10 is also used for:
[0185] Register the main data logical object to be accessed by each data access operation and the related data logical objects corresponding to the main data logical object;
[0186] The master data logical object and the related data logical object registered for the same data access operation are grouped into the same set of data logical objects;
[0187] For any first data access operation in each of the data access operations, if it is determined that the related data logic object registered by a second data access operation is the same as the main data logic object registered by the first data access operation, then the main data logic object and the related data logic object registered by the first data access operation and the second data access operation are assigned to the same set of data logic objects.
[0188] Furthermore, the recording module 20 is also used for:
[0189] Record the access information when each of the data access operations actually accesses the data block, wherein the access information includes the time when the data block is accessed;
[0190] The first access count of the data block is calculated based on the access information recorded each time the data block is accessed, and the first access count is used as the first access time information corresponding to the data block.
[0191] The statistics module 30 is also used for:
[0192] The first access count of each data block corresponding to the data logical object in the data logical object set is accumulated to obtain the second access count corresponding to the data logical object set, and the second access count is used as the second access time information corresponding to the data logical object set.
[0193] Furthermore, the recording module 20 is also used for:
[0194] The number of first accesses of the data block in multiple historical time periods at different distances from the current time is calculated based on the access information recorded each time the data block is accessed.
[0195] The statistics module 30 is also used for:
[0196] The first access counts of each data block corresponding to the data logical object in the data logical object set within the same historical time period are summed to obtain the second access counts of the data logical object set within each historical time period.
[0197] The analysis module 40 is also used for:
[0198] The second access counts of multiple sets of data logical objects within the same historical time period are compared to calculate the access count percentage of each set of data logical objects in each historical time period.
[0199] The data popularity of the data logical object set is calculated based on the percentage of accesses to the data logical object set in each of the historical time periods, and the first data hot / cold analysis result corresponding to the data logical object set is determined based on the data popularity.
[0200] Furthermore, the analysis module 40 is also used for:
[0201] The data popularity of the data logical object set is obtained by weighting and summing the percentage of accesses of the data logical object set in each of the historical time periods according to the weights corresponding to each historical time period. The weight of the historical time period that is further away from the current time is smaller.
[0202] Furthermore, the analysis module 40 is also used for:
[0203] When the data popularity corresponding to the data logic object set is less than a first preset threshold, the data logic object set is determined to be cold data;
[0204] When the data popularity corresponding to the data logic object set is greater than or equal to the first preset threshold, the data logic object set is determined to be hot data.
[0205] Furthermore, the statistics module 30 is also used for:
[0206] When the first data hot and cold analysis result indicates that the data logical object set is cold data, the third access time information corresponding to the data logical object in the data logical object set is obtained by statistical analysis based on the first access time information of each data block corresponding to the data logical object in the data logical object set.
[0207] The analysis module 40 is also used for:
[0208] Based on the third access time information, the second data hot / cold analysis result corresponding to the data logical object in the data logical object set is obtained;
[0209] The data hot and cold analysis device also includes:
[0210] The migration module is used to migrate each data block corresponding to each data logical object in the data logical object set, which is cold data, to a preset low-speed storage device, and when it is determined from the second data cold and hot analysis result that there is a target data logical object belonging to hot data in the data logical object set, the data block corresponding to the target data logical object is cached from the preset low-speed storage device into memory.
[0211] The extended content of the specific implementation of the data hot and cold analysis device of the present invention is basically the same as the various embodiments of the data hot and cold analysis method described above, and will not be repeated here.
[0212] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing a data hot and cold analysis program, which, when executed by a processor, implements the steps of the data hot and cold analysis method described below.
[0213] The various embodiments of the data hot and cold analysis device, system, and computer-readable storage medium of the present invention can all refer to the various embodiments of the data hot and cold analysis method of the present invention, and will not be described again here.
[0214] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0215] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0216] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0217] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for analyzing hot and cold data, characterized in that, The data hot and cold analysis method includes the following steps: The data logical objects to be accessed in each data access operation are registered, and a set of data logical objects is determined based on the registered data logical object information. A set of data logical objects includes a group of data logical objects that have access relevance. Record the first access time information corresponding to the data block actually accessed by each of the aforementioned data access operations; Based on the first access time information of each data block corresponding to the data logical object in the data logical object set, the second access time information corresponding to the data logical object set is obtained statistically. The first data hot / cold analysis result corresponding to the data logical object set is obtained based on the second access time information; The steps of registering the data logical objects to be accessed in each data access operation and determining the set of data logical objects based on the registered data logical object information include: Register the main data logical object to be accessed by each data access operation and the related data logical objects corresponding to the main data logical object; The master data logical object and the related data logical object registered for the same data access operation are grouped into the same set of data logical objects; For any first data access operation in each of the data access operations, if it is determined that the related data logic object registered by a second data access operation is the same as the main data logic object registered by the first data access operation, then the main data logic object and the related data logic object registered by the first data access operation and the second data access operation are assigned to the same set of data logic objects.
2. The data hot and cold analysis method as described in claim 1, characterized in that, The step of recording the first access time information corresponding to the data block actually accessed by each of the data access operations includes: Record the access information when each of the data access operations actually accesses the data block, wherein the access information includes the time when the data block is accessed; The first access count of the data block is calculated based on the access information recorded each time the data block is accessed, and the first access count is used as the first access time information corresponding to the data block. The step of obtaining the second access time information corresponding to the data logical object set based on the first access time information of each data block corresponding to the data logical object in the data logical object set includes: The first access count of each data block corresponding to the data logical object in the data logical object set is accumulated to obtain the second access count corresponding to the data logical object set, and the second access count is used as the second access time information corresponding to the data logical object set.
3. The data hot and cold analysis method as described in claim 2, characterized in that, The step of counting the first access count of the data block based on the access information recorded each time the data block is accessed includes: The number of first accesses of the data block in multiple historical time periods at different distances from the current time is calculated based on the access information recorded each time the data block is accessed. The step of summing the first access count of each data block corresponding to the data logical object in the data logical object set to obtain the second access count corresponding to the data logical object set includes: The first access counts of each data block corresponding to the data logical object in the data logical object set within the same historical time period are summed to obtain the second access counts of the data logical object set within each historical time period. The step of obtaining the first data hot / cold analysis result corresponding to the data logical object set based on the second access time information includes: The second access counts of multiple sets of data logical objects within the same historical time period are compared to calculate the access count percentage of each set of data logical objects in each historical time period. The data popularity of the data logical object set is calculated based on the percentage of accesses to the data logical object set in each of the historical time periods, and the first data hot / cold analysis result corresponding to the data logical object set is determined based on the data popularity.
4. The data hot and cold analysis method as described in claim 3, characterized in that, The step of calculating the data popularity corresponding to the data logical object set based on the access frequency ratio of the data logical object set in each of the historical time periods includes: The data popularity of the data logical object set is obtained by weighting and summing the percentage of accesses of the data logical object set in each of the historical time periods according to the weights corresponding to each historical time period. The weight of the historical time period that is further away from the current time is smaller.
5. The data hot and cold analysis method as described in claim 3, characterized in that, The step of determining the first data hot / cold analysis result corresponding to the data logical object set based on the data heat includes: When the data popularity corresponding to the data logic object set is less than a first preset threshold, the data logic object set is determined to be cold data; When the data popularity corresponding to the data logic object set is greater than or equal to the first preset threshold, the data logic object set is determined to be hot data.
6. The data hot and cold analysis method according to any one of claims 1 to 5, characterized in that, After the step of calculating the first data hot / cold analysis results corresponding to the data logical object set based on the second access time information, the method further includes: When the first data hot and cold analysis result indicates that the data logical object set is cold data, the third access time information corresponding to the data logical object in the data logical object set is obtained by statistical analysis based on the first access time information of each data block corresponding to the data logical object in the data logical object set. Based on the third access time information, the second data hot / cold analysis result corresponding to the data logical object in the data logical object set is obtained; Each data block corresponding to each data logical object in the data logical object set, which is cold data, is migrated to a preset low-speed storage device. When it is determined from the second data cold and hot analysis result that there is a target data logical object belonging to hot data in the data logical object set, the data block corresponding to the target data logical object is cached from the preset low-speed storage device into memory.
7. A data hot and cold analysis device, characterized in that, The data hot and cold analysis device includes: The registration module is used to register the data logical objects to be accessed in each data access operation, and to determine the data logical object set based on the registered data logical object information. A set of data logical objects includes a group of data logical objects with access relevance. The recording module is used to record the first access time information corresponding to the data block actually accessed by each of the data access operations; The statistics module is used to obtain the second access time information corresponding to the data logic object set based on the first access time information of each data block corresponding to the data logic object in the data logic object set. The analysis module is used to analyze the second access time information to obtain the first data hot / cold analysis result corresponding to the data logical object set; The registration module is also used for: Register the main data logical object to be accessed by each data access operation and the related data logical objects corresponding to the main data logical object; The master data logical object and the related data logical object registered for the same data access operation are grouped into the same set of data logical objects; For any first data access operation in each of the data access operations, if it is determined that the related data logic object registered by a second data access operation is the same as the main data logic object registered by the first data access operation, then the main data logic object and the related data logic object registered by the first data access operation and the second data access operation are assigned to the same set of data logic objects.
8. A data hot and cold analysis device, characterized in that, The data hot and cold analysis device includes: a memory, a processor, and a data hot and cold analysis program stored in the memory and executable on the processor. When the data hot and cold analysis program is executed by the processor, it implements the steps of the data hot and cold analysis method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a data hot and cold analysis program, which, when executed by a processor, implements the steps of the data hot and cold analysis method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data management method and device in server cluster system
CN105786401A
Data processing method, device, equipment and medium
CN112286459A