Data migration method and device for server device
Patent Information
- Application Number
- CN202610925723.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-06-25
AI Technical Summary
[0005]本申请提供了一种服务器设备的数据迁移方法及设备,以至少解决相关技术中数据访问延迟较高的问题
[0017]本申请提供了一种服务器设备的数据迁移方法及设备,该方法包括:获取服务器设备预设时间窗口内多个数据访问请求的访问特征信息,访问特征信息包括访问频率信息、访问间隔信息、访问地址信息、平均访问延迟、带宽占用率及数据存储位置信息中的一种或多种;根据预设时间窗口内多个数据访问请求的访问特征信息,通过加权滑动窗口构建服务器设备对应的访问状态向量,加权滑动窗口用于融合短期访问特征信息和长期访问特征信息;根据访问状态向量调用强化学习模型,确定服务器设备的数据迁移策略,并按数据迁移策略对服务器设备的数据进行迁移。在本申请实施例中,由于通过加权融合机制能够同时捕捉服务器设备的短期访问特征与长期访问趋势,构建融合短期访问特征与长期访问趋势的访问状态向量,使强化学习模型输出的数据迁移策略,可以匹配突发访问模式和稳定访问模式,避免单一时间尺度特征的局限性,从而减少不必要的数据迁移,避免带宽拥塞,因此降低了数据访问请求的访问延迟,满足了用户的数据访问需求。
Smart Images

Figure CN122470323B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and in particular to a data migration method and device for server equipment. Background Technology
[0002] Currently, CXL (Compute Express Link), as a new generation of high-speed interconnect standard, achieves cache consistency and unified address space between the host and extended memory, and provides hardware support for shared memory pools for heterogeneous systems.
[0003] In related technologies, the system collects the access frequency of memory pages in real time through an access monitoring module, and determines whether to migrate the memory page based on the access frequency and a preset access frequency threshold. For example, hot pages (memory pages with an access frequency greater than the preset access frequency threshold) are migrated to the local cache to reduce access latency, while cold pages (memory pages with an access frequency less than the preset access frequency threshold) are migrated to extended memory to free up cache space.
[0004] However, as the scale of computing nodes increases, the decision to migrate memory pages based on their access frequency becomes problematic. In scenarios with dynamic loads on computing nodes, the same memory page may be migrated multiple times in a short period of time, leading to bandwidth congestion and high data access latency. Summary of the Invention
[0005] This application provides a data migration method and apparatus for server devices to at least solve the problem of high data access latency in related technologies.
[0006] On the one hand, this application provides a data migration method for server equipment, including:
[0007] Obtain access characteristic information of multiple data access requests within a preset time window of the server device. The access characteristic information includes one or more of the following: access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information.
[0008] Based on the access feature information of multiple data access requests within a preset time window, an access state vector corresponding to the server device is constructed through a weighted sliding window. The weighted sliding window is used to fuse short-term access feature information and long-term access feature information.
[0009] The reinforcement learning model is invoked based on the access state vector to determine the data migration strategy for the server device, and the data on the server device is migrated according to the data migration strategy.
[0010] On the other hand, this application provides a data migration apparatus for a server device, comprising:
[0011] The acquisition module is used to acquire access characteristic information of multiple data access requests within a preset time window of the server device. The access characteristic information includes one or more of the following: access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information.
[0012] The feature fusion module is used to construct the access status vector corresponding to the server device through a weighted sliding window based on the access feature information of multiple data access requests within a preset time window. The weighted sliding window is used to fuse short-term access feature information and long-term access feature information.
[0013] The data migration module invokes a reinforcement learning model based on the access state vector to determine the data migration strategy for the server device, and then migrates the data on the server device according to the data migration strategy.
[0014] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the data migration method of any of the above-described server devices.
[0015] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the data migration method of any of the above-described server devices.
[0016] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data migration method for any of the above-described server devices.
[0017] This application provides a data migration method and apparatus for a server device. The method includes: acquiring access feature information of multiple data access requests within a preset time window of the server device, wherein the access feature information includes one or more of access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information; constructing an access state vector corresponding to the server device through a weighted sliding window based on the access feature information of multiple data access requests within the preset time window, wherein the weighted sliding window is used to fuse short-term access feature information and long-term access feature information; calling a reinforcement learning model based on the access state vector to determine the data migration strategy of the server device, and migrating the data of the server device according to the data migration strategy. In this embodiment, since the weighted fusion mechanism can simultaneously capture the short-term access features and long-term access trends of the server device and construct an access state vector that fuses the short-term access features and long-term access trends, the data migration strategy output by the reinforcement learning model can match bursty access patterns and stable access patterns, avoiding the limitations of single time-scale features, thereby reducing unnecessary data migration, avoiding bandwidth congestion, and thus reducing the access latency of data access requests, meeting the user's data access needs. Attached Figure Description
[0018] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic diagram of the structure of a data migration system provided for related technologies;
[0020] Figure 2 This is a schematic diagram of the structure of a data migration system provided in an embodiment of this application;
[0021] Figure 3 A flowchart illustrating a data migration method for a server device provided in this application embodiment;
[0022] Figure 4 A schematic diagram illustrating a data migration method for a server device provided in an embodiment of this application;
[0023] Figure 5 This is a schematic diagram of the structure of the data migration device for the server equipment provided in the embodiments of this application;
[0024] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0026] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0027] Currently, CXL (Compute Express Link), as a next-generation high-speed interconnect standard, achieves cache consistency and a unified addressing space between the host and extended memory, providing hardware support for shared memory pools in heterogeneous systems. However, as node size increases and memory tiering deepens, the temporal and spatial locality characteristics of data access become increasingly complex and variable. How to efficiently migrate and prefetch data between main memory, local cache, and extended memory becomes a key factor determining system performance.
[0028] Figure 1 A schematic diagram of the structure of a data migration system provided for related technologies. For example... Figure 1 As shown, the host node contains computing units such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), and NPU (Neural Processing Unit), as well as local cache, and is the core source of computing and data access. The access monitoring module collects page-level access information (access frequency, source, time distribution) and performs page popularity statistical analysis in real time. The migration control module determines whether to migrate data (moving hot pages up and cold pages down) based on access popularity and thresholds of the migration decision strategy. The prefetch management module predicts and preloads potential access data based on address pattern detection or time series detection. The bandwidth-aware scheduling module dynamically adjusts migration and prefetch requests by detecting link load. The CXL Switch (conversion module) and the CXL extended memory device form a unified address space, enabling interconnection and data flow between the host and extended memory.
[0029] In related technologies, the system collects the access frequency of memory pages in real time through an access monitoring module, and determines whether to migrate the memory page based on the access frequency and a preset access frequency threshold. For example, hot pages (memory pages with an access frequency greater than the preset access frequency threshold) are migrated to the local cache to reduce access latency, while cold pages (memory pages with an access frequency less than the preset access frequency threshold) are migrated to extended memory to free up cache space. However, as the scale of computing nodes increases, determining whether to migrate memory pages based on their access frequency can lead to multiple migrations of the same memory page in a short period of time, especially in scenarios with dynamic loads on computing nodes. This can cause bandwidth congestion and result in high data access latency.
[0030] Therefore, traditional fixed-threshold migration mechanisms and simple historical statistical prefetching methods are no longer adequate for adapting to dynamic load changes, especially in multi-tenant cloud environments and model training scenarios. Access patterns change drastically with time and tasks, leading to frequent imbalances in data layout and migration strategies, resulting in bandwidth congestion, migration jitter, and latency degradation. In this context, an intelligent adaptive management mechanism is urgently needed to improve overall system performance and resource utilization by real-time sensing of system status and dynamic optimization of data migration and prefetching strategies.
[0031] To address the aforementioned technical issues, this application proposes an adaptive data migration and prefetching system based on reinforcement learning. Through intelligent perception, state modeling, policy learning, and dynamic execution, it achieves global optimization and adaptive management of multi-layer memory resources. Figure 2 This is a schematic diagram of the structure of a data migration system provided in an embodiment of this application. Figure 2 As shown, the system works collaboratively through five modules: access monitoring, state modeling, reinforcement learning, action execution, and feedback evaluation. The access monitoring module collects access information in real time, including access address, access type, access latency, and access frequency. The state modeling module constructs an access state vector S(t) using a weighted sliding window. The reinforcement learning module outputs the action a(t), i.e., the data migration strategy. The action execution module migrates data according to the data migration strategy (including migration or prefetch commands). The feedback evaluation module monitors performance and generates a reward R(t), dynamically adjusting the reinforcement learning model by feeding back the reward R(t) to the reinforcement learning module. All modules operate collaboratively through a unified control interface and state flow, enabling intelligent data migration and prefetching between main memory, CXL extended memory, and local cache. This forms an adaptive closed loop of perception-decision-execution-feedback, improving system bandwidth utilization, reducing access latency, and optimizing energy consumption.
[0032] The specific steps may include: obtaining access feature information of multiple data access requests within a preset time window of the server device, including one or more of access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information; constructing an access state vector corresponding to the server device through a weighted sliding window based on the access feature information of multiple data access requests within the preset time window, wherein the weighted sliding window is used to fuse short-term access feature information and long-term access feature information; calling a reinforcement learning model based on the access state vector to determine the data migration strategy of the server device, and migrating the data of the server device according to the data migration strategy.
[0033] In this embodiment, since the weighted fusion mechanism can simultaneously capture the short-term access characteristics and long-term access trends of the server device, and construct an access state vector that integrates the short-term access characteristics and long-term access trends, the data migration strategy output by the reinforcement learning model can match burst access patterns and stable access patterns, avoiding the limitations of single time scale features, thereby reducing unnecessary data migration and avoiding bandwidth congestion. Therefore, the access latency of data access requests is reduced, and the user's data access needs are met.
[0034] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0035] The specific application environment architecture or specific hardware architecture on which the data migration method for server devices depends is described here.
[0036] Figure 3 The flow chart of the data migration method for server devices provided in the embodiments of this application Figure 1 The data migration method for this server device can be performed by the server itself. For example... Figure 3 As shown, the data migration method for this server device includes:
[0037] S301. Obtain access characteristic information of multiple data access requests within a preset time window of the server device. The access characteristic information includes one or more of the following: access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information.
[0038] In this embodiment of the application, access request information of each server device can be collected in real time through the access monitoring module. The access request information includes memory access address (Addr), access type (Type), access frequency (Frequency), hit rate (Hit Rate), access latency (Lat), link bandwidth utilization (BW Usage), and memory usage status (Memory Usage).
[0039] In some embodiments, access request information from each server device can be aggregated along a time dimension to obtain access characteristic information for multiple data access requests. Optionally, within a preset time window, the event stream is statistically analyzed at fixed time steps Δt to form an access event set {e}. t1 e t2 , ..., e tn}, where access event e t This includes: memory access address, access type (read / write), access data block size, access timestamp, and access latency; based on the set of access events, determine the access characteristic information of multiple data access requests within a preset time window, including one or more of the following: access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information.
[0040] Optionally, the access frequency information includes the access frequency distribution of multiple memory pages within a preset time window. For example, the access frequency information can be represented as F. freq ={f1, f2, ..., f k}, where f i This represents the access frequency of the i-th memory page within a preset time window, and k represents the number of memory pages.
[0041] Optionally, the access interval information includes the average access interval of memory pages and / or the access interval variance. Optionally, the access address information includes access addresses and access address distribution information; wherein, the access addresses can be host memory, local cache, or extended memory. The access address distribution information can be the distribution entropy of each access address, used to represent the degree of concentration of access addresses.
[0042] In this embodiment, the duration of the preset time window is not specifically limited. Optionally, the preset time window can be 15 minutes, 30 minutes, or 60 minutes, etc.
[0043] S302. Based on the access feature information of multiple data access requests within a preset time window, construct the access status vector corresponding to the server device through a weighted sliding window. The weighted sliding window is used to fuse short-term access feature information and long-term access feature information.
[0044] In some embodiments, the access data provided by the access monitoring module provides the state modeling and reinforcement learning module with accurate and real-time contextual information. Based on this, such as... Figure 4 As shown, the state modeling module constructs a high-dimensional state vector based on the access characteristics of multiple data access requests within a preset time window, and captures short-term hotspots and long-term access trends through a time sliding window.
[0045] Optionally, based on the access feature information of multiple data access requests within a preset time window, an access state vector corresponding to the server device is constructed through a weighted sliding window, including: obtaining the access time of multiple data access requests within the preset time window; determining the interval between the access time of the data access request and the current time, and determining the weight of the access feature information of the data access request based on the interval; wherein the weight is negatively correlated with the interval; and performing a weighted summation of the access feature information of multiple data access requests based on the weights corresponding to the access feature information of each of the multiple data access requests within the preset time window to construct the access state vector corresponding to the server device.
[0046] In some embodiments, an exponential decay function may be used to determine the weight of access feature information. Accordingly, determining the weight of access feature information of a data access request based on the interval duration includes: determining the weight of access feature information of a data access request based on the interval duration using the following formula 1;
[0047] Formula 1: ;
[0048] Where W represents the preset time window length, which is the number of data access requests participating in the weight calculation (the summation range i=0 to W-1 corresponds to the data access requests within the entire time window). w represents the exponential decay coefficient. i This represents the weight of the access feature information for the i-th data access request.
[0049] Optionally, the access feature information of multiple data access requests within a preset time window is weighted and summed to construct the access state vector corresponding to the server device, including: weighting and summing the access feature information of multiple data access requests within a preset time window, and constructing the access state vector corresponding to the server device using the following formula 2.
[0050] Formula 2: ;
[0051] in, This represents the weighted and fused access state vector, where W represents the preset time window length. iLet F(t-i) represent the weight of the access feature information of the i-th data access request, t represent the number of multiple data access requests at the current time, and F(t-i) represent the access feature information of the i-th data access request before the current time.
[0052] In this embodiment, the system employs a sliding window mechanism to weight and integrate indicators such as access frequency, reuse interval, spatial locality, and link bandwidth occupancy to construct a high-dimensional state vector. This state vector contains both the volatility information of short-term access patterns and retains long-term trends and system topological features, forming an input representation that can be directly used by the reinforcement learning agent. The decay weights of the state features are controlled by an exponential function, which can adaptively adjust according to time distance, enabling the system to have dual response capabilities to bursty loads and stable access patterns.
[0053] S303. Based on the access state vector, invoke the reinforcement learning model to determine the data migration strategy of the server device, and migrate the data of the server device according to the data migration strategy.
[0054] In this embodiment of the application, determining the data migration strategy of the server device by calling the reinforcement learning model based on the access state vector may include the following steps (1) to (3):
[0055] (1) Based on the access state vector, call the reinforcement learning model to generate multiple candidate data migration strategies.
[0056] In some embodiments, a deep reinforcement learning framework is employed, which, through the collaborative optimization of the policy network and the value network, outputs transfer and prefetching decisions in real time based on the state vector. The action space of the reinforcement learning model encompasses the migration of data pages between different memory levels, the prefetching of hot data, and the adjustment of bandwidth scheduling priorities.
[0057] Optionally, during policy updates, a proximal policy optimization sub-model is used to generate multiple candidate data migration policies based on a shearing objective function to ensure update stability and prevent policy oscillations. Accordingly, a reinforcement learning model is invoked based on the access state vector to generate multiple candidate data migration policies, including: invoking a proximal policy optimization sub-model within the reinforcement learning model based on the access state vector to generate multiple candidate data migration policies; wherein the proximal policy optimization sub-model is used to limit the difference between the candidate data migration policy and the previous candidate data migration policy based on a shearing objective function.
[0058] The shearing objective function can be defined as follows:
[0059] ;
[0060] in, This represents the expectation over all time steps t; Indicates a cropping operation; This represents the shuffling parameter, used to limit the policy update magnitude and prevent excessive updates from causing policy instability. This indicates that the policy network selects action a under parameter θ. t The probability of; This represents the probability of the last policy update; The advantage function is used to measure the superiority of an action relative to the average policy. This represents the time difference error at step t+l, where T represents the time step length. This represents a future reward discount factor; The attenuation coefficient is represented by T; the time step length is represented by r. t This represents the immediate reward obtained at step t; Let represent the long-term expected reward at step t; This represents the long-term expected reward at step t+1.
[0061] (2) Determine the reward value corresponding to each of the multiple candidate data migration strategies.
[0062] In some embodiments, determining the reward value corresponding to each of the multiple candidate data migration strategies includes: obtaining the average access latency, bandwidth utilization, and energy consumption parameters corresponding to the candidate data migration strategies; and performing a weighted summation of the average access latency, bandwidth utilization, and energy consumption parameters to obtain the reward value corresponding to the candidate data migration strategy.
[0063] Optionally, the reward value corresponding to the candidate data migration strategy can be expressed as follows: (The weighted summation of average access latency, bandwidth utilization, and energy consumption parameters is not provided in the original text.)
[0064] ;
[0065] Among them, R t L represents the reward value. t P represents the average access latency. t B represents the energy consumption parameter. t Indicates bandwidth utilization. Indicates the weight.
[0066] (3) Determine the data migration strategy for the server device based on the reward value corresponding to each of the multiple candidate data migration strategies.
[0067] Optionally, based on the reward values corresponding to each of the multiple candidate data migration strategies, the candidate data migration strategy with the highest reward value is determined as the data migration strategy for the server device.
[0068] In the embodiments of this application, the data migration strategy includes at least one data migration task, and the data migration task includes one or more of the following: data migration direction, data migration granularity, and available bandwidth resources.
[0069] In some embodiments, different available bandwidth resources can be configured for different data migration tasks, employing a bandwidth tiered scheduling mechanism to ensure that critical path requests obtain low-latency channels while avoiding link congestion and bandwidth waste. Accordingly, migrating data on server devices according to a data migration strategy includes: determining the priority of each of the multiple data migration tasks based on their task types; determining the available bandwidth resources corresponding to each of the multiple data migration tasks based on their respective priorities; and migrating the data on the server devices according to the available bandwidth resources corresponding to each of the multiple data migration tasks.
[0070] Optionally, based on the respective priorities of the multiple data migration tasks, the available bandwidth resources corresponding to each of the multiple data migration tasks can be determined using the following Formula 3.
[0071] Formula 3: ;
[0072] Among them, BW i BW represents the available bandwidth resources allocated to task type i. total represents the total available bandwidth resources, and wi represents the weight of task type i; where wi can be dynamically adjusted according to task priority and urgency.
[0073] This application provides a data migration method for server devices: It acquires access characteristic information of multiple data access requests within a preset time window of the server device. The access characteristic information includes one or more of the following: access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information. Based on the access characteristic information of the multiple data access requests within the preset time window, a weighted sliding window is used to construct an access state vector corresponding to the server device. The weighted sliding window is used to fuse short-term and long-term access characteristic information. A reinforcement learning model is invoked based on the access state vector to determine the data migration strategy for the server device, and the data on the server device is migrated according to the data migration strategy. In this embodiment, because the weighted fusion mechanism can simultaneously capture the short-term access characteristics and long-term access trends of the server device, and construct an access state vector that fuses these characteristics, the data migration strategy output by the reinforcement learning model can match both bursty and stable access patterns, avoiding the limitations of single-time-scale features. This reduces unnecessary data migration, avoids bandwidth congestion, and thus reduces the access latency of data access requests, meeting the user's data access needs.
[0074] It should be noted that, in some embodiments, when a migration or prefetching action is triggered, the target page status can be checked according to the page-level directory table. If concurrent writes or migration conflicts exist, a delay or retry mechanism is adopted to avoid data contention and invalid access. Optionally, before migrating the data of the server device according to the data migration strategy, the method further includes: constructing a page-level directory table corresponding to multiple data pages in the data, the page-level directory table being used to record the storage location, version number, locking status, and last access time of the data pages; correspondingly, migrating the data of the server device according to the data migration strategy includes: determining the data page status of multiple target data pages in the target data to be migrated according to the page-level directory table; if the data page status indicates that there are concurrent writes or migration conflicts in the target data page, a delay or retry mechanism is adopted to migrate the target data page.
[0075] In some embodiments, the actual performance metrics of the server after migrating data from the server device according to the data migration strategy can be obtained, and the parameters of the reinforcement learning model can be adjusted based on the feedback from the actual performance metrics. Optionally, the method further includes: obtaining the actual performance metrics of the server after migrating data from the server device according to the data migration strategy, wherein the actual performance metrics include one or more of data access latency, data hit rate, data migration energy consumption, and bandwidth utilization; determining the immediate reward value corresponding to the data migration strategy based on the actual performance metrics, and adjusting the parameters of the reinforcement learning model based on the immediate reward value.
[0076] Optionally, such as Figure 4 As shown, the feedback evaluation module collects actual performance metrics after migration and generates reward signals to be sent back to the reinforcement learning module for online parameter updates. The feedback evaluation module sends back data such as access latency, hit rate changes, migration energy consumption, and link bandwidth usage from the monitoring end, and calculates the instantaneous reward value accordingly. The system continuously updates the policy network parameters through this reward feedback, achieving online adaptive optimization. For example, when a performance degradation exceeding a threshold is detected, the system automatically rolls back to the previous policy snapshot and reduces the learning rate, thereby ensuring the training stability of the machine learning model and maintaining the long-term optimization effect of the reinforcement learning model.
[0077] In the embodiments of this application, the use of an experience replay mechanism and a small step gradient update mechanism avoids policy oscillation and performance degradation, thereby ensuring the training stability of the machine learning model.
[0078] Figure 5 This is a schematic diagram of the structure of a data migration device for a server device provided in an embodiment of this application. Figure 5 As shown, the device includes:
[0079] The acquisition module 501 is used to acquire access characteristic information of multiple data access requests within a preset time window of the server device. The access characteristic information includes one or more of the following: access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information.
[0080] The feature fusion module 502 is used to construct the access status vector corresponding to the server device through a weighted sliding window based on the access feature information of multiple data access requests within a preset time window. The weighted sliding window is used to fuse short-term access feature information and long-term access feature information.
[0081] The data migration module 503 calls the reinforcement learning model based on the access state vector to determine the data migration strategy of the server device, and migrates the data of the server device according to the data migration strategy.
[0082] In some embodiments, the feature fusion module 502 constructs an access state vector corresponding to the server device through a weighted sliding window based on the access feature information of multiple data access requests within a preset time window, including: obtaining the access time of multiple data access requests within the preset time window; determining the interval between the access time of the data access request and the current time, and determining the weight of the access feature information of the data access request based on the interval; wherein the weight is negatively correlated with the interval; and performing a weighted summation of the access feature information of multiple data access requests based on the weights corresponding to the access feature information of each of the multiple data access requests to construct the access state vector corresponding to the server device.
[0083] In some embodiments, the feature fusion module 502 determines the weight of the access feature information of the data access request based on the interval duration, including: determining the weight of the access feature information of the data access request based on the interval duration using the following formula 1.
[0084] Formula 1: ;
[0085] Where W represents the preset time window length, w represents the exponential decay coefficient. i This represents the weight of the access feature information for the i-th data access request.
[0086] In some embodiments, the feature fusion module 502 invokes a reinforcement learning model based on the access state vector to determine the data migration strategy of the server device, including: invoking the reinforcement learning model based on the access state vector to generate multiple candidate data migration strategies; determining the reward value corresponding to each of the multiple candidate data migration strategies; and determining the data migration strategy of the server device based on the reward value corresponding to each of the multiple candidate data migration strategies.
[0087] In some embodiments, the feature fusion module 502 calls a reinforcement learning model based on the access state vector to generate multiple candidate data migration strategies, including: calling a proximal policy optimization sub-model in the reinforcement learning model based on the access state vector to generate multiple candidate data migration strategies; wherein, the proximal policy optimization sub-model is used to limit the difference between the candidate data migration strategy and the previous candidate data migration strategy based on a shearing objective function.
[0088] In some embodiments, the feature fusion module 502 determines the reward value corresponding to each of the multiple candidate data migration strategies, including: obtaining the average access latency, bandwidth utilization, and energy consumption parameters corresponding to the candidate data migration strategies; and performing a weighted summation of the average access latency, bandwidth utilization, and energy consumption parameters to obtain the reward value corresponding to the candidate data migration strategy.
[0089] In some embodiments, the data migration module 503 migrates data from the server device according to a data migration strategy, including: determining the priority of each of the multiple data migration tasks according to the task types of the multiple data migration tasks included in the data migration strategy; determining the available bandwidth resources corresponding to each of the multiple data migration tasks according to the priority of each of the multiple data migration tasks; and migrating the data from the server device according to the available bandwidth resources corresponding to each of the multiple data migration tasks.
[0090] In some embodiments, the data migration module 503 is further configured to construct a page-level directory table corresponding to multiple data pages in the data. The page-level directory table is used to record the storage location, version number, locking status, and last access time of the data pages. Accordingly, the data migration module 503 migrates the data of the server device according to the data migration strategy, including: determining the data page status of multiple target data pages in the target data to be migrated according to the page-level directory table; if the data page status indicates that there is concurrent writing or migration conflict of the target data page, then a delay or retry mechanism is adopted to migrate the target data page.
[0091] In some embodiments, the apparatus further includes: a feedback evaluation module; the feedback evaluation module is configured to obtain the actual performance indicators of the server after migrating the data of the server device according to the data migration strategy, the actual performance indicators including one or more of data access latency, data hit rate, data migration energy consumption and bandwidth utilization; determine the instant reward value corresponding to the data migration strategy based on the actual performance indicators, and adjust the parameters of the reinforcement learning model based on the instant reward value.
[0092] In some embodiments, the data migration strategy described above includes at least one data migration task, and the data migration task includes one or more of the following: data migration direction, data migration granularity, and available bandwidth resources.
[0093] This application provides a data migration device for server equipment. By using a weighted fusion mechanism, it can simultaneously capture the short-term access characteristics and long-term access trends of the server equipment, and construct an access state vector that integrates the short-term access characteristics and long-term access trends. This allows the data migration strategy output by the reinforcement learning model to match bursty access patterns and stable access patterns, avoiding the limitations of single time-scale features. This reduces unnecessary data migration, avoids bandwidth congestion, and thus reduces the access latency of data access requests, meeting the user's data access needs.
[0094] For a description of the features of the server device data migration apparatus provided in this application, please refer to the relevant description of the server device data migration method. Further details will not be repeated here.
[0095] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the electronic device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus.
[0096] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to execute the above-described data migration method embodiment for server devices.
[0097] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0098] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0099] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0100] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0101] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described server device data migration method embodiments when running.
[0102] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0103] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described data migration method embodiments for server devices.
[0104] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described server device data migration method embodiments.
[0105] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0106] The data migration method and device for a server provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A data migration method for server equipment, characterized in that, include: The system acquires access characteristic information of multiple data access requests within a preset time window of the server device. The access characteristic information includes one or more of the following: access frequency information, access interval information, access address information, average access latency, bandwidth utilization, and data storage location information. Based on the access feature information of multiple data access requests within the preset time window, an access state vector corresponding to the server device is constructed through a weighted sliding window. The weighted sliding window is used to fuse short-term access feature information and long-term access feature information. The reinforcement learning model is invoked based on the access state vector to determine the data migration strategy of the server device, and the data of the server device is migrated according to the data migration strategy. Before migrating the data of the server device according to the data migration strategy, the method further includes: constructing a page-level directory table corresponding to multiple data pages in the data, wherein the page-level directory table is used to record the storage location, version number, lock status and last access time of the data pages; The migration of data on the server device according to the data migration strategy includes: determining the data page status of multiple target data pages in the target data to be migrated according to the page-level directory table; if the data page status is used to indicate that there is concurrent writing or migration conflict of the target data page, then a delay or retry mechanism is adopted to migrate the target data page. The method further includes: obtaining actual performance indicators of the server after migrating the data of the server device according to the data migration strategy, wherein the actual performance indicators include one or more of data access latency, data hit rate, data migration energy consumption and bandwidth utilization; determining the instant reward value corresponding to the data migration strategy based on the actual performance indicators; and adjusting the parameters of the reinforcement learning model based on the instant reward value. The adjustment of the parameters of the reinforcement learning model further includes: monitoring the actual performance indicators of the server, and when the actual performance indicators are detected to have dropped below a preset threshold, automatically rolling back the parameters of the reinforcement learning model to the previous policy snapshot and reducing the learning rate of the reinforcement learning model.
2. The data migration method according to claim 1, characterized in that, The step of constructing an access state vector corresponding to the server device using a weighted sliding window based on the access feature information of multiple data access requests within the preset time window includes: Obtain the access time of multiple data access requests within the preset time window; Determine the interval between the access time of the data access request and the current time, and determine the weight of the access feature information of the data access request based on the interval; wherein the weight is negatively correlated with the interval. Based on the weights corresponding to the access feature information of the multiple data access requests, the access feature information of the multiple data access requests is weighted and summed to construct the access state vector corresponding to the server device.
3. The data migration method according to claim 2, characterized in that, The step of determining the weight of the access feature information of the data access request based on the interval duration includes: Based on the interval duration, the weight of the access feature information of the data access request is determined using the following formula 1; Formula 1: ; Where W represents the preset time window length, w represents the exponential decay coefficient. i This represents the weight of the access feature information for the i-th data access request.
4. The data migration method according to claim 1, characterized in that, The step of invoking a reinforcement learning model based on the access state vector to determine the data migration strategy for the server device includes: Based on the access state vector, a reinforcement learning model is invoked to generate multiple candidate data migration strategies; Determine the reward value corresponding to each of the multiple candidate data migration strategies; The data migration strategy for the server device is determined based on the reward values corresponding to each of the multiple candidate data migration strategies.
5. The data migration method according to claim 4, characterized in that, The step of invoking a reinforcement learning model based on the access state vector to generate multiple candidate data migration strategies includes: The near-end policy optimization sub-model in the reinforcement learning model is invoked based on the access state vector to generate multiple candidate data migration policies; wherein, the near-end policy optimization sub-model is used to limit the difference between the candidate data migration policy and the previous candidate data migration policy based on a shearing objective function.
6. The data migration method according to claim 4, characterized in that, The determination of the reward value corresponding to each of the multiple candidate data migration strategies includes: Obtain the average access latency, bandwidth utilization, and energy consumption parameters corresponding to the candidate data migration strategy; The average access latency, bandwidth utilization, and energy consumption parameters are weighted and summed to obtain the reward value corresponding to the candidate data migration strategy.
7. The data migration method according to claim 1, characterized in that, Migrate the data on the server device according to the data migration strategy, including: Based on the task types of the multiple data migration tasks included in the data migration strategy, determine the priority of each of the multiple data migration tasks; Based on the priority of each of the multiple data migration tasks, the available bandwidth resources corresponding to each of the multiple data migration tasks are determined. The data on the server device is migrated according to the available bandwidth resources corresponding to each of the multiple data migration tasks.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the data migration method of the server device as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Frequency access data storage migration method and device for big data
CN120653199A