Load request processing method, device, equipment, storage medium and program product

By counting the load request characteristics and using the policy to determine the model, the storage devices in the hybrid storage system are dynamically scheduled, which solves the problem of low load request response efficiency in the existing technology and improves the availability and reliability of the system.

CN118467185BActive Publication Date: 2024-09-27JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410932224.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-09-27
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

After receiving a load request, it is difficult for the existing hybrid storage system to efficiently determine the storage device that responds to the load request and perform data scheduling, resulting in low access efficiency and insufficient system availability reliability.

Method used

By counting the characteristics of the load requests to be processed and inputting them into the strategy determination model, the characteristics of candidate request processing strategies are compared to determine the target request processing strategy, and dynamically schedule storage devices to improve access efficiency and resource utilization.

Benefits of technology

It significantly improves the access efficiency of load requests, ensures the availability and reliability of the hybrid storage system, and achieves efficient response to load requests and data scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118467185B
    Figure CN118467185B
Patent Text Reader

Abstract

The present invention relates to the field of hybrid storage technology, and discloses a load request processing method, device, equipment, storage medium and program product, the method comprising: counting a first load feature corresponding to a load request to be processed; inputting the first load feature into a policy determination model, wherein the policy determination model includes a first preset number of candidate request processing strategies and a second load feature corresponding to the candidate request processing strategy; using the policy determination model to compare the first load feature with the second load feature, and determining a target request processing strategy from the first preset number of candidate request processing strategies according to the comparison result; executing the target request processing strategy, determining a storage device that responds to the load request to be processed according to the target request processing strategy, and processing data corresponding to the load request to be processed. The present invention solves the problem that after receiving a load request, it is difficult to efficiently determine a storage device that responds to a load request and schedule related data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of hybrid storage technology, and in particular to a load request processing method, device, equipment, storage medium and program product. Background Art

[0002] The hybrid storage system includes storage devices of different flash media types, such as storage class memory (SCM) and high-density storage SSD (Solid State Disk) composed of SLC (Single-level Cell) and QLC (Quad-level Cell) media. In a storage system composed of heterogeneous storage devices, different storage devices can respond to various load requests.

[0003] Since storage devices of different flash media types have different storage performance and costs, hybrid storage systems need to store different types of data in storage devices of different media types to achieve a balance between storage performance and cost. When receiving load requests such as IO (Input / Output) requests, it is necessary to determine the appropriate storage device to respond to the load request and implement adaptive scheduling of the load request to improve the access efficiency of the request and ensure the availability and reliability of the hybrid storage system. However, the current hybrid storage system lacks a method that can efficiently determine the storage device that responds to the load request and schedule the relevant data after receiving the load request.

[0004] Therefore, the related art has the problem that after receiving a load request, it is difficult to efficiently determine the storage device that responds to the load request and schedule the related data. Summary of the invention

[0005] In view of this, the present invention provides a load request processing method, apparatus, device, storage medium and program product to solve the problem that after receiving a load request, it is difficult to efficiently determine the storage device that responds to the load request and schedule related data.

[0006] In a first aspect, the present invention provides a load request processing method, comprising:

[0007] Counting first load characteristics corresponding to the load requests to be processed;

[0008] Inputting the first load characteristic into a policy determination model, wherein the policy determination model includes a first preset number of candidate request processing strategies and second load characteristics corresponding to the candidate request processing strategies; using the policy determination model to compare the first load characteristic with the second load characteristic, and determining a target request processing strategy from the first preset number of candidate request processing strategies according to the comparison result;

[0009] Execute the target request processing strategy, determine the storage device that responds to the load request to be processed according to the target request processing strategy, and process the data corresponding to the load request to be processed, wherein the storage device is included in the hybrid storage system.

[0010] The load request processing method provided in this embodiment compares the first load characteristic corresponding to the load request to be processed with the second load characteristic corresponding to the candidate request processing strategy in the policy determination model to determine the target request processing strategy. The target request processing strategy determined by the policy determination model is highly efficient, and the determined target request processing strategy is highly accurate. The storage device that responds to the load request to be processed is determined by executing the target request processing strategy, and the data corresponding to the load request to be processed is processed, which greatly improves the access efficiency of the load request and ensures the availability and reliability of the hybrid storage system. The problem of difficulty in efficiently determining the storage device that responds to the load request and scheduling the relevant data after receiving the load request is solved.

[0011] In some optional implementations, before inputting the first load characteristic into the strategy determination model, the method further includes:

[0012] Determine the state space and operation space of the hybrid storage system;

[0013] Obtaining a second preset number of first preset load requests;

[0014] Create a model to be trained and initialize the model parameters of the model to be trained;

[0015] The model to be trained is trained using a preset optimizer according to the state space, the operation space, the first preset load request and the preset random strategy to obtain a strategy determination model, wherein the first load feature is statistically calculated based on the first preset load request.

[0016] In this embodiment, a model to be trained is created and trained to obtain a policy determination model including a first preset number of candidate request processing strategies and a second load characteristic, so that the subsequent policy determination model can determine the target request processing strategy by comparing the first load characteristic and the second load characteristic, thereby improving the accuracy and efficiency of the model.

[0017] In some optional implementations, determining a state space and an operation space of a hybrid storage system includes:

[0018] Determine a first type of storage device and a second type of storage device included in the hybrid storage system;

[0019] Obtaining the size of a first capacity space and the size of a second capacity space in a first type storage device;

[0020] Obtaining a data migration amount and a data eviction amount between a first type storage device and a second type storage device;

[0021] Obtain a first average response delay of a first type storage device to a load request and a second average response delay of a second type storage device to a load request;

[0022] Determine a state space according to a size of the first capacity space, a size of the second capacity space, a data migration amount, a data eviction amount, a first average response delay, and a second average response delay;

[0023] determining a third preset number of operable modes of the hybrid storage system in response to the load request;

[0024] An operation space is determined according to a third preset number of operable modes.

[0025] In some optional implementations, counting the first load feature corresponding to the load request to be processed includes:

[0026] According to the pending load requests and the processed load requests, the read-write ratio of the load requests, the average request size of the requested data, and the average number of accesses are obtained;

[0027] Get the unique request count of pending load requests from pending load requests;

[0028] A first load characteristic is obtained according to the read-write ratio, the average request size, the average number of accesses, and the number of unique requests.

[0029] In this embodiment, the first load characteristics corresponding to the load requests to be processed are counted to facilitate the policy determination model to match the corresponding target request processing strategy, realize adaptive scheduling of the load requests to be processed, and improve the resource utilization and request response performance of the hybrid storage system.

[0030] In some optional implementations, after determining the storage device that responds to the load request to be processed according to the target request processing strategy and processing the data corresponding to the load request to be processed, the method further includes:

[0031] Get the update interval;

[0032] If the time interval between the current time and the time when the strategy determination model was last updated reaches the update interval time, a new state space and a new operation space of the hybrid storage system are determined;

[0033] Obtaining a fourth preset number of second preset load requests;

[0034] The initialization strategy determines the model parameters of the model;

[0035] The strategy determination model is trained by using a preset optimizer according to the new state space, the new operation space, the second preset load request and the preset random strategy to complete the update of the strategy determination model.

[0036] In this embodiment, the policy determination model is updated every update interval, which can reduce the difference between the actual load and the candidate request processing policy in the policy determination model, and improve the accuracy of determining the target request processing policy.

[0037] In some optional implementations, obtaining the update interval time includes:

[0038] Obtaining a first read request ratio, a first write request ratio, a first request data average size, a first average access number, and a first unique request number of load requests in a first time period, wherein the first time period is a time period before the last update of the strategy determination model;

[0039] Obtaining a second read request ratio, a second write request ratio, a second request data average size, a second average access number, and a second unique request number of load requests in a second time period, wherein the second time period is a time period after the last update of the strategy determination model;

[0040] Compare the first read request ratio and the second read request ratio to obtain a first change value; compare the first write request ratio and the second write request ratio to obtain a second change value; compare the first request data average size and the second request data average size to obtain a third change value; compare the first average access number and the second average access number to obtain a fourth change value; compare the first unique request number and the second unique request number to obtain a fifth change value;

[0041] A load request change is obtained according to the first change value, the second change value, the third change value, the fourth change value and the fifth change value, and an update interval is obtained according to the load request change, wherein the load request change is negatively correlated with the update interval.

[0042] In this embodiment, the update interval is determined based on the change values ​​of various load characteristics of the load requests in the first time period and the second time period. By dynamically adjusting the update interval, on the one hand, the hybrid storage system can timely update the candidate request processing strategy for loads with frequent characteristic changes; on the other hand, for load requests with little characteristic change, the hybrid storage system can save a lot of system training overhead.

[0043] In some optional implementations, obtaining a load request change according to the first change value, the second change value, the third change value, the fourth change value, and the fifth change value, and obtaining an update interval according to the load request change includes:

[0044] Obtaining an update interval time according to the first change value, the second change value, the third change value, the fourth change value, the fifth change value and the first target formula;

[0045] The first objective formula satisfies:

[0046] .

[0047] in, Indicates the update interval. is the preset parameter, represents the first change value, Indicates the first read request ratio, Indicates the second read request ratio, represents the second change value, Indicates the first write request ratio, Indicates the ratio of second write requests, represents the third change value, Indicates the average size of the first request data. Indicates the average size of the second request data. represents the fourth change value, represents the first average number of visits, represents the second average number of visits, represents the fifth change value, Indicates the first unique request number, represents the second unique request number, n represents the second time period, n-1 represents the first time period, and function d is used to calculate the change value between the two parameters. represents the load request change, and function C is used to determine the corresponding relationship between the load request change and the update interval time.

[0048] In some optional implementations, after determining the storage device that responds to the load request to be processed according to the target request processing policy, the method further includes:

[0049] Obtaining a first target size of a first capacity space and a second target size of a second capacity space in a first type storage device according to a read-write ratio, an average request size, an average number of accesses, a number of unique requests, and a second objective function in the first load characteristic;

[0050] The second objective function satisfies:

[0051] .

[0052] in, represents the first target size, Indicates the second target size, Indicates the read-write ratio, Indicates the ratio of read requests to read-write ratio. Indicates the ratio of write requests to read-write ratio. represents the average request size, represents the average number of visits, Indicates the number of unique requests. Function is the influence function of load characteristics on the system delay of the hybrid energy storage system.

[0053] In this embodiment, the first target size of the first capacity space and the second target size of the second capacity space are calculated according to the second objective function and the first load characteristic, and the space of the first type of storage device is dynamically allocated according to the first target size and the second target size to improve resource utilization and system request response performance.

[0054] In some optional implementations, determining a storage device that responds to a load request to be processed according to a target request processing policy includes:

[0055] Determine a target response delay of the load request to be processed according to the average access number in the first load characteristic, wherein the average access number and the target response delay are negatively correlated;

[0056] If the target response latency is less than the first preset threshold, the storage device that responds to the load request to be processed is a first type of storage device;

[0057] If the target response latency is greater than or equal to the first preset threshold, the storage device that responds to the load request to be processed is a second type storage device.

[0058] In this embodiment, based on the relationship between the target response delay of the load request to be processed and the first preset threshold, it is determined whether the storage device responding to the load request to be processed is a first type storage device or a second type storage device, thereby improving request response efficiency and resource utilization.

[0059] In some optional implementations, determining a storage device that responds to a load request to be processed according to a target request processing policy includes:

[0060] Determine, based on the average number of accesses and the number of unique requests in the first load characteristic, the access frequency of the request data corresponding to the load request to be processed;

[0061] In the case where the load request to be processed is a write request, if the average request size in the first load characteristic is not greater than the second preset threshold, the storage device responding to the load request to be processed is a first type storage device;

[0062] If the average request size is greater than the second preset threshold, determine whether the access frequency is greater than the third preset threshold; if the access frequency is greater than the third preset threshold, the storage device responding to the pending load request is a first type storage device; if the access frequency is less than or equal to the third preset threshold, the storage device responding to the pending load request is a second type storage device;

[0063] In the case where the load request to be processed is a read request, if the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, the storage device responding to the load request to be processed is a first type storage device.

[0064] In this embodiment, based on the access frequency and average request size of the requested data, it is determined whether the first type of storage device or the second type of storage device is responsible for responding to the load request to be processed, and the storage resources of the hybrid storage system are reasonably scheduled to improve the request response efficiency and resource utilization.

[0065] In some optional implementations, determining a storage device that responds to the load request to be processed according to the target request processing strategy, and processing data corresponding to the load request to be processed includes:

[0066] Determine request data corresponding to the load request to be processed;

[0067] Determine, based on the average number of accesses and the number of unique requests in the first load characteristic, the access frequency of the request data corresponding to the load request to be processed;

[0068] Writing the requested data into the second type storage device and creating a cache layer in the first type storage device;

[0069] In the case where the load request to be processed is a write request, if the average request size in the first load characteristic is not greater than a fourth preset threshold, copying the request data to the cache layer;

[0070] If the average request size is greater than or equal to the fourth preset threshold, determine whether the access frequency is greater than the fifth preset threshold; if the access frequency is greater than the fifth preset threshold, copy the request data to the cache layer;

[0071] In the case where the load request to be processed is a read request, if the average request size is not greater than a fourth preset threshold and the access frequency is greater than a fifth preset threshold, the request data is copied to the cache layer.

[0072] In this embodiment, whether to copy the requested data to the cache layer is determined based on the access frequency and average request size of the requested data. While meeting the frequent read and write data requirements of the load requests, the storage space of the cache layer is not wasted, the storage space of the cache layer is used rationally, and the request response efficiency and resource utilization are improved.

[0073] In some optional implementations, using a strategy determination model to compare the first load feature with the second load feature, and determining a target request processing strategy from a first preset number of candidate request processing strategies according to the comparison result, includes:

[0074] determining a difference between the first load characteristic and the second load characteristic;

[0075] The candidate request processing strategy with the smallest difference between the corresponding second load characteristic and the first load characteristic is used as the target request processing strategy.

[0076] In this embodiment, by calculating the difference between the first load feature and the second load feature, the candidate request processing strategy corresponding to the second load feature with the smallest difference from the first load feature is selected as the target request processing strategy. The method is simple and easy to implement with high accuracy.

[0077] In a second aspect, the present invention provides a load request processing device, comprising:

[0078] A statistics module, used for counting the first load characteristics corresponding to the load request to be processed;

[0079] A determination module, configured to input the first load characteristic into a policy determination model, wherein the policy determination model includes a first preset number of candidate request processing strategies and second load characteristics corresponding to the candidate request processing strategies; compare the first load characteristic with the second load characteristic using the policy determination model, and determine a target request processing strategy from the first preset number of candidate request processing strategies according to the comparison result;

[0080] The execution module is used to execute the target request processing strategy, determine the storage device that responds to the load request to be processed according to the target request processing strategy, and process the data corresponding to the load request to be processed, wherein the storage device is included in the hybrid storage system.

[0081] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the load request processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0082] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the load request processing method of the first aspect or any corresponding embodiment thereof.

[0083] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the load request processing method of the first aspect or any corresponding embodiment thereof.

[0084] In an embodiment of the present application, a first load characteristic corresponding to the load request to be processed is compared with a second load characteristic corresponding to the candidate request processing strategy in the policy determination model to determine the target request processing strategy. The target request processing strategy determined by the policy determination model is highly efficient, and the determined target request processing strategy is highly accurate. The storage device that responds to the load request to be processed is determined by executing the target request processing strategy, and the data corresponding to the load request to be processed is processed, which greatly improves the access efficiency of the load request and ensures the availability and reliability of the hybrid storage system. The problem of being difficult to efficiently determine the storage device that responds to the load request and schedule related data after receiving the load request is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0086] Figure 1 is a flow chart of a load request processing method according to an embodiment of the present invention;

[0087] Figure 2 is a flow chart of data placement of a hybrid storage system based on reinforcement learning according to an embodiment of the present invention;

[0088] Figure 3 is a schematic diagram of preparation of a reinforcement learning training environment according to an embodiment of the present invention;

[0089] Figure 4 is a flow chart of a training strategy determination model according to an embodiment of the present invention;

[0090] Figure 5 is a structural block diagram of a load request processing device according to an embodiment of the present invention;

[0091] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0092] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0093] The hybrid storage system includes storage devices of different flash media types, such as storage-class memory (SCM) and high-density storage (SSD) composed of SLC and QLC media. In a hybrid storage system composed of heterogeneous storage devices, different storage devices can respond to various load requests. The performance and efficiency of the hybrid storage system can be improved by designing appropriate response strategies. Data placement is required in the process of processing load requests. Data placement in a hybrid storage system refers to storing different types of data in different storage media to achieve a balance between storage performance and cost. According to the importance and access frequency of the data, the data is stored in high-speed and low-speed storage devices respectively to improve the overall performance and efficiency of the storage system.

[0094] Based on the above content, an embodiment of the present invention provides a load request processing method, which builds an adaptive request scheduling scheme for the system by learning the storage device status and load characteristics in the hybrid storage system. The first load characteristic corresponding to the load request to be processed is compared with the second load characteristic corresponding to the candidate request processing strategy in the policy determination model to determine the target request processing strategy. The target request processing strategy can realize the dynamic allocation of SCM space to byte-addressable (byte addressable) and block-addressable (block-level addressable) capacity; and, for the IO response characteristics of SCM and QLC, different access modes of caching and tiering can also be dynamically realized according to the load situation. In order to achieve the adaptive scheduling of IO requests, improve the IOPS (Input / output Operations PerSecond) and bandwidth performance of the storage system, greatly improve the access efficiency of load requests, and ensure the availability and reliability of the hybrid storage system.

[0095] According to an embodiment of the present invention, a load request processing embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device with data processing capabilities, such as a computer, a server, etc., 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.

[0096] In this embodiment, a load request processing method is provided, which can be used in the above-mentioned computer device. Figure 1 is a flow chart of a load request processing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0097] Step S101, counting first load characteristics corresponding to load requests to be processed.

[0098] Specifically, when the hybrid storage system faces multiple pending load requests, it will first count the first load characteristics corresponding to these pending load requests. The first load characteristics include: the proportion of read requests and write requests in the load requests, the average request size of the requested data, the average number of accesses, and the number of unique requests. The unique request count is used to count the total number of different types of load requests processed by the system within a certain period of time.

[0099] The above process is as follows Figure 2 As shown, feature perception and statistics are performed on the real load.

[0100] Step S102: input the first load characteristic into a policy determination model, wherein the policy determination model includes a first preset number of candidate request processing strategies and second load characteristics corresponding to the candidate request processing strategies; use the policy determination model to compare the first load characteristic with the second load characteristic, and determine the target request processing strategy from the first preset number of candidate request processing strategies based on the comparison result.

[0101] Specifically, in this embodiment, the model trained offline is referred to as a policy determination model. The policy determination model includes a first preset number of candidate request processing strategies and second load characteristics corresponding to the candidate request processing strategies. The first preset number represents multiple, and there is no specific quantity limit here. The second load characteristic contains the same type of data as the first load characteristic. The second load characteristic may include: the proportion of read requests and write requests in the load request, the average request size of the request data, the average number of accesses, and the number of unique requests. The policy determination model can be used to compare the first load characteristic with the second load characteristic, calculate the difference in parameters contained in the first load characteristic and the second load characteristic, and select the candidate request processing strategy with the smallest difference as the target request processing strategy.

[0102] The above process is as follows Figure 2 As shown, the features are compared with the offline strategies and models.

[0103] Step S103, executing the target request processing strategy, determining the storage device that responds to the load request to be processed according to the target request processing strategy, and processing the data corresponding to the load request to be processed, wherein the storage device is included in the hybrid storage system.

[0104] Specifically, the target request processing strategy is loaded, and in combination with the latest state space and operation space of the hybrid storage system, a storage device suitable for responding to the pending load request is determined in the hybrid storage system. The storage device responds to the pending load request and processes the data corresponding to the pending load request.

[0105] The above process is as follows Figure 2 As shown, load the offline data placement model and strategy.

[0106] The load request processing method provided in this embodiment compares the first load characteristic corresponding to the load request to be processed with the second load characteristic corresponding to the candidate request processing strategy in the policy determination model to determine the target request processing strategy. The target request processing strategy determined by the policy determination model is highly efficient, and the determined target request processing strategy is highly accurate. The storage device that responds to the load request to be processed is determined by executing the target request processing strategy, and the data corresponding to the load request to be processed is processed, which greatly improves the access efficiency of the load request and ensures the availability and reliability of the hybrid storage system. The problem of difficulty in efficiently determining the storage device that responds to the load request and scheduling the relevant data after receiving the load request is solved.

[0107] In some optional implementations, before inputting the first load characteristic into the strategy determination model, the method further includes:

[0108] Determine the state space and operation space of the hybrid storage system;

[0109] Obtaining a second preset number of first preset load requests;

[0110] Create a model to be trained and initialize the model parameters of the model to be trained;

[0111] The model to be trained is trained using a preset optimizer according to the state space, the operation space, the first preset load request and the preset random strategy to obtain a strategy determination model, wherein the first load feature is statistically calculated based on the first preset load request.

[0112] Specifically, combined Figure 3 and Figure 4 The process of model training in this embodiment is described. Figure 3As shown in the figure, before training the model, it is necessary to determine the system state space (state_spec) and system operation space (action_spec) of the hybrid storage system. The system state space may include: SCM space allocation, data migration, data eviction, response latency, etc.; the system operation space may include: cache mode, tiered mode, fast device response, slow device response, etc. Figure 4 As shown, multiple load types are also used to train the model, such as: read-write ratio, average request size, average number of accesses, and number of unique requests. Multiple load types are obtained by counting the second preset number of first preset load requests, where the second preset number represents multiple, and the second preset number is greater than the first preset number. The first preset load request is a load request type that has been processed multiple times by the hybrid storage system within a period of time.

[0113] Use neural networks and Q-networks to create models to be trained. Q-networks are built based on reinforcement learning. Reinforcement learning can build an agent to conduct trial-and-error learning in a storage environment to achieve the optimal decision or operation for data placement in the storage system. The agent accumulates experience and gradually improves performance by continuously interacting with the storage environment, ultimately achieving efficient completion of complex tasks. After creating the model to be trained, initialize the model parameters of the model to be trained. The parameters of the neural network and Q-network need to be initialized separately, and the initialization process of the agent and strategy is completed.

[0114] like Figure 3 As shown, a training environment is constructed, including: RMSprop algorithm optimizer, random strategy, neural network and Q-network, and agent and strategy initialization. The preset optimizer is, for example, RMSprop algorithm optimizer, and the preset random strategy is, for example, random_policy (random strategy). The first preset load request is summarized to obtain multiple load types, and the multiple load types are input into the model to be trained. The model to be trained is trained according to the state space, operation space and preset random strategy using the preset optimizer to obtain a strategy determination model, including: based on the RMSprop algorithm, the optimizer instance is initialized to optimize the convergence efficiency of the parameters during the training process. The reinforcement learning method is used to train the agent model and strategy of various loads to obtain relevant model parameters, and the obtained model and strategy are persistently stored to obtain a strategy determination model. The strategy determination model includes a first preset number of candidate request processing strategies and a second load feature corresponding to the candidate request processing strategy, and the second load feature is statistically calculated based on the first preset load request.

[0115] The above process is as follows Figure 4As shown, various load types are used to train agents and strategies; offline agents and strategies are obtained; and various data placement models and strategies are persisted.

[0116] In this embodiment, a model to be trained is created and trained to obtain a policy determination model including a first preset number of candidate request processing strategies and a second load characteristic, so that the subsequent policy determination model can determine the target request processing strategy by comparing the first load characteristic and the second load characteristic, thereby improving the accuracy and efficiency of the model.

[0117] In some optional implementations, determining a state space and an operation space of a hybrid storage system includes:

[0118] Determine a first type of storage device and a second type of storage device included in the hybrid storage system;

[0119] Obtaining the size of a first capacity space and the size of a second capacity space in a first type storage device;

[0120] Obtaining a data migration amount and a data eviction amount between a first type storage device and a second type storage device;

[0121] Obtain a first average response delay of a first type storage device to a load request and a second average response delay of a second type storage device to a load request;

[0122] Determine a state space according to a size of the first capacity space, a size of the second capacity space, a data migration amount, a data eviction amount, a first average response delay, and a second average response delay;

[0123] determining a third preset number of operable modes of the hybrid storage system in response to the load request;

[0124] An operation space is determined according to a third preset number of operable modes.

[0125] Specifically, a first type of storage device and a second type of storage device included in the hybrid storage system are determined. The first type of storage device is, for example, an SCM, and the second type of storage device is, for example, a high-density storage SSD.

[0126] The first capacity space is, for example, a byte-addressable allocated space, and the second capacity space is, for example, a block-addressable allocated space. The size of the first capacity space and the size of the second capacity space in the first type storage device are obtained.

[0127] Obtain a data migration amount migration_count and a data eviction amount eviction_count between the first type storage device and the second type storage device. Obtain a first average response delay of the first type storage device to a load request and a second average response delay of the second type storage device to the load request.

[0128] The size of the first capacity space, the size of the second capacity space, the data migration amount, the data eviction amount, the first average response delay, and the second average response delay are summarized to determine a state space (state_spec) of the hybrid storage system.

[0129] For the action space action_spec, the hybrid storage system can divide the locations that respond to load requests into fast devices and slow devices based on the access frequency of the requested data, the size of the data, and the priority of the request, and divide the data response mode into cache mode and tiered mode to respond flexibly to requests. Figure 3 As shown, the operation space action_spec may include: cache mode, layered mode, fast device response, slow device response, etc. The third preset number is, for example, 4 or 6, and no specific number limitation is made here.

[0130] In some optional implementations, counting the first load feature corresponding to the load request to be processed includes:

[0131] According to the pending load requests and the processed load requests, the read-write ratio of the load requests, the average request size of the requested data, and the average number of accesses are obtained;

[0132] Get the unique request number of the pending load requests from the pending load requests, and get the unique request number of the processed load requests from the processed load requests;

[0133] A first load characteristic is obtained according to the read-write ratio, the average request size, the average number of accesses, and the number of unique requests.

[0134] Specifically, in order to adapt the hybrid storage system to different load request types, the hybrid storage system needs to extract the load characteristics of the load requests received within a period of time. The pending load requests and processed load requests represent the load requests received by the hybrid storage system within a period of time. The hybrid storage system first counts the read-write ratio, the average request size of the requested data, and the average number of accesses in the pending load requests and the processed load requests. For example, the statistical method is to first obtain the request data size of each load request, and then calculate the average value to obtain the average request size.

[0135] The hybrid storage system obtains the number of unique requests from the pending load requests, obtains the number of unique requests from the processed load requests, summarizes the above read-write ratio, average request size, average access number and unique request number, and obtains the first load characteristic.

[0136] In this embodiment, the first load characteristics corresponding to the load requests to be processed are counted to facilitate the policy determination model to match the corresponding target request processing strategy, realize adaptive scheduling of the load requests to be processed, and improve the resource utilization and request response performance of the hybrid storage system.

[0137] In some optional implementations, after determining the storage device that responds to the load request to be processed according to the target request processing strategy and processing the data corresponding to the load request to be processed, the method further includes:

[0138] Get the update interval;

[0139] If the time interval between the current time and the time when the strategy determination model was last updated reaches the update interval time, a new state space and a new operation space of the hybrid storage system are determined;

[0140] Obtaining a fourth preset number of second preset load requests;

[0141] The initialization strategy determines the model parameters of the model;

[0142] The strategy determination model is trained by using a preset optimizer according to the new state space, the new operation space, the second preset load request and the preset random strategy to complete the update of the strategy determination model.

[0143] Specifically, the hybrid storage system responds to requests; in order to reduce the difference between the actual load and the offline placement strategy and model, a training thread is opened, and the system status information, placement strategy and model parameters are updated at regular intervals, and the model and strategy related parameters are updated and optimized until convergence or the load characteristics change beyond the threshold range, and the online reinforcement learning model and strategy tuning are performed. Steps such as:

[0144] Get update interval If the time interval between the current time and the last time the strategy was updated to determine the model reaches the update interval , indicating that the policy determination model needs to be updated again. The hybrid storage system state is updated to determine the new state space and new operation space of the hybrid storage system.

[0145] A fourth preset number of second preset load requests is obtained, where the second preset load requests are load request types that have been processed multiple times by the hybrid storage system within a period of time.

[0146] Initialize the model parameters of the strategy determination model. Preset optimizers such as: RMSprop algorithm optimizer, preset random strategies such as: random_policy (random strategy). Summarize the second preset load request to obtain multiple load types, input the multiple load types into the model to be trained, use the preset optimizer to train the model to be trained according to the state space, operation space and preset random strategy, and obtain the strategy determination model, including: based on the RMSprop algorithm, initialize the optimizer instance to achieve the convergence efficiency optimization of the parameters during the training process. Use the reinforcement learning method to train the intelligent model and strategy of various loads until convergence or the load characteristics change beyond the threshold range, obtain the relevant model parameters, and store the obtained model and strategy persistently to complete the update of the strategy determination model. The updated strategy determination model includes a first preset number of updated candidate request processing strategies and the second load characteristics corresponding to the updated candidate request processing strategies. The second load characteristics are counted according to the second preset load request.

[0147] The above process is as follows Figure 2 As shown, after loading the offline data placement model and strategy, the system state is updated, and based on the latest system state space and system operation space, the data is placed based on reinforcement learning with reward maximization as the optimization goal, and the model parameters are updated according to the placement results.

[0148] In this embodiment, the policy determination model is updated every update interval, which can reduce the difference between the actual load and the candidate request processing policy in the policy determination model, and improve the accuracy of determining the target request processing policy.

[0149] In some optional implementations, obtaining the update interval time includes:

[0150] Obtaining a first read request ratio, a first write request ratio, a first request data average size, a first average access number, and a first unique request number of load requests in a first time period, wherein the first time period is a time period before the last update of the strategy determination model;

[0151] Obtaining a second read request ratio, a second write request ratio, a second request data average size, a second average access number, and a second unique request number of load requests in a second time period, wherein the second time period is a time period after the last update of the strategy determination model;

[0152] Compare the first read request ratio and the second read request ratio to obtain a first change value; compare the first write request ratio and the second write request ratio to obtain a second change value; compare the first request data average size and the second request data average size to obtain a third change value; compare the first average access number and the second average access number to obtain a fourth change value; compare the first unique request number and the second unique request number to obtain a fifth change value;

[0153] A load request change is obtained according to the first change value, the second change value, the third change value, the fourth change value and the fifth change value, and an update interval is obtained according to the load request change, wherein the load request change is negatively correlated with the update interval.

[0154] Specifically, this embodiment improves the update of the policy determination model. Different from the traditional method of periodic update (for example, update once every 1000 requests), this embodiment considers the load characteristic changes of two adjacent time periods. If the load characteristic changes are obvious, the update interval is shortened. Otherwise, the update interval of the reinforcement learning parameters and models should be appropriately extended according to the magnitude of the change. The steps of considering the load characteristic changes between two adjacent time periods include:

[0155] In summary, in this embodiment, the first time period is a time period before the strategy determination model is last updated, and the second time period is a time period after the strategy determination model is last updated.

[0156] A first read request ratio, a first write request ratio, a first request data average size, a first average access number, and a first unique request number of the load requests in the first time period are obtained. A second read request ratio, a second write request ratio, a second request data average size, a second average access number, and a second unique request number of the load requests in the second time period are obtained.

[0157] Compare the first read request ratio and the second read request ratio to obtain a first change value. Compare the first write request ratio and the second write request ratio to obtain a second change value. Compare the first request data average size and the second request data average size to obtain a third change value. Compare the first average access number and the second average access number to obtain a fourth change value. Compare the first unique request number and the second unique request number to obtain a fifth change value. The change value can be a difference value, a ratio change, or other data, which is set according to actual needs.

[0158] The first change value, the second change value, the third change value, the fourth change value and the fifth change value are integrated to obtain the load request change. In order to make the load request change more accurately reflect the change of the load request, different weights can be set for different change values ​​during integration. The load request change is negatively correlated with the update interval, that is, the greater the load request change, the longer the update interval. The smaller.

[0159] In this embodiment, the update interval is determined based on the change values ​​of various load characteristics of the load requests in the first time period and the second time period. By dynamically adjusting the update interval, on the one hand, the hybrid storage system can timely update the candidate request processing strategy for loads with frequent characteristic changes; on the other hand, for load requests with little characteristic change, the hybrid storage system can save a lot of system training overhead.

[0160] In some optional implementations, obtaining a load request change according to the first change value, the second change value, the third change value, the fourth change value, and the fifth change value, and obtaining an update interval according to the load request change includes:

[0161] Obtaining an update interval time according to the first change value, the second change value, the third change value, the fourth change value, the fifth change value and the first target formula;

[0162] The first objective formula satisfies:

[0163] .

[0164] in, Indicates the update interval. is the preset parameter, represents the first change value, Indicates the first read request ratio, Indicates the second read request ratio, represents the second change value, Indicates the first write request ratio, Indicates the ratio of second write requests, represents the third change value, Indicates the average size of the first request data. Indicates the average size of the second request data. represents the fourth change value, represents the first average number of visits, represents the second average number of visits, represents the fifth change value, Indicates the first unique request number, represents the second unique request number, n represents the second time period, n-1 represents the first time period, and function d is used to calculate the change value between the two parameters. represents the load request change, and function C is used to determine the corresponding relationship between the load request change and the update interval time.

[0165] Specifically, the first change value , the second change value , the third change value , the fourth change value And the fifth change value Substitute into the first target formula and calculate the update interval time The function C in the first objective formula is to dynamically adjust the training cycle according to the load change. The greater the load change, the shorter the training cycle. Function d compares the corresponding features of two adjacent cycles to obtain the quantitative value of the change.

[0166] In some optional implementations, after determining the storage device that responds to the load request to be processed according to the target request processing policy, the method further includes:

[0167] Obtaining a first target size of a first capacity space and a second target size of a second capacity space in a first type storage device according to a read-write ratio, an average request size, an average number of accesses, a number of unique requests, and a second objective function in the first load characteristic;

[0168] The second objective function satisfies:

[0169] .

[0170] in, represents the first target size, Indicates the second target size, Indicates the read-write ratio, Indicates the ratio of read requests to read-write ratio. Indicates the ratio of write requests to read-write ratio. represents the average request size, represents the average number of visits, Indicates the number of unique requests. Function is the influence function of load characteristics on the system delay of the hybrid energy storage system.

[0171] Specifically, the first capacity space is, for example, a byte-addressable allocation space; the second capacity space is, for example, a block-addressable allocation space.

[0172] Set the read-write ratio in the first load characteristic of the load request to be processed , average request size , average number of visits and the number of unique requests Substituting into the second objective function, Under the action of function and minimum function min, the first target size is obtained and the second target size .

[0173] In this embodiment, the first target size of the first capacity space and the second target size of the second capacity space are calculated according to the second objective function and the first load characteristic, and the space of the first type of storage device is dynamically allocated according to the first target size and the second target size to improve resource utilization and system request response performance.

[0174] In some optional implementations, determining a storage device that responds to a load request to be processed according to a target request processing policy includes:

[0175] Determine a target response delay of the load request to be processed according to the average access number in the first load characteristic, wherein the average access number and the target response delay are negatively correlated;

[0176] If the target response latency is less than the first preset threshold, the storage device that responds to the load request to be processed is a first type of storage device;

[0177] If the target response latency is greater than or equal to the first preset threshold, the storage device that responds to the load request to be processed is a second type storage device.

[0178] Specifically, this embodiment processes the pending load request in a fast device response and a slow device response manner according to the target request processing strategy. The first type of storage device is, for example, an SCM, and the second type of storage device is, for example, a high-density storage SSD. The first type of storage device is a fast response device, and the second type of storage device is a slow response device.

[0179] The target response delay of the load request to be processed is determined based on the average number of accesses in the first load characteristic. If the average number of accesses to a certain request data is very high, reaching more than 10 times per minute, multiple load requests accessing the same request data will affect each other and cause congestion. In this regard, the target response delay of the load request to be processed can be set to 0-50ms so that the access can be completed quickly. In addition, in order to meet the target response delay, the request data can be placed on a fast response device, that is, a first type storage device. If the average number of accesses to a certain request data is low, reaching less than 2 times per minute, in order to save the storage resources of the first type storage device in the hybrid storage system, the target response delay of the load request to be processed can be set to 100ms.

[0180] Based on the above content, a first preset threshold can be set, for example: 50ms. If the target response delay of the load request to be processed is less than the first preset threshold, in order to meet the target response delay, the request data can be placed on a fast response device, that is, a first type of storage device, that is, the storage device responsible for responding to the load request to be processed is a first type of storage device.

[0181] If the target response latency is greater than or equal to the first preset threshold, in order to save storage resources of the first type of storage device in the hybrid storage system, the requested data is placed on a slow-responding device, namely, a second type of storage device. That is, the storage device responsible for responding to the load request to be processed is the second type of storage device.

[0182] In this embodiment, based on the relationship between the target response delay of the load request to be processed and the first preset threshold, it is determined whether the storage device responding to the load request to be processed is a first type storage device or a second type storage device, thereby improving request response efficiency and resource utilization.

[0183] In some optional implementations, determining a storage device that responds to a load request to be processed according to a target request processing policy includes:

[0184] Determine, based on the average number of accesses and the number of unique requests in the first load characteristic, the access frequency of the request data corresponding to the load request to be processed;

[0185] In the case where the load request to be processed is a write request, if the average request size in the first load characteristic is not greater than the second preset threshold, the storage device responding to the load request to be processed is a first type storage device;

[0186] If the average request size is greater than the second preset threshold, determine whether the access frequency is greater than the third preset threshold; if the access frequency is greater than the third preset threshold, the storage device responding to the pending load request is a first type storage device; if the access frequency is less than or equal to the third preset threshold, the storage device responding to the pending load request is a second type storage device;

[0187] In the case where the load request to be processed is a read request, if the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, the storage device responding to the load request to be processed is a first type storage device.

[0188] Specifically, this embodiment uses a hierarchical mode to process pending load requests according to a target request processing strategy. The first type of storage device is, for example, SCM, and the second type of storage device is, for example, a high-density storage SSD. SCM serves as the performance layer of the hybrid storage system, and the high-density storage SSD serves as the flash memory capacity layer of the hybrid storage system.

[0189] The number of unique requests is used to count the total number of different types of load requests processed by the system within a certain period of time. Based on the average number of accesses and the number of unique requests in the first load feature, the total amount of accesses to the request data corresponding to the load request to be processed by different types of load requests can be determined, and then divided by the time the hybrid storage system receives these load requests, the access frequency can be obtained.

[0190] In the case where the pending load request is a write request, if the average request size in the first load characteristic is not greater than the second preset threshold, the second preset threshold, for example: 32Mb, indicates that the average request size is small, and all the data in the write request can be placed in the performance layer, namely SCM, that is, the storage device responding to the pending load request is a first type storage device.

[0191] If the average request size is greater than the second preset threshold, it means that the average request size is large. At this time, it is necessary to divide it into two cases according to the access frequency. If the access frequency is greater than the third preset threshold, the third preset threshold is, for example, 10 times per minute, which means that the write request contains more data that is currently read and written frequently. All the data in the write request can be placed in the performance layer, that is, the SCM, that is, the storage device that responds to the pending load request is the first type of storage device. If the access frequency is less than or equal to the third preset threshold, it means that the data in the write request is not the data that is currently read and written frequently, and does not need to occupy the SCM storage space. All the data in the write request is placed in the flash capacity layer, that is, the high-density storage SSD, that is, the storage device responsible for responding to the pending load request is the second type of storage device.

[0192] In addition, if the data stored in the SCM is no longer frequently read and written data, the data can be placed in a high-density storage SSD through data migration or data eviction.

[0193] In the case where the pending load request is a read request, if the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, it means that the data size read by the pending load request is small and needs to be read frequently, and the read request is responded to from the performance layer, i.e., SCM, that is, the storage device responsible for responding to the pending load request is the first type of storage device, otherwise, the read request is scheduled to the flash memory capacity layer for response.

[0194] In this embodiment, based on the access frequency and average request size of the requested data, it is determined whether the first type of storage device or the second type of storage device is responsible for responding to the load request to be processed, and the storage resources of the hybrid storage system are reasonably scheduled to improve the request response efficiency and resource utilization.

[0195] In some optional implementations, determining a storage device that responds to the load request to be processed according to the target request processing strategy, and processing data corresponding to the load request to be processed includes:

[0196] Determine request data corresponding to the load request to be processed;

[0197] Determine, based on the average number of accesses and the number of unique requests in the first load characteristic, the access frequency of the request data corresponding to the load request to be processed;

[0198] Writing the requested data into the second type storage device and creating a cache layer in the first type storage device;

[0199] In the case where the load request to be processed is a write request, if the average request size in the first load characteristic is not greater than a fourth preset threshold, copying the request data to the cache layer;

[0200] If the average request size is greater than or equal to the fourth preset threshold, determine whether the access frequency is greater than the fifth preset threshold; if the access frequency is greater than the fifth preset threshold, copy the request data to the cache layer;

[0201] In the case where the load request to be processed is a read request, if the average request size is not greater than a fourth preset threshold and the access frequency is greater than a fifth preset threshold, the request data is copied to the cache layer.

[0202] Specifically, this embodiment uses a cache mode to process the pending load request according to the target request processing strategy. The first type of storage device is, for example, SCM, and the second type of storage device is, for example, a high-density storage SSD.

[0203] Determine request data corresponding to the load request to be processed, write the request data into the second type storage device, and create a cache layer in the SCM, that is, the first type storage device.

[0204] The number of unique requests is used to count the total number of different types of load requests processed by the system within a certain period of time. Based on the average number of accesses and the number of unique requests in the first load feature, the total amount of accesses to the request data corresponding to the load request to be processed by different types of load requests can be determined, and then divided by the time the hybrid storage system receives these load requests, the access frequency can be obtained.

[0205] When the load request to be processed is a write request, if the average request size in the first load characteristic is not greater than the fourth preset threshold, the fourth preset threshold, for example: 16Mb, indicates that the average request size is small, and the request data can be copied to the cache layer for subsequent efficient access.

[0206] If the average request size is greater than or equal to the fourth preset threshold, it means that the average request size is large, and it is necessary to divide it into two cases according to the access frequency. If the access frequency is greater than the fifth preset threshold, for example, 12 times per minute, it means that the request data of the load request to be processed is the data that is currently read and written frequently, and the request data is copied to the cache layer for subsequent efficient access.

[0207] When the load request to be processed is a read request, if the average request size is not greater than the fourth preset threshold and the access frequency is greater than the fifth preset threshold, it means that the size of the requested data is small and needs to be read frequently. The requested data is copied to the cache layer for subsequent efficient access.

[0208] In addition, if the data stored in the cache layer is no longer frequently read and written data, the data can be cleaned up in the cache layer through data migration, data eviction or direct deletion to save storage space in the cache layer.

[0209] In this embodiment, whether to copy the requested data to the cache layer is determined based on the access frequency and average request size of the requested data. While meeting the frequent read and write data requirements of the load requests, the storage space of the cache layer is not wasted, the storage space of the cache layer is used rationally, and the request response efficiency and resource utilization are improved.

[0210] In some optional implementations, using a strategy determination model to compare the first load feature with the second load feature, and determining a target request processing strategy from a first preset number of candidate request processing strategies according to the comparison result, includes:

[0211] determining a difference between the first load characteristic and the second load characteristic;

[0212] The candidate request processing strategy with the smallest difference between the corresponding second load characteristic and the first load characteristic is used as the target request processing strategy.

[0213] Specifically, in an actual production environment, the first load feature of the load request to be processed is counted in real time. The policy determination model calculates the difference between the first load feature and the second load feature of the candidate request processing policy, for example, calculating the difference between the average request size in the first load feature and the second load feature, and using the difference as the difference. After calculating the local difference between each parameter, the overall difference between the first load feature and the second load feature is obtained after integration.

[0214] A candidate request processing strategy corresponding to a second load characteristic having the smallest difference from the first load characteristic is selected and used as the target request processing strategy.

[0215] In this embodiment, by calculating the difference between the first load feature and the second load feature, the candidate request processing strategy corresponding to the second load feature with the smallest difference from the first load feature is selected as the target request processing strategy. The method is simple and easy to implement with high accuracy.

[0216] In this embodiment, a load request processing device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0217] This embodiment provides a load request processing device, such as Figure 5 As shown, including:

[0218] A statistics module 501 is used to count the first load characteristics corresponding to the load request to be processed;

[0219] A determination module 502 is configured to input the first load characteristic into a policy determination model, wherein the policy determination model includes a first preset number of candidate request processing strategies and second load characteristics corresponding to the candidate request processing strategies; compare the first load characteristic with the second load characteristic using the policy determination model, and determine a target request processing strategy from the first preset number of candidate request processing strategies according to the comparison result;

[0220] The execution module 503 is used to execute the target request processing strategy, determine the storage device that responds to the load request to be processed according to the target request processing strategy, and process the data corresponding to the load request to be processed, wherein the storage device is included in the hybrid storage system.

[0221] In some optional embodiments, before inputting the first load characteristic into the strategy determination model, the apparatus is configured to:

[0222] Determine the state space and operation space of the hybrid storage system;

[0223] Obtaining a second preset number of first preset load requests;

[0224] Create a model to be trained and initialize the model parameters of the model to be trained;

[0225] The model to be trained is trained using a preset optimizer according to the state space, the operation space, the first preset load request and the preset random strategy to obtain a strategy determination model, wherein the first load feature is statistically calculated based on the first preset load request.

[0226] In some optional implementations, the apparatus determines a state space and an operation space of a hybrid storage system, including:

[0227] Determine a first type of storage device and a second type of storage device included in the hybrid storage system;

[0228] Obtaining the size of a first capacity space and the size of a second capacity space in a first type storage device;

[0229] Obtaining a data migration amount and a data eviction amount between a first type storage device and a second type storage device;

[0230] Obtain a first average response delay of a first type storage device to a load request and a second average response delay of a second type storage device to a load request;

[0231] Determine a state space according to a size of the first capacity space, a size of the second capacity space, a data migration amount, a data eviction amount, a first average response delay, and a second average response delay;

[0232] determining a third preset number of operable modes of the hybrid storage system in response to the load request;

[0233] An operation space is determined according to a third preset number of operable modes.

[0234] In some optional implementations, the statistics module 501 counts the first load characteristics corresponding to the load request to be processed, including:

[0235] According to the pending load requests and the processed load requests, the read-write ratio of the load requests, the average request size of the requested data, and the average number of accesses are obtained;

[0236] Get the unique request count of pending load requests from pending load requests;

[0237] A first load characteristic is obtained according to the read-write ratio, the average request size, the average number of accesses, and the number of unique requests.

[0238] In some optional implementations, after determining the storage device that responds to the load request to be processed according to the target request processing strategy and processing the data corresponding to the load request to be processed, the apparatus is further configured to:

[0239] Get the update interval;

[0240] If the time interval between the current time and the time when the strategy determination model was last updated reaches the update interval time, a new state space and a new operation space of the hybrid storage system are determined;

[0241] Obtaining a fourth preset number of second preset load requests;

[0242] The initialization strategy determines the model parameters of the model;

[0243] The strategy determination model is trained by using a preset optimizer according to the new state space, the new operation space, the second preset load request and the preset random strategy to complete the update of the strategy determination model.

[0244] In some optional implementations, the device obtains the update interval time, including:

[0245] Obtaining a first read request ratio, a first write request ratio, a first request data average size, a first average access number, and a first unique request number of load requests in a first time period, wherein the first time period is a time period before the last update of the strategy determination model;

[0246] Obtaining a second read request ratio, a second write request ratio, a second request data average size, a second average access number, and a second unique request number of load requests in a second time period, wherein the second time period is a time period after the last update of the strategy determination model;

[0247] Compare the first read request ratio and the second read request ratio to obtain a first change value; compare the first write request ratio and the second write request ratio to obtain a second change value; compare the first request data average size and the second request data average size to obtain a third change value; compare the first average access number and the second average access number to obtain a fourth change value; compare the first unique request number and the second unique request number to obtain a fifth change value;

[0248] A load request change is obtained according to the first change value, the second change value, the third change value, the fourth change value and the fifth change value, and an update interval is obtained according to the load request change, wherein the load request change is negatively correlated with the update interval.

[0249] In some optional implementations, the device obtains a load request change according to the first change value, the second change value, the third change value, the fourth change value, and the fifth change value, and obtains an update interval according to the load request change, including:

[0250] Obtaining an update interval time according to the first change value, the second change value, the third change value, the fourth change value, the fifth change value and the first target formula;

[0251] The first objective formula satisfies:

[0252] .

[0253] in, Indicates the update interval. is the preset parameter, represents the first change value, Indicates the first read request ratio, Indicates the second read request ratio, represents the second change value, Indicates the first write request ratio, Indicates the ratio of second write requests, represents the third change value, Indicates the average size of the first request data. Indicates the average size of the second request data. represents the fourth change value, represents the first average number of visits, represents the second average number of visits, represents the fifth change value, Indicates the first unique request number, represents the second unique request number, n represents the second time period, n-1 represents the first time period, and function d is used to calculate the change value between the two parameters. represents the load request change, and function C is used to determine the corresponding relationship between the load request change and the update interval time.

[0254] In some optional implementations, after determining the storage device that responds to the load request to be processed according to the target request processing policy, the apparatus is further configured to:

[0255] Obtaining a first target size of a first capacity space and a second target size of a second capacity space in a first type storage device according to a read-write ratio, an average request size, an average number of accesses, a number of unique requests, and a second objective function in the first load characteristic;

[0256] The second objective function satisfies:

[0257] .

[0258] in, represents the first target size, Indicates the second target size, Indicates the read-write ratio, Indicates the ratio of read requests to read-write ratio. Indicates the ratio of write requests to read-write ratio. represents the average request size, represents the average number of visits, Indicates the number of unique requests. Function is the influence function of load characteristics on the system delay of the hybrid energy storage system.

[0259] In some optional implementations, the execution module 503 determines the storage device that responds to the load request to be processed according to the target request processing strategy, including:

[0260] Determine a target response delay of the load request to be processed according to the average access number in the first load characteristic, wherein the average access number and the target response delay are negatively correlated;

[0261] If the target response latency is less than the first preset threshold, the storage device that responds to the load request to be processed is a first type of storage device;

[0262] If the target response latency is greater than or equal to the first preset threshold, the storage device that responds to the load request to be processed is a second type storage device.

[0263] In some optional implementations, the execution module 503 determines the storage device that responds to the load request to be processed according to the target request processing strategy, including:

[0264] Determine, based on the average number of accesses and the number of unique requests in the first load characteristic, the access frequency of the request data corresponding to the load request to be processed;

[0265] In the case where the load request to be processed is a write request, if the average request size in the first load characteristic is not greater than the second preset threshold, the storage device responding to the load request to be processed is a first type storage device;

[0266] If the average request size is greater than the second preset threshold, determine whether the access frequency is greater than the third preset threshold; if the access frequency is greater than the third preset threshold, the storage device responding to the pending load request is a first type storage device; if the access frequency is less than or equal to the third preset threshold, the storage device responding to the pending load request is a second type storage device;

[0267] In the case where the load request to be processed is a read request, if the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, the storage device responding to the load request to be processed is a first type storage device.

[0268] In some optional implementations, the execution module 503 determines the storage device that responds to the load request to be processed according to the target request processing strategy, and processes the data corresponding to the load request to be processed, including:

[0269] Determine request data corresponding to the load request to be processed;

[0270] Determine, based on the average number of accesses and the number of unique requests in the first load characteristic, the access frequency of the request data corresponding to the load request to be processed;

[0271] Writing the requested data into the second type storage device and creating a cache layer in the first type storage device;

[0272] In the case where the load request to be processed is a write request, if the average request size in the first load characteristic is not greater than a fourth preset threshold, copying the request data to the cache layer;

[0273] If the average request size is greater than or equal to the fourth preset threshold, determine whether the access frequency is greater than the fifth preset threshold; if the access frequency is greater than the fifth preset threshold, copy the request data to the cache layer;

[0274] In the case where the load request to be processed is a read request, if the average request size is not greater than a fourth preset threshold and the access frequency is greater than a fifth preset threshold, the request data is copied to the cache layer.

[0275] In some optional implementations, the determination module 502 compares the first load feature with the second load feature using a strategy determination model, and determines a target request processing strategy from a first preset number of candidate request processing strategies according to the comparison result, including:

[0276] determining a difference between the first load characteristic and the second load characteristic;

[0277] The candidate request processing strategy with the smallest difference between the corresponding second load characteristic and the first load characteristic is used as the target request processing strategy.

[0278] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0279] The load request processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0280] The embodiment of the present invention also provides a computer device having the above Figure 5 The load request processing device is shown.

[0281] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0282] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0283] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0284] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device 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.

[0285] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0286] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0287] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0288] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0289] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the present application.

Claims

1. A load request processing method, characterized in that: The method comprises: Counting first load characteristics corresponding to the load requests to be processed; Determine the state space and operation space of the hybrid storage system; Obtaining a second preset number of first preset load requests; Creating a model to be trained and initializing model parameters of the model to be trained; Using a preset optimizer to train the model to be trained according to the state space, the operation space, the first preset load request and a preset random strategy to obtain a strategy determination model, wherein the first load feature is statistically obtained according to the first preset load request; Inputting the first load characteristic into a policy determination model, wherein the policy determination model includes a first preset number of candidate request processing strategies and second load characteristics corresponding to the candidate request processing strategies; using the policy determination model to compare the first load characteristic with the second load characteristic, and determining a target request processing strategy from the first preset number of candidate request processing strategies according to the comparison result; Execute the target request processing strategy, determine the storage device that responds to the pending load request according to the target request processing strategy, and process the data corresponding to the pending load request, wherein the storage device is included in the hybrid storage system.

2. The method according to claim 1, characterized in that Determining the state space and operation space of the hybrid storage system includes: Determine a first type of storage device and a second type of storage device included in the hybrid storage system; Acquire the size of a first capacity space and the size of a second capacity space in the first type storage device; Acquire a data migration amount and a data eviction amount between the first type storage device and the second type storage device; Obtaining a first average response delay of the first type storage device to the load request and a second average response delay of the second type storage device to the load request; Determining the state space according to the size of the first capacity space, the size of the second capacity space, the data migration amount, the data eviction amount, the first average response delay, and the second average response delay; Determining a third preset number of operable modes of the hybrid storage system in response to the load request; The operation space is determined according to a third preset number of the operable modes.

3. The method according to claim 1, characterized in that The counting of first load characteristics corresponding to the load request to be processed includes: According to the to-be-processed load requests and the processed load requests, a read-write ratio of the load requests, an average request size of the requested data, and an average number of accesses are obtained; Obtaining a unique request number of the to-be-processed load request from the to-be-processed load request; The first load characteristic is obtained according to the read-write ratio, the average request size, the average number of accesses, and the number of unique requests.

4. The method according to claim 1, characterized in that After determining the storage device that responds to the load request to be processed according to the target request processing strategy and processing the data corresponding to the load request to be processed, the method further includes: Get the update interval; If the time interval between the current time and the time when the policy determination model was last updated reaches the update interval, determining a new state space and a new operation space of the hybrid storage system; Obtaining a fourth preset number of second preset load requests; Initializing model parameters of the strategy determination model; The strategy determination model is trained using a preset optimizer according to the new state space, the new operation space, the second preset load request and the preset random strategy to complete the update of the strategy determination model.

5. The method according to claim 4, characterized in that The obtaining update interval time includes: Obtaining a first read request ratio, a first write request ratio, a first request data average size, a first average access number, and a first unique request number of load requests in a first time period, wherein the first time period is a time period before the policy determination model is last updated; Obtaining a second read request ratio, a second write request ratio, a second request data average size, a second average access number, and a second unique request number of load requests in a second time period, wherein the second time period is a time period after the policy determination model is last updated; Comparing the first read request ratio with the second read request ratio to obtain a first change value; comparing the first write request ratio with the second write request ratio to obtain a second change value; comparing the first request data average size with the second request data average size to obtain a third change value; comparing the first average access number with the second average access number to obtain a fourth change value; comparing the first unique request number with the second unique request number to obtain a fifth change value; A load request change is obtained according to the first change value, the second change value, the third change value, the fourth change value and the fifth change value, and the update interval time is obtained according to the load request change, wherein the load request change is negatively correlated with the update interval time.

6. The method according to claim 5, characterized in that The step of obtaining a load request change according to the first change value, the second change value, the third change value, the fourth change value, and the fifth change value, and obtaining the update interval according to the load request change includes: Obtaining the update interval time according to the first change value, the second change value, the third change value, the fourth change value, the fifth change value and a first target formula; The first objective formula satisfies: in, represents the update interval time, is the preset parameter, represents the first change value, represents the first read request ratio, Indicates the second read request ratio, represents the second change value, represents the first write request ratio, represents the second write request ratio, represents the third change value, represents the average size of the first request data, represents the average size of the second request data, represents the fourth change value, represents the first average number of visits, represents the second average number of visits, represents the fifth change value, represents the first unique request number, represents the second unique request number, n represents the second time period, n-1 represents the first time period, and function d is used to calculate the change value between two parameters. represents the load request change, and function C is used to determine the corresponding relationship between the load request change and the update interval time.

7. The method according to claim 3, characterized in that After determining the storage device that responds to the load request to be processed according to the target request processing strategy, the method further includes: Obtaining a first target size of a first capacity space and a second target size of a second capacity space in a first type storage device according to the read-write ratio, the average request size, the average number of accesses, the number of unique requests, and a second objective function in the first load characteristic; The second objective function satisfies: in, represents the first target size, represents the second target size, Indicates the read-write ratio, Indicates the ratio of read requests in the read-write ratio, represents the write request ratio in the read-write ratio, represents the average request size, represents the average number of visits, represents the number of unique requests, The function is an influence function of load characteristics on the system delay of the hybrid storage system.

8. The method according to claim 3, characterized in that The step of determining the storage device that responds to the load request to be processed according to the target request processing strategy includes: Determining a target response delay of the to-be-processed load request according to the average access number in the first load characteristic, wherein the average access number is negatively correlated with the target response delay; If the target response delay is less than a first preset threshold, the storage device that responds to the load request to be processed is a first type of storage device; If the target response latency is greater than or equal to the first preset threshold, the storage device that responds to the load request to be processed is a second type storage device.

9. The method according to claim 3, characterized in that: The step of determining the storage device that responds to the load request to be processed according to the target request processing strategy includes: Determine, according to the average number of accesses and the number of unique requests in the first load characteristic, an access frequency of the request data corresponding to the load request to be processed; In the case where the to-be-processed load request is a write request, if the average request size in the first load characteristic is not greater than a second preset threshold, the storage device responding to the to-be-processed load request is a first type storage device; If the average request size is greater than the second preset threshold, determine whether the access frequency is greater than a third preset threshold; if the access frequency is greater than the third preset threshold, the storage device that responds to the pending load request is the first type of storage device; if the access frequency is less than or equal to the third preset threshold, the storage device that responds to the pending load request is the second type of storage device; In the case where the pending load request is a read request, if the average request size is not greater than the second preset threshold and the access frequency is greater than the third preset threshold, the storage device responding to the pending load request is a first type storage device.

10. The method according to claim 3, characterized in that The step of determining a storage device that responds to the load request to be processed according to the target request processing strategy, and processing data corresponding to the load request to be processed, includes: Determining request data corresponding to the load request to be processed; Determine, according to the average number of accesses and the number of unique requests in the first load characteristic, an access frequency of the request data corresponding to the load request to be processed; Writing the requested data into a second type storage device, and creating a cache layer in the first type storage device; In a case where the to-be-processed load request is a write request, if the average request size in the first load characteristic is not greater than a fourth preset threshold, copying the request data to the cache layer; If the average request size is greater than or equal to the fourth preset threshold, determining whether the access frequency is greater than a fifth preset threshold; if the access frequency is greater than the fifth preset threshold, copying the request data to the cache layer; In the case where the to-be-processed load request is a read request, if the average request size is not greater than the fourth preset threshold and the access frequency is greater than the fifth preset threshold, the request data is copied to the cache layer.

11. The method according to claim 1, characterized in that: The using the strategy determination model to compare the first load feature with the second load feature, and determining a target request processing strategy from a first preset number of candidate request processing strategies according to the comparison result, includes: determining a difference between the first load characteristic and the second load characteristic; The candidate request processing strategy whose corresponding second load characteristic has the smallest difference with the first load characteristic is used as the target request processing strategy.

12. A load request processing device, characterized in that: The device comprises: A statistics module, used for counting the first load characteristics corresponding to the load request to be processed; Determine the state space and operation space of the hybrid storage system; Obtaining a second preset number of first preset load requests; Creating a model to be trained and initializing model parameters of the model to be trained; Using a preset optimizer to train the model to be trained according to the state space, the operation space, the first preset load request and a preset random strategy to obtain a strategy determination model, wherein the first load feature is statistically obtained according to the first preset load request; A determination module, configured to input the first load characteristic into a policy determination model, wherein the policy determination model includes a first preset number of candidate request processing strategies and second load characteristics corresponding to the candidate request processing strategies; compare the first load characteristic with the second load characteristic using the policy determination model, and determine a target request processing strategy from the first preset number of candidate request processing strategies according to the comparison result; An execution module is used to execute the target request processing strategy, determine the storage device that responds to the pending load request according to the target request processing strategy, and process the data corresponding to the pending load request, wherein the storage device is included in a hybrid storage system.

13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the load request processing method according to any one of claims 1 to 11 by executing the computer instructions.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the load request processing method according to any one of claims 1 to 11.

15. A computer program product, characterized in that It comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the load request processing method according to any one of claims 1 to 11.