Data migration method and device, nonvolatile storage medium and computer equipment
By updating data status information and storage hierarchical status information and optimizing data migration strategies in deep learning frameworks, the problem of insufficient performance and resource utilization in traditional distributed storage scheduling algorithms in separate data centers is solved, and data management efficiency is improved.
Patent Information
- Application Number
- CN202411294942.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-14
AI Technical Summary
Traditional distributed storage scheduling algorithms cannot meet the performance and resource utilization requirements of separate data center storage systems, especially in terms of storage hierarchy and network bandwidth impacts.
By receiving processing requests for the pending data, update its status information and storage status information at the initial storage level, determine the target storage level of the pending data, use the storage data migration model to optimize the data migration strategy based on the deep learning framework, considering the popularity of data and users Factors such as demand and network bandwidth.
It improves the data management efficiency of the separate data center storage system, improves the effect of the data migration strategy, and meets the performance and resource utilization requirements of the separate data center storage system.
Smart Images

Figure CN119248747A_ABST
Abstract
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 equipment. Background Art
[0002] As a carrier of data, data centers are indispensable resources in the contemporary information world. Traditional data centers use servers as basic components, and package computing, memory, and storage resources into servers. It is difficult to achieve cross-system pooled storage between servers, and most storage scheduling algorithms can only migrate data layer by layer, resulting in low performance. Currently, a new type of separated data center has attracted widespread attention. In the storage architecture of the separated data center, storage resources are pooled by category, and storage media pools at different levels are connected through a high-speed network. Data can be migrated between different storage pools through the network.
[0003] Due to differences in storage architecture, separate data center storage systems also face many challenges: First, in terms of storage hierarchy structure, new storage media are introduced into separate storage resource pools, and more efficient software design is a major challenge; second, in terms of storage tiered scheduling strategies, traditional distributed storage scheduling algorithm designs are based on an environment where storage and computing are closely integrated, and most consider factors such as the heterogeneity of server nodes, computing performance, and node load; after thorough decoupling of storage and computing, it is necessary not only to consider factors such as performance and cost, but also to pay attention to the impact of network bandwidth, storage system scalability, and adaptability.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a data migration method, apparatus, non-volatile storage medium and computer equipment to at least solve the technical problem that the performance and resource utilization of traditional distributed storage scheduling algorithms cannot meet the requirements of separate data center storage systems.
[0006] According to one aspect of an embodiment of the present invention, a data migration method is provided, comprising: receiving a processing request for data to be processed; based on the processing request, updating status information of the data to be processed and storage status information of an initial storage layer storing the data to be processed, determining updated status information of the data to be processed and updated storage status information of the initial storage layer, wherein the status information of the data to be processed includes a heat value of the data to be processed, the heat value represents the frequency with which the data to be processed is accessed, the initial storage layer is located in a storage pool, and the storage status information of the initial storage layer includes an average of heat values corresponding to data stored in the initial storage layer; obtaining storage status information corresponding to storage layers other than the initial storage layer in the storage pool; determining a target storage layer for 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 layer, and the storage status information corresponding to storage layers other than the initial storage layer in the storage pool; and moving the data to be processed from the initial storage layer to the target storage layer.
[0007] Optionally, based on the processing request, the status information of the data to be processed is updated, and the updated status information of the data to be processed is determined, 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 of the storage pool within a preset period corresponding to 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 a low peak period and a stable period; based on the heat period corresponding to the storage pool, determining a 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 a stable period, the calculation formula for determining the heat value of the data to be processed is a first calculation formula, wherein the first calculation formula is as follows:
[0009]
[0010] Among them, T(t n ) is the data to be processed at t n The heat value at time t n-1 is the time when the data to be processed was last accessed, T heat The data to be processed is n The heat value that rises after being accessed at time t n When the data to be processed is accessed at time t, the value of c is 1. n If the node is not accessed at any time, the value of c is 0.
[0011] Optionally, when the heat period corresponding to the storage pool is a low peak period, the calculation formula for determining the heat value of the data to be processed is a second calculation formula, wherein the second calculation formula is as follows:
[0012]
[0013] Among them, B i The data to be processed is n The average heat value in the preset period corresponding to the moment, C is the selected n The number of sample data within the preset time period before the preset period corresponding to the moment, m newavg is the average value of the heat value of multiple sample data, n Bayes For n The number of times the data to be processed is accessed within the preset period corresponding to the moment, For n 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.
[0014] Optionally, a target storage tier of the data to be processed is determined based on updated status information of the data to be processed, updated storage status information of the initial storage tier, and storage status information corresponding to storage tiers other than the initial storage tier in the storage pool, including: inputting the updated status information of the data to be processed, the updated storage status information of the initial storage tier, and storage status information corresponding to storage tiers other than the initial storage tier in the storage pool into a storage data migration model to obtain the target storage tier of the data to be processed, wherein the storage data migration model is trained using training samples, and the training samples include 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, wherein the state space includes state information in the storage pool and state 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 a preset deep learning framework, optimizing the initial storage data migration model, and obtaining the storage data migration model.
[0016] Optionally, the state information of the data to be decided also includes user demand, wherein the user demand represents the user's demand for data access rate.
[0017] According to another aspect of an embodiment of the present invention, a data migration device is also provided, including: a receiving module for receiving a processing request for data to be processed; a first determination module for updating the status information of the data to be processed and the storage status information of the initial storage layer storing the data to be processed based on the processing request, and determining the updated status information of the data to be processed and the updated storage status information of the initial storage layer, wherein the status information of the data to be processed includes a heat value of the data to be processed, the heat value represents the frequency with which the data to be processed is accessed, the initial storage layer is located in a storage pool, and the storage status information of the initial storage layer includes an average of the heat values corresponding to the data stored in the initial storage layer; an acquisition module for acquiring storage status information corresponding to storage layers other than the initial storage layer in the storage pool; a second determination module for determining a target storage layer of the data to be processed based on the updated status information of the data to be processed, the updated storage status information of the initial storage layer, and the storage status information corresponding to storage layers other than the initial storage layer in the storage pool; and a moving module for moving the data to be processed from the initial storage layer to the target storage layer.
[0018] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above data migration methods.
[0019] According to yet another aspect of an embodiment of the present invention, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is run, any one of the above-mentioned data migration methods is executed.
[0020] According to yet another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the above-mentioned data migration methods is implemented.
[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 layer 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 layer, wherein the status information of the data to be processed includes a heat value of the data to be processed, the heat value represents the frequency of access to the data to be processed, the initial storage layer is located in a storage pool, and the storage status information of the initial storage layer includes an average of the heat values corresponding to the data stored in the initial storage layer; obtaining the corresponding storage layers in the storage pool except the initial storage layer storage status information of the data to be processed; determine the target storage tier 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 tier, and the storage status information corresponding to the storage tiers other than the initial storage tier in the storage pool; move the data to be processed from the initial storage tier to the target storage tier, thereby achieving the purpose of outputting a data migration strategy according to storage resource status, user demand, data popularity, etc., 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 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 and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0023] Figure 1 A hardware structure block diagram of a computer terminal for implementing a data migration method is shown;
[0024] Figure 2 is a flow chart of a data migration method provided according to an embodiment of the present invention;
[0025] Figure 3 is an overall architecture diagram of a separated data center provided according to an optional embodiment of the present invention;
[0026] Figure 4 is an overall architecture diagram of a storage system scheduling module provided according to an optional embodiment of the present invention;
[0027] Figure 5 is a curve graph of the total amount of storage pool access per hour for a data set provided according to an optional embodiment of the present invention;
[0028] Figure 6 is a heat change curve diagram of the commodity information with the most total visits in the storage pool provided by an optional embodiment of the present invention;
[0029] Figure 7 is a graph of data heat calculated using a formula based on Newton's law of cooling provided in accordance with an optional embodiment of the present invention;
[0030] Figure 8 is a curve chart of calculating data heat using a stage-by-stage combination model according to an optional embodiment of the present invention;
[0031] Fig. 9 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;
[0032] Fig.10 is a schematic diagram of the overall mechanism of a deep reinforcement learning data scheduling algorithm provided according to an optional embodiment of the present invention;
[0033] Fig.11 is a curve chart of average reward values for each training session in the simulation training results provided in an optional embodiment of the present invention;
[0034] Fig.12 is a line graph comparing total access delays of four algorithms provided according to an optional embodiment of the present invention;
[0035] Fig.13 is a line graph of load balancing degree changes of four algorithms provided according to an optional embodiment of the present invention;
[0036] Fig.14 is a structural block diagram of a data migration device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0039] According to an embodiment of the present invention, a data migration method embodiment 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 a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a data migration method. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also 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. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0041] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., 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 program instructions / data storage devices corresponding to the data migration method in the embodiment 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, the data migration method of the above-mentioned application program is realized. The memory 104 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 memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0043] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0044] Figure 2 is a flow chart of a data migration method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0045] Step S201, receiving a processing request for data to be processed.
[0046] In this step, the processing request initiated for the data to be processed may be a read or write request, which initiates an I / O request to read or write data from the storage pool. Therefore, the access volume of the data to be processed will change, and the access volume of the storage layer storing the data to be processed in the storage pool will also change accordingly.
[0047] Step S202, based on the processing request, updates the status information of the data to be processed and the storage status information of the initial storage layer storing the data to be processed, determines the updated status information of the data to be processed and the updated storage status information of the initial storage layer, wherein the status information of the data to be processed includes the heat value of the data to be processed, the heat value represents the frequency with which the data to be processed is accessed, the initial storage layer is located in a storage pool, and the storage status information of the initial storage layer includes the average of the heat values corresponding to the data stored in the initial storage layer.
[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 layer storing the data to be processed will also change accordingly. The status information of the data to be processed can be stored in a separate database, and the data structure in the database may include information such as data size, heat value, and access timestamp. The storage status information of the initial storage layer may include the average of the heat values corresponding to the data stored in the initial storage layer, and may also include the storage space available for the initial storage layer, and may also include the continuous read and write speed of the storage medium of the initial storage layer.
[0049] Step S203, obtaining storage status information corresponding to storage tiers other than the initial storage tier in the storage pool.
[0050] In this step, in order to allocate the data to be processed to a more appropriate storage layer, in addition to the status information of the data to be processed itself and the status information of the initial storage layer of the data to be processed, it is also necessary to obtain the storage status information of other storage layers, comprehensively consider the status information of the data to be processed and the status information of all storage layers, and finally determine the target migration storage layer of the data to be processed.
[0051] Step S204, determining a target storage tier for 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 tier, and the storage status information corresponding to the storage tiers other than the initial storage tier in the storage pool.
[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 the data to be processed should be migrated, and the migration strategy corresponding to the data to be processed can be output. The migration strategy may include the target storage level of the data to be processed.
[0053] Step S205 , moving the data to be processed from the initial storage tier to the target storage tier.
[0054] In this step, after obtaining the migration strategy, the file system of the storage pool can be interacted with according to the migration strategy to move the data to be processed from the initial storage tier to the target storage tier to complete the data migration operation.
[0055] As an optional embodiment, Figure 3 1 is a diagram of the overall architecture of a separate data center provided according to an optional embodiment of the present invention. Figure 3 As shown in the figure, the storage scheduling module is deployed in the storage server of the data center. Read, write and migration requests will first reach the storage server, which will interact with the storage at all levels in the storage pool through the storage scheduling module and return the result after completing the request. Although the hardware resources are completely decoupled in the separated data center architecture, the storage pool is still equipped with a small amount of computing resources for performing some management tasks. These computing resources play the role of the storage server. In order to more clearly show the internal composition of the storage scheduling module, Figure 4 This is an overall architecture diagram of the storage system scheduling module provided according to an optional embodiment of the present invention, which only retains the data flow between the read and write, migration request and the storage scheduling module and the storage pool. Figure 4 As shown in the figure, the storage system scheduling module architecture is mainly divided into three parts: storage resource status information module, scheduling algorithm module and 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, free capacity size, storage medium bandwidth, and accessed data heat value, data size, user demand and other information in each storage layer; the scheduling algorithm module is responsible for receiving storage resource status information, performing intelligent analysis, and outputting data migration strategies; the migration execution module is responsible for interacting with the database file system according to the migration strategy to handle the specific operations of data migration, including data reading and writing.
[0056] Through the above steps, the purpose of outputting data migration strategies according to storage resource status, user needs, data popularity, 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 of traditional distributed storage scheduling algorithms cannot meet the requirements of the separated data center storage system.
[0057] As an optional embodiment, based on the processing request, the status information of the data to be processed is updated, and the updated status information of the data to be processed is determined, 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 of the storage pool within a preset period corresponding to 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 a low peak period and a stable period; based on the heat period corresponding to the storage pool, determining a 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.
[0058] Optionally, the data heat value is an indicator to measure the frequency of data access, which will change with the passage of time and changes in business needs. The data storage strategy can be adjusted according to the change in the heat value, and hot data can be stored on a faster storage medium for quick access, while cold data can be stored on a more economical storage medium to optimize storage costs, thereby improving data processing efficiency and storage system performance. Based on the total access volume of the storage pool in a preset period corresponding to the current moment, the heat period corresponding to the storage pool can be determined. Among them, the process of determining the heat period corresponding to the storage pool can be to obtain the value of the total access volume in the period after a preset period. Then, the total access volume value in the period is compared with the preset threshold value set for defining the stable period and the low peak period, so as to determine whether the period belongs to the stable access period or the low peak access 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 total access volume; when performing system upgrades or maintenance, user access to data may be temporarily restricted. In the above situation, the original hot data may cool down rapidly, and the temperatures of cold and hot data will tend to be consistent, making it difficult to distinguish between cold and hot data, resulting in unnecessary data migration. Therefore, for different heat periods, different heat value calculation formulas need to be selected to calculate the heat value of the data.
[0059] For example, you can set up a phased hybrid model. When the storage pool is in a low-peak period, use Bayesian averaging to calculate its data heat. When the storage pool is in a stable period, use Newton's cooling law to simulate the natural decay of data temperature over time. According to the prior data, get the maximum count of the number of accesses to the storage pool in a period. max , based on count max Determine the preset thresholds for defining stable periods and low peak periods, N t is the observed value of the access volume of the storage pool, that is, the total access volume of the storage pool in the preset period corresponding to the current moment. If the total access volume in the preset period corresponding to the current moment is greater than the maximum total access volume currently recorded, the maximum total access volume is updated. t≥0.3 count max When the storage pool is in a stable period, the observed value N t <0.3 count max When , the storage pool is in the off-peak period. As the storage pool access observation value changes, the model is dynamically adjusted to transform between Newton's cooling law and Bayesian average, and the maximum count max Dynamic update. The hybrid model can be expressed as:
[0060]
[0061]
[0062] Among them, T(t n ) indicates that the data is at t n The heat at the moment, B(t n ) represents the Bayesian average heat, N t It represents the observed value of the total number of database visits in the corresponding period, and α represents the cooling coefficient of the storage medium. The two models are combined together through the stage model, so that they can be flexibly transformed according to different data types and application scenarios.
[0063] In order 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, which contains user behavior records within a week. Each row of user behavior can be compared to an access to the product information in the storage pool. Figure 5 is a curve chart of the total amount of storage pool access per hour for a data set provided in an optional embodiment of the present invention, Figure 6 This is a heat change curve of the product information with the most total visits in the storage pool provided according to an optional embodiment of the present invention. As shown in the figure, when the total visits to the storage pool are low (i.e., the database is in the off-peak period), the most active data in the storage pool will also cool down rapidly until it is close to 0. At this time, the heat of hot and cold data tends to be consistent, making it difficult to distinguish between hot and cold data. If there is data migration at this time, it may cause active data to migrate to low-speed storage. After the off-peak period, the data heat rises, and 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 off-peak period is not only affected by time, but also refers to the heat value of the data in the stable period, so that the active data can maintain a relatively stable data heat in the off-peak period, thereby distinguishing between cold and hot data. Figure 7 is a curve chart provided according to an optional embodiment of the present invention using a formula based on Newton's law of cooling to calculate data heat, Figure 8It is a curve diagram of calculating data heat using a staged combination model according to an optional embodiment of the present invention. As shown in the figure, the heat value of the data in the low-peak period becomes more stable and approaches the average heat value of the data in the stable period.
[0065] In view of the actual situation of storage pool access, a hybrid calculation formula for data heat that changes with the storage pool access volume is proposed. When the storage pool is in a stable access period, the data heat calculation formula based on Newton's cooling law is used. When the storage pool is in a low-peak access period, the data heat calculation formula based on Bayesian average is used. This formula can reduce the impact of the drop in data temperature during the low-peak period on hot data, so that its heat can be biased towards the average value of data heat during the stable period, thereby maintaining heat during the low-peak period and reducing unnecessary migration.
[0066] As an optional embodiment, when the heat period corresponding to the storage pool is a stable period, the calculation formula for determining the heat value of the data to be processed is a first calculation formula, wherein the first calculation formula is as follows:
[0067]
[0068] Among them, T(t n ) is the data to be processed at t n The heat value at time t n-1 is the time when the data to be processed was last accessed, T heat The data to be processed is n The heat value that rises after being accessed at time t n When the data to be processed is accessed at time t, the value of c is 1. n If the node is not accessed at any time, the value of c is 0.
[0069] Optionally, when the storage pool is in a stable access period, a data heat value calculation formula based on Newton's cooling law can be used. Newton's cooling law reflects the process in which the temperature of an object decreases exponentially over time. Similarly, the heat of a piece of data will also decrease over time, which is basically consistent with the meaning of Newton's cooling law. Newton's cooling law can be applied to simulate the process of data heat decrease. Newton's cooling law can be expressed by the following mathematical formula:
[0070] T′(t)=-α(T(t)-H)
[0071] Among them, T(t) is the temperature of the object, H represents the ambient temperature, and α is the cooling coefficient. Further derivation of this formula can yield the following results:
[0072]
[0073] For the data in the storage pool, the ambient temperature can be replaced by the average temperature of all data in the storage pool. However, each data is independent of other data in the storage pool. The data temperature is determined by its own access mode and frequency, and depends on external factors such as specific user needs. It is not affected by the average temperature of all data in the storage pool. Therefore, this calculation method is not very meaningful in practical application, so the influence of ambient temperature is ignored. Considering that the temperature of data will increase when it is accessed, the above formula is modified to obtain the following temperature calculation formula:
[0074]
[0075] Among them, t n-1 Indicates the time when the data was last accessed, T heat Indicates the heat of data after being accessed. c is a discrete function. n When the data is accessed at time t n When the time is not accessed, c=0.
[0076] In addition, the cooling coefficient is a crucial part in the data heat model based on Newton's law of cooling. It directly affects the speed at which data heat decays over time, and thus affects the timing of data migration between different storage media. The performance characteristics of different storage media, such as I / O rate, latency, etc., can serve as an important reference 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 data access efficiency. Traditional media such as HDDs have a lower reading speed, so using a higher cooling coefficient can quickly cool the stored data, reduce the unnecessary migration of short-term accidental heating data, and thus improve the overall efficiency of the system.
[0077] As an optional embodiment, when the heat period corresponding to the storage pool is a low peak period, the calculation formula for determining the heat value of the data to be processed is a second calculation formula, wherein the second calculation formula is as follows:
[0078]
[0079] Among them, B i The data to be processed is n The average heat value in the preset period corresponding to the moment, C is the selected n The number of sample data within the preset time period before the preset period corresponding to the moment, m newavg is the average value of the heat value of multiple sample data, n Bayes For nThe number of times the data to be processed is accessed within the preset period corresponding to the moment, For n 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.
[0080] Optionally, when the storage pool is in a low-peak access period, a data heat value calculation formula based on Bayesian average can be used. Bayesian average is a statistical method that estimates the true situation of an individual based on the overall sample average and individual sample information. When the storage pool is in a low-peak period, the data access volume is usually low. In comparison, the heat value in the stable period may be more stable, which can reflect the access characteristics of the data and can serve as a reliable reference for estimating the data heat value. Bayesian average can use the past heat information of the data to provide a more robust estimate. For each data, its Bayesian average temperature can be calculated according to the following formula:
[0081]
[0082] Among them, C represents the prior sample size, and C heat data in a period before the low peak period are selected as samples, m newavg Represents the prior average score, that is, calculating the average heat value of all sample data, n Bayes Indicates the number of times data is accessed during the off-peak period. It represents the sum of heat values calculated using Newton's cooling law during the off-peak period. By introducing C and m newavg ,The Bayesian average method can reduce the impact of the decrease of data heat during the off-peak 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 optional embodiment, a target storage tier of the data to be processed is determined based on updated status information of the data to be processed, updated storage status information of the initial storage tier, and storage status information corresponding to storage tiers other than the initial storage tier in the storage pool, including: inputting the updated status information of the data to be processed, the updated storage status information of the initial storage tier, and storage status information corresponding to storage tiers other than the initial storage tier in the storage pool into a storage data migration model to obtain the target storage tier of the data to be processed, wherein the storage data migration model is trained using training samples, and the training samples include 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 according to the current system situation, data information, user needs, etc., to ensure the performance of the storage system and achieve efficient data management. Among them, when deep reinforcement learning is applied to specific problems, it is first necessary to map the problem into the reinforcement learning framework. The framework consists of an intelligent agent and an environment, and reinforcement learning is a process of interaction between the two. In the interactive process, there are three key elements, namely state, action, and reward. Fig. 9 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, such as Fig. 9 As shown in the figure, the storage resource pool is regarded as the environment, the storage medium environment information and the data information that needs to be decided are regarded as the state, and the intelligent agent model observes the state s t Then select an action a t (i.e., the target migration level of the data), the environment receives action a t After that, the data t After migrating to the target level, the environment will generate a new state based on the state of the resource pool after migration and the next data information. t+1 , and calculate the reward r t+1 , reward r t+1 Will tell the agent model action a t Whether to make 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 trained using training samples, including: defining the state space, action space, and reward function of the initial storage data migration model, wherein the state space includes state information in the storage pool and state 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 a preset deep learning framework, optimizing the initial storage data migration model, and obtaining the storage data migration model.
[0086] Optionally, the storage data migration model includes three important contents: state space, action space and reward function. Among them, the variables in the state space can fully describe the key information that affects the data migration decision. In the process of training the initial storage data migration model, T can be set as the data migration period (unit: hour), and the specific size can be set according to business needs. After each T time, the storage system sorts all the data accessed in this time period according to the number of accesses, and makes migration decisions one by one. Specifically, in each time period t, a total of m data are accessed. Then, by arranging the data from high to low according to the number of times it is accessed, we can get the data id sequence {data1, data2,…, data t , data t+1 …, data m}. Collect data status information and corresponding storage pool status information to obtain status s t :
[0087] s t =[avgtemp t , frea t ,speed t , datatemp t , size t , tier t , demand t ,freq t ]
[0088] The status information in the storage pool includes: avgtemp t It represents the average value of data heat in each level, which can reflect the hotness and coldness of data in the level, and enable the intelligent model to evaluate the rationality of the current hot and cold data distribution. Every time a time T passes, the heat value of all data is updated, and the average value of data heat in each level is calculated. t Indicates the available storage space of each level of storage devices, reflecting the current storage resource usage; speed t Indicates the continuous read and write speed of each storage layer, which helps the intelligent model evaluate the performance differences between different storage layers. The status information of data includes: datatemp t Indicates the current heat value of the data to be decided, reflecting the frequency of data access in the near future. For data with high heat value, the intelligent model may choose to keep it in the current storage layer or migrate it to a storage layer with faster access speed. For data with low heat value, it will consider migrating it to a slow layer to leave space for new data to be added; size tIndicates the size of the decision-making data, 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 level of the data to be decided, which helps the agent model analyze whether to migrate the data and the target storage level of the migration; demand t It represents user demand and reflects the user's expectations for the data storage level. It represents the number of times the data is accessed within the time period, reflecting the activity of the data. It is also a reference for the intelligent 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 level that can be selected for the data to be decided. The action space A is defined as follows (n represents the number of storage levels):
[0090] A={0,1,2,...,n-1}
[0091] When using a policy network, the output is a probability distribution of the action space, and actions are selected based on the probability distribution, choosing the action with the highest probability among all possible actions.
[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, the corresponding reward is calculated after completing a migration activity. The optimization goal of the migration algorithm is to minimize system latency while meeting user needs as much as possible. t It consists of four parts: The average access delay of 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, as well as the degree to which data migration meets user needs. The calculation formula is as follows:
[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. A lower average access delay means that the scheduling algorithm is more efficient and can respond quickly to user access requests. In this embodiment, the average access delay only includes the time taken to read data, and the calculation formula is as follows:
[0095]
[0096] Among them, sizei Indicates the size of the accessed data, v tier Indicates the reading speed of the data level. After migration The total delay time of the access sequence within the time period, N represents the total number of access requests during this period. In order to ensure that each reward can be on the same scale, the average access delay is constrained to the range of [-1, 0] using the m,in-max normalization method. After multiple experimental verifications, the maximum and minimum values of the average access delay can be set to dmax=0.0017 and dmin=0.0002, respectively, and the maximum value is updated dynamically. Since the goal of reinforcement learning is to maximize the reward value, while minimizing the average access delay at the same time, the standardized average access delay needs to be negative to keep it consistent with the goal of deep reinforcement learning. The specific calculation formula is as follows:
[0097]
[0098] d avgdelay ∈[0, 1], in the process of maximizing the reward function, the agent model will tend to choose a strategy that can reduce the average access delay, thereby improving the system response speed. There are two reasons for calculating the reward function for the access sequence of the time period. First, compared with the access sequence of the complete T time period, The data volume is small, which can occupy less computing resources during model training and strategy update, and achieve faster data processing speed, which is crucial for storage migration tasks with high real-time requirements; second, The access sequence of a time period is more timely and can better reflect the recent access trend of the storage system, thereby guiding data migration operations more effectively.
[0099] d remov e represents the delay caused by the data migration process. As a penalty in the reward function, it constrains the agent model to consider the system delay caused by the migration data when making decisions. It includes two parts: the delay caused by the migration of decision data to the target level, and the delay caused by the expulsion of some data when the target level does not have enough free time. When the target level does not have enough free time, the data with low access times in this level will be expelled to a lower level. The calculation formula is as follows:
[0100]
[0101] Among them, size t represents the size of decision data, v read Indicates the speed of reading data from the storage layer, v new_write Indicates the speed at which data is written to the target storage layer, ∑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 reward function calculation. For example, the weight coefficients can be set to w1 = 1, w2 = 0.2, and w3 = 0.005 after multiple experimental attempts in order to reduce system latency.
[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. Fig.10 is a schematic diagram of the overall mechanism of the deep reinforcement learning data scheduling algorithm provided according to an optional embodiment of the present invention, such as Fig.10 As shown in the figure, the application scenario consists of three parts: environment, user and scheduling algorithm. The environment consists of a multi-level storage device pool, including PM pool, NVMe SSD pool, SSD pool and HDD pool. Each level has different capacity, read and write speed and cost characteristics. A large amount of data information is stored in the device, which has information such as popularity, data size, level, and number of accesses. Users continue to generate access requests and user needs, which directly affect the data information and thus 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. They have the same network structure and can copy network parameters to each other. The local policy network and value network are responsible for interacting with the environment, collecting data and calculating gradients. The global network is responsible for updating parameters based on the gradients collected by the local network and synchronizing the parameters to the local network. The global network does not interact with the environment. The optimization goal of the scheduling algorithm is to minimize the system access delay. The policy network outputs the probability distribution of all actions based on the current state, selects actions according to the probability distribution, and applies the actions to the environment to obtain rewards from environmental feedback. The Actor and Critic network parameters are updated according to the reward, new state, and advantage function value after the action is executed. A3C contains multiple worker threads that interact with their respective environments, collect experience, and regularly synchronize parameters to the global network. Through a large amount of training, A3C can learn the optimal strategy for data migration scheduling problems. In practical applications, the trained policy network can select the optimal migration strategy according to environmental changes and continuously optimize system performance.
[0111] As an optional embodiment, the state information of the data to be decided also includes user demand, wherein the user demand represents the user's demand for data access rate.
[0112] Optionally, based on different user requirements for data access rates, user requirements can be divided into three types: expected data to be stored in a fast device layer (such as frequently accessed data), expected data to be stored in a slow device layer (such as long-term archived data), and no 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 data may change multiple times, so the average value is taken from multiple records. Recording user requirements enables the intelligent model to take into account personalized needs in the decision-making process. The three user requirements are assigned as follows:
[0113]
[0114] As an optional embodiment, a simulation experiment can be performed on the A3C-based storage data migration model in Python 3.10 and Pytorch 1.12.1 environments. Table 1 is a simulation experiment parameter tuning and selection value table provided according to an optional embodiment of the present invention.
[0115]
[0116] Table 1 A simulation experiment parameter tuning and selection table
[0117] As shown in Table 1, the parameters considered in the experimental design and the values selected after the tuning process are displayed. When the discount factor γ = 0, the agent only focuses on the immediate reward. When γ = 1, the agent will focus on long-term rewards. The learning rate determines the speed at which the weights of the neural network are updated. A lower learning rate has a smaller effect on the speed of weight updates. More training iterations may be required to converge. Too high a learning rate may cause the neural network to update in large steps and fall into a local optimum too quickly. The number of training rounds needs to be adjusted according to the convergence of the model, the discount factor and the learning rate, and the optimal number of rounds is gradually explored. Table 2 is a table of other parameter values for a simulation experiment provided according to an optional embodiment of the present invention.
[0118]
[0119] Table 2 Other parameter values of a simulation experiment
[0120] As shown in Table 2, the settings of parameters such as the number of storage levels, migration cycle, and cooling coefficient are displayed.
[0121] In the embodiment of the present invention, the corresponding storage devices are simulated for the four storage levels. Due to the insufficient performance of the experimental equipment, when the simulation is performed according to the above capacity, the amount of data in the storage device is too large, resulting in insufficient memory and long model training time. Therefore, the capacity of the above device is proportionally reduced. Table 3 is a storage device information and simulation experiment simulation capacity table provided according to an optional embodiment of the present invention.
[0122]
[0123]
[0124] Table 3 A storage device information and simulation experiment simulation capacity table
[0125] As shown in Table 3, the storage device information and simulation experiment capacity information are displayed. The data migration is based on the data block granularity, and the storage device is set to 1MB as the block size. The appropriate data block size helps reduce the generation of fragmentation in storage and also helps to simplify the design of the migration algorithm.
[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-cart, and purchases). Each row of data consists of user ID, product ID, product category ID, behavior type, and timestamp. If all behaviors are regarded as access to product information in the database, then each row of data can represent a visit behavior corresponding to the product. The dataset has a total of 100,150,807 records and 4,162,024 product IDs. The simulation experiment can adopt the probability sampling method, extract 400 product IDs and corresponding 239959 access records from the original data set according to the probability distribution of each product being accessed, as the data used in the simulation experiment, and then perform the following operations in sequence: 1) remove the three columns of irrelevant data 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, set to any value in between; 4) arrange the data set in order from small to large timestamps, each row of data consists of product ID, data size, timestamp, user requirements, and each row of data represents a user's access to the data information; 5) use the timestamp 1511845200 as the dividing line, and divide the data into a training set for deep reinforcement learning agent model training and a test set for testing algorithm performance. Table 4 is a data set information table provided according to an optional embodiment of the present invention.
[0127]
[0128] Table 4 A data set information table
[0129] As shown in Table 4, the specific information of the training set and the test set is displayed, including the number of access records, start time, end time, and data size.
[0130] Set the above parameters and train the model. Fig.11 is a curve diagram of the average reward value of each training in the simulation training result provided by an optional embodiment of the present invention, such as Fig.11As shown in the figure, the reward value gradually increases during training and eventually converges stably around 1.2, and the policy network can learn a better policy.
[0131] In addition, three algorithms can be used for comparison in simulation experiments: (1) data migration strategy based on LRU (Least Recently Used); (2) data migration strategy that combines data heat with LRU; (3) data migration strategy based on greedy FIFO (First Input First Output). The total access delay and load balance can be used as comparison indicators. In order to more comprehensively evaluate the system delay, the delay caused by data migration is included in the calculation of the total delay to ensure a more reasonable evaluation of system performance. The load balance is to calculate the IOPS (Input / Output Operations Per Second) of each device in each migration cycle, and then measure the load balance of the storage pool by calculating the standard deviation of IOPS. The load balance calculation formula is as follows:
[0132]
[0133] Among them, x i Indicates the IOPS of each device. represents the average value of IOPS, and n represents the total number of devices. When the standard deviation of IOPS is smaller, the load is more balanced and the load balancing degree is greater, otherwise the load balancing degree is smaller. Finally, the total access delay of the four algorithms can be obtained. Fig.12 is a line chart comparing the total access delays of four algorithms provided according to an optional embodiment of the present invention, such as Fig.12 As shown in the figure, the data migration scheduling algorithm based on A3C is more effective in reducing the total latency of access requests than the other three algorithms. Fig.13 is a line graph showing changes in load balancing of four algorithms according to an optional embodiment of the present invention. Fig.13 As shown, the load balancing degree of the FIFO algorithm is low for a long time, and the load balancing degree of the LRU-temp algorithm is less stable. Therefore, the load balancing degree of the four algorithms can be further analyzed over time. Table 5 is a load balancing degree analysis table of four algorithms provided according to an optional embodiment of the present invention.
[0134]
[0135] Table 5 Load balancing analysis of four algorithms
[0136] As shown in Table 5, the standard deviation, maximum-minimum ratio, and average of the four algorithms are displayed. The standard deviation of the load balancing degree of the A3C algorithm is the smallest, indicating that the A3C algorithm is more stable and has smaller fluctuations over a long time span. The maximum-minimum ratio of A3C is 1.1491, which is close to 1, indicating 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. As can be seen from the table, the average performance of A3C is also good.
[0137] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but 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 required by the present invention.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the data migration method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0139] According to an embodiment of the present invention, a data migration device for implementing the above data migration method is also provided. Fig.14 is a structural block diagram of a data migration device provided according to an embodiment of the present invention, such as Fig.14 As shown, the data migration device includes: a receiving module 141, a first determining module 142, an acquiring module 143, a second determining module 144 and a moving module 145. The data migration device is described below.
[0140] The receiving module 141 is used to receive a processing request for data to be processed.
[0141] The first determination module 142 is connected to the receiving module 141, and is used to update the status information of the data to be processed and the storage status information of the initial storage layer 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 layer, wherein the status information of the data to be processed includes the heat value of the data to be processed, the heat value represents the frequency of access to the data to be processed, the initial storage layer is located in the storage pool, and the storage status information of the initial storage layer includes the average of the heat values corresponding to the data stored in the initial storage layer.
[0142] The acquisition module 143 is connected to the first determination module 142 and is used to acquire storage status information corresponding to storage tiers other than the initial storage tier in the storage pool.
[0143] The second determination module 144 is connected to the acquisition module 143, and is used to determine the target storage tier of the data to be processed based on the updated status information of the data to be processed, the updated storage status information of the initial storage tier, and the storage status information corresponding to the storage tiers in the storage pool except the initial storage tier.
[0144] The moving module 145 is connected to the second determining module 144 and is used to move the to-be-processed data from the initial storage level to the target storage level.
[0145] It should be noted that the receiving module 141, the first determining module 142, the acquiring module 143, the second determining module 144 and the moving module 145 correspond to steps S201 to S205 in the embodiment, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.
[0146] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of 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 embodiment 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, realizing 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 memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0148] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receive a processing request for data to be processed; based on the processing request, update the status information of the data to be processed and the storage status information of the initial storage layer storing the data to be processed, and determine the updated status information of the data to be processed and the updated storage status information of the initial storage layer, wherein the status information of the data to be processed includes the heat value of the data to be processed, the heat value represents the frequency of access to the data to be processed, the initial storage layer is located in the storage pool, and the storage status information of the initial storage layer includes the average of the heat values corresponding to the data stored in the initial storage layer; obtain the storage status information corresponding to the storage layers other than the initial storage layer in the storage pool; determine the target storage layer 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 layer, and the storage status information corresponding to the storage layers other than the initial storage layer in the storage pool; and move the data to be processed from the initial storage layer to the target storage layer.
[0149] Optionally, the processor may also 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, 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 of the storage pool within a preset period corresponding to 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 a low peak period and a stable period; based on the heat period corresponding to the storage pool, determining the calculation formula of the heat value of the data to be processed; based on the calculation formula of the heat value of the data to be processed, determining the heat value of the data to be processed.
[0150] Optionally, the processor may further execute the program code of the following steps: when the heat period corresponding to the storage pool is a stable period, determining that the calculation formula for the heat value of the data to be processed is a first calculation formula, wherein the first calculation formula is as follows:
[0151]
[0152] Among them, T(t n ) is the data to be processed at t n The heat value at time t n-1 is the time when the data to be processed was last accessed, T heat The data to be processed is n The heat value that rises after being accessed at time t n When the data to be processed is accessed at time t, the value of c is 1. n If the node is not accessed at any time, the value of c is 0.
[0153] Optionally, the processor may further execute the program code of the following steps: when the heat period corresponding to the storage pool is a low peak period, determining that the calculation formula for the heat value of the data to be processed is a second calculation formula, wherein the second calculation formula is as follows:
[0154]
[0155] Among them, B i The data to be processed is n The average heat value in the preset period corresponding to the moment, C is the selected n The number of sample data within the preset time period before the preset period corresponding to the moment, m newavg is the average value of the heat value of multiple sample data, n Bayes For n The number of times the data to be processed is accessed within the preset period corresponding to the moment, For n 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.
[0156] Optionally, the processor may also execute program code for the following steps: determining a target storage layer of the data to be processed based on updated status information of the data to be processed, updated storage status information of the initial storage layer, and storage status information corresponding to storage layers other than the initial storage layer in the storage pool, including: inputting the updated status information of the data to be processed, the updated storage status information of the initial storage layer, and storage status information corresponding to storage layers other than the initial storage layer in the storage pool into a storage data migration model to obtain a target storage layer of the data to be processed, wherein the storage data migration model is trained using training samples, and the training samples include status information of the data.
[0157] Optionally, the processor may also execute program code for the following steps: 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, wherein the state space includes state information in the storage pool and state 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 a preset deep learning framework, optimizing the initial storage data migration model, and obtaining the storage data migration model.
[0158] Optionally, the processor may also execute program code of the following steps: the state information of the data to be decided also includes user demand, wherein the user demand represents the user's demand for data access rate.
[0159] According to an embodiment of the present invention, a data migration method is provided. A processing request for data to be processed is received; based on the processing request, the status information of the data to be processed and the storage status information of the initial storage layer storing the data to be processed are updated, and the updated status information of the data to be processed and the updated storage status information of the initial storage layer are determined, wherein the status information of the data to be processed includes the heat value of the data to be processed, the heat value represents the frequency of access to the data to be processed, the initial storage layer is located in a storage pool, and the storage status information of the initial storage layer includes the average of the heat values corresponding to the data stored in the initial storage layer; the storage status information corresponding to the storage layers other than the initial storage layer in the storage pool is obtained; based on According to the updated status information of the data to be processed, the updated storage status information of the initial storage layer and the storage status information corresponding to the storage layers other than the initial storage layer in the storage pool, the target storage layer of the data to be processed is determined; the data to be processed is moved from the initial storage layer to the target storage layer, so as to achieve the purpose of outputting the data migration strategy according to the storage resource status, user demand, data popularity, 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 of the traditional distributed storage scheduling algorithm cannot meet the requirements of the separated data center storage system.
[0160] A person 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 hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0161] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can 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 computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0163] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: receiving a processing request for data to be processed; based on the processing request, updating status information of the data to be processed and storage status information of an initial storage layer storing the data to be processed, and determining updated status information of the data to be processed and updated storage status information of the initial storage layer, wherein the status information of the data to be processed includes a heat value of the data to be processed, the heat value represents the frequency with which the data to be processed is accessed, the initial storage layer is located in a storage pool, and the storage status information of the initial storage layer includes an average of heat values corresponding to data stored in the initial storage layer; obtaining storage status information corresponding to storage layers other than the initial storage layer in the storage pool; determining a target storage layer for the data to be processed based on the updated status information of the data to be processed, the updated storage status information of the initial storage layer, and the storage status information corresponding to storage layers other than the initial storage layer in the storage pool; and moving the data to be processed from the initial storage layer to the target storage layer.
[0164] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing 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 of the storage pool within a preset period corresponding to 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 a low peak period and a stable period; based on the heat period corresponding to the storage pool, determining a 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, the non-volatile storage medium is configured to store a program code for executing the following steps: when the heat period corresponding to the storage pool is a stable period, the calculation formula for determining the heat value of the data to be processed is a first calculation formula, wherein the first calculation formula is as follows:
[0166]
[0167] Among them, T(t n ) is the data to be processed at t n The heat value at time t n-1 is the time when the data to be processed was last accessed, T heat The data to be processed is n The heat value that rises after being accessed at time t n When the data to be processed is accessed at time t, the value of c is 1. n If the node is not accessed at any time, the value of c is 0.
[0168] Optionally, in this embodiment, the non-volatile storage medium is configured to store a program code for executing the following steps: when the heat period corresponding to the storage pool is a low peak period, the calculation formula for determining the heat value of the data to be processed is a second calculation formula, wherein the second calculation formula is as follows:
[0169]
[0170] Among them, B i The data to be processed is n The average heat value in the preset period corresponding to the moment, C is the selected n The number of sample data within the preset time period before the preset period corresponding to the moment, m newavg is the average value of the heat value of multiple sample data, n Bayes For n The number of times the data to be processed is accessed within the preset period corresponding to the moment, For n 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.
[0171] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: determining a target storage tier for the data to be processed based on updated status information of the data to be processed, updated storage status information of the initial storage tier, and storage status information corresponding to storage tiers other than the initial storage tier in the storage pool, including: inputting the updated status information of the data to be processed, the updated storage status information of the initial storage tier, and storage status information corresponding to storage tiers other than the initial storage tier in the storage pool into a storage data migration model to obtain a target storage tier for the data to be processed, wherein the storage data migration model is trained using training samples, and the training samples include status information of the data.
[0172] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: 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, wherein the state space includes state information in the storage pool and state 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 a preset deep learning framework, optimizing the initial storage data migration model, and obtaining the storage data migration model.
[0173] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: the state information of the data to be decided also includes user demand, wherein the user demand represents the user's demand for data access rate.
[0174] An embodiment of the present invention also provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it can achieve: 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 layer 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 layer, wherein the status information of the data to be processed includes a heat value of the data to be processed, the heat value represents the frequency with which the data to be processed is accessed, the initial storage layer is located in a storage pool, and the storage status information of the initial storage layer includes the average of the heat values corresponding to the data stored in the initial storage layer; obtaining the storage status information corresponding to the storage layers other than the initial storage layer in the storage pool; determining the target storage layer 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 layer, and the storage status information corresponding to the storage layers other than the initial storage layer in the storage pool; and moving the data to be processed from the initial storage layer to the target storage layer.
[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 description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0177] In the 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 only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0178] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0179] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0180] If the 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 this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0181] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data migration method, characterized in that: include: receiving a processing request for data to be processed; Based on the processing request, update the status information of the data to be processed and the storage status information of the initial storage layer storing the data to be processed, and determine the updated status information of the data to be processed and the updated storage status information of the initial storage layer, wherein the status information of the data to be processed includes a heat value of the data to be processed, the heat value represents the frequency of access to the data to be processed, the initial storage layer is located in a storage pool, and the storage status information of the initial storage layer includes an average of the heat values corresponding to the data stored in the initial storage layer; Acquire storage status information corresponding to storage tiers other than the initial storage tier in the storage pool; Determine a target storage tier for 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 tier, and the storage status information corresponding to the storage tiers other than the initial storage tier in the storage pool; The to-be-processed data is moved from the initial storage tier to the target storage tier.
2. The method according to claim 1, characterized in that The updating of the state information of the data to be processed based on the processing request and determining the updated state information of the data to be processed, wherein the state information of the data to be processed includes the heat value of the data to be processed, comprises: According to the processing request, obtaining the total access volume of the storage pool in a preset period corresponding to the current moment; Determine a hot period corresponding to the storage pool according to the total access volume, wherein the hot period represents the access situation of data in the storage pool, including a low peak period and a stable period; Based on the heat period corresponding to the storage pool, a calculation formula for the heat value of the data to be processed is determined; based on the calculation formula for the heat value of the data to be processed, the heat value of the data to be processed is determined.
3. The method according to claim 2, characterized in that When the heat period corresponding to the storage pool is a stable period, the calculation formula for determining the heat value of the data to be processed is a first calculation formula, wherein the first calculation formula is as follows: Among them, T(t n ) is the heat value of the data to be processed at time tn, tn-1 is the time when the data to be processed was last accessed, T heat The data to be processed is n The heat value that rises after being accessed at time t n If the data to be processed is accessed at time t, the value of c is 1. n If the node is not accessed at any time, the value of c is 0.
4. The method according to claim 3, characterized in that When the heat period corresponding to the storage pool is a low peak period, the calculation formula for determining the heat value of the data to be processed is a second calculation formula, wherein the second calculation formula is as follows: Among them, B i The data to be processed is n The average heat value in the preset period corresponding to the moment, C is the selected n The number of sample data within the preset time period before the preset period corresponding to the moment, m newavg is the average value of the heat value of multiple sample data, n Bayes For the n The number of times the data to be processed is accessed within a preset period corresponding to the moment, For the n The sum of the heat values of the data to be processed at multiple moments calculated based on the first calculation formula within a preset period corresponding to the moment.
5. The method according to claim 1, characterized in that The determining a target storage tier 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 tier, and the storage status information corresponding to the storage tiers other than the initial storage tier in the storage pool includes: The updated status information of the data to be processed, the updated storage status information of the initial storage layer, and the storage status information corresponding to the storage layers other than the initial storage layer in the storage pool are input into a storage data migration model to obtain a target storage layer for the data to be processed, wherein the storage data migration model is trained using training samples, and the training samples include status information of the data.
6. The method according to claim 5, characterized in that 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, wherein the state space includes state information in the storage pool and state 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; The sample data set is input into the initial storage data migration model, and training is performed based on a preset deep learning framework to optimize the initial storage data migration model to obtain the storage data migration model.
7. The method according to claim 6, characterized in that The state information of the data to be decided also includes user demand, wherein the user demand represents the user's demand for data access rate.
8. A data migration device, characterized in that: include: A receiving module, used for receiving a processing request for data to be processed; A first determination module is used to update the state information of the data to be processed and the storage state information of the initial storage layer storing the data to be processed based on the processing request, and determine the updated state information of the data to be processed and the updated storage state information of the initial storage layer, wherein the state information of the data to be processed includes a heat value of the data to be processed, the heat value represents the frequency of access to the data to be processed, the initial storage layer is located in a storage pool, and the storage state information of the initial storage layer includes an average of the heat values corresponding to the data stored in the initial storage layer; An acquisition module, used to acquire storage status information corresponding to storage tiers other than the initial storage tier in the storage pool; a second determination module, configured to determine a target storage tier for 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 tier, and the storage status information corresponding to the storage tiers in the storage pool other than the initial storage tier; A moving module is used to move the to-be-processed data from the initial storage level to the target storage level.
9. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the data migration method according to any one of claims 1 to 7.
10. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor executes the data migration method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data migration method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Information processing method, device and equipment and storage medium
CN112434126A
Distributed database system load balancing method and device
CN116991580A
Data classified storage method and device based on reinforcement learning
CN117453123A
Data migration method and device, equipment and storage medium
CN117762898A
