Data Migration Method, Device, Non-Volatile Storage Medium, and Computer Device

By optimizing data migration strategies in a separate data center, using deep learning framework and hot computing methods, the problem of insufficient performance and resource utilization in a traditional storage scheduling algorithm in a separate data center is solved, and more efficient data management and storage system performance is achieved.

CN119248747BActive Publication Date: 2025-07-18STATE GRID BEIJING ELECTRIC POWER CO +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411294942.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-07-18
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

The performance and resource utilization of traditional distributed storage scheduling algorithms cannot meet the requirements of separate data center storage systems, especially in terms of storage hierarchy structure and storage hierarchical scheduling strategies.

Method used

By receiving processing requests, update the state information of the data and the state information of the storage level, use the deep learning framework to optimize the storage data migration model, determine the target storage level of the data, and move the data from the initial storage level to the target storage level, combine Newton's cooling law and Bayesian averaging method to calculate the data heat value, and optimize the data migration strategy.

Benefits of technology

It improves the data management efficiency of the separate data center storage system, improves the performance and resource utilization of the storage system, reduces unnecessary data migration, and optimizes storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248747B_ABST
    Figure CN119248747B_ABST
Patent Text Reader

Abstract

The present invention discloses a data migration method, apparatus, non-volatile storage medium and computer device. Among them, the method includes: receiving a processing request for data to be processed; based on the processing request, determining the updated status information of the data to be processed and the updated storage status information of the initial storage level; obtaining the storage status information corresponding to the storage levels other than the initial storage level in the storage pool; determining the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool; and moving the data to be processed from the initial storage level to the target storage level. The present invention solves the technical problem that the performance and resource utilization rate of the traditional distributed storage scheduling algorithm cannot meet the requirements of the storage system of the separated data center.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic information technology, and in particular, to a data migration method, device, non-volatile storage medium, and computer device. Background Art

[0002] As the carrier of data, the data center is an essential resource in the contemporary information world. Traditional data centers take servers as the basic component units, packing computing, memory, and storage resources into servers. It is difficult to achieve cross-system pooled storage among servers, and most storage scheduling algorithms can only migrate data layer by layer, with low performance. Currently, a new type of disaggregated data center has attracted wide attention. In the storage architecture of the disaggregated data center, storage resources are pooled by category, and different levels of storage medium pools are connected through high-speed networks. Data can be migrated between different storage pools through the network.

[0003] Due to the differences in storage architectures, the disaggregated data center storage system also faces challenges in many aspects: First, in terms of the storage hierarchy structure, new storage media are introduced into the disaggregated storage resource pool, and more efficient software design is a major challenge; Second, in terms of the storage hierarchical scheduling strategy, traditional distributed storage scheduling algorithms are designed based on the environment where storage and computing are closely combined, mostly considering factors such as the heterogeneity of server nodes, computing performance, and node load. After complete decoupling of storage and computing, not only factors such as performance and cost need to be considered, but also the impact of network bandwidth, the scalability and adaptability of the storage system need to be concerned.

[0004] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention

[0005] Embodiments of the present invention provide a data migration method, device, non-volatile storage medium, and computer device to at least solve the technical problem that the performance and resource utilization rate of traditional distributed storage scheduling algorithms cannot meet the requirements of the disaggregated data center storage system.

[0006] According to one aspect of an embodiment of the present invention, a data migration method is provided, including: receiving a processing request for data to be processed; based on the processing request, updating the status information of the data to be processed and the storage status information of the initial storage level where the data to be processed is stored, and determining the updated status information of the data to be processed and the updated storage status information of the initial storage level, wherein the status information of the data to be processed includes the heat value of the data to be processed, and the heat value characterizes the frequency of access to the data to be processed; the initial storage level is located in the storage pool, and the storage status information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level; obtaining the storage status information corresponding to the storage levels other than the initial storage level in the storage pool; determining the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool; moving the data to be processed from the initial storage level to the target storage level.

[0007] Optionally, based on the processing request, updating the status information of the data to be processed and determining the updated status information of the data to be processed, wherein the status information of the data to be processed includes the heat value of the data to be processed, includes: according to the processing request, obtaining the total access volume within a preset period corresponding to the storage pool at the current moment; according to the total access volume, determining the heat period corresponding to the storage pool, wherein the heat period characterizes the access situation of the data in the storage pool, including the low peak period and the stable period; based on the heat period corresponding to the storage pool, determining the calculation formula for the heat value of the data to be processed; based on the calculation formula for the heat value of the data to be processed, determining the heat value of the data to be processed.

[0008] Optionally, when the heat period corresponding to the storage pool is the stable period, the calculation formula for the heat value of the data to be processed is the first calculation formula, wherein the first calculation formula is as follows:

[0009]

[0010] wherein, T(t n ) is the heat value of the data to be processed at time t n , t n-1 is the time when the data to be processed was last accessed, T heat is the heat value increase of the data to be processed after being accessed at time t n . When the data to be processed is accessed at time t n , the value of c is 1. When the data to be processed is not accessed at time t n , the value of c is 0.

[0011] Optionally, when the heat period corresponding to the storage pool is at a low peak, the calculation formula for determining the heat value of the data to be processed is the second calculation formula, where the second calculation formula is as follows:

[0012]

[0013] Among them, B i is the average heat value of the data to be processed within the preset period corresponding to the moment t n , C is the number of sample data within the preset duration before the preset period corresponding to the moment t n , m newavg is the average value of the heat values of multiple sample data, n Bayes is the number of times the data to be processed is accessed within the preset period corresponding to the moment t n , is the sum of the heat values of the data to be processed at multiple moments calculated based on the first calculation formula within the preset period corresponding to the moment t n .

[0014] Optionally, according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool, determining the target storage level of the data to be processed includes: inputting the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool into the storage data migration model to obtain the target storage level of the data to be processed, where the storage data migration model is trained using training samples, and the training samples include the status information of the data.

[0015] Optionally, the storage data migration model is trained using training samples, including: defining the state space, action space, and reward function of the initial storage data migration model, where the state space includes the status information in the storage pool and the status information of the data, the action space defines multiple storage levels selected for data migration, and the reward function is used to calculate the reward value corresponding to the migration action performed on the data; inputting the sample data set into the initial storage data migration model, training based on the preset deep learning framework, and optimizing the initial storage data migration model to obtain the storage data migration model.

[0016] Optionally, the status information of the data to be decided further includes user requirements, where the user requirements represent the user's requirements for the data access rate.

[0017] According to another aspect of the embodiments of the present invention, there is also provided a data migration device, including: a receiving module, configured to receive a processing request for data to be processed; a first determination module, configured to update the status information of the data to be processed and the storage status information of the initial storage level storing the data to be processed based on the processing request, and determine the updated status information of the data to be processed and the updated storage status information of the initial storage level, wherein the status information of the data to be processed includes the heat value of the data to be processed, the heat value characterizing the frequency of access to the data to be processed, the initial storage level is located in the storage pool, and the storage status information of the initial storage level includes the mean value of the heat values corresponding to the data stored in the initial storage level; an obtaining module, configured to obtain the storage status information corresponding to the storage levels in the storage pool except the initial storage level; a second determination module, configured to determine the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels in the storage pool except the initial storage level; and a moving module, configured to move the data to be processed from the initial storage level to the target storage level.

[0018] According to yet another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium, which includes a stored program. When the program runs, it controls the device where the non-volatile storage medium is located to execute any one of the above data migration methods.

[0019] According to still another aspect of the embodiments of the present invention, there is also provided a computer device, which includes a processor for running a program. When the program runs, it executes any one of the above data migration methods.

[0020] According to still another aspect of the embodiments of the present invention, there is also provided a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements any one of the above data migration methods.

[0021] In an embodiment of the present invention, a data migration method is adopted. By receiving a processing request for data to be processed; based on the processing request, updating the status information of the data to be processed and the storage status information of the initial storage level where the data to be processed is stored, determining the updated status information of the data to be processed and the updated storage status information of the initial storage level, wherein the status information of the data to be processed includes the heat value of the data to be processed, and the heat value represents the frequency of access to the data to be processed. The initial storage level is located in the storage pool, and the storage status information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level; obtaining the storage status information corresponding to the storage levels other than the initial storage level in the storage pool; according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool, determining the target storage level of the data to be processed; moving the data to be processed from the initial storage level to the target storage level, achieving the purpose of outputting a data migration strategy according to the storage resource status, user requirements, data heat, etc., thereby realizing the technical effect of improving the data management efficiency of the separated data center storage system, and further solving the technical problem that the performance and resource utilization rate of the traditional distributed storage scheduling algorithm cannot meet the requirements of the separated data center storage system. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and the illustrative embodiments and descriptions of the present invention are used to explain the present invention, and do not constitute an improper limitation of the present invention. In the drawings:

[0023] Figure 1 shows a hardware structure block diagram of a computer terminal for implementing the data migration method;

[0024] Figure 2 is a flowchart of the data migration method provided by an embodiment of the present invention;

[0025] Figure 3 is an overall architecture diagram of a separated data center provided by an optional embodiment of the present invention;

[0026] Figure 4 is an overall architecture diagram of a storage system scheduling module provided by an optional embodiment of the present invention;

[0027] Figure 5 is a curve graph of the total hourly access volume of a data set to the storage pool provided by an optional embodiment of the present invention;

[0028] Figure 6 is a curve graph of the heat value change of the commodity information with the most total access volume in the storage pool provided by an optional embodiment of the present invention;

[0029] Figure 7 is a curve graph for calculating data heat using the Newton's law of cooling formula according to an alternative embodiment of the present invention;

[0030] Figure 8 is a curve graph for calculating data heat using a phased combination model according to an alternative embodiment of the present invention;

[0031] Figure 9 is a schematic diagram of mapping a multi - level storage scheduling problem to a reinforcement learning framework according to an alternative embodiment of the present invention;

[0032] Figure 10 is a schematic diagram of the overall mechanism of a deep reinforcement learning data scheduling algorithm according to an alternative embodiment of the present invention;

[0033] Figure 11 is a curve graph of the average reward value for each training in the simulation training results according to an alternative embodiment of the present invention;

[0034] Figure 12 is a broken - line graph comparing the total access latency of four algorithms according to an alternative embodiment of the present invention;

[0035] Figure 13 is a broken - line graph of the change in load balancing degree of four algorithms according to an alternative embodiment of the present invention;

[0036] Figure 14 is a structural block diagram of a data migration device according to an embodiment of the present invention. Detailed implementation manners

[0037] In order to enable those skilled in the art of the present technology to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0038] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0039] According to an embodiment of the present invention, an embodiment of a data migration method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0040] The method embodiment provided by the first embodiment of the present application can be executed on a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal for implementing the data migration method is shown. As Figure 1 shown, the computer terminal 10 may include one or more (shown as 102a, 102b,..., 102n in the figure) processors (the processor may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components than Figure 1 shown, or have a different configuration from Figure 1 shown.

[0041] It should be noted that one or more of the above-mentioned processors and / or other data processing circuits can generally be referred to as "data processing circuits" herein. The data processing circuit can be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit can be a single independent processing module, or be incorporated in whole or in part into any one of other elements in the computer terminal 10. As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (such as the selection of a variable resistor terminal path connected to an interface).

[0042] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the data migration method in the embodiments of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizes the data migration method of the above-mentioned application program. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 can further include a memory remotely disposed relative to the processor, and these remote memories can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0043] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables a user to interact with the user interface of the computer terminal 10.

[0044] Figure 2 is a schematic flowchart of the data migration method provided according to the embodiments of the present invention, as Figure 2 shown, the method includes the following steps:

[0045] Step S201, receive a processing request for the data to be processed.

[0046] In this step, the processing request initiated for the data to be processed can be a read / write request. The read / write request initiates an I / O request to read or write data from the storage pool. Therefore, the access volume of the data to be processed changes, and the access volume of the storage level in the storage pool storing the data to be processed also changes correspondingly.

[0047] Step S202: Based on the processing request, update the status information of the data to be processed and the storage status information of the initial storage level where the data to be processed is stored, and determine the updated status information of the data to be processed and the updated storage status information of the initial storage level. Among them, the status information of the data to be processed includes the heat value of the data to be processed, and the heat value represents the frequency of access to the data to be processed. The initial storage level is located in the storage pool, and the storage status information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level.

[0048] In this step, since the access volume of the data to be processed will change, the status information of the data to be processed and the storage status information of the initial storage level where the data to be processed is stored also change correspondingly. The status information of the data to be processed can be stored in a separate database, and the data structure in the database can include information such as data size, heat value, and access timestamp. The storage status information of the initial storage level can include the average value of the heat values corresponding to the data stored in the initial storage level, can also include the available storage space of the initial storage level, and can also include the continuous read and write speed of the storage medium of the initial storage level.

[0049] Step S203: Obtain the storage status information corresponding to the storage levels in the storage pool except the initial storage level.

[0050] In this step, in order to allocate the data to be processed to a more appropriate storage level, in addition to based on the status information of the data to be processed itself and the status information of the initial storage level of the data to be processed, it is also necessary to obtain the storage status information of other storage levels, comprehensively consider the status information of the data to be processed and the status information of all storage levels, and finally determine the target migration storage level of the data to be processed.

[0051] Step S204: Determine the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels in the storage pool except the initial storage level.

[0052] In this step, the updated status information of the data to be processed and the status information of all storage levels in the storage pool can be input into a pre-trained storage data migration model for analysis to determine whether to migrate the data to be processed, and output the migration strategy corresponding to the data to be processed. The migration strategy can include the target storage level of the data to be processed.

[0053] Step S205: Move the data to be processed from the initial storage level to the target storage level.

[0054] In this step, after obtaining the migration policy, according to the migration policy, it is possible to interact with the file system of the storage pool to move the data to be processed from the initial storage level to the target storage level, thus completing the data migration operation.

[0055] As an alternative embodiment, Figure 3 is the overall architecture diagram of the separated data center provided according to an alternative embodiment of the present invention. As Figure 3 shown, the storage scheduling module is deployed in the storage server of the data center. The read / write requests and migration requests first reach the storage server, and the storage server interacts with each level of storage in the storage pool through the storage scheduling module therein, and returns the result after completing the request. Although in the separated data center architecture, all hardware resources are completely decoupled, a small amount of computing resources are still equipped in the storage pool to perform some management tasks, and these computing resources serve as the storage server. To more clearly show the internal composition of the storage scheduling module, Figure 4 is the overall architecture diagram of the storage system scheduling module provided according to an alternative embodiment of the present invention, only retaining the data flow between the read / write, migration requests and the storage scheduling module and the storage pool. As Figure 4 shown, the architecture of the storage system scheduling module is mainly divided into three parts: the storage resource status information module, the scheduling algorithm module, and the migration execution module. Among them, the storage resource status information module is responsible for recording the current storage pool status information, including the average data heat in each storage level, the free capacity size, the bandwidth of the storage medium, and the heat value, data size, user requirements, etc. of the accessed data; the scheduling algorithm module is responsible for receiving the storage resource status information, performing intelligent analysis, and outputting the data migration policy; the migration execution module is responsible for interacting with the database file system according to the migration policy to handle the specific operations of data migration, including data reading, writing, etc.

[0056] Through the above steps, the purpose of outputting the data migration policy according to the storage resource status, user requirements, data heat, etc. is achieved, thus realizing the technical effect of improving the data management efficiency of the storage system in the separated data center, and further solving the technical problem that the performance and resource utilization rate of the traditional distributed storage scheduling algorithm cannot meet the requirements of the storage system in the separated data center.

[0057] As an alternative embodiment, based on a processing request, the status information of the data to be processed is updated to determine the updated status information of the data to be processed, where the status information of the data to be processed includes the heat value of the data to be processed, including: obtaining the total access volume of the storage pool within a preset period corresponding to the current moment according to the processing request; determining the heat period corresponding to the storage pool according to the total access volume, where the heat period characterizes the access situation of the data in the storage pool, including the low peak period and the stable period; determining the calculation formula for the heat value of the data to be processed based on the heat period corresponding to the storage pool; and determining the heat value of the data to be processed based on the calculation formula for the heat value of the data to be processed.

[0058] Optionally, the data heat value is an indicator to measure the data access frequency and will change over time and with the change of business requirements. The data storage strategy can be adjusted according to the change of the heat value. The hot data is stored on a faster storage medium for quick access, and the cold data is stored in a more economical storage medium to optimize the storage cost, thereby improving the data processing efficiency and enhancing the performance of the storage system. Based on the total access volume of the storage pool within a preset period corresponding to the current moment, the heat period corresponding to the storage pool can be judged. Among them, the process of judging the heat period corresponding to the storage pool can be to obtain the value of the total access volume within this period after a preset period. Then, compare the total access volume value within this period with the preset thresholds set for defining the stable period and the low peak period, and accordingly judge whether this period belongs to the access stable period or the access low peak period. During the low peak period, most of the data in the storage pool is rarely or not accessed at all. For example, at night or on holidays, user activities decrease, resulting in a decrease in the total access volume; when the system is upgraded or maintained, the access to data by users may be temporarily restricted. In the above situations, it may cause the originally hot data to rapidly cool down, and the temperatures of the hot and cold data tend to be the same, making it difficult to distinguish between the hot and cold data, resulting in unnecessary data migration. Therefore, for different heat periods, different calculation formulas for the heat value need to be selected to calculate the heat value of the data.

[0059] For example, a phased hybrid model can be set. When the storage pool is in the low peak period, Bayesian averaging is used to calculate its data heat. When the storage pool is in the stable period, the Newton cooling law is used to simulate the process of the data temperature naturally decaying over time. Obtain the maximum value count of the access volume of the storage pool within a period according to the prior data max , based on count max determine the preset thresholds N for defining the stable period and the low peak period t is the observed value of the storage pool access volume, that is, the total access volume of the storage pool within the preset period corresponding to the current moment. Among them, if the total access volume in the preset period corresponding to the current moment is greater than the maximum value of the total access volume currently recorded, update the maximum value of the total access volume. Suppose when the observed value N of the storage pool access volume t≥0.3·count max When it is, the storage pool is in a stable period, and the observed value N t <0.3·count max When it is, the storage pool is in a low peak period. As the observed value of the storage pool access volume changes, the dynamic adjustment model transforms between Newton's cooling law and Bayesian average, and at the same time, the maximum value count max is dynamically updated. The hybrid model can be expressed as:

[0060]

[0061]

[0062] where T(t n ) represents the heat of the data at time t n , B(t n ) represents the Bayesian average heat, N t represents the observed value of the total database access volume in the corresponding period, and α represents the cooling coefficient of the storage medium. The two models are combined through a phased model, enabling it to be flexibly transformed according to different data types and application scenarios.

[0063] To verify the rationality of the phased combination model, the data heat can be visualized for comparison. For example, a user shopping behavior dataset can be used. The dataset contains user behavior records within a week, and each row of user behavior can be analogized to an access to the commodity information in the storage pool. Figure 5 is the curve graph of the total hourly access volume of the storage pool of the dataset provided by an optional embodiment of the present invention, Figure 6 is the curve graph of the heat change of the commodity information with the most total access volume in the storage pool provided by an optional embodiment of the present invention. As shown in the figure, when the total access volume of the storage pool is relatively low (i.e., the low peak period of the database), the most active data in the storage pool will also rapidly cool down until it approaches 0. At this time, the heat of hot and cold data tends to be the same, making it difficult to distinguish between hot and cold data. At this time, if there is data migration, it may cause active data to migrate to low-speed storage. After the low peak period, the data heat rises, and then the active data is migrated back to the high-speed storage device, resulting in unnecessary data migration.

[0064] The phased combination model can alleviate the above problems. In the phased combination model, the data heat in the low peak period is not only affected by time but also refers to the heat value of the data in the stable period, enabling the active data to maintain a relatively stable data heat in the low peak period, thereby distinguishing between hot and cold data. Figure 7 is the curve graph of calculating the data heat using the formula based on Newton's cooling law provided by an optional embodiment of the present invention, Figure 8It is a curve graph for calculating data heat using a phased combination model according to an optional embodiment of the present invention. As shown in the figure, the heat value of the data becomes more stable during the low peak period and approaches the average value of the data heat during the stable period.

[0065] In view of the actual situation of storage pool access, a data heat mixing calculation formula that changes with the change of storage pool access volume is proposed. When the storage pool is in the stable access period, the data heat calculation formula based on Newton's law of cooling is used. When the storage pool belongs to the low peak period of access, the data heat calculation formula based on Bayesian average is used. This formula can reduce the impact of the data temperature drop during the low peak period on the hot data, making its heat bias towards the average value of the data heat during the stable period, and thus maintaining the heat during the low peak period and reducing unnecessary migrations.

[0066] As an optional embodiment, when the heat period corresponding to the storage pool is the stable period, the calculation formula for determining the heat value of the data to be processed is the first calculation formula, where the first calculation formula is as follows:

[0067]

[0068] Where, T(t n ) is the heat value of the data to be processed at time t n , t n-1 is the time when the data to be processed was last accessed, T heat is the increased heat value of the data to be processed after being accessed at time t n . When the data to be processed is accessed at time t n , the value of c is 1. When the data to be processed is not accessed at time t n , the value of c is 0.

[0069] Optionally, when the storage pool is in the stable access period, the data heat value calculation formula based on Newton's law of cooling can be used. Newton's law of cooling reflects the process of the temperature of an object decreasing exponentially with time. Similarly, the heat of a data will also decrease over time, which is basically consistent with the meaning of Newton's law of cooling. Newton's law of cooling can be applied to simulate the process of data heat decrease. Newton's law of cooling can be expressed by the following mathematical formula:

[0070] T′(t) = -α(T(t) - H)

[0071] Where, T(t) is the temperature of the object, H represents the ambient temperature, and α is the cooling coefficient. Further derivation of this formula can obtain the following results:

[0072]

[0073] For the data in the storage pool, the ambient temperature can be replaced by the average heat of all the data in the storage pool. However, each data is independent of other data in the storage pool, and the heat of the data is determined according to its own access pattern and frequency, depending on external factors such as specific user requirements, and is not affected by the average heat of all the data in the storage pool. Therefore, such a calculation method has little practical application significance, so the influence of the ambient temperature is ignored. Considering that the heat of the data will increase when it is accessed, the above formula is modified to obtain the following heat calculation formula:

[0074]

[0075] Among them, t n-1 represents the time when the data was last accessed, T heat represents the increased heat after the data is accessed, c is a discrete function, when the data is accessed at time t n , then c = 1; when the data is not accessed at time t n , then c = 0.

[0076] In addition, the cooling coefficient is a crucial part in the data heat model based on Newton's law of cooling, directly affecting the rate at which the data heat decays over time, and thus affecting the timing of data migration between different storage media. The performance characteristics of different storage media, such as I / O rate, latency time, etc., can be used as important references for setting the cooling coefficient. For example, high-performance storage media (such as persistent memory, SSD) have high read and write capabilities and are suitable for storing frequently accessed hot data. Applying a lower cooling coefficient to high-performance media can extend the storage time of hot data in high-performance media and ensure the access efficiency of the data. For traditional media such as HDD, due to the low read speed, using a higher cooling coefficient can quickly cool the stored data and reduce unnecessary migration of short-term accidentally heated data, thereby improving the overall efficiency of the system.

[0077] As an optional embodiment, in the case where the heat period corresponding to the storage pool is the low peak period, the calculation formula for determining the heat value of the data to be processed is the second calculation formula, where the second calculation formula is as follows:

[0078]

[0079] Among them, B i is the average heat value of the data to be processed within the preset period corresponding to time t n , C is the number of sample data within the preset duration before the preset period corresponding to time t n , m newavg is the average value of the heat values of multiple sample data, n Bayes is at time t nThe number of times the data to be processed is accessed within a preset period corresponding to a moment. is, within the preset period corresponding to time t n the sum of the heat values of the data to be processed at multiple moments calculated based on the first calculation formula.

[0080] Optionally, when the storage pool is in a low access period, a data heat value calculation formula based on Bayesian average can be used. The Bayesian average method is a statistical method that estimates the true situation of an individual based on the overall sample average level and individual sample information. When the storage pool is in a low period, the access volume of data is usually low. In contrast, the heat value during the stable period may be more stable and can reflect the access characteristics of the data, which can be used as a reliable reference for estimating the data heat value. Bayesian average can utilize the past heat information of the data to provide a more robust estimated value. For each data, its Bayesian average temperature can be calculated according to the following formula:

[0081]

[0082] where C represents the prior sample size, and C heat data in a period before the low period are selected as samples, m newavg represents the prior average score, that is, the average heat value of all sample data is calculated, and n Bayes represents the number of times the data is accessed during the low period, represents the sum of the heat values calculated using Newton's cooling law during the low period. By introducing C and m newavg , the Bayesian average method can reduce the impact of the decrease in data heat during the low period on the hot data, so that its heat can be biased towards the average value of the data heat during the stable period.

[0083] As an alternative embodiment, according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool, determine the target storage level of the data to be processed, including: inputting the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool into the storage data migration model to obtain the target storage level of the data to be processed, where the storage data migration model is trained using training samples, and the training samples include the status information of the data.

[0084] Optionally, in order to determine the target storage level of the data to be processed, a storage data migration model can be designed to migrate data based on the current system situation, data information, user requirements, etc., so as to ensure the performance of the storage system and achieve efficient data management. When applying deep reinforcement learning to a specific problem, the problem needs to be first mapped into a reinforcement learning framework, which consists of an agent and an environment, and reinforcement learning is a process of interaction between the two. During the interaction process, there are three key elements, namely state, action, and reward. Figure 9 It is a schematic diagram of mapping a multi-level storage scheduling problem to a reinforcement learning framework according to an optional embodiment of the present invention, as Figure 9 shown. The storage resource pool is regarded as the environment, the storage medium environment information and the data information that needs to make decisions are used as the state. After the agent model observes the state s t , it selects an action a t (i.e., the target migration level of the data). After the environment receives the action a t , it migrates the data data t to the target level. The environment will generate a new state s t+1 according to the state of the resource pool after migration and the next data information, and calculate the reward r t+1 at the same time. The reward r t+1 will tell the agent model whether the action a t makes the environment move in the desired direction, thereby guiding the agent model to update the policy network.

[0085] As an optional embodiment, the storage data migration model is obtained by training with training samples, including: defining the state space, action space, and reward function of the initial storage data migration model. Among them, the state space includes the state information in the storage pool and the state information of the data, the action space defines multiple storage levels for data migration selection, and the reward function is used to calculate the reward value corresponding to the migration action performed on the data; inputting the sample data set into the initial storage data migration model, training based on a preset deep learning framework, and optimizing the initial storage data migration model to obtain the storage data migration model.

[0086] Optionally, the storage data migration model includes three important elements: state space, action space, and reward function. Among them, the variables in the state space can fully describe the key information affecting data migration decisions. During the training of the initial storage data migration model, let T be the data migration period (unit: hour), and its specific size can be set according to business requirements. After each T time period of the storage system, all the data accessed during this time period are sorted by the number of accesses, and migration decisions are made one by one. Specifically, within each time period t, there are m pieces of data accessed. Then, arranging them in descending order of the number of times the data is accessed, we can obtain the data ID sequence {data1, data2,..., data t , data t+1 …, data m}. By statistically analyzing its data status information and the corresponding storage pool status information, we obtain the state s t :

[0087] s t = [avgtemp t , frea t , speed t , datatemp t , size t , tier t , demand t , freq t

[0088] Among them, the status information of the storage pool includes: avgtemp t represents the average value of the data heat in each layer, which can reflect the cold and hot degree of the data in the layer, enabling the intelligent agent model to evaluate the rationality of the current cold and hot data distribution. After each time T, the heat values of all data are updated, and the average value of the data heat in each layer is calculated;.free t represents the available storage space of the storage device in each layer, reflecting the current usage of storage resources; speed t represents the continuous read and write speed of the storage medium in each layer, which helps the intelligent agent model evaluate the performance differences between different storage layers. The status information of the data includes: datatemp t represents the current heat value of the data to be decided, reflecting the frequency of the data being accessed recently. For data with a high heat value, the intelligent agent model may choose to keep it in the current storage layer or migrate it to a storage layer with a faster access speed. For data with a low heat value, it will consider migrating it to a slow layer to make room for new data to be added; size t ​Indicates the size of the data to be decided, which affects the agent model's estimation of the migration cost. When the data is large, the migration delay will increase, affecting the system response time; tier t Indicates the current tier where the data to be decided is located, which helps the agent model analyze whether to migrate the data and the target storage tier for migration; demand t Indicates the user demand, which reflects the user's expectation for the data storage tier; Indicates the number of times the data is accessed within this time period, which reflects the data activity and is also a reference for the agent model to predict the future access trend of the data.

[0089] The action space defines all possible actions that the agent model can take. For the storage data migration model, the action space is the storage tiers that the data to be decided can choose. The action space A is defined as follows (n represents the number of storage tiers):

[0090] A = {0, 1, 2,..., n - 1}

[0091] When using the policy network, the output is the probability distribution of the action space. Actions are selected according to the probability distribution, and the action with the highest probability among all possible actions is selected.

[0092] The reward function is the most critical part of the storage data migration model. It is the immediate feedback of the environment to the actions of the agent model and is used to guide the agent model to learn the optimal data migration strategy. In the storage data migration model, a corresponding reward is calculated for each migration activity. The optimization goal of the migration algorithm is to minimize the system delay while satisfying the user demand as much as possible. The reward r t Consists of four parts in total: The average access delay in the access sequence, the delay caused by migrating data, The difference between the proportion of fast device access times and the proportion of slow access data in

[0093] r t = w1·d avgdelay - w2·d remove + w3·u demand + rate diff

[0094] Among them, d avgdelay Is the reward for the average access delay part. A lower average access delay means that the scheduling algorithm is more efficient and can quickly respond to the user's access requests. In this embodiment, the average access delay only includes the time used to read the data, and the calculation formula is as follows:

[0095]

[0096] Among them, sizei represents the size of the accessed data, v tier represents the read speed of the level where the data is located, so represents after migration the total latency of the access sequence during the time period, N represents the total number of access requests during this period. To ensure that each reward can be on the same scale, the m, in-max normalization method is used to constrain the average access latency within the range of [-1, 0]. After multiple experimental verifications, the maximum and minimum values of the average access latency can be set to dmax = 0.0017 and dmin = 0.0002 respectively, and the extreme values are dynamically updated. Since the goal of reinforcement learning is to maximize the reward value, however, at the same time, it is necessary to minimize the average access latency, so the normalized average access latency needs to be taken as a negative value to make it consistent with the goal of deep reinforcement learning. The specific calculation formula is as follows:

[0097]

[0098] d avgdelay ∈[0, 1], during the process of maximizing the reward function, the agent model will tend to select strategies that can reduce the average access latency, thereby improving the system response speed. Select the access sequence of the time period to calculate the reward function for two reasons; one is that, compared with the access sequence of the complete T time period, the amount of data is smaller, which can occupy less computing resources when training the model and updating the strategy, achieving a faster data processing speed, which is crucial for storage migration tasks with high real-time requirements; the other is that, the timeliness of the access sequence of the time period is stronger, and it can better reflect the recent access trend of the storage system, thus more effectively guiding the data migration operation.

[0099] d remov e represents the latency generated during the process of migrating data, as a penalty in the reward function, to constrain the agent model to consider the system latency caused by migrating data when making decisions. It includes two parts: the latency generated by migrating decision data to the target level and the latency generated by evicting some data when there is insufficient free space in the target level. When there is not enough free time in the target level, the data with a low access count in this level is evicted to a lower level. The calculation formula is as follows:

[0100]

[0101] where, size t represents the size of the decision data, v read represents the read speed of the storage level where the data is located, v new_write represents the write speed of the data to the target storage level, ∑delay exchangeThe delay caused by evicting data. The delay of migrating data only includes one read at the original level and one write at the target level. Similarly, the min-max normalization method is used to constrain the migration delay to the range of [0, 1]. remove The minimum value is drmin=0, which means that the decision data is not migrated. Based on multiple experiments, the maximum value is set to drmax=0.16 and is dynamically updated. remove The calculation formula is as follows:

[0102]

[0103] d demand Indicates the satisfaction of user needs. Storage devices are divided into two categories: fast storage devices and slow storage devices. The n storage tiers are numbered from slow to fast as tier = {0, 1, 2, ..., n-1}, and set as the dividing line between fast storage devices and slow storage devices. When tier>η, the storage device is considered to be a fast device, and when tier<η, the storage device is considered to be a slow device. Let the data storage tier after migration be tier new , the standardized d demand The calculation formula is as follows:

[0104]

[0105] Among them, demand t Indicates user demand, dem,in=-1.5, demax=1.5, and the maximum value is dynamically updated.

[0106] rate diff express The difference between the proportion of fast device accesses and the proportion of slow device accesses. The larger the difference, the more efficient the fast device is in storing frequently accessed data in the system, allowing high-performance media to fully exert their performance advantages; slow devices are accessed more sparsely, and data with low access frequency is stored in relatively slow devices to optimize costs. Therefore, this item is added to the reward function to guide the intelligent model to achieve a match between access frequency and storage performance. The calculation formula is as follows:

[0107]

[0108] Among them, n fast Indicates the number of times data in the fast device is accessed after migration, n slow Indicates the number of times data in the slow device is accessed after migration, and N indicates the total number of access requests during that period.

[0109] w1, w2, and w3 are weight coefficients used to distinguish the importance of different reward values in the calculation of the reward function. For example, with the goal of reducing system latency, after multiple experimental attempts, the weight coefficients can be set as w1 = 1, w2 = 0.2, and w3 = 0.005.

[0110] After defining the initial storage data migration model, the Asynchronous Advantage Actor-Critic (A3C) algorithm can be used to solve the optimal strategy for data migration in the storage pool. Figure 10 It is a schematic diagram of the overall mechanism of the deep reinforcement learning data scheduling algorithm provided by an optional embodiment of the present invention. As Figure 10 shown, the application scenario includes three parts: the environment, the user, and the scheduling algorithm. The environment consists of a multi-level storage device pool, including a PM pool, an NVMe SSD pool, an SSD pool, and an HDD pool. Each level has different capacity, read / write speed, and cost characteristics. A large amount of data information is stored in the devices, and this data has information such as heat, data size, location level, and access times. The user continuously generates access requests and user requirements, which directly affect the data information and thus affect the distribution of data in the storage pool. The scheduling algorithm uses the A3C framework. In the A3C framework, there is a global network and multiple local networks, which have the same network structure and can copy the network parameters from each other. The local policy network and value network are responsible for interacting with the environment, collecting data to calculate gradients, and the global network is responsible for updating the parameters according to the gradients collected by the local networks and synchronizing the parameters to the local networks. The global network does not interact with the environment. The optimization goal of the scheduling algorithm is to minimize the system access latency. The policy network outputs the probability distribution over all actions according to the current state, selects actions according to the probability distribution, and applies the actions to the environment to obtain the reward feedback from the environment. Update the Actor and Critic network parameters according to the reward after the action execution, the new state, and the value of the advantage function. There are multiple worker threads in A3C, which interact with their respective environments, collect experiences, and periodically synchronize the parameters to the global network. Through a large amount of training, A3C can learn the optimal strategy for the data migration scheduling problem. In practical applications, the trained policy network can select the optimal migration strategy according to the changes in the environment and continuously optimize the system performance.

[0111] As an optional embodiment, the status information of the data to be decided further includes user requirements, where the user requirements represent the user's requirements for data access rate.

[0112] Optionally, based on different user requirements for data access rates, user requirements can be divided into three types: expecting data to be stored in the fast device layer (such as frequently accessed data), expecting data to be stored in the slow device layer (such as long-term archived data), and not setting storage (the system makes migration decisions based on the current storage pool status and data status). During the migration cycle, the user requirements corresponding to a certain piece of data may change multiple times, so the average value is taken after multiple records. Recording user requirements enables the intelligent agent model to take into account personalized needs during the decision-making process. The assignments for the three types of user requirements are as follows:

[0113]

[0114] As an alternative embodiment, a simulation experiment can be conducted on the storage data migration model based on A3C in the Python 3.10 and Pytorch 1.12.1 environments. Table 1 is a table of simulation experiment parameter tuning and selected values provided according to an alternative embodiment of the present invention.

[0115]

[0116] Table 1 A table of simulation experiment parameter tuning and selected values

[0117] As shown in Table 1, it shows the parameters considered in the experimental design and the values selected after the tuning process. When the discount factor γ = 0, the intelligent agent only focuses on immediate rewards. When γ = 1, the intelligent agent attaches importance to long-term rewards. The learning rate determines the speed of neural network weight update. A lower learning rate results in a smaller speed of weight update, and more training iterations may be required to converge. An overly high learning rate may cause the neural network to update in large steps and fall into local optima too quickly. The number of training rounds needs to be adjusted according to the model convergence situation, discount factor, and learning rate to gradually find the optimal number of rounds. Table 2 is a table of other parameter values of the simulation experiment provided according to an alternative embodiment of the present invention.

[0118]

[0119] Table 2 A table of other parameter values of the simulation experiment

[0120] As shown in Table 2, it shows the settings of parameters such as the number of storage levels, migration cycle, and cooling coefficient.

[0121] In the embodiment of the present invention, corresponding storage devices are simulated for four storage levels respectively. Due to insufficient performance of the experimental equipment, when simulating according to the above capacity, the data volume in the storage device is too large, resulting in problems such as memory shortage and too long model training time. Therefore, the above device capacity is scaled down proportionally. Table 3 is a table of storage device information and simulated capacity sizes of the simulation experiment provided according to an alternative embodiment of the present invention.

[0122]

[0123]

[0124] Table 3 Table of storage device information and simulation experiment simulation capacity size

[0125] As shown in Table 3, it shows the storage device information and the simulation experiment capacity information. When data is migrated, the data block is used as the granularity, and the storage device is set with a block size of 1 MB. A suitable data block size helps to reduce the generation of fragments in storage and also facilitates the simplification of the migration algorithm design.

[0126] For example, the dataset used in the simulation experiment can be a user shopping behavior dataset, which records the shopping behaviors of random users (including clicks, likes, add - to - carts, purchases). Each row of data consists of a user id, a product id, a product category id, a behavior type, and a timestamp. Considering all behaviors as accesses to product information in the database, each row of data can represent an access behavior to the corresponding product. This dataset has a total of 100150807 records and 4162024 product ids. The simulation experiment can use the method of probability sampling to extract 400 product ids and the corresponding 239959 access records from the original dataset according to the probability distribution of each product being accessed as the data for the simulation experiment, and then perform the following operations in sequence: 1) Remove the irrelevant data in the three columns of user id, product category id, and behavior type; 2) Generate a random integer between 1 and 5 for each product id to represent the data size in MB (megabytes); 3) Randomly generate user requirements for each access record and set them to any value between; 4) Sort the dataset in ascending order of the timestamp. Each row of data consists of a product id, a data size, a timestamp, and a user requirement, and each row of data represents a user's access to data information; 5) Using the timestamp 1511845200 as the dividing line, divide the data into a training set for training the deep reinforcement learning agent model and a test set for testing the algorithm performance. Table 4 is a table of dataset information provided according to an alternative embodiment of the present invention.

[0127]

[0128] Table 4 A table of dataset information

[0129] As shown in Table 4, it shows the specific information of the training set and the test set, including the number of access records, start time, end time, and data size, etc.

[0130] Set the model according to the above parameters and train the model. Figure 11 is the curve graph of the average reward value for each training in the simulation training results provided according to an alternative embodiment of the present invention, as Figure 11As shown, the reward value gradually increases during training and finally converges stably around 1.2. The policy network can learn a better policy.

[0131] In addition, three algorithms can also be used for comparison in the simulation experiment: (1) the data migration policy based on LRU (Least Recently Used); (2) the data migration policy that combines data popularity with LRU; (3) the greedy-based FIFO (First Input First Output) data migration policy. The total access latency and load balance degree can be used as comparison metrics. Among them, in order to evaluate the system latency more comprehensively, the latency generated by data migration is incorporated into the calculation of the total latency to ensure a more reasonable evaluation of the system performance. The load balance degree is calculated by the IOPS (Input / Output Operations Per Second) of each device within each migration cycle, and then the standard deviation of the IOPS is calculated to measure the load balance degree of the storage pool. The formula for the load balance degree is as follows:

[0132]

[0133] where x i represents the IOPS of each device, represents the average value of the IOPS, and n represents the total number of devices. When the standard deviation of the IOPS is smaller, the load is more balanced and the load balance degree is larger; conversely, the load balance degree is smaller. Finally, the total access latency of the four algorithms can be obtained. Figure 12 is a line chart comparing the total access latency of the four algorithms provided by the optional embodiments of the present invention. As Figure 12 shown, the data migration scheduling algorithm based on A3C is significantly more effective than the other three algorithms in reducing the total access latency of access requests. Figure 13 is a line chart showing the change in the load balance degree of the four algorithms provided by the optional embodiments of the present invention. As Figure 13 shown, the load balance degree of the FIFO algorithm is relatively low for a long time, and the stability of the load balance degree of the LRU-temp algorithm is poor. Therefore, the change in the load balance degree of the four algorithms over time can be further analyzed. Table 5 is an analysis table of the load balance degree of the four algorithms provided by the optional embodiments of the present invention.

[0134]

[0135] Table 5 Analysis Table of Load Balance Degree of Four Algorithms

[0136] As shown in Table 5, the standard deviation, the ratio of the maximum value to the minimum value, and the average value of the balance degrees of the four algorithms are presented. The standard deviation of the load balance degree of the A3C algorithm is the smallest, indicating that within the range of a long time span, the A3C algorithm is more stable with smaller fluctuations. The ratio of the maximum value to the minimum value corresponding to A3C is 1.1491, which is close to 1, suggesting that the A3C algorithm is relatively balanced in different time periods without extreme peaks or valleys. The average value reflects the average performance of the algorithm during all test times. It can be seen from the table that the average performance of A3C is also good.

[0137] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0138] Through the description of the above embodiments, those skilled in the art can clearly understand that the data migration method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes contributions to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), including several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0139] According to an embodiment of the present invention, there is also provided a data migration device for implementing the above data migration method. Figure 14 It is a structural block diagram of the data migration device provided according to an embodiment of the present invention. As Figure 14 shown, the data migration device includes: a receiving module 141, a first determination module 142, an obtaining module 143, a second determination module 144, and a moving module 145. The data migration device will be described below.

[0140] The receiving module 141 is configured to receive a processing request for data to be processed.

[0141] The first determination module 142, connected to the receiving module 141, is configured to update the status information of the data to be processed and the storage status information of the initial storage level where the data to be processed is stored based on a processing request, and determine the updated status information of the data to be processed and the updated storage status information of the initial storage level. The status information of the data to be processed includes the heat value of the data to be processed, and the heat value represents the frequency of access to the data to be processed. The initial storage level is located in the storage pool, and the storage status information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level.

[0142] The obtaining module 143, connected to the first determination module 142, is configured to obtain the storage status information corresponding to the storage levels in the storage pool except the initial storage level.

[0143] The second determination module 144, connected to the obtaining module 143, is configured to determine the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels in the storage pool except the initial storage level.

[0144] The moving module 145, connected to the second determination module 144, is configured to move the data to be processed from the initial storage level to the target storage level.

[0145] It should be noted here that the above receiving module 141, first determination module 142, obtaining module 143, second determination module 144, and moving module 145 correspond to steps S201 to S205 in the embodiment. The instances and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in the embodiment.

[0146] An embodiment of the present invention can provide a computer device. Optionally, in this embodiment, the above computer device can be at least one of multiple network devices in a computer network. The computer device includes a memory and a processor.

[0147] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the data migration method and device in the embodiments of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above-mentioned data migration method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely disposed relative to the processor, and these remote memories may be connected to the computer terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.

[0148] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: receiving a processing request for the data to be processed; based on the processing request, updating the status information of the data to be processed and the storage status information of the initial storage level storing the data to be processed, and determining the updated status information of the data to be processed and the updated storage status information of the initial storage level, where the status information of the data to be processed includes the heat value of the data to be processed, and the heat value characterizes the frequency of access to the data to be processed; the initial storage level is located in the storage pool, and the storage status information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level; obtaining the storage status information corresponding to the storage levels other than the initial storage level in the storage pool; determining the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool; moving the data to be processed from the initial storage level to the target storage level.

[0149] Optionally, the above processor may further execute the program code of the following steps: based on the processing request, updating the status information of the data to be processed, and determining the updated status information of the data to be processed, where the status information of the data to be processed includes the heat value of the data to be processed, including: obtaining the total access volume within a preset period corresponding to the storage pool at the current moment according to the processing request; determining the heat period corresponding to the storage pool according to the total access volume, where the heat period characterizes the access situation of the data in the storage pool, including the low peak period and the stable period; determining the calculation formula of the heat value of the data to be processed based on the heat period corresponding to the storage pool; determining the heat value of the data to be processed based on the calculation formula of the heat value of the data to be processed.

[0150] Optionally, the above processor may further execute the program code of the following steps: in the case that the heat period corresponding to the storage pool is the stable period, determining that the calculation formula of the heat value of the data to be processed is the first calculation formula, where the first calculation formula is as follows:

[0151]

[0152] Among them, T(t n ) is the popularity value of the data to be processed at time t n , t n-1 is the time when the data to be processed was last accessed, and T heat is the increased popularity value after the data to be processed is accessed at time t n . When the data to be processed is accessed at time t n , the value of c is 1. When the data to be processed is not accessed at time t n , the value of c is 0.

[0153] Optionally, the above processor can also execute the program code of the following steps: when the popularity period corresponding to the storage pool is at a low peak, determine that the calculation formula for the popularity value of the data to be processed is the second calculation formula, where the second calculation formula is as follows:

[0154]

[0155] Among them, B i is the average popularity value of the data to be processed within the preset period corresponding to time t n , C is the number of sample data within the preset duration before the preset period corresponding to time t n , m newavg is the average value of the popularity values of multiple sample data, and n Bayes is the number of times the data to be processed is accessed within the preset period corresponding to time t n , is the sum of the popularity values of the data to be processed at multiple times calculated based on the first calculation formula within the preset period corresponding to time t n .

[0156] Optionally, the above processor can also execute the program code of the following steps: determine the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool, including: input the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool into the storage data migration model to obtain the target storage level of the data to be processed, where the storage data migration model is trained using training samples, and the training samples include the status information of the data.

[0157] Optionally, the above-mentioned processor may also execute the program code of the following steps: The storage data migration model is obtained by training with training samples, including: defining the state space, action space, and reward function of the initial storage data migration model, where the state space includes the state information of the storage pool and the state information of the data, the action space defines multiple storage levels for data migration selection, and the reward function is used to calculate the reward value corresponding to the migration action performed on the data; inputting the sample data set into the initial storage data migration model, training based on a preset deep learning framework, and optimizing the initial storage data migration model to obtain the storage data migration model.

[0158] Optionally, the above-mentioned processor may also execute the program code of the following steps: The state information of the data to be decision-making further includes user requirements, where the user requirements represent the user's requirements for data access rate.

[0159] By adopting the embodiment of the present invention, a data migration method is provided. By receiving a processing request for the data to be processed; based on the processing request, updating the state information of the data to be processed and the storage state information of the initial storage level for storing the data to be processed, and determining the updated state information of the data to be processed and the updated storage state information of the initial storage level, where the state information of the data to be processed includes the heat value of the data to be processed, and the heat value represents the frequency of access to the data to be processed, the initial storage level is located in the storage pool, and the storage state information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level; obtaining the storage state information corresponding to the storage levels in the storage pool except the initial storage level; determining the target storage level of the data to be processed according to the updated state information of the data to be processed, the updated storage state information of the initial storage level, and the storage state information corresponding to the storage levels in the storage pool except the initial storage level; moving the data to be processed from the initial storage level to the target storage level, the purpose of outputting a data migration policy according to the storage resource state, user requirements, data heat, etc. is achieved, thereby achieving the technical effect of improving the data management efficiency of the separated data center storage system, and further solving the technical problem that the performance and resource utilization rate of the traditional distributed storage scheduling algorithm cannot meet the requirements of the separated data center storage system.

[0160] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware of the terminal device through a program, and the program can be stored in a non-volatile storage medium. The storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.

[0161] An embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium may be used to store the program code executed by the data migration method provided in the above embodiment.

[0162] Optionally, in this embodiment, the non-volatile storage medium may be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0163] Optionally, in this embodiment, the non-volatile storage medium is set to store the program code for performing the following steps: receiving a processing request for the data to be processed; based on the processing request, updating the status information of the data to be processed and the storage status information of the initial storage level storing the data to be processed, determining the updated status information of the data to be processed and the updated storage status information of the initial storage level, wherein the status information of the data to be processed includes the heat value of the data to be processed, and the heat value characterizes the frequency of access to the data to be processed, the initial storage level is located in the storage pool, and the storage status information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level; obtaining the storage status information corresponding to the storage levels in the storage pool except the initial storage level; according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels in the storage pool except the initial storage level, determining the target storage level of the data to be processed; moving the data to be processed from the initial storage level to the target storage level.

[0164] Optionally, in this embodiment, the non-volatile storage medium is set to store the program code for performing the following steps: based on the processing request, updating the status information of the data to be processed, and determining the updated status information of the data to be processed, wherein the status information of the data to be processed includes the heat value of the data to be processed, including: according to the processing request, obtaining the total access volume within a preset period corresponding to the storage pool at the current moment; according to the total access volume, determining the heat period corresponding to the storage pool, wherein the heat period characterizes the access situation of the data in the storage pool, including the low peak period and the stable period; based on the heat period corresponding to the storage pool, determining the calculation formula for the heat value of the data to be processed; based on the calculation formula for the heat value of the data to be processed, determining the heat value of the data to be processed.

[0165] Optionally, in this embodiment, when the heat period corresponding to the storage pool is the stable period, the calculation formula for the heat value of the data to be processed is determined as the first calculation formula, wherein the first calculation formula is as follows:

[0166]

[0167] Among them, T(t n ) is the popularity value of the data to be processed at time t n , t n-1 is the time when the data to be processed was last accessed, T heat is the increased popularity value after the data to be processed is accessed at time t n . When the data to be processed is accessed at time t n , the value of c is 1. When the data to be processed is not accessed at time t n , the value of c is 0.

[0168] Optionally, in this embodiment, the non-volatile storage medium is set to store program code for performing the following steps: when the popularity period corresponding to the storage pool is at a low peak, determine that the calculation formula for the popularity value of the data to be processed is the second calculation formula, where the second calculation formula is as follows:

[0169]

[0170] Among them, B i is the average popularity value of the data to be processed within the preset period corresponding to time t n , C is the number of sample data within the preset duration before the preset period corresponding to time t n , m newavg is the average value of the popularity values of multiple sample data, n Bayes is the number of times the data to be processed is accessed within the preset period corresponding to time t n , is the sum of the popularity values of the data to be processed at multiple times calculated based on the first calculation formula within the preset period corresponding to time t n .

[0171] Optionally, in this embodiment, the non-volatile storage medium is set to store program code for performing the following steps: determine the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool, including: input the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels other than the initial storage level in the storage pool into the storage data migration model to obtain the target storage level of the data to be processed, where the storage data migration model is trained using training samples, and the training samples include the status information of the data.

[0172] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: The storage data migration model is obtained by training with training samples, including: defining the state space, action space, and reward function of the initial storage data migration model, where the state space includes the state information of the storage pool and the state information of the data, the action space defines multiple storage levels for data migration selection, and the reward function is used to calculate the reward value corresponding to the migration action performed on the data; inputting the sample data set into the initial storage data migration model, training based on a preset deep learning framework, and optimizing the initial storage data migration model to obtain the storage data migration model.

[0173] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: The state information of the data to be decided further includes user requirements, where the user requirements characterize the user's requirements for data access rate.

[0174] An embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it can implement: receiving a processing request for the data to be processed; based on the processing request, updating the state information of the data to be processed and the storage state information of the initial storage level storing the data to be processed, and determining the updated state information of the data to be processed and the updated storage state information of the initial storage level, where the state information of the data to be processed includes the heat value of the data to be processed, and the heat value characterizes the frequency of access to the data to be processed, the initial storage level is located in the storage pool, and the storage state information of the initial storage level includes the mean value of the heat values corresponding to the data stored in the initial storage level; obtaining the storage state information corresponding to the storage levels in the storage pool other than the initial storage level; determining the target storage level of the data to be processed according to the updated state information of the data to be processed, the updated storage state information of the initial storage level, and the storage state information corresponding to the storage levels in the storage pool other than the initial storage level; moving the data to be processed from the initial storage level to the target storage level.

[0175] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0176] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own focuses. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0177] In several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections shown or discussed with each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.

[0178] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0179] In addition, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0180] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0181] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A data migration method, characterized in that, Including: Receiving a processing request for data to be processed; Based on the processing request, updating the status information of the data to be processed and the storage status information of the initial storage level where the data to be processed is stored, determining the updated status information of the data to be processed and the updated storage status information of the initial storage level, wherein the status information of the data to be processed includes the heat value of the data to be processed, the heat value characterizing the frequency of access to the data to be processed, the initial storage level is located in the storage pool, and the storage status information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level; Obtaining the storage status information corresponding to the storage levels in the storage pool other than the initial storage level; Based on the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels in the storage pool other than the initial storage level, determining the target storage level of the data to be processed; Moving the data to be processed from the initial storage level to the target storage level; Among them, determining the updated status information of the data to be processed includes: according to the processing request, obtaining the total access volume within a preset period corresponding to the storage pool at the current moment; according to the total access volume, determining the heat period corresponding to the storage pool, wherein the heat period characterizes the access situation of the data in the storage pool, including the low peak period and the stable period; based on the heat period corresponding to the storage pool, determining the calculation formula for the heat value of the data to be processed; based on the calculation formula for the heat value of the data to be processed, determining the heat value of the data to be processed; Among them, when the heat period corresponding to the storage pool is the stable period, the calculation formula for determining the heat value of the data to be processed is the first calculation formula, wherein the first calculation formula is as follows: where, T(t n ) is the heat value of the data to be processed at time t n , t n-1 is the time when the data to be processed was last accessed, T heat is the increased heat value of the data to be processed after being accessed at time t n . When the data to be processed is accessed at time t n , the value of c is 1. When the data to be processed is not accessed at time t n , the value of c is 0; Among them, when the heat period corresponding to the storage pool is the low peak period, the calculation formula for determining the heat value of the data to be processed is the second calculation formula, wherein the second calculation formula is as follows: Among them, B i is the average heat value of the data to be processed within the preset period corresponding to the time t n . C is the number of sample data within the preset duration before the preset period corresponding to the time t n . m newavg is the average value of the heat values of multiple sample data. n Bayes is the number of times the data to be processed is accessed within the preset period corresponding to the time t n . is the sum of the heat values of the data to be processed at multiple times calculated based on the first calculation formula within the preset period corresponding to the time t n .

2. The method according to claim 1, wherein The determining the target storage level of the data to be processed according to the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels in the storage pool other than the initial storage level includes: Inputting the updated status information of the data to be processed, the updated storage status information of the initial storage level, and the storage status information corresponding to the storage levels in the storage pool other than the initial storage level into a storage data migration model to obtain the target storage level of the data to be processed, wherein the storage data migration model is trained using training samples, and the training samples include the status information of the data.

3. The method according to claim 2, wherein The storage data migration model is trained using training samples, including: Define the state space, action space, and reward function of the initial storage data migration model. Among them, the state space includes the state information of the storage pool and the state information of the data. The action space defines multiple storage levels for data migration selection. The reward function is used to calculate the reward value corresponding to the migration action performed on the data. Input the sample data set into the initial storage data migration model, and perform training based on a preset deep learning framework to optimize the initial storage data migration model to obtain the storage data migration model.

4. The method according to claim 3, characterized in that, The state information of the data to be processed further includes user requirements, where the user requirements represent the user's requirements for data access rate.

5. A data migration device, characterized in that, It includes: A receiving module for receiving a processing request for the data to be processed. A first determination module for updating the state information of the data to be processed and the storage state information of the initial storage level storing the data to be processed based on the processing request, and determining the updated state information of the data to be processed and the updated storage state information of the initial storage level. Among them, the state information of the data to be processed includes the heat value of the data to be processed, and the heat value represents the frequency of access to the data to be processed. The initial storage level is located in the storage pool, and the storage state information of the initial storage level includes the average value of the heat values corresponding to the data stored in the initial storage level. An acquisition module for acquiring the storage state information corresponding to the storage levels in the storage pool other than the initial storage level. A second determination module for determining the target storage level of the data to be processed according to the updated state information of the data to be processed, the updated storage state information of the initial storage level, and the storage state information corresponding to the storage levels in the storage pool other than the initial storage level. A moving module for moving the data to be processed from the initial storage level to the target storage level. Among them, the first determination module is further used to obtain the total access volume of the storage pool within a preset period corresponding to the current moment according to the processing request; determine the heat period corresponding to the storage pool according to the total access volume, where the heat period represents the access situation of the data in the storage pool, including the low peak period and the stable period; determine the calculation formula for the heat value of the data to be processed based on the heat period corresponding to the storage pool; determine the heat value of the data to be processed based on the calculation formula for the heat value of the data to be processed. Among them, the device is further used to determine that the calculation formula for the heat value of the data to be processed is the first calculation formula when the heat period corresponding to the storage pool is the stable period. The first calculation formula is as follows: Among them, T(t n ) is the heat value of the data to be processed at time t n , t n-1 is the time when the data to be processed was last accessed, T heat is the increased heat value of the data to be processed after being accessed at time t n . When the data to be processed is accessed at time t n , the value of c is 1. When the data to be processed is not accessed at time t n , the value of c is 0; Among them, the device is further used to determine that the calculation formula for the heat value of the data to be processed is the second calculation formula when the heat period corresponding to the storage pool is the low peak period. The second calculation formula is as follows: Among them, B i is the average heat value of the data to be processed within the preset period corresponding to the time t n . C is the number of sample data within the preset duration before the preset period corresponding to the time t n . m newavg is the average value of the heat values of multiple sample data. n Bayes is the number of times the data to be processed is accessed within the preset period corresponding to the time t n . is the sum of the heat values of the data to be processed at multiple times calculated based on the first calculation formula within the preset period corresponding to the time t n .

6. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored program, wherein when the program runs, it controls the device where the non-volatile storage medium is located to execute the data migration method described in any one of claims 1 to 4.

7. A computer device, characterized in that, Comprising: a memory and a processor, the memory stores a computer program; the processor is configured to execute the computer program stored in the memory, and when the computer program runs, the processor executes the data migration method described in any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the data migration method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Data classified storage method and device based on reinforcement learning

    CN117453123A