Data request processing method and apparatus, and electronic device

By dynamically selecting data request processing paths in a multi-core processor environment and rationally allocating resources based on the status parameters of the processing layer, the problem of low data request processing efficiency is solved, and more efficient and reliable data request processing is achieved.

CN120872628BActive Publication Date: 2025-12-12LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511409544.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-12-12
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

In a multi-core processor environment, data request processing is inefficient and resources are not utilized properly, resulting in a disproportionate increase in performance and a decrease in processing efficiency as the number of processor cores increases.

Method used

By querying the status parameters of multiple processing layers, the most suitable processing path is dynamically selected, breaking out of the fixed processing path, and resources are reasonably allocated according to the status parameters of the processing layers, so as to achieve efficient and rational data request processing.

Benefits of technology

It improves the efficiency and reliability of data request processing, optimizes resource utilization, and adapts to changing business scenarios and load conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120872628B_ABST
    Figure CN120872628B_ABST
Patent Text Reader

Abstract

The application discloses a data request processing method and device and electronic equipment, and relates to the technical field of storage systems. The method comprises the following steps: in response to a current data request to be processed, state parameters of processing layers in at least two processing layers are queried, wherein the state parameters of the processing layers in the at least two processing layers are used to represent the working load conditions of the corresponding processing layers; according to the state parameters of the processing layers in the at least two processing layers, a processing layer to which the processing layers are transferred by a host layer is selected from the at least two processing layers, a current processing path is obtained, and the current data request is processed according to the current processing path. The method can solve the problem of low efficiency of data request processing in the related art, and improve the efficiency and reliability of data request processing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of storage systems, and particularly relates to a data request processing method and device and electronic equipment. BACKGROUND

[0002] In a multi-core or even many-core processor environment, a storage input / output stack usually follows a strict sequential processing flow from a host layer to a cache layer, and then to a redundant array of independent disks layer and a disk management layer. This flow works well in a single-core or few-core system, but in a multi-core system, due to the communication and data synchronization overhead between cores and possible processor and memory access conflicts, performance improvement often does not grow in proportion to the number of processor cores, and also leads to reduced processing efficiency and waste of some resources.

[0003] Therefore, the data request processing method in the related art has the problem of low data request processing efficiency. SUMMARY

[0004] The present application provides a data request processing method and device and electronic equipment to at least solve the problem of low data request processing efficiency in the data request processing method.

[0005] The present application provides a data request processing method applied to an input / output stack, wherein the input / output stack includes a host layer and at least two processing layers. The method includes: in response to a current data request to be processed, querying a state parameter of a processing layer in the at least two processing layers, wherein the state parameter of the processing layer in the at least two processing layers is used to represent a working load condition of the corresponding processing layer; according to the state parameter of the processing layer in the at least two processing layers, selecting the processing layer to which the host layer flows from the at least two processing layers, to obtain a current processing path; and processing the current data request according to the current processing path.

[0006] The present application also provides a data request processing device applied to an input / output stack, wherein the input / output stack includes a host layer and at least two processing layers. The device includes: a querying unit configured to, in response to a current data request to be processed, query a state parameter of a processing layer in the at least two processing layers, wherein the state parameter of the processing layer in the at least two processing layers is used to represent a working load condition of the corresponding processing layer; a selecting unit configured to, according to the state parameter of the processing layer in the at least two processing layers, select the processing layer to which the host layer flows from the at least two processing layers, to obtain a current processing path; and a processing unit configured to process the current data request according to the current processing path.

[0007] The application further provides an electronic device, comprising a memory for storing a computer program, and a processor for executing the computer program to implement the steps of the data request processing method.

[0008] The application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the data request processing method.

[0009] The application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the data request processing method.

[0010] According to the application, in response to a current data request to be processed, a state parameter of a processing layer in at least two processing layers is queried, wherein the state parameter of the processing layer in the at least two processing layers is used to represent a working load condition of the corresponding processing layer; a processing layer to which the host layer flows is selected from the at least two processing layers according to the state parameter of the processing layer in the at least two processing layers, to obtain a current processing path, and the current data request is processed according to the current processing path. Since the state parameter of the processing layer is used, the processing layer to which the host layer flows can be selected and the processing path can be obtained, that is, the fixed processing path can be jumped out, the most suitable data request processing path can be dynamically selected according to the state parameter of the processing layer, the data request processing method is efficient and the resources are reasonably used, and therefore, the problem of low efficiency of the data request processing in the related art can be solved, and the technical effects of improving the efficiency and reliability of the data request processing are achieved. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0012] Figure 1 is an application scenario diagram of a data request processing method according to an embodiment of the application.

[0013] Figure 2 is a flow diagram of an optional data request processing method according to an embodiment of the application.

[0014] Figure 3 is a diagram of an optional data request processing method according to an embodiment of the application.

[0015] Figure 4This is a flowchart illustrating another optional data request processing method according to an embodiment of this application.

[0016] Figure 5 This is a structural block diagram of an optional data request processing method according to an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0018] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0019] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram illustrating an application scenario for the data request processing method according to an embodiment of this application. For example... Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the image. A processor 102 (which may include, but is not limited to, a central processing unit (CPU), microprocessor (MCU), or programmable logic device (FPGA), etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0021] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the method for processing a data request in the embodiments of the present application. The processor 102 can execute various functions and data processing, i.e., implement the above method, by running the computer program stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and the remote memory can be connected to a server device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0022] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet in a wireless manner.

[0023] Figure 2 FIG. 2 is a flowchart of an optional method for processing a data request according to an embodiment of the present application. As shown in FIG. 2, the method includes the following steps: Figure 2

[0024] In step S202, in response to a current data request to be processed, a state parameter of a processing layer in at least two processing layers is queried, where the state parameter of the processing layer in the at least two processing layers is used to represent a working load condition of the corresponding processing layer.

[0025] In step S204, according to the state parameter of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, to obtain a current processing path.

[0026] In step S206, the current data request is processed according to the current processing path.

[0027] The method in the embodiments of the present application can be applied to the field of server technology, and can be applied to a scenario in which a storage system needs to process a data request.

[0028] ​Unified Storage is a storage solution integrating network attached storage and storage area network architecture, supporting multiple protocols, realizing unified management of block-level, file-level and object-level data access, and its core goal is to meet diversified storage needs through a single system, reduce operation and maintenance complexity and improve resource utilization. The performance of a storage system depends largely on the operation of the central processing unit (CPU). In recent years, the development of CPUs has shown some trends. The current mainstream CPUs have crossed the single-core to multi-core architecture and evolved from multi-core to many-core.

[0029] In a storage system, input / output (IO) operations follow a fixed processing flow, starting from the host layer (HL), passing through the cache layer (CA) for cache hit check and data pre-reading, then to the redundant array of independent disks layer (RAID) for data striping processing and verification data generation, and finally to the volume layer (VL) to complete the data read / write operation. Although this process ensures data integrity and system stability, in a multi-core processor and high concurrency scenario, the fixed flow may cause excessive consumption of CPU resources in some modules, while other modules may be idle, affecting overall performance.

[0030] In current multi-core storage systems, CPU utilization is often improved through CPU grouping. For example, the VNode concept and intelligent distribution algorithm can be introduced. The business processing inside the VNode implements an end-to-end flow, which means that from receiving a host IO request to completing data processing, the entire process is completed within the same VNode without cross-VNode communication. This design reduces communication overhead across CPU nodes, remote memory access overhead, and CPU conflicts. The VNode also groups all CPU cores into multiple groups, with each group responsible for a specific business function. Within the VNode business grouping, a lock-free mechanism between cores can also be used. When each CPU core processes business logic, it uses independent data structures, so even within the same business group, CPU cores will not compete for locks due to shared data structures. In another example, a core grouping strategy can be used. Based on an understanding of specific business scenarios, CPU cores are grouped by function to optimize resource allocation, reduce cross-core communication and latency, and thus improve overall processing efficiency. However, this approach is single-scenario-oriented and can only group cores for typical scenarios, and cannot fully utilize the CPU in other scenarios.

[0031] For example, performance acceptance of a financial system usually focuses on a 7:3 random 8k IO scenario (i.e., the read-write ratio is 7:3, and the size of each IO is 8k), in which the hit rate of the cache layer is not high, and the RAID layer will experience write amplification due to data redundancy and verification mechanisms, that is, the actual amount of data written to the disk is greater than the original write amount. For this load characteristic, the storage system is often designed with a core grouping strategy of HL:CA:RAID:VL = 1:3:4:2, that is, the host layer is allocated fewer cores, the cache layer is allocated more cores, the RAID layer is allocated the most cores, and the disk management layer is allocated fewer cores. This strategy can reasonably allocate CPU resources in typical scenarios, but in other scenarios, such as online analytical processing scenarios, the frequency of read operations and the hit rate of the cache layer are higher, and the demand for the RAID layer is relatively low. At this time, if the IO is processed according to the core grouping strategy of the 7:3 scenario, problems may occur. Specifically, allocating too many CPU cores to the cache layer can cause a performance bottleneck because too many resources are used to process high-hit-rate read operations, and the actual processing capacity is not fully utilized. At the same time, the CPU cores allocated to the RAID layer can be underutilized, causing resource waste and reducing processing efficiency.

[0032] Therefore, the data request processing method in the related art has the problem of low efficiency of data request processing.

[0033] To at least partially solve the above technical problems, an embodiment provides a data request processing method. In response to a current data request to be processed, a state parameter of a processing layer in at least two processing layers is queried, wherein the state parameter of the processing layer in the at least two processing layers is used to represent a working load condition of the corresponding processing layer. According to the state parameter of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, to obtain a current processing path. The current data request is processed according to the current processing path. Since the state parameter of the processing layer is used, the processing layer to which the host layer flows can be selected and the processing path can be obtained, that is, the fixed processing path can be jumped out, and the most suitable data request processing path can be dynamically selected according to the state parameter of the processing layer, so that efficient and reasonable resource utilization of data request processing is achieved. Therefore, the problem of low efficiency of data request processing in the related art can be solved, and the technical effects of improving the efficiency and reliability of data request processing are achieved.

[0034] Optionally, in response to a current data request to be processed, a state parameter of a processing layer in at least two processing layers can be queried. The current data request to be processed can be a read or write operation request, or other data processing request.

[0035] Optionally, the processing layers in the at least two processing layers can include, but are not limited to, a cache layer, a redundant array of independent disks layer, and a disk management layer.

[0036] Optionally, when a new data request arrives at the storage system, the state parameters of the processing layers in the at least two processing layers can be queried, which can be querying the periodically recorded state parameters of the processing layers in the at least two processing layers, or actively querying and analyzing the real-time working states of the multiple processing layers to evaluate their load conditions.

[0037] Optionally, the state parameters can be parameters for measuring the working load of the processing layers, which can include, but are not limited to, a percentage of CPU resources occupied by the processing layer, a length of a request queue waiting for processing by the processing layer, a cache hit rate, a data throughput, and the like.

[0038] Optionally, the processing layer to which the host layer flows can be selected from the at least two processing layers according to the state parameters of the processing layers in the at least two processing layers, to obtain a current processing path, the basic processing path being a path of the data request formed by the host layer and the at least two processing layers, the current processing path being a processing path determined according to the processing layer to which the host layer flows on the basis of the basic processing path, which can be the basic processing path or a simplified basic processing path.

[0039] Here, the basic processing path can be a basic path of a data request from the host layer in the storage system, processed through a series of processing layers, in a conventional storage architecture, the processing of a read or write request usually needs to pass through multiple processing layers such as a cache layer (CA), a RAID layer, and a disk management layer (VL), which can jointly constitute a basic processing path of the data request. For example, the data flow of a read request can follow a basic path of host layer (HL)→cache layer (CA)→RAID layer→disk management layer (VL) until the required data is found and returned.

[0040] For example, as shown in FIG. 1, a data request from a host layer (HL) can be processed through a cache layer (CA), a RAID layer, and a disk management layer (VL) to obtain the required data. Figure 3As shown, in the storage system, a hardware / driver layer, a management and communication layer, and a storage function layer can be included. In the hardware / driver layer, a device unique identification data and a sensor, a battery backup unit connected to an embedded host program through a system management bus can be included, and various drivers (such as a fiber channel driver, a serial driver, an Internet small computer system interface driver, a non-transparent bridging interconnection, and a network protocol driver) can be included to realize connection and interaction through an IO physical layer interface framework. The management and communication layer can include an inter-node communication module, a configuration management module, and a cluster management module. In addition, the configuration management module can be connected to other auxiliary modules (such as a storage management standard agent, a command line interface, and a graphical user interface). The storage function layer can be responsible for processing of IO requests and data interaction, and can receive a data request command through a SCSI (Small Computer System Interface) target (i.e., a front-end entrance of the storage system), that is, the upper layer data request is preliminarily analyzed and routed to a corresponding module through the HL layer, and can be used for upper layer input and output forwarding, remote replication, upper layer caching (responsible for the cache layer to accelerate hot data read and write), local replication, copy input and output forwarding, a redundant array of independent disks, a SCSI initiator (responsible for the VL layer to send a SCSI command to a disk). For the storage function layer, that is, the processing layer in the storage system architecture, the IO stack can be simplified as a front end (HL), a CA, a RAID, and a back end (VL).

[0041] Optionally, based on the analysis result of the state parameters, the current processing path can be a path dynamically determined according to the processing layer to which the host layer flows on the basis of the basic processing path. This path can be the basic processing path itself, or a simplified path that bypasses some processing layers to reduce processing delay and improve efficiency. For example, if the cache hit rate of the cache layer (CA) is very low and the resource occupancy rate is very high, the system can select to bypass the cache layer for the next read request, and directly flow the request from the host layer to the RAID layer or the disk management layer to form a simplified basic processing path. By dynamically adjusting the current processing path, the storage system can better adapt to changing business scenarios and load conditions.

[0042] Optionally, the processing layer to which the host layer flows can be selected from at least two processing layers by the host layer, and the current processing path is obtained. When a data request arrives at the host layer, the host layer can query the state parameters of the at least two processing layers, select the processing layer that is currently most suitable for processing the data request based on the state parameters, and form the current processing path.

[0043] Optionally, the processing layer to which the host layer forwards the data request can also be selected by the path decision module from the at least two processing layers, so as to obtain the current processing path, that is, a module can be separately arranged for making a decision on the data request processing path, and the module can be independent of the host layer. Once the data request reaches the host layer, the host layer can pass the request information to the path decision module, and the path decision module can evaluate the load conditions of different processing layers, and feed back the selected processing layer information and the corresponding current processing path to the host layer. Then, the host layer forwards the data request to the selected processing layer for processing according to the received path information.

[0044] Optionally, after the current processing path is determined, the current data request can be processed according to the current processing path, that is, the host layer forwards the data request to the selected processing layer according to the current processing path. For example, if the current path is from the host layer to the RAID layer and then to the disk management layer, the read request is directly sent from the host layer to the RAID layer for data verification and reorganization, and then sent to the disk management layer for data retrieval.

[0045] According to the embodiments provided in the present application, by means of a data request processing method, in response to a current data request to be processed, a state parameter of a processing layer in at least two processing layers is queried, wherein the state parameter of the processing layer in the at least two processing layers is used to represent a working load condition of the corresponding processing layer; and according to the state parameter of the processing layer in the at least two processing layers, a processing layer to which the host layer forwards the data request is selected from the at least two processing layers, to obtain a current processing path, and the current data request is processed according to the current processing path, so that the problem of low efficiency of data request processing in the related art can be solved, and the technical effects of improving the efficiency and reliability of data request processing are achieved.

[0046] In an example embodiment, the state parameter of the processing layer in the at least two processing layers is queried, including:

[0047] The resource occupancy rate of the processing layer in the at least two processing layers is queried, wherein the state parameter of the processing layer in the at least two processing layers includes the resource occupancy rate of the processing layer in the at least two processing layers, and the resource occupancy rate of the processing layer in the at least two processing layers is an average occupancy rate of the processing resource occupied by the corresponding processing layer.

[0048] In the present embodiment, the state parameter refers to a set of data reflecting the current working state and resource usage of a specific component (such as a processing layer) in the system. Optionally, the state parameter can include the resource occupancy rate, and the state parameter of the processing layer in the at least two processing layers can include the resource occupancy rate of the processing layer in the at least two processing layers.

[0049] Here, the resource occupancy of a processing layer can be used to indicate the occupancy of CPU resources occupied by the layer within a certain time range, and the state parameter of a processing layer in the at least two processing layers can include the resource occupancy of the processing layer in the at least two processing layers, and the resource occupancy of a processing layer in the at least two processing layers can be the average occupancy of the processing resources occupied by the corresponding processing layer.

[0050] Optionally, for a single processing layer, if it occupies the resources of one or more CPU cores, the average usage of these CPU cores within a period of time can be calculated to obtain the resource occupancy of the processing layer. For example, if the cache layer occupies three CPU cores and uses 50%, 60% and 70% of the computing power respectively, the resource occupancy of the cache layer can be the average of the three values, i.e. 60%.

[0051] Through the embodiment, by monitoring the resource occupancy of each processing layer to determine the state parameter of the processing layer, the accuracy of the processing layer state determination can be improved, and based on the state parameter of the query, the processing path of the data request can be dynamically adjusted to improve the efficiency of the data request processing.

[0052] In an example embodiment, the query of the resource occupancy of a processing layer in the at least two processing layers includes:

[0053] The resource occupancy of a processing layer in the at least two processing layers is obtained based on the module identifier of the processing layer in the at least two processing layers by looking up a specified relationship table, wherein the specified relationship table is used to record the corresponding relationship between the module identifier of the processing layer in the at least two processing layers and the resource occupancy of the processing layer in the at least two processing layers.

[0054] Here, the specified relationship table can be a data structure used to store and manage the corresponding relationship between the module identifier and the resource occupancy of the processing layer. In a storage system environment, the processing layer can include but is not limited to a cache layer, a RAID layer, a disk management layer, etc., and each processing layer is composed of multiple modules performing specific functions. The specified relationship table can be used to record the corresponding relationship between the module identifier of these processing layers and their respective resource occupancy.

[0055] For example, the specified relationship table can include CA_1, RAID_1 and VL_1 as the module identifiers of the cache layer, the RAID layer and the disk management layer, as shown in Table 1:

[0056] Table 1

[0057]

[0058] Optionally, the module identifier of the processing layer to be queried can be determined, the specified relationship table is accessed, the resource occupancy rate information of the corresponding entry is found by searching according to the module identifier, and the resource occupancy rate obtained from the specified relationship table is used for further decision-making, such as determining the processing path of the data request, optimizing resource allocation, etc.

[0059] Through the embodiment, the resource occupancy rate is determined by querying the specified relationship table, the state in the processing layer can be accurately determined, the basis for decision-making is provided, and the efficiency of data request processing is improved.

[0060] In an example embodiment, the above method further comprises:

[0061] According to the first time interval, the average occupancy rate of the processing resource occupied by the processing layer in the at least two processing layers is periodically calculated, and the calculated average occupancy rate is used to update the resource occupancy rate of the corresponding processing layer in the specified relationship table.

[0062] In the embodiment, the average occupancy rate of the processing resource occupied by the processing layer in the at least two processing layers can be periodically calculated, and the calculated average occupancy rate is used to update the resource occupancy rate of the corresponding processing layer in the specified relationship table.

[0063] Here, the first time interval refers to the time period for periodically checking and updating the resource occupancy rate of the processing layer. The first time interval can be pre-set or adjusted in real time according to the resource occupancy situation. For example, in a high-load scenario, the time interval can be shortened to update the resource occupancy rate more frequently; and in a low-load or stable resource environment, the time interval can be appropriately extended to reduce unnecessary calculation overhead.

[0064] Optionally, the resource usage data of a plurality of processing layers in the time period can be collected in each time interval, the average resource occupancy rate of the processing layer in the current time interval is calculated, and the resource occupancy rate field of the corresponding processing layer stored in the specified relationship table is updated after the average resource occupancy rate is calculated.

[0065] Through the embodiment, by periodically calculating and updating the resource occupancy rate in the specified relationship table, the resource usage of the processing layer can be monitored in real time, and the selection of the data request processing path is based on the latest system state, so that the resources can be allocated more accurately, and the overall resource usage efficiency is improved.

[0066] In an example embodiment, the above method further comprises:

[0067] According to a second time interval, periodically predict the resource occupancy of the processing layer in the at least two processing layers at a future time based on the historical resource occupancy of the processing layer in the at least two processing layers, obtain the predicted resource occupancy of the processing layer in the at least two processing layers, and store the predicted resource occupancy of the processing layer in the at least two processing layers, wherein the queried resource occupancy of the processing layer in the at least two processing layers is the latest stored predicted resource occupancy of the processing layer in the at least two processing layers.

[0068] In the embodiment, the resource occupancy at the future time can be predicted based on the historical resource occupancy, which can be a prediction according to a second time interval, which can be the same as or different from the first time interval, and can be a time interval preset in advance.

[0069] Optionally, the historical resource occupancy can be used to indicate the resource usage of the processing layer in a certain time period in the past. Through analysis of the historical data, the resource usage mode, trend and periodicity can be determined.

[0070] Optionally, the historical resource occupancy data can be extracted from the specified relationship table or other resource monitoring data sources.

[0071] Optionally, the host layer can periodically predict the resource occupancy of the processing layer in the at least two processing layers at a future time based on the historical resource occupancy of the processing layer in the at least two processing layers according to a second time interval, or other modules can perform the above prediction operation. The other modules can be the same as or different from the path decision module in the foregoing embodiments.

[0072] Optionally, the module for predicting the resource occupancy of the processing layer in the at least two processing layers at a future time can be a pre-configured data analysis tool or algorithm for identifying the mode and trend of the change in resource occupancy, such as an exponential smoothing, neural network or other prediction model. The most suitable prediction model can be selected according to the characteristics of the historical data. The prediction model can be a combination of multiple models to improve the prediction accuracy.

[0073] Optionally, based on the analysis result, a predicted value of the resource occupancy at the future time can be generated, which can be used to reflect the predicted resource usage of the processing layer.

[0074] Optionally, the generated predicted resource occupancy can be stored for subsequent query and decision-making, which can be stored in the specified relationship table in the foregoing embodiments, can be stored as a separate predicted resource occupancy field, or can be stored in other relationship tables.

[0075] Optionally, the resource occupancy of the processing layer in the at least two processing layers queried is the latest stored predicted resource occupancy of the processing layer in the at least two processing layers.

[0076] Optionally, the path of the data flowing in the host layer can be selected based on the resource occupancy of the corresponding processing layer in the specified relationship table, the path of the data flowing in the host layer can also be selected based on the stored predicted resource occupancy, and the path of the data flowing in the host layer can also be selected in combination with the resource occupancy and the predicted resource occupancy of the processing layer.

[0077] Through the embodiment, by predicting the resource occupancy and storing the predicted value, the future resource state can be predicted, the data request processing path can be optimized in advance, the load can be directed to the processing layer that is predicted to be idle, and the performance bottleneck can be avoided.

[0078] In one example embodiment, the processing layer flowed to by the host layer is selected from the at least two processing layers according to the state parameters of the processing layer in the at least two processing layers, and a current processing path is obtained, including:

[0079] The processing layer with the lowest resource occupancy in the at least two processing layers is selected as the processing layer flowed to by the host layer, and a current processing path is obtained.

[0080] In the embodiment, the processing layer with the lowest resource occupancy in the at least two processing layers is selected as the processing layer flowed to by the host layer, and a current processing path is obtained. When the processing path needs to be dynamically selected from multiple processing layers, the processing layer with the lowest resource occupancy means that the resources (such as CPU) of the layer are relatively idle, and can respond and process new data requests faster, thereby reducing the time delay of data processing and improving the overall processing efficiency.

[0081] Optionally, the host layer or the specified path decision module can monitor the resource occupancy of the at least two processing layers. When a data request is received, the resource occupancy of the processing layers can be queried and compared, and the processing layer with the lowest resource occupancy is selected as the next processing target of the data request, thereby forming a current processing path. For example, if the resource occupancy of the cache layer is 60%, the occupancy of the RAID layer is 40%, and the occupancy of the disk management layer is 20%, the disk management layer can be selected as the next processing target of the data request.

[0082] Through the embodiment, by selecting the processing layer with the lowest resource occupancy as the flowing target of the data request to obtain the processing path, the accuracy and effectiveness of the data request processing can be improved.

[0083] In one example embodiment, the processing layer flowed to by the host layer is selected from the at least two processing layers according to the state parameters of the processing layer in the at least two processing layers, and a current processing path is obtained, including:

[0084] According to the request type of the current data request and the state parameter of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, and a current processing path is obtained.

[0085] Optionally, the request type of the data request can include a read request and a write request, and different request types have different resource requirements for the storage system, for example, the write request can depend on the RAID layer.

[0086] Optionally, the host layer can identify the type of the received data request, which can determine whether it is a read request or a write request, and query the state parameters of the at least two processing layers to evaluate their current resource utilization.

[0087] Optionally, the state parameters of all processing layers can be queried, or the state parameters corresponding to the requirements can be queried according to the type of the data request, for example, for a read request, the resource occupancy rates of the CA layer, the RAID layer and the VL layer can be queried, and for a write request, only the resource occupancy rates of the CA layer and the RAID layer can be queried.

[0088] Optionally, a predefined path algorithm can be applied to determine the flow path of the data request, which can be based on simple rules (such as the lowest priority of resource occupancy rate) or more complex decision strategies, which are not limited in the embodiment.

[0089] Through the embodiment, by identifying the type of the data request and selecting the data request processing path in combination with the state of the processing layer, the selection of the data path can be adapted to the needs of the data request, and the accuracy of the data request processing can be improved.

[0090] In one example embodiment, according to the request type of the current data request and the state parameter of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, and a current processing path is obtained, including:

[0091] According to the request type of the current data request and the resource occupancy rate of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, and a current processing path is obtained, wherein the state parameter of the processing layer in the at least two processing layers includes the resource occupancy rate of the processing layer in the at least two processing layers, and the resource occupancy rate of the processing layer in the at least two processing layers is the average occupancy rate of the processing resource occupied by the corresponding processing layer.

[0092] Similar to the foregoing embodiments, the processing layer to which the data request is to be transferred from the host layer can be selected from the at least two processing layers according to the request type of the current data request and the state parameter of the processing layer in the at least two processing layers, to obtain the current processing path. The processing layer to which the data request is to be transferred from the host layer can be selected from the at least two processing layers according to the request type of the current data request and the resource occupancy rate of the processing layer in the at least two processing layers, to obtain the current processing path.

[0093] Optionally, the type of the data request (e.g., read request, write request) can be parsed to determine the requirement of the data request.

[0094] Optionally, the type of the data request can be further subdivided, for example, based on data block size, read-write ratio, data access mode, which is not limited in the embodiment.

[0095] Optionally, the data processing path can be selected based on the resource occupancy rate of the processing layer. The resource occupancy rate can reflect the resource usage of the layer in processing other data requests. The higher the resource occupancy rate of the layer, the closer the resource of the layer to saturation, and processing a new data request can cause the response time to be prolonged and the performance to be degraded. Conversely, the lower the resource occupancy rate of the layer, the more idle resources the layer has, and the layer can process the new data request more efficiently.

[0096] Optionally, the host layer can first identify the type of the currently received data request, for example, whether it is a read request or a write request, and query the resource occupancy rate of the at least two processing layers. The at least two processing layers can include the cache layer, the RAID layer, and the disk management layer.

[0097] Optionally, the query of the resource occupancy rate can be based on the average resource occupancy rate or the latest predicted resource occupancy rate recorded in the specified relationship table in the foregoing embodiments, to obtain the most accurate current resource usage state.

[0098] Optionally, the state parameter of all the processing layers can be queried, or the state parameter of the processing layer corresponding to the requirement of the data request can be queried according to the type of the data request.

[0099] Optionally, based on the request type and the queried resource occupancy rate, a preset path selection strategy can be applied to determine which processing layer the data request should be transferred to first. For example, for a read request, if the resource occupancy rate of the cache layer is low, the cache layer can be used as the first processing layer to improve the response speed of the read operation.

[0100] Through the embodiment, the dynamic path selection mechanism based on the data request type and the resource occupancy rate of the processing layer can optimize resource utilization, improve response speed, and improve the efficiency and accuracy of data request processing.

[0101] In one example embodiment, the processing layer to which the host layer flows is selected from the at least two processing layers according to the request type of the current data request and the resource occupancy of the processing layer in the at least two processing layers, to obtain the current processing path, including:

[0102] In the case where the request type of the current data request is a read request, the processing layer with the lowest resource occupancy in the at least two processing layers is selected as the processing layer to which the host layer flows, to obtain the current processing path.

[0103] In this embodiment, for a read request (i.e. in the case where the request type of the current data request is a read request), the read path can be optimized according to the comparison of the resource occupancies of the cache layer, the RAID layer and the disk management layer.

[0104] Here, for a read request, the main goal is to retrieve data from the storage system without data writing or modification, and the read request can involve operations such as cache access, RAID data recovery or direct disk reading.

[0105] Optionally, when the host layer identifies a read request, it can query the resource occupancies of the at least two processing layers, and select the processing layer with the lowest resource occupancy as the starting point of the request processing, i.e. the processing layer to which the host layer flows.

[0106] For example, if the resource occupancy of the cache layer is low, directly reading data from the cache can significantly reduce the number of accesses to the physical disk, thereby speeding up the reading; if the resource occupancy of the RAID layer is the lowest, data can be directly read from the RAID layer to avoid the additional processing overhead of the cache layer; if the resource occupancy of the disk management layer is the lowest, it indicates that the access pressure of the physical disk is small, and data can be directly read from the disk.

[0107] Through this embodiment, by selecting the processing layer with the lowest resource occupancy as the processing layer to which the host layer flows in the read request processing path, the system response speed can be improved, the data processing delay can be reduced, and the data processing efficiency can be improved.

[0108] In one example embodiment, the at least two processing layers include: a cache layer, an independent disk redundant array layer and a disk management layer;

[0109] In the case where the request type of the current data request is a read request, the processing layer with the lowest resource occupancy in the at least two processing layers is selected as the processing layer to which the host layer flows, to obtain the current processing path, including:

[0110] In the case where the request type of the current data request is a read request, when the cache layer is the processing layer with the lowest resource occupancy among the at least two processing layers, the cache layer is selected as the processing layer to which the host layer flows, and a current processing path is obtained, wherein the current processing path is a path from the host layer to the disk management layer via the cache layer and the redundant array of independent disks layer in sequence.

[0111] In the case where the request type of the current data request is a read request, when the cache layer is the processing layer with the lowest resource occupancy among the at least two processing layers, the cache layer is selected as the processing layer to which the host layer flows, and a current processing path is obtained, wherein the current processing path is a path from the host layer to the disk management layer via the cache layer and the redundant array of independent disks layer in sequence.

[0112] In the case where the request type of the current data request is a read request, when the cache layer is the processing layer with the lowest resource occupancy among the at least two processing layers, the cache layer is selected as the processing layer to which the host layer flows, and a current processing path is obtained, wherein the current processing path is a path from the host layer to the disk management layer via the cache layer and the redundant array of independent disks layer in sequence.

[0113] In the present embodiment, the at least two processing layers can include a cache layer, a redundant array of independent disks layer, and a disk management layer. Here, the cache layer is located between the host layer and the lower-level processing layer, and can reduce the number of direct disk accesses by storing commonly used or recently accessed data, thereby speeding up data processing. The redundant array of independent disks layer (i.e., the RAID layer) is responsible for distributing data on a plurality of physical disks while providing data redundancy and protection to improve data reliability and read-write performance. The disk management layer directly interacts with the physical disks, manages disk space allocation, data read-write, and interaction with the underlying hardware, and is responsible for mapping the data blocks abstracted by the upper layer to the specific locations of the underlying disks.

[0114] Similar to the foregoing embodiments, by default, data requests (whether read or write) generally follow a basic processing path: the data request first starts from the host layer (HL), then passes through the cache layer (CA) and the redundant array of independent disks layer (RAID) in sequence, and finally reaches the disk management layer (VL). This path ensures the sequential processing of data requests.

[0115] In the present embodiment, when the data request type is identified as a read request, the processing path of the read request can be dynamically adjusted according to the resource occupancy of each processing layer to optimize read efficiency and system performance.

[0116] Optionally, in the case that the request type of the current data request is a read request, the cache layer can be selected as the processing layer to which the host layer flows when the cache layer is the processing layer with the lowest resource occupancy among the at least two processing layers, to obtain a current processing path, wherein the current processing path is a path from the host layer to the disk management layer via the cache layer and the redundant array of independent disks layer in sequence, which can be equivalent to the basic processing path, i.e., the flow path of HL, CA, RAID, and VL.

[0117] Optionally, when the redundant array of independent disks layer is the processing layer with the lowest resource occupancy among the at least two processing layers, the redundant array of independent disks layer can be selected as the processing layer to which the host layer flows, to obtain a current processing path, wherein the current processing path is a path from the host layer to the disk management layer via the redundant array of independent disks layer, in this case, the IO request jumps directly from the HL to the RAID layer, and then the data is directly transmitted to the VL after being processed by the RAID layer, thereby bypassing the hit check and data processing steps that can exist in the cache layer, and the data can be directly provided by the RAID layer in this case.

[0118] Optionally, when the disk management layer is the processing layer with the lowest resource occupancy among the at least two processing layers, the disk management layer is selected as the processing layer to which the host layer flows, to obtain a current processing path, wherein the current processing path is a path from the host layer to the disk management layer, which can be a further simplification of the basic processing path, and the data is directly obtained from the VL, thereby skipping the RAID layer and the cache layer.

[0119] Through the dynamic path selection mechanism based on the read request type and the resource occupancy of the processing layers, the embodiment can realize efficient and intelligent read request processing, and improve the response speed and resource use efficiency of the system in a read-intensive scenario.

[0120] In one example embodiment, the at least two processing layers include a cache layer, a redundant array of independent disks layer, and a disk management layer.

[0121] According to the request type of the current data request and the resource occupancy of the processing layers in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, to obtain a current processing path, including:

[0122] In the case that the request type of the current data request is a write request, the processing layer with the lowest resource occupancy among the cache layer and the redundant array of independent disks layer is selected as the processing layer to which the host layer flows, to obtain a current processing path.

[0123] Similar to the foregoing embodiments, the processing layers can include a cache layer, a redundant array of independent disks layer, and a disk management layer.

[0124] For the basic processing path of the write request, it can also follow the order from the host layer (HL) to the cache layer, the redundant array of independent disks layer, and finally to the disk management layer, which ensures that the data is processed by the cache performance acceleration and the RAID data protection before being written to the disk.

[0125] In the embodiment, for the write request, the processing layer with the lowest resource occupancy rate can be selected as the processing layer flowed from the host layer according to the real-time resource occupancy rate of the cache layer and the redundant array of independent disks layer.

[0126] Here, for the write request, the RAID layer is needed for the redundancy protection function. The RAID technology can provide data protection by distributing and redundantly storing data on multiple physical disks to prevent data loss due to a single disk failure. In the write operation, the data can be divided into multiple smaller blocks (stripes), and then the stripes are distributed and stored on multiple disks in the RAID array. At the same time, the RAID layer can be based on different RAID levels. Therefore, in the write scenario, the data is not directly processed by the RAID layer from the host layer (HL) to the disk management layer (VL) to avoid directly skipping the RAID layer, which will result in a lack of data redundancy protection. Once a disk fails, the data cannot be recovered, thereby affecting the data security and stability of the storage system.

[0127] Optionally, regardless of the resource occupancy rate of the cache layer or the disk management layer, the write request can first pass through the RAID layer to achieve the striping storage and redundancy calculation of the data.

[0128] Optionally, in the case where the request type of the current data request is a write request, the processing layer with the lowest resource occupancy rate in the cache layer and the redundant array of independent disks layer can be selected as the processing layer flowed from the host layer to obtain the current processing path, that is, the current processing path when the lowest is the cache layer or the lowest is the redundant array of independent disks layer can be selected.

[0129] For example, as shown in FIG. 4, the current processing path of the write request can be selected as the cache layer or the redundant array of independent disks layer. Figure 4As shown, after starting, the host layer can perform interactive processing, receive a data processing request, and determine whether it is a read request, i.e., determine the type of data request. If it is a read request, the busy degree of the cache layer, the redundant array of independent disks layer, and the disk management layer can be queried. If the cache layer is the least busy (i.e., has the lowest resource occupancy rate), the data request can be transferred to the cache layer for cache processing, followed by redundant array of independent disks layer processing and disk management layer processing. If the redundant array of independent disks layer is the least busy, the data request can be directly transferred to the redundant array of independent disks layer for processing, followed by disk management layer processing. If the disk management layer is the least busy, the data request can be directly transferred to the disk management layer for processing. If the data request is not a read request but a write request, the busy degrees of the cache layer and the redundant array of independent disks layer can be queried. If the cache layer is the least busy, the data request can be transferred to the cache layer for cache processing, followed by redundant array of independent disks layer processing and disk management layer processing. If the redundant array of independent disks layer is the least busy, the data request can be transferred to the redundant array of independent disks layer for processing, followed by disk management layer processing.

[0130] Through the embodiment, by dynamically analyzing the write request type and the resource occupancy rate of the processing layer, the processing layer with the lowest resource occupancy rate is selected from the cache layer and the redundant array of independent disks layer as the processing layer to which the host layer is transferred, so that the efficiency of data request processing can be improved, and the safety and consistency of data can be improved.

[0131] In one example embodiment, the at least two processing layers include: a cache layer, a redundant array of independent disks layer, and a disk management layer.

[0132] According to the current processing path, the current data request is processed, including:

[0133] In the case where the processing layer to which the host layer is transferred is the redundant array of independent disks layer, the host layer directly forwards the current data request to the redundant array of independent disks layer, wherein the current data request carries a logical block addressing address.

[0134] Optionally, the at least two processing layers can include: a cache layer, a redundant array of independent disks layer, and a disk management layer.

[0135] Optionally, the processing layer to which the host layer is transferred can be a cache layer, a redundant array of independent disks layer, or a disk management layer.

[0136] Optionally, the current processing path can include a processing path in which the host layer is transferred to the cache layer, a processing path in which the host layer is transferred to the redundant array of independent disks layer, and a processing path in which the host layer is transferred to the disk management layer.

[0137] Optionally, in the case that the processing layer to which the host layer flows is a redundant array of independent disks layer, the current data request can be directly forwarded to the redundant array of independent disks layer through the host layer, wherein the logical block addressing address is carried in the current data request.

[0138] Here, the logical block addressing (LBA for short) is an address scheme for locating data on a disk, which can be used to identify the location of a data block on a storage medium. In the case of directly accessing the RAID or disk management layer by skipping the cache layer, the LBA address can be used to provide positioning.

[0139] Optionally, if the resource occupancy rate of the cache layer is high and the resource occupancy rate of the RAID layer is the lowest, the new data request can be directly sent to the RAID layer instead of the cache layer, which can avoid the cache layer from becoming a bottleneck, reduce the workload of the cache layer, and improve the overall processing efficiency.

[0140] Optionally, the host layer can receive a data request issued from an external device or an application program, which can include LBA address information for indicating a specific data location to be accessed. Then, the host layer can evaluate the resource occupancy rates of the processing layers, determine the processing path based on the evaluation results, and in the case that the processing layer to which the host layer flows is a redundant array of independent disks layer, the data request can be decoded according to the LBA address to determine which physical disks contain the required striping, and the RAID layer can perform data operations, such as retrieving data from the specified disks in a read request, or performing data striping and redundancy check calculation in a write request, and then writing data to the physical disks.

[0141] Optionally, the RAID layer directly transmits data to the final destination layer, which can be a disk management layer (VL) or a cache layer (CA), depending on the specific type of request. For example, in the case of a read request, the data can be directly returned to the host layer; in the case of a write request, the data can be sent to the disk management layer for storage after being processed by the RAID layer.

[0142] Through this embodiment, by forwarding the data request (including the logical block addressing address) to the RAID layer for processing when the RAID layer is selected as the flow target, the processing efficiency of the storage system can be significantly improved.

[0143] In one example embodiment, a processing layer to which a host layer flows is selected from at least two processing layers according to a state parameter of the processing layer, to obtain a current processing path, including:

[0144] In a case where the hit rate of the cached data in the cache layer is less than or equal to a specified hit rate threshold, the RAID layer is selected as the processing layer to which the host layer flows, and a current processing path is obtained, wherein the state parameter of the cache layer includes the hit rate of the cached data in the cache layer, and the current processing path is a path from the host layer to the disk management layer via the RAID layer.

[0145] Here, the cache hit rate refers to a ratio of successfully locating and processing data requests using cached data in the cache layer, and a high cache hit rate means that the cache layer effectively stores data, and in a case where the cache hit rate is low, a large amount of data requests need to be obtained from the disk, and the processing efficiency of the cache layer is not high.

[0146] Optionally, the state parameter of the cache layer can include the hit rate of the cached data in the cache layer, and a cache hit rate threshold can be preset as a basis for measuring the efficiency of the cache layer and deciding the path selection. When the real-time hit rate of the cache layer is lower than or equal to the threshold, it can be considered that the efficiency of the cache layer is low and the data load is high.

[0147] Optionally, in a case where the hit rate of the cached data in the cache layer is less than or equal to a specified hit rate threshold, the RAID layer can be selected as the processing layer to which the host layer flows, and a current processing path is obtained, that is, the data request can bypass the cache layer and be forwarded by the host layer to the RAID layer, and then flow to the disk management layer from the RAID layer to complete data processing.

[0148] Through the storage request path optimization strategy based on the cache hit rate, the data request is directed to the RAID layer for processing when the cache hit rate of the cache layer is low, which can improve the performance and efficiency of the storage system on the premise of ensuring data security and integrity.

[0149] In one example embodiment, the at least two processing layers include a cache layer, a redundant array of independent disks (RAID) layer, and a disk management layer.

[0150] According to the current processing path, the current data request is processed, including:

[0151] In a case where the request type of the current data request is a read request and the processing layer to which the host layer flows is the disk management layer, the logical block addressing address of the current data request is converted into a physical disk address by the host layer to obtain a to-be-accessed disk address;

[0152] The data access request of the disk management layer is constructed using the to-be-accessed disk address by the host layer, and the data access request is sent to the disk management layer, wherein the data access request carries the to-be-accessed disk address.

[0153] In response to the received data access request, the disk management layer extracts the to-be-accessed disk address from the data access request, accesses the physical disk corresponding to the to-be-accessed disk address, reads the data requested by the current data request, obtains a data reading result, and sends the data reading result to the host layer.

[0154] Optionally, the processing layer to which the host layer is transferred can be the disk management layer, and correspondingly, the current processing path can be a processing path transferred from the host layer to the disk management layer, and the read request can skip the cache layer and the RAID layer and be directly sent by the host layer to the disk management layer for data reading.

[0155] Optionally, in the case where the request type of the current data request is a read request and the processing layer to which the host layer is transferred is the disk management layer, the host layer can convert the logical block addressing address of the current data request into a physical disk address to obtain the to-be-accessed disk address. Here, the logical block addressing address is a standard address format used to locate data in the storage system and can be used to specify the location of data in the logical storage space, and the physical disk address refers to the exact location of data on the actual physical disk and is used for direct access to data by the drive.

[0156] Optionally, the host layer can determine the specific location of data on a physical disk, i.e., the to-be-accessed disk address, based on the LBA address.

[0157] Optionally, once the host layer completes the conversion of the LBA to the physical disk address, the host layer can use the to-be-accessed disk address to construct a data access request of the disk management layer and send the data access request to the disk management layer. The data access request can include the converted to-be-accessed disk address and be used to guide the disk management layer to directly access the specified physical disk to obtain the requested data.

[0158] Optionally, the host layer can encapsulate the to-be-accessed disk address in the data access request, and the data access request can also include related parameters (such as a reading range, a request ID, etc.) of the read request to form a complete data access instruction.

[0159] Optionally, after the construction is completed, the host layer can send the data access request to the disk management layer, and correspondingly, the disk management layer, after receiving the data access request sent by the host layer, can extract the to-be-accessed disk address from the data access request in response to the received data access request, access the physical disk corresponding to the to-be-accessed disk address, and read the requested data.

[0160] Optionally, according to the parsed information, the disk management layer can perform a reading operation on the specified physical disk, and the read data can be sent by the disk management layer to the host layer as a data reading result to complete the processing procedure of the entire read request.

[0161] Through the processing strategy of directly jumping to the disk management layer by the read request, through the conversion of LBA to physical disk address and the direct access to the disk management layer, the efficiency of data reading can be improved and the overall delay of the system can be reduced.

[0162] In one example embodiment, the logical block addressing address of the current data request is converted into a physical disk address by the host layer to obtain a to-be-accessed disk address, including:

[0163] The logical block addressing address of the current data request is looked up in the logical block addressing mapping table by the host layer to obtain the to-be-accessed disk address, wherein the logical block addressing mapping table is used to record the mapping relationship between the logical block addressing address and the physical disk address.

[0164] In a storage system, data is organized and accessed in the form of logical blocks, while data is stored on a physical disk according to actual physical addresses. Therefore, when processing a read request, the logical block addressing address (LBA) can be converted into a physical disk address to locate the actual storage location of the data, and this conversion process can occur in the host layer and be completed by querying a logical block addressing mapping table.

[0165] Here, the logical block addressing mapping table is a data structure used to record the correspondence between the LBA and the physical disk address, and in related storage architectures, this part of data mapping information is usually privately managed by the RAID layer, while in this embodiment, this mapping relationship can be disclosed to the host layer, so that the host layer can directly use this information to construct a data access request without the need to pass through the processing of the cache layer or the RAID layer.

[0166] Optionally, during storage system initialization or data writing, the RAID layer can map each LBA address to a specific physical disk address according to data striping rules and redundancy distribution strategies, and this mapping information can be recorded in a global LBA mapping table to reflect the logical-to-physical distribution of data within the storage system.

[0167] Optionally, the global LBA mapping table can be disclosed to the host layer and other modules for access, and the host layer can immediately obtain the physical disk address where the data is located by directly querying this mapping table, thereby constructing a data access request that directly points to the disk management layer, skipping the processing of the cache layer and the RAID layer.

[0168] For example, the global LBA mapping table can be as shown in Table 2:

[0169] Table 2

[0170]

[0171] Through the global LBA mapping table described above, the RAID layer can be skipped, and the data can be directly read from the VL.

[0172] Through the present embodiment, the global LBA mapping table is directly accessed through the host layer, and a data access request is constructed, so that the read process no longer depends on the cache layer, and the read efficiency is improved.

[0173] In one example embodiment, the above method further comprises:

[0174] In the case where the update trigger condition is met, the mapping relationship between the logical block addressing address and the physical disk address is re-determined by the RAID layer, and the logical block addressing mapping table is updated according to the re-determined mapping relationship.

[0175] In the present embodiment, the generation and update of the logical block addressing mapping table can be responsible by the RAID layer.

[0176] Optionally, the update of the mapping relationship can be triggered when one of the following conditions occurs, including but not limited to: new data is written into the storage system, data migration, disk fault recovery, configuration change, and the like. Correspondingly, in the case where the mapping relationship is updated, the update trigger condition can be met.

[0177] Optionally, when the update trigger condition is met, the mapping relationship between the logical block addressing address and the physical disk address can be re-determined by the RAID layer, and the logical block addressing mapping table is updated according to the re-determined mapping relationship.

[0178] Optionally, the RAID layer can re-calculate the physical disk positions corresponding to all LBA addresses according to the current disk configuration and data distribution strategy, to re-determine the mapping relationship between the LBA and the physical disk address, and update the logical block addressing mapping table.

[0179] Optionally, the updated logical block addressing mapping table can be synchronized with the host layer (HL) and other related layers, to ensure that all layers use the latest mapping information.

[0180] Optionally, after completing the update of the mapping relationship, the RAID layer can notify the host layer or other related modules, so that they use the latest mapping relationship in subsequent data access operations.

[0181] Through the present embodiment, by updating the mapping relationship through the RAID layer, the consistency of the data and the integrity of the redundancy protection mechanism can be ensured.

[0182] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software on a general hardware platform as necessary, and of course can also be realized by hardware, but in many cases the former is a better embodiment.

[0183] Embodiments of the present application also provide a data request processing apparatus, Figure 5 is a structural block diagram of a data request processing apparatus according to an embodiment of the present application, as Figure 5 shown, the apparatus comprises:

[0184] The query unit 502 is configured to query the state parameters of the processing layers in the at least two processing layers in response to a current data request to be processed, wherein the state parameters of the processing layers in the at least two processing layers are used to represent the working load conditions of the corresponding processing layers.

[0185] The selection unit 504 is configured to select the processing layer to which the host layer flows from the at least two processing layers according to the state parameters of the processing layers in the at least two processing layers, to obtain a current processing path.

[0186] The processing unit 506 is configured to process the current data request according to the current processing path.

[0187] It should be noted that the query unit 502 in this embodiment can be configured to execute the above step S202, the selection unit 504 in this embodiment can be configured to execute the above step S204, and the processing unit 506 in this embodiment can be configured to execute the above step S206.

[0188] Through the above apparatus, in response to a current data request to be processed, the state parameters of the processing layers in the at least two processing layers are queried, wherein the state parameters of the processing layers in the at least two processing layers are used to represent the working load conditions of the corresponding processing layers; the processing layer to which the host layer flows is selected from the at least two processing layers according to the state parameters of the processing layers in the at least two processing layers, to obtain a current processing path, and the current data request is processed according to the current processing path. Since the processing layer is selected based on the state parameters of the processing layer, the processing path can be selected, that is, the fixed processing path can be jumped out, and the most suitable data request processing path can be dynamically selected according to the state parameters of the processing layer, so as to realize efficient and reasonable utilization of resources for data request processing. Therefore, the problem of low efficiency of data request processing in the related art can be solved, and the technical effects of improving the efficiency and reliability of data request processing are achieved.

[0189] In an example embodiment, the querying unit comprises: a querying module configured to query the resource occupancy rate of the processing layer in the at least two processing layers, wherein the state parameter of the processing layer in the at least two processing layers comprises the resource occupancy rate of the processing layer in the at least two processing layers, and the resource occupancy rate of the processing layer in the at least two processing layers is an average occupancy rate of the processing resource occupied by the corresponding processing layer.

[0190] In an example embodiment, the first querying module comprises: a searching submodule configured to search the specified relationship table based on the module identifier of the processing layer in the at least two processing layers to obtain the resource occupancy rate of the processing layer in the at least two processing layers, wherein the specified relationship table is configured to record the corresponding relationship between the module identifier of the processing layer in the at least two processing layers and the resource occupancy rate of the processing layer in the at least two processing layers.

[0191] In an example embodiment, the apparatus further comprises: a first execution unit configured to periodically calculate the average occupancy rate of the processing resource occupied by the processing layer in the at least two processing layers according to the first time interval, and update the resource occupancy rate of the corresponding processing layer in the specified relationship table using the calculated average occupancy rate.

[0192] In an example embodiment, the apparatus further comprises: a second execution unit configured to periodically predict the resource occupancy rate of the processing layer in the at least two processing layers at a future time based on the historical resource occupancy rate of the processing layer in the at least two processing layers according to the second time interval to obtain the predicted resource occupancy rate of the processing layer in the at least two processing layers, and store the predicted resource occupancy rate of the processing layer in the at least two processing layers, wherein the queried resource occupancy rate of the processing layer in the at least two processing layers is the latest stored predicted resource occupancy rate of the processing layer in the at least two processing layers.

[0193] In an example embodiment, the selecting unit comprises: a first selecting module configured to select the processing layer with the lowest resource occupancy rate in the at least two processing layers as the processing layer to which the host layer flows, to obtain the current processing path.

[0194] In an example embodiment, the selecting unit comprises: a second selecting module configured to select the processing layer to which the host layer flows from the at least two processing layers according to the request type of the current data request and the state parameter of the processing layer in the at least two processing layers, to obtain the current processing path.

[0195] In an example embodiment, the second selecting module comprises: a selecting sub-module, configured to select, according to a request type of the current data request and resource occupancy of a processing layer in the at least two processing layers, a processing layer to which the host layer flows from the at least two processing layers, to obtain the current processing path, wherein the state parameter of the processing layer in the at least two processing layers comprises the resource occupancy of the processing layer in the at least two processing layers, and the resource occupancy of the processing layer in the at least two processing layers is an average occupancy of a processing resource occupied by the corresponding processing layer.

[0196] In an example embodiment, the selecting sub-module comprises: a first selecting sub-unit, configured to, in a case where the request type of the current data request is a read request, select, as the processing layer to which the host layer flows, a processing layer with the lowest resource occupancy in the at least two processing layers, to obtain the current processing path.

[0197] In an example embodiment, the at least two processing layers comprise: a cache layer, a redundant array of independent disks layer and a disk management layer; and the first selecting sub-unit is further configured to: in a case where the request type of the current data request is a read request, when the cache layer is the processing layer with the lowest resource occupancy in the at least two processing layers, select the cache layer as the processing layer to which the host layer flows, to obtain the current processing path, wherein the current processing path is a path in which the host layer flows to the disk management layer via the cache layer and the redundant array of independent disks layer in sequence; when the redundant array of independent disks layer is the processing layer with the lowest resource occupancy in the at least two processing layers, select the redundant array of independent disks layer as the processing layer to which the host layer flows, to obtain the current processing path, wherein the current processing path is a path in which the host layer flows to the disk management layer via the redundant array of independent disks layer; and when the disk management layer is the processing layer with the lowest resource occupancy in the at least two processing layers, select the disk management layer as the processing layer to which the host layer flows, to obtain the current processing path, wherein the current processing path is a path in which the host layer flows to the disk management layer.

[0198] In an example embodiment, the at least two processing layers comprise: a cache layer, a redundant array of independent disks layer and a disk management layer; and the selecting sub-module comprises: a second selecting sub-unit, configured to, in a case where the request type of the current data request is a write request, select, as the processing layer to which the host layer flows, a processing layer with the lowest resource occupancy in the cache layer and the redundant array of independent disks layer, to obtain the current processing path.

[0199] In an example embodiment, the at least two processing layers comprise: a cache layer, a redundant array of independent disks layer and a disk management layer; and the processing unit comprises: a forwarding module, configured to, in a case where the processing layer to which the host layer flows is the redundant array of independent disks layer, directly forward the current data request to the redundant array of independent disks layer through the host layer, wherein the current data request carries a logical block addressing address.

[0200] In an example embodiment, the selecting unit comprises: a third selecting module configured to select the Redundant Array of Independent Disks layer as the processing layer to which the host layer flows, to obtain a current processing path, in a case where a hit rate of the cache data in the cache layer is less than or equal to a specified hit rate threshold, wherein the state parameter of the cache layer comprises the hit rate of the cache data in the cache layer, and the current processing path is a path from the host layer to the disk management layer via the Redundant Array of Independent Disks layer.

[0201] In an example embodiment, the at least two processing layers comprise: a cache layer, a Redundant Array of Independent Disks layer, and a disk management layer; and the processing unit comprises: a conversion module configured to convert, by the host layer, a logical block addressing address of the current data request to a physical disk address to obtain an accessed disk address, in a case where the request type of the current data request is a read request and the processing layer to which the host layer flows is the disk management layer; a sending module configured to construct, by the host layer, a data access request of the disk management layer using the accessed disk address, and send the data access request to the disk management layer, wherein the accessed disk address is carried in the data access request; and an execution module configured to extract, by the disk management layer, the accessed disk address from the data access request in response to the received data access request, access a physical disk corresponding to the accessed disk address, read data requested to be accessed by the current data request, obtain a data read result, and send the data read result to the host layer.

[0202] In an example embodiment, the conversion module comprises: a lookup submodule configured to look up, by the host layer, a logical block addressing mapping table using the logical block addressing address of the current data request to obtain the accessed disk address, wherein the logical block addressing mapping table is used to record a mapping relationship between the logical block addressing address and the physical disk address.

[0203] In an example embodiment, the apparatus further comprises: a third execution unit configured to re-determine, by the Redundant Array of Independent Disks layer, the mapping relationship between the logical block addressing address and the physical disk address in a case where the update triggering condition is met, and update the logical block addressing mapping table according to the re-determined mapping relationship.

[0204] The features of the embodiments of the data request processing apparatus can be referred to the related descriptions of the embodiments of the data request processing method, which will not be repeated here.

[0205] Embodiments of the present application also provide an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the embodiments of the data request processing method.

[0206] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is configured to execute the steps in any of the data request processing method embodiments when running.

[0207] In an example embodiment, the computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0208] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the data request processing method embodiments.

[0209] The embodiment of the present application further provides another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the data request processing method embodiments.

[0210] The skilled person can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0211] The above provides a data request processing method, device and electronic equipment. The principles and implementation modes of the present application are described by applying specific examples. The above description of the examples is only applicable to help understand the method and core idea of the present application. It should be noted that, for those skilled in the art, without departing from the principles of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method of processing a data request, characterized by, The method is applied to an input-output stack including a host layer and at least two processing layers, and comprises the following steps: In response to a current data request to be processed, querying a state parameter of a processing layer in the at least two processing layers, wherein the state parameter of the processing layer in the at least two processing layers is used to represent a workload condition of the corresponding processing layer; According to the state parameter of the processing layer in the at least two processing layers, selecting the processing layer to which the host layer flows from the at least two processing layers to obtain a current processing path; Processing the current data request according to the current processing path; The querying of the state parameter of the processing layer in the at least two processing layers comprises querying a resource occupation rate of the processing layer in the at least two processing layers, wherein the state parameter of the processing layer in the at least two processing layers comprises the resource occupation rate of the processing layer in the at least two processing layers, and the resource occupation rate of the processing layer in the at least two processing layers is an average occupation rate of a processing resource occupied by the corresponding processing layer.

2. The method of claim 1, wherein, The querying of the resource occupation rate of the processing layer in the at least two processing layers comprises: Based on a module identifier of the processing layer in the at least two processing layers, searching a specified relationship table to obtain the resource occupation rate of the processing layer in the at least two processing layers, wherein the specified relationship table is used to record a corresponding relationship between the module identifier of the processing layer in the at least two processing layers and the resource occupation rate of the processing layer in the at least two processing layers.

3. The method of claim 2, wherein, The method further comprises: According to a first time interval, periodically calculating the average occupation rate of the processing resource occupied by the processing layer in the at least two processing layers, and using the calculated average occupation rate to update the resource occupation rate of the corresponding processing layer in the specified relationship table.

4. The method of claim 1, wherein, The method further comprises: According to a second time interval, periodically predicting the resource occupation rate of the processing layer in the at least two processing layers at a future time based on a historical resource occupation rate of the processing layer in the at least two processing layers to obtain a predicted resource occupation rate of the processing layer in the at least two processing layers, and storing the predicted resource occupation rate of the processing layer in the at least two processing layers, wherein the queried resource occupation rate of the processing layer in the at least two processing layers is the latest stored predicted resource occupation rate of the processing layer in the at least two processing layers.

5. The method of claim 1, wherein, The selecting of the processing layer to which the host layer flows from the at least two processing layers to obtain the current processing path according to the state parameter of the processing layer in the at least two processing layers comprises: Selecting the processing layer with the lowest resource occupation rate in the at least two processing layers as the processing layer to which the host layer flows to obtain the current processing path.

6. The method of claim 1, wherein, The selecting of the processing layer to which the host layer flows from the at least two processing layers to obtain the current processing path according to the state parameter of the processing layer in the at least two processing layers comprises: According to the request type of the current data request and the state parameter of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, and the current processing path is obtained.

7. The method of claim 6, wherein, The method according to the request type of the current data request and the state parameter of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, and the current processing path is obtained. According to the request type of the current data request and the resource occupation rate of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, and the current processing path is obtained, wherein the state parameter of the processing layer in the at least two processing layers includes the resource occupation rate of the processing layer in the at least two processing layers, and the resource occupation rate of the processing layer in the at least two processing layers is the average occupation rate of the processing resource occupied by the corresponding processing layer.

8. The method of claim 7, wherein, The method according to the request type of the current data request and the resource occupation rate of the processing layer in the at least two processing layers, a processing layer to which the host layer flows is selected from the at least two processing layers, and the current processing path is obtained. In the case where the request type of the current data request is a read request, a processing layer with the lowest resource occupation rate in the at least two processing layers is selected as the processing layer to which the host layer flows, and the current processing path is obtained.

9. The method of claim 8, wherein, The at least two processing layers include a cache layer, a redundant array of independent disks (RAID) layer, and a disk management layer. In the case where the request type of the current data request is a read request, a processing layer with the lowest resource occupation rate in the at least two processing layers is selected as the processing layer to which the host layer flows, and the current processing path is obtained. In the case where the request type of the current data request is a read request, when the cache layer is the processing layer with the lowest resource occupation rate in the at least two processing layers, the cache layer is selected as the processing layer to which the host layer flows, and the current processing path is obtained, wherein the current processing path is a path in which the host layer flows to the disk management layer via the cache layer and the RAID layer in sequence. When the RAID layer is the processing layer with the lowest resource occupation rate in the at least two processing layers, the RAID layer is selected as the processing layer to which the host layer flows, and the current processing path is obtained, wherein the current processing path is a path in which the host layer flows to the disk management layer via the RAID layer. When the disk management layer is the processing layer with the lowest resource occupation rate in the at least two processing layers, the disk management layer is selected as the processing layer to which the host layer flows, and the current processing path is obtained, wherein the current processing path is a path in which the host layer flows to the disk management layer.

10. The method of claim 7, wherein, The at least two processing layers include a cache layer, a redundant array of independent disks (RAID) layer, and a disk management layer. The selecting the processing layer to which the host layer flows from the at least two processing layers according to the request type of the current data request and the resource occupancy of the processing layer in the at least two processing layers, to obtain the current processing path, comprises: In a case where the request type of the current data request is a write request, the processing layer with the lowest resource occupancy in the cache layer and the redundant array of independent disks layer is selected as the processing layer to which the host layer flows, to obtain the current processing path.

11. The method of claim 1, wherein, The at least two processing layers comprise a cache layer, a redundant array of independent disks layer and a disk management layer; The processing of the current data request according to the current processing path comprises: In a case where the processing layer to which the host layer flows is the redundant array of independent disks layer, the current data request is directly forwarded to the redundant array of independent disks layer through the host layer, wherein the current data request carries a logical block addressing address.

12. The method of claim 11, wherein, The selecting the processing layer to which the host layer flows from the at least two processing layers according to the state parameter of the processing layer in the at least two processing layers, to obtain the current processing path, comprises: In a case where the hit rate of the cache data in the cache layer is less than or equal to a specified hit rate threshold, the redundant array of independent disks layer is selected as the processing layer to which the host layer flows, to obtain the current processing path, wherein the state parameter of the cache layer comprises the hit rate of the cache data in the cache layer, and the current processing path is a path through which the host layer flows to the disk management layer via the redundant array of independent disks layer.

13. The method of claim 1, wherein, The at least two processing layers comprise a cache layer, a redundant array of independent disks layer and a disk management layer; The processing of the current data request according to the current processing path comprises: In a case where the request type of the current data request is a read request and the processing layer to which the host layer flows is the disk management layer, a logical block addressing address of the current data request is converted into a physical disk address through the host layer, to obtain an accessed disk address; A data access request of the disk management layer is constructed through the host layer using the accessed disk address, and the data access request is sent to the disk management layer, wherein the data access request carries the accessed disk address; In response to the received data access request, the accessed disk address is extracted from the data access request through the disk management layer, a physical disk corresponding to the accessed disk address is accessed to read data requested by the current data request, to obtain a data reading result, and the data reading result is sent to the host layer.

14. The method of claim 13, wherein, The converting of the logical block addressing address of the current data request into a physical disk address through the host layer to obtain an accessed disk address comprises: The accessed disk address is obtained by searching a logical block addressing mapping table through the host layer using the logical block addressing address of the current data request, wherein the logical block addressing mapping table is used to record a mapping relationship between a logical block addressing address and a physical disk address.

15. The method of claim 14, wherein, The method further comprises: In the case where the update trigger condition is met, the mapping relationship between the logical block addressing address and the physical disk address is re-determined through the Redundant Array of Independent Disks layer, and the logical block addressing mapping table is updated according to the re-determined mapping relationship.

16. An apparatus for processing a data request, the apparatus comprising: The device is applied to an input-output stack, and the input-output stack comprises a host layer and at least two processing layers. The query unit is configured to query a state parameter of a processing layer in the at least two processing layers in response to a current data request to be processed, wherein the state parameter of the processing layer in the at least two processing layers is used to represent a workload condition of the corresponding processing layer. The selection unit is configured to select, according to the state parameter of the processing layer in the at least two processing layers, the processing layer to which the host layer flows from the at least two processing layers, to obtain a current processing path. The processing unit is configured to process the current data request according to the current processing path. The query unit comprises a query module configured to query a resource occupancy rate of the processing layer in the at least two processing layers, wherein the state parameter of the processing layer in the at least two processing layers comprises the resource occupancy rate of the processing layer in the at least two processing layers, and the resource occupancy rate of the processing layer in the at least two processing layers is an average occupancy rate of a processing resource occupied by the corresponding processing layer.

17. An electronic device, comprising: The computer program is stored in the computer-readable storage medium. The processor is configured to implement the steps of the method according to any one of claims 1 to 15 when executing the computer program. The computer program is stored in the computer-readable storage medium.

18. A computer-readable storage medium, characterized in that, The computer program is stored in the computer-readable storage medium.

19. A computer program product comprising a computer program, characterized in that, The computer program is stored in the computer-readable storage medium.

Citation Information

Patent Citations

  • Cache bypassing

    CN117312190A