Request processing method, data storage system, apparatus, and computer device

By controlling the depth of read data addition in the task queue and prioritizing write requests, the problem of low write latency for write requests is solved, enabling fast processing of write requests and efficient processing of read requests, thus reducing the complexity of request processing.

CN122111304APending Publication Date: 2026-05-29DAWNING INFORMATION IND (BEIJING) CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DAWNING INFORMATION IND (BEIJING) CO LTD
Filing Date
2024-11-15
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In mixed scenarios, during the processing of read and write requests at the storage array end, the write latency of write requests is low, and existing technologies require complex algorithms to adjust the processing priority of write requests.

Method used

By adding read data for read requests to the task queue according to a preset data volume, and stopping adding read data when a write request is detected, and switching to adding write requests, the task queue is kept empty, and write requests are processed first to avoid read data filling the queue.

Benefits of technology

It reduces the write latency of write requests, while also reducing the complexity of request processing methods, ensuring that write requests maintain low write latency even when the number of read requests and concurrency increases, and improving the processing speed of read requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111304A_ABST
    Figure CN122111304A_ABST
Patent Text Reader

Abstract

The application relates to a request processing method, a data storage system, a device and computer equipment. The method comprises the following steps: adding read data corresponding to a read request of a host end to a task queue according to a preset data amount, and sequentially processing each task in the task queue, wherein, during the process of adding the read data to the task queue, if a write request of the host end is detected, the adding of the read data is stopped, and the process is switched to adding write data corresponding to the write request to the task queue. The above method can control the depth of the read data added to the task queue according to the preset data amount, so that the task queue is not occupied by the read data, a certain space is reserved for the write data request in the task queue, the processing speed of the write request is improved, and the write delay of the write request is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data storage technology, and in particular to a request processing method, data storage system, apparatus, and computer equipment. Background Technology

[0002] With the development of big data technology, it has become increasingly important to back up business data through data storage systems in order to improve the security and reliability of business data.

[0003] The data storage system comprises a host and a storage array. In practical applications, the host frequently receives both write and read requests; therefore, processing these mixed-mode read and write requests is crucial. Related technologies primarily involve the storage array processing the read and write requests sequentially, according to the order in which they are sent from the host.

[0004] However, in the process of handling read and write requests in mixed scenarios, the related technologies suffer from low write latency for write requests. Summary of the Invention

[0005] Therefore, it is necessary to provide a request processing method, data storage system, device, and computer equipment to address the above-mentioned technical problems, which can improve the write latency of write requests in the process of processing read and write requests in mixed scenarios.

[0006] In a first aspect, embodiments of this application provide a request processing method applied to a storage processor at a storage array, the method comprising:

[0007] According to the preset data volume, add the read data corresponding to the read request from the host to the task queue; if a write request from the host is detected during the process of adding read data to the task queue, stop adding read data and switch to adding the write data request corresponding to the write request to the task queue.

[0008] Process each task in the task queue in turn.

[0009] The technical solution in this embodiment adds read data corresponding to read requests from the host to the task queue according to a preset data volume, and processes each task in the task queue sequentially. During the process of adding read data to the task queue, if a write request from the host is detected, the addition of read data is stopped, and the write data request corresponding to the write request is added to the task queue instead. This method can control the depth of read data already added to the task queue according to a preset data volume, ensuring that the task queue is not filled with read data and leaving some space for write data requests to speed up the processing of write requests, thereby reducing write latency. Simultaneously, this method does not require complex algorithms to adjust the processing priority of write requests, thus reducing the complexity of the request processing method while ensuring reduced write latency. Furthermore, this method can control the depth of read data already added to the task queue according to a preset data volume, ensuring that the write latency of write requests does not decrease with the increase in the size and concurrency of read request tasks, thus maintaining a relatively low write latency.

[0010] In one embodiment, adding read data corresponding to the read request from the host to the task queue includes:

[0011] If the length of the read data is less than or equal to the preset length threshold, the read data corresponding to the read request will be added to the task queue.

[0012] The technical solution in this application embodiment adds the read data corresponding to the read request to the task queue when the length of the read data is less than or equal to a preset length threshold. Under certain conditions, the read data corresponding to the read request on the host side can be directly added to the task queue to improve the processing speed of the read request, thereby reducing the processing speed of the read request in mixed scenarios and reducing the read latency of the read request.

[0013] In one embodiment, adding read data corresponding to the read request from the host to the task queue includes:

[0014] If the length of the read data exceeds a preset length threshold, the read data is split according to the preset length threshold to obtain multiple sub-data corresponding to the read data;

[0015] Add each sub-data item to the task queue to complete the process of adding read data to the task queue.

[0016] The technical solution in this application embodiment can split the read data according to the preset length threshold when the length of the read data is greater than the preset length threshold, obtain multiple sub-data corresponding to the read data, and then add each sub-data to the task queue to complete the addition of read data to the task queue. This can ensure that the workload of each task (i.e., sub-data) added to the task queue is small, reduce the processing time of each sub-data, thereby shortening the waiting time of other write data requests added after each sub-data in the task queue, thereby speeding up the processing speed of write requests and reducing the write latency of write requests. Moreover, this process does not require the participation of complex algorithms, thereby reducing the complexity of adding read data to the task queue and speeding up the addition speed of read data to a certain extent.

[0017] In one embodiment, the read data includes multiple sub-data; according to a preset data volume, the read data corresponding to the read request from the host is added to the task queue, including:

[0018] For any sub-data, obtain the number of unprocessed tasks in the task queue as counted by the global counter;

[0019] If the amount of unprocessed tasks is less than the preset amount of data, then the sub-data will be added to the task queue based on the amount of unprocessed tasks and the maximum count value of the global counter.

[0020] If the amount of unprocessed tasks equals the preset amount of data, then if the amount of unprocessed tasks in the task queue is detected to be less than the preset amount of data, the sub-data will be added to the task queue.

[0021] In the technical solution of this application embodiment, for any sub-data, the unprocessed task quantity of the task queue counted by the global counter is obtained. If the unprocessed task quantity is less than the preset data quantity, the sub-data is added to the task queue according to the unprocessed task quantity and the maximum count value of the global counter. If the unprocessed task quantity is equal to the preset data quantity, the sub-data is added to the task queue when it is detected that the unprocessed task quantity of the task queue is less than the preset data quantity. The above method can add the sub-data to the task queue when it is determined that the task quantity of unprocessed sub-data in the task queue is less than the stop adding threshold of the task queue. Otherwise, it waits for a period of time before continuing to add sub-data to the task queue. This can ensure that there is a certain amount of space in the task queue for write data requests, so that the write requests received by the subsequent storage processor in real time can be processed quickly and preferentially. By speeding up the processing speed of write requests, the write latency of write requests is reduced.

[0022] In one embodiment, sub-data is added to the task queue based on the amount of unprocessed tasks and the maximum count value of the global counter, including:

[0023] If the number of unprocessed tasks is less than the maximum count, the sub-data will be added to the task queue.

[0024] If the number of unprocessed tasks is equal to m times the maximum count value, then the maximum count value of the global counter is configured to n1 times the maximum count value, and the sub-data is added to the task queue.

[0025] If the unprocessed task volume is less than m times the maximum count value, then the maximum count value of the global counter is configured to be n2 times the maximum count value, and the sub-data is added to the task queue; m times is less than n1 and greater than n2.

[0026] The technical solution in this application embodiment can dynamically configure the count value of the global counter based on the relationship between the amount of unprocessed sub-data in the task queue and the upper limit of the global counter, so as to correctly count the amount of tasks added to the task queue. This makes the above request processing method applicable to scenarios with a large number of read requests, and improves the wide applicability of the request processing method.

[0027] In one embodiment, the read data includes multiple sub-data; the method further includes:

[0028] When a write data request is added to the task array, at least one sub-data that was not added is added to the task array.

[0029] The technical solution in this application embodiment can add at least one unadded sub-data to the task array when a write data request is added to the task array. This ensures that complete read data is added to the task queue, speeds up the read data processing, and improves the read data processing accuracy.

[0030] In one embodiment, each task in the task queue is processed sequentially, including:

[0031] Each task in the task queue is sent to the storage array card on the storage array end in turn.

[0032] The technical solution in this application embodiment can sequentially send each task in the task queue to the storage array card on the storage array end, which can avoid the problem of tasks in the task queue being missed and improve the completeness of task processing.

[0033] In one embodiment, the task is a read data or write data request; the method further includes:

[0034] When reading data is sent to the storage array card, a read completion message is sent to the storage array card to complete the reading data processing;

[0035] Once the write data corresponding to the write data request is obtained, a write completion message is sent to the storage array card to complete the processing of the write data request.

[0036] Secondly, embodiments of this application provide a request processing method applied to a host card on a host side, the method comprising:

[0037] A write request is sent to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor. In order to stop adding read data corresponding to the read request in the task queue and switch to adding the write data request corresponding to the write request to the task queue, and process each task in the task queue in sequence; wherein, the storage processor adds read data to the task queue according to a preset data amount.

[0038] Respond to the write data request sent by the storage processor through the storage array card, and send the write data corresponding to the write data request to the storage array card.

[0039] The technical solution in this embodiment sends a write request to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor. This stops adding read data corresponding to the read request to the task queue and switches to adding the write data request corresponding to the write request to the task queue. Each task in the task queue is processed sequentially, responding to the write data request sent by the storage processor through the storage array card, and sending the write data corresponding to the write data request to the storage array card. The storage processor adds read data corresponding to the host-side read request to the task queue according to a preset data amount. This preset data amount controls the depth of the added read data in the task queue, preventing the task queue from being filled with read data and leaving space for write data requests to speed up write request processing, thereby reducing write latency. Furthermore, this method does not require complex algorithms to adjust the processing priority of write requests, thus reducing the complexity of the request processing method while ensuring reduced write latency.

[0040] In one embodiment, the method further includes:

[0041] Receive write completion messages from the storage array card and send the write completion message back to the host processor; and,

[0042] It receives read data and read completion messages sent by the storage array card, and then sends the read data and read completion messages to the main processor.

[0043] The technical solution in this application embodiment can receive a write completion message for write data sent by the storage array card and send the write completion message to the main processor on the host side. It can also receive read data and read completion messages for read data sent by the storage array card and send the read data and read completion messages to the main processor. This can send the processing completion messages of different requests to the source end in a timely manner to avoid affecting the performance of the application services involved in the request.

[0044] Thirdly, this application provides a data storage system, which includes: a storage array terminal, a storage array card of the storage array terminal, a host terminal, and a host card of the host terminal; the storage array terminal includes a storage processor, and the host terminal includes a main processor;

[0045] The main processor is used to send read and write requests to the storage processor via the host card and storage array card;

[0046] A storage processor, configured to perform the steps of the method of any of the embodiments of the first aspect described above;

[0047] A host card for performing the steps of the method in any of the embodiments of the second aspect described above.

[0048] Fourthly, embodiments of this application provide a request processing apparatus, the apparatus comprising:

[0049] The add module is used to add read data corresponding to read requests from the host to the task queue according to a preset data volume. If a write request from the host is detected during the process of adding read data to the task queue, the addition of read data is stopped and the write data request corresponding to the write request is added to the task queue instead.

[0050] The task processing module is used to process each task in the task queue in sequence.

[0051] Fifthly, embodiments of this application provide a request processing apparatus, the apparatus comprising:

[0052] The sending module is used to send write requests to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor, so that during the process of adding read data corresponding to the read request to the task queue, the addition of read data is stopped and the write data request corresponding to the write request is added to the task queue, and each task in the task queue is processed in turn; wherein, the storage processor adds read data corresponding to the read request from the host end to the task queue according to a preset data amount.

[0053] The response module is used to respond to write data requests sent by the storage processor through the storage array card, and to send the write data corresponding to the write data request to the storage array card.

[0054] In a sixth aspect, embodiments of this application also provide a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the embodiments of the first and second aspects described above.

[0055] In a seventh aspect, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method in any of the embodiments of the first and second aspects described above.

[0056] Eighthly, embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the methods in any of the embodiments of the first and second aspects described above.

[0057] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0058] Figure 1 This is an application environment diagram of a request processing method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating a request processing method in one embodiment;

[0060] Figure 3 This is a flowchart illustrating the request processing method in another embodiment;

[0061] Figure 4 This is a flowchart illustrating the request processing method in another embodiment;

[0062] Figure 5 This is a schematic diagram of the read request processing flow in another embodiment;

[0063] Figure 6 This is a schematic diagram of the write request processing flow in another embodiment;

[0064] Figure 7 This is a flowchart illustrating the request processing method in another embodiment;

[0065] Figure 8 This is a structural block diagram of a request processing device in one embodiment;

[0066] Figure 9 This is a structural block diagram of a request processing device in another embodiment;

[0067] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0069] In the field of big data, enterprises are generating increasingly larger volumes of business data. To improve the security and reliability of this data, backups are required through data storage systems. These systems include host-side and storage array-side components. In practical applications, the host-side frequently receives both write and read requests. Therefore, processing these mixed-scenario read and write requests is crucial. In related technologies, the storage array-side primarily processes read and write requests sequentially based on the order they are sent from the host-side. However, in these mixed-scenario scenarios, the concurrency of read requests often exceeds the concurrency of write requests, and / or the amount of data read in read requests exceeds the amount of data written in write requests. Consequently, in processing read and write requests in mixed scenarios, the large data volume involved in processing read requests leads to longer wait times for write requests, resulting in low write latency. Therefore, this application provides a request processing method that improves write latency in processing read and write requests in mixed scenarios.

[0070] The request processing method provided in this application embodiment is applicable to... Figure 1The application environment diagram shown illustrates this. This application environment includes a data storage system, which may include a host terminal, at least one host card installed on the host terminal, a storage array terminal, at least one storage array card installed on the storage array terminal, and a storage array backend. The storage array terminal and the storage array backend are connected via a communication method, such as Wi-Fi, mobile network, wired connection, or Bluetooth connection. Simultaneously, each host card is connected to its corresponding storage array card via a wired connection, such as fiber optic or copper stranded cable. Optionally, the host terminal may be, but is not limited to, a server or computer device, such as a personal computer, laptop, tablet, or smartphone; the storage array terminal may be a computer device with data storage capabilities, a server, or a database system; the storage array backend may be an electronic device with a disk and / or hard drive; each host card and each storage array card may be a network interface card (NIC), but in this embodiment, it is illustrated by the example of each host card and each storage array card being a Fibre Channel (Host Bus Adapter, HBA) card. Optionally, the HBA card may be, but is not limited to, an Emulex HBA card or a Qlogic HBA card.

[0071] In practical applications, all host cards and storage array cards support the same transmission protocol, such as Internet Small Computer System Interface (iSCSI), Serial Attached SCSI (SAS), ATA over Ethernet (AoE), Fibre Channel (FC), etc. However, in this embodiment, the example given is that all host cards and storage array cards support the Converged Ethernet Remote Direct Memory Access (RDMA over Converged Ethernet, RoCE) protocol. This embodiment does not limit the specific form of the host, host card, storage array, storage array card, and storage array backend. Figure 1 This example illustrates a host card and a connected storage array card. In this embodiment, the request processing method is implemented by the storage processor running a request processing algorithm, which can be built based on the NVMe over RoCE protocol. The specific process of the request processing method is described below, using the processor (i.e., the storage processor) and the host card at the storage array end as the execution entities.

[0072] like Figure 2The diagram shown is a flowchart of a request processing method provided in an embodiment of this application. This method is applied to a storage processor on a storage array and can be implemented through the following steps:

[0073] S101. According to the preset data volume, add the read data corresponding to the read request on the host to the task queue; wherein, if a write request on the host is detected during the process of adding read data to the task queue, stop adding read data and switch to adding the write data request corresponding to the write request to the task queue.

[0074] The aforementioned preset data volume can be user-defined or determined based on historical experience. In this embodiment, the preset data volume can be equal to the ratio of the processing latency td1 of any read data being sent from the storage processor to the host to the sum of the processing latency td2 of the data of the maximum count size being sent from the storage processor to the host and the reserved processing latency Δtd, i.e., td1 / (td2+Δtd). In this embodiment, the maximum count value of the global counter is 256k as an example.

[0075] Meanwhile, before adding read data corresponding to read requests from the host side to the task queue, the task queue can be either completely empty or already contain at least one task. In this case, the task can be read data corresponding to at least one read request or write data request corresponding to at least one write request received by the storage processor before the current moment. In practical applications, the depth of read data (i.e., the amount of read data) in the task queue can be less than or equal to a preset data volume. However, during the process of adding read data to the task queue, the read data can only be added to the task queue if it is determined that the depth of read data in the task queue is less than the preset data volume; otherwise, a certain amount of time must be waited before adding more data.

[0076] Specifically, the storage processor can receive read requests indirectly sent by the host through the storage array card at the current moment, that is, receive read requests indirectly sent by the host processor through the host card and the storage array card at the current moment, then respond to the read request, obtain the read data corresponding to the read request, and add the read data corresponding to the host's read request to the task queue according to the preset data volume.

[0077] In one embodiment, the method of adding read data corresponding to the read request of the host to the task queue according to the preset data volume can be to obtain the depth of the read data already added in the task queue. If it is determined that the depth of the read data already added is less than the preset data volume, the read data of the read request of the host is added to the task queue. If it is determined that the depth of the read data already added is equal to the preset data volume, the read data of the read request of the host is added to the task queue only after waiting for a certain period of time and then determining that the depth of the read data already added is less than the preset data volume.

[0078] In another embodiment, the method of adding read data corresponding to the read request from the host to the task queue according to a preset data amount can also be that the storage processor sends the preset data amount to a third-party monitoring device. If the third-party monitoring device detects that the depth of the read data already added in the task queue is equal to the preset data amount, the third-party monitoring device sends a stop control command to the storage processor, instructing the storage processor to stop adding the read data corresponding to the read request to the task queue. If the third-party monitoring device detects that the depth of the read data already added in the task queue is less than the preset data amount, the third-party monitoring device sends an add control command to the storage processor, instructing the storage processor to add the read data corresponding to the read request to the task queue.

[0079] In the process of adding read data to the task queue, if the storage processor detects a write request from the host, it can stop adding read data and switch to adding the write data request corresponding to the write request to the task queue. That is, it stops adding the remaining data that has not been added in the read data and can prioritize adding the write data request corresponding to the write request to the task queue, so as to speed up the processing speed of the write request and reduce the write latency of the write request.

[0080] In this embodiment, the storage processor can construct multiple task queues based on the business type to which a task belongs, or based on different sources of the request. In practical applications, tasks corresponding to the same business type can be added to the same task queue. Optionally, the business type to which a task belongs can be video services, voice services, gaming services, sports services, financial services, tourism services, etc.

[0081] S102. Process each task in the task queue in turn.

[0082] It should be noted that each task in the task queue mentioned above may include read data corresponding to at least one read request and write data request corresponding to at least one write request received by the storage processor before the current moment, as well as read data corresponding to read requests and write data requests corresponding to write requests indirectly sent by the main processor at the current moment.

[0083] Specifically, the storage processor can prioritize processing at least one write data request in the task queue in sequence, and then process at least one read data request in the task queue in sequence.

[0084] In this embodiment of the application, the storage processor can process each task in the task queue in the order of their arrangement to improve the regularity of task processing and reduce the error rate that occurs during task processing.

[0085] The technical solution in this application embodiment adds read data corresponding to read requests from the host to the task queue according to a preset data volume, and processes each task in the task queue sequentially. During the process of adding read data to the task queue, if a write request from the host is detected, the addition of read data is stopped, and the write data request corresponding to the write request is added to the task queue instead. This method can control the depth of read data already added to the task queue according to a preset data volume, ensuring that the task queue is not filled with read data and leaving some space for write data requests to speed up the processing of write requests, thereby reducing write latency. Simultaneously, this method does not require complex algorithms to adjust the processing priority of write requests, thus reducing the complexity of the request processing method while ensuring reduced write latency. Furthermore, this method can control the depth of read data already added to the task queue according to a preset data volume, ensuring that the write latency of write requests does not decrease with the increase in the size and concurrency of read request tasks, thus maintaining a relatively low write latency.

[0086] In some scenarios, the amount of data corresponding to the read request on the host side is relatively small. The process of adding the read data corresponding to the read request on the host side to the task queue in this case is described below. In one embodiment, the step of adding the read data corresponding to the read request on the host side to the task queue in S101 above may include: adding the read data corresponding to the read request to the task queue if the length of the read data is less than or equal to a preset length threshold.

[0087] In practical applications, after obtaining the read data corresponding to the read request from the host, the storage processor can determine whether the length of the read data corresponding to the read request is greater than a preset length threshold. If it is determined that the length of the read data corresponding to the read request is less than or equal to the preset length threshold, it indicates that the amount of read data corresponding to the read request is small, and the waiting time of other tasks during the direct processing of the read data is short. At this time, the read data corresponding to the read request can be directly added to the task queue.

[0088] Optionally, the aforementioned preset length threshold can be user-defined or determined based on historical experience values; this embodiment of the application does not limit this.

[0089] The technical solution in this application embodiment adds the read data corresponding to the read request to the task queue when the length of the read data is less than or equal to a preset length threshold. Under certain conditions, the read data corresponding to the read request on the host side can be directly added to the task queue to improve the processing speed of the read request, thereby reducing the processing speed of the read request in mixed scenarios and reducing the read latency of the read request.

[0090] In other scenarios, the amount of data to be read corresponding to a read request on the host side is large. The process of adding the read data corresponding to the host side's read request to the task queue in this case is described below. In one embodiment, as... Figure 3 As shown, the step of adding the read data corresponding to the read request from the host to the task queue in S101 above may include:

[0091] S111. If the length of the read data is greater than the preset length threshold, the read data is split according to the preset length threshold to obtain multiple sub-data corresponding to the read data.

[0092] In practical applications, after obtaining the read data corresponding to the read request from the host, the storage processor can call the port data management structure to determine whether the length of the read data corresponding to the read request is greater than a preset length threshold. If it is determined that the length of the read data corresponding to the read request is greater than the preset length threshold, it indicates that the amount of data corresponding to the read request is large, and the waiting time of other tasks during the direct processing of the read data is long. At this time, the read data can be split according to the preset length threshold to obtain multiple sub-data corresponding to the read data.

[0093] In one embodiment, the method of splitting read data according to a preset length threshold can be to pre-train an algorithm model, and then input the preset length threshold and the read data of the read request from the host into the algorithm model. The algorithm model outputs multiple sub-data corresponding to the read data.

[0094] In another embodiment, the method of splitting the read data according to the preset length threshold can also be to split a sub-data from the read data according to the preset length threshold. If the length of the remaining data after splitting is greater than the preset length threshold, then continue to split a sub-data from the remaining data according to the preset length threshold, and so on, until the length of the current remaining data is less than the preset length threshold. The current remaining data is then taken as a sub-data, thus obtaining multiple sub-data in the read data.

[0095] It should be noted that the above-mentioned multiple sub-data can be simply combined to obtain the read data corresponding to the read request on the host side. Among these multiple sub-data, the length of at least one sub-data can be equal to a preset length threshold, and the length of at most one sub-data can be less than the preset length threshold.

[0096] For example, if the preset length threshold is 64KB, if the length of the read data is greater than 64KB, the read data can be split into at least two sub-data in 64KB increments.

[0097] S121. Add each sub-data to the task queue to complete the addition of read data to the task queue.

[0098] Based on the multiple sub-data corresponding to the read data obtained in the previous steps, the storage processor can call the call port data management structure to add each sub-data to the task queue in turn, thereby completing the addition of read data to the task queue.

[0099] The technical solution in this application embodiment can split the read data according to the preset length threshold when the length of the read data is greater than the preset length threshold, obtain multiple sub-data corresponding to the read data, and then add each sub-data to the task queue to complete the addition of read data to the task queue. This can ensure that the workload of each task (i.e., sub-data) added to the task queue is small, reduce the processing time of each sub-data, thereby shortening the waiting time of other write data requests added after each sub-data in the task queue, thereby speeding up the processing speed of write requests and reducing the write latency of write requests. Moreover, this process does not require the participation of complex algorithms, thereby reducing the complexity of adding read data to the task queue and speeding up the addition speed of read data to a certain extent.

[0100] In one embodiment, the read data includes multiple sub-data; such as Figure 4 As shown, the step in S100 above, which adds the read data corresponding to the read request from the host to the task queue according to the preset data volume, can be achieved through the following steps:

[0101] S1211. For any sub-data, obtain the number of unprocessed tasks in the task queue as counted by the global counter.

[0102] Specifically, the storage processor can obtain the number of unprocessed tasks in the task queue as counted by a global counter deployed in the call port data management structure.

[0103] In practical applications, after any sub-data has been processed, the storage processor can remove the processed sub-data from the task queue. It should be noted that the above request processing algorithm includes a global counter, which can be used to count the amount of unprocessed sub-data added to the task queue, i.e., the amount of unprocessed tasks.

[0104] S1222. If the amount of unprocessed tasks is less than the preset amount of data, then add the sub-data to the task queue based on the amount of unprocessed tasks and the maximum count value of the global counter.

[0105] Furthermore, the storage processor can determine whether the amount of unprocessed tasks in the task queue is less than a preset data amount. If it is determined that the amount of unprocessed tasks is less than the preset data amount, a control strategy is determined based on the amount of unprocessed tasks and the maximum count value of the global counter, and the sub-data is added to the task queue according to the control strategy. Optionally, the maximum count value of the global counter can be understood as the upper limit of the global counter's count; the control strategy mentioned above may include information such as the addition time, addition conditions, and addition method of the sub-data to the task queue.

[0106] In one embodiment, the step in S1222 above, which involves adding sub-data to the task queue based on the amount of unprocessed tasks and the maximum count value of the global counter, may include:

[0107] If the number of unprocessed tasks is less than the maximum count value, the sub-data is added to the task queue; if the number of unprocessed tasks is equal to m times the maximum count value, the maximum count value of the global counter is configured to n1 times the maximum count value, and the sub-data is added to the task queue; if the number of unprocessed tasks is less than m times the maximum count value, the maximum count value of the global counter is configured to n2 times the maximum count value, and the sub-data is added to the task queue; m times is less than n1 and greater than n2.

[0108] In practical applications, the storage processor can determine whether the number of unprocessed tasks in the task queue is less than the maximum count value of the global counter. If the number of unprocessed tasks is less than the maximum count value, the sub-data is added to the task queue. In this embodiment, each sub-data and write data request are added to the task queue sequentially.

[0109] Meanwhile, if the storage processor determines that the amount of unprocessed tasks is equal to m times the maximum count value, the maximum count value of the global counter can be configured to be n1 times the maximum count value. Then, the sub-data is added to the task queue. This allows the global counter to include the amount of the added sub-data, improving the accuracy of the unprocessed task amount counted by the global counter in the task queue. Here, n1 can be greater than m, but in this embodiment, n1 is equal to m plus 1. That is, in this case, after the global counter is incremented by 1, the sub-data is added to the task queue.

[0110] For example, if the maximum count value of the global counter is 111, after incrementing the global counter by 1, the global counter can continue counting from 0. After adding any sub-data to the task queue, the current count value of the global counter is equal to 1. At this time, the actual count value of the global counter is equal to 111 + 1, that is, 112. In the embodiments of this application, the number of unprocessed tasks in the task queue can be equal to the actual count value of the global counter.

[0111] Furthermore, if the storage processor determines that the number of unprocessed tasks is less than m times the maximum count value, it indicates that the number of unprocessed tasks in the task queue at the current moment is small. In this case, the maximum count value of the global counter can be configured to be n² times the maximum count value to ensure the accuracy of the unprocessed task count in the task queue in subsequent statistics. This helps the data storage system to rationally schedule resources and reduce resource waste. Further, this sub-data can be added to the task queue. Here, n² can be less than m, but in this embodiment, n² is equal to m minus 1. That is, in this case, after the global counter is decremented by 1, the sub-data is added to the task queue.

[0112] For example, if the maximum count value of the global counter is 111, the current count value of the global counter at time t1 is equal to 10, but the actual count value of the global counter at this time is equal to 111+10 (i.e. 121). After a period of time, the actual count value of the global counter at time t2 is equal to 98. At this time, the global counter is decremented by 1, and the current count value of the global counter can be equal to 111+98-111, i.e. 98.

[0113] This embodiment can dynamically configure the count value of the global counter based on the relationship between the number of unprocessed sub-data tasks in the task queue and the upper limit of the global counter's count, so as to correctly count the number of tasks added to the task queue. This makes the above request processing method applicable to scenarios with a large number of read requests, thus improving the wide applicability of the request processing method.

[0114] S1223. If the amount of unprocessed tasks is equal to the preset amount of data, then when it is detected that the amount of unprocessed tasks in the task queue is less than the preset amount of data, the sub-data is added to the task queue.

[0115] In addition, if the storage processor determines that the amount of unprocessed tasks is equal to the preset amount of data, it indicates that the amount of sub-data in the task queue has reached the maximum. At this time, it is necessary to stop adding the sub-data to the task queue. After waiting for a period of time, if it detects that the amount of unprocessed tasks in the task queue is less than the preset amount of data, the sub-data can continue to be added to the task queue.

[0116] In the technical solution of this application embodiment, for any sub-data, the unprocessed task quantity of the task queue counted by the global counter is obtained. If the unprocessed task quantity is less than the preset data quantity, the sub-data is added to the task queue according to the unprocessed task quantity and the maximum count value of the global counter. If the unprocessed task quantity is equal to the preset data quantity, the sub-data is added to the task queue when it is detected that the unprocessed task quantity of the task queue is less than the preset data quantity. The above method can add the sub-data to the task queue when it is determined that the task quantity of unprocessed sub-data in the task queue is less than the stop adding threshold of the task queue. Otherwise, it waits for a period of time before continuing to add sub-data to the task queue. This can ensure that there is a certain amount of space in the task queue for write data requests, so that the write requests received by the subsequent storage processor in real time can be processed quickly and preferentially. By speeding up the processing speed of write requests, the write latency of write requests is reduced.

[0117] In some scenarios, during the process of adding read data to the task queue, if a write request is detected on the host side, and the write data request corresponding to the write request is added to the task queue first, some read data may still not be added to the task queue. The following describes the process of handling the part of read data that has not been added to the task queue in this case. In one embodiment, the read data includes multiple sub-data; after adding the write data request corresponding to the write request to the task queue, the method may further include: when the write data request is added to the task array, adding at least one sub-data that has not been added to the task array.

[0118] In practical applications, if the storage processor adds the write data request corresponding to a received write request to the task array, and no new write request has been received yet, it can continue to add at least one remaining sub-data item to the task array sequentially. It should be noted that the sorting order of the sub-data items and write data requests in the task queue can be determined by the order in which they were added.

[0119] The technical solution in this application embodiment can add at least one unadded sub-data to the task array when a write data request is added to the task array. This ensures that complete read data is added to the task queue, speeds up the read data processing, and improves the read data processing accuracy.

[0120] The process of processing each task in the task queue in sequence is described below. In one embodiment, the steps in S102 above may include: sequentially sending each task in the task queue to the storage array card on the storage array end.

[0121] In practical applications, when there is at least one task in the task queue, the storage processor can call the thread structure to start processing each task in the task queue and send each task to the storage array card on the storage array end in turn.

[0122] In practical applications, data or requests transmitted on the transmission links between the main processor, host card, storage array card, and storage processor are all transmitted asynchronously in a streaming manner. Meanwhile, the storage processor processes tasks in the task queue sequentially according to their order of arrangement. Multiple sub-data items corresponding to the same read data can be arranged consecutively or intermittently in the task queue; that is, there will be at least one write data request between any two sub-data items corresponding to the same read data.

[0123] It should be noted that if there are multiple task queues, the storage processor can invoke multiple thread structures, with each thread structure processing each task in each task queue sequentially; that is, each thread structure processes one task queue. In this embodiment, each thread structure deploys a data volume counter, which can be used to count the number of unprocessed tasks in the task queue being processed by the current thread structure. Furthermore, the actual count value of the global counter can be dynamically updated based on the actual count value of each data volume counter deployed in each thread structure. This allows the storage processor to control the amount of data or tasks added to multiple task queues based on the actual count value of the global counter.

[0124] The functions of each data volume counter are similar to those of the global counter, both capable of incrementing and decrementing by 1. This will not be elaborated further in this embodiment. In this embodiment, deploying data volume counters in each thread structure allows for the counting of unprocessed tasks using each task queue as the smallest unit. The count value of each data volume counter periodically adjusts the count value in the global counter, eliminating the need for dynamic adjustment of the global counter for each task processed. This reduces the number of dynamic adjustments to the global counter, thereby improving the performance of the port data management structure.

[0125] In one embodiment, the task described above is a read data or write data request; during the process of sequentially sending each task in the task queue to the storage array card on the storage array end, the method further includes:

[0126] When reading data is sent to the storage array card, a read completion message is sent to the storage array card to complete the read data processing; when the write data corresponding to the write data request is obtained, a write completion message is sent to the storage array card to complete the write data request processing.

[0127] In this embodiment, when the storage processor processes read data, it can send a read completion message to the storage array card before sending the read data. This instructs the storage array card to send the read completion message to the main processor via the host card, causing the main processor to output the read completion message to inform the user that the read request has been completed. If the read data includes multiple sub-data items, sending all of these sub-data items to the storage array card indicates that the read data has been sent to the storage array card.

[0128] For example, if the main processor, host card, storage array card, and storage processor in the data storage system only handle read requests, such as Figure 5 The diagram shows a flowchart for processing read requests. Among them, Figure 5 The illustration uses the example of splitting the read data corresponding to a read request into four sub-data segments (including sub-data 1, sub-data 2, sub-data 3, and sub-data 4) (the transmission process of sub-data 3 is not shown in the diagram). After the storage processor sends all four sub-data segments to the storage array card, it can send a read completion message to the storage array card. Furthermore, after receiving the four sub-data segments, the host card can send the read data obtained by merging the four sub-data segments to the main processor, and also send the received read completion message to the main processor.

[0129] Meanwhile, when the storage processor processes the write data request, if it obtains the write data corresponding to the write data request sent by the host card through the storage array card, it can send a write completion message to the storage array card, instructing the storage array card to send the write completion message to the main processor through the host card, so that the main processor can output the write completion message to inform the user that the write request has been processed.

[0130] For example, if the main processor, host card, storage array card, and storage processor in a data storage system only handle write requests, such as Figure 6 The diagram shows a flowchart of the write request process. After the storage processor sends the write data request to the storage array card, it instructs the storage array card to send the write data request to the host card, so that the host card can send the write data corresponding to the write data request to the storage processor through the storage array card. Correspondingly, the storage processor can only send a write completion message to the storage array card after receiving the write data and storing it.

[0131] The technical solution in this application embodiment can sequentially send each task in the task queue to the storage array card on the storage array end, which can avoid the problem of tasks in the task queue being missed and improve the completeness of task processing.

[0132] In one embodiment, this application also provides a request processing method applied to a storage processor at a storage array, the method comprising the following steps:

[0133] (1) Obtain the read data corresponding to the read request from the host;

[0134] (2) When the length of the read data is greater than the preset length threshold, the read data is split according to the preset length threshold to obtain multiple sub-data corresponding to the read data;

[0135] (3) For any sub-data, obtain the number of unprocessed tasks in the task queue as counted by the global counter;

[0136] (4) If the amount of unprocessed tasks is less than the preset amount of data, then if the amount of unprocessed tasks is less than the maximum count value, then the sub-data will be added to the task queue.

[0137] (5) If the number of unprocessed tasks is equal to m times the maximum count value, then configure the maximum count value of the global counter to n1 times the maximum count value, and add the sub-data to the task queue;

[0138] (6) If the unprocessed task volume is less than m times the maximum count value, then the maximum count value of the global counter is configured to n2 times the maximum count value, and the sub-data is added to the task queue; m times is less than n1 and greater than n2, so as to complete the addition of read data to the task queue;

[0139] (7) If the amount of unprocessed tasks is equal to the preset amount of data, then when it is detected that the amount of unprocessed tasks in the task queue is less than the preset amount of data, the sub-data is added to the task queue to complete the addition of read data to the task queue.

[0140] (8) When a write data request is added to the task array, at least one sub-data that was not added is added to the task array;

[0141] (9) Send each task in the task queue to the storage array card on the storage array end in sequence;

[0142] (10) When sending read data to the storage array card, send a read data completion message to the storage array card to complete the read data processing;

[0143] (11) If the write data corresponding to the write data request is obtained, a write completion message is sent to the storage array card to complete the processing of the write data request.

[0144] For details of the execution process of (1) to (11) above, please refer to the description of the above embodiments. The implementation principle and technical effect are similar, and will not be repeated here.

[0145] To address the issue of low write latency for write requests in related technologies when processing read and write requests in mixed scenarios, this application provides a request processing method that improves write latency for write requests during the processing of read and write requests in mixed scenarios. This request processing method will explain how to improve write latency for write requests in mixed scenarios from the host card side. The following embodiments will specifically describe the process of the request processing method, focusing on the execution entity. Figure 1 The host card in the data storage system is used to illustrate the specific process of request processing.

[0146] like Figure 7 The diagram shown is a flowchart of a request processing method provided in an embodiment of this application. This method is applied to a host card installed on the host side and can be implemented through the following steps:

[0147] S201. Send a write request to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor, so that during the process of adding the read data corresponding to the read request to the task queue, the addition of read data is stopped and the write data request corresponding to the write request is added to the task queue, and each task in the task queue is processed in sequence; wherein, the storage processor adds the read data corresponding to the read request of the host end to the task queue according to the preset data amount.

[0148] In practical applications, the storage processor can send a write request to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor. This causes the storage processor to stop adding read data corresponding to the read request in the task queue and switch to adding the write data request corresponding to the write request to the task queue. That is, it prioritizes adding the write data request corresponding to the write request to the task queue, and then adds the remaining data in the read data that has not been added to the task array.

[0149] The preset data volume can be user-defined or determined based on historical experience; this embodiment does not limit this. Before adding read data corresponding to a read request from the host to the task queue, the task queue can be either completely empty or already containing at least one task. In this case, the task can be read data corresponding to at least one read request or write data request corresponding to at least one write request received by the storage processor before the current moment. In practical applications, the depth of read data (i.e., the amount of read data) in the task queue can be less than or equal to the preset data volume. However, during the process of adding read data to the task queue, the read data can only be added if the depth of read data in the task queue is determined to be less than the preset data volume; otherwise, a certain period of time must be waited before adding more data.

[0150] Specifically, the storage processor can receive read requests indirectly sent by the host through the storage array card at the current moment, that is, receive read requests indirectly sent by the host processor through the host card and the storage array card at the current moment, then respond to the read request, obtain the read data corresponding to the read request, and add the read data corresponding to the host's read request to the task queue according to the preset data volume.

[0151] In one embodiment, the method of adding read data corresponding to the read request of the host to the task queue according to the preset data volume can be to obtain the depth of the read data already added in the task queue. If it is determined that the depth of the read data already added is less than the preset data volume, the read data of the read request of the host is added to the task queue. If it is determined that the depth of the read data already added is equal to the preset data volume, the read data of the read request of the host is added to the task queue only after waiting for a certain period of time and then determining that the depth of the read data already added is less than the preset data volume.

[0152] In another embodiment, the method of adding read data corresponding to the read request from the host to the task queue according to a preset data amount can also be that the storage processor sends the preset data amount to a third-party monitoring device. If the third-party monitoring device detects that the depth of the read data already added in the task queue is equal to the preset data amount, the third-party monitoring device sends a stop control command to the storage processor, instructing the storage processor to stop adding the read data corresponding to the read request to the task queue. If the third-party monitoring device detects that the depth of the read data already added in the task queue is less than the preset data amount, the third-party monitoring device sends an add control command to the storage processor, instructing the storage processor to add the read data corresponding to the read request to the task queue.

[0153] In the process of adding read data to the task queue, if the storage processor detects a write request from the host, it can stop adding read data and switch to adding the write data request corresponding to the write request to the task queue. That is, it stops adding the remaining data that has not been added in the read data and can prioritize adding the write data request corresponding to the write request to the task queue, so as to speed up the processing speed of the write request and reduce the write latency of the write request.

[0154] It should be noted that each task in the task queue mentioned above may include read data corresponding to at least one read request and write data request corresponding to at least one write request received by the storage processor before the current moment, as well as read data corresponding to read requests and write data requests corresponding to write requests indirectly sent by the main processor at the current moment.

[0155] Specifically, the storage processor can prioritize processing at least one write data request in the task queue in sequence, and then process at least one read data request in the task queue in sequence.

[0156] In this embodiment of the application, the storage processor can process each task in the task queue in the order of their arrangement to improve the regularity of task processing and reduce the error rate that occurs during task processing.

[0157] S202, Respond to the write data request sent by the storage processor through the storage array card, and send the write data corresponding to the write data request to the storage array card.

[0158] In practical applications, the host card can respond to write data requests sent by the storage processor through the storage array card, and send the write data corresponding to the write data request to the storage array card.

[0159] In one embodiment, the above method may further include the following steps:

[0160] The system receives a write completion message from the storage array card and sends the write completion message to the host processor; it also receives read data and a read completion message from the storage array card and sends the read data and the read completion message to the host processor.

[0161] It's important to note that after the host card sends write data to the storage array card, it can wait to receive a write completion message from the storage array card and then send that message to the host processor. Conversely, after the host card sends a read request to the storage processor via the storage array card, it can wait to receive read data and a read completion message from the storage array card and then send both to the host processor. The host card can asynchronously receive the read data and read completion message corresponding to the read request; upon receiving either, it can forward them to the host processor in real time. Here, the read completion message can be understood as the completion message for the read request.

[0162] In this process, after receiving the write data corresponding to the write request and storing the write request, the storage processor can send a write complete message to the storage array card. The storage array card then sends the write complete message to the host card. Correspondingly, the host card can send the received write complete message to the main processor, instructing the main processor to output the write complete message to inform the user that the write request has been processed.

[0163] Simultaneously, when the storage processor sends read data to the storage array card, it can send a read completion message to the storage array card. The storage array card then sends the read completion message to the host card. Correspondingly, the host card can send the received read completion message to the main processor, instructing the main processor to output a read completion message to inform the user that the read request has been processed. Additionally, the host card can receive read data sent by the storage processor through the storage array card and send the read data to the main processor.

[0164] This embodiment can receive write completion messages of write data sent by the storage array card and send the write completion messages to the main processor on the host side. It can also receive read data and read completion messages of read data sent by the storage array card and send the read data and read completion messages to the main processor. This can send the processing completion messages of different requests to the source end in a timely manner to avoid affecting the performance of the application services involved in the request.

[0165] The technical solution in this embodiment sends a write request to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor. This stops adding read data corresponding to the read request to the task queue and switches to adding the write data request corresponding to the write request to the task queue. Each task in the task queue is processed sequentially, responding to the write data request sent by the storage processor through the storage array card, and sending the write data corresponding to the write data request to the storage array card. The storage processor adds read data corresponding to the host-side read request to the task queue according to a preset data amount. This preset data amount controls the depth of the added read data in the task queue, preventing the task queue from being filled with read data and leaving space for write data requests to speed up write request processing, thereby reducing write latency. Furthermore, this method does not require complex algorithms to adjust the processing priority of write requests, thus reducing the complexity of the request processing method while ensuring reduced write latency.

[0166] In one embodiment, this application also provides a request processing method applied to a host card on the host side, the method including the following process:

[0167] (1) Send a write request to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor, so that during the process of adding the read data corresponding to the read request to the task queue, the addition of read data is stopped and the write data request corresponding to the write request is added to the task queue, and each task in the task queue is processed in turn; wherein, the storage processor adds the read data corresponding to the read request of the host end to the task queue according to the preset data amount.

[0168] (2) Respond to the write data request sent by the storage processor through the storage array card, and send the write data corresponding to the write data request to the storage array card;

[0169] (3) Receive the write completion message sent by the storage array card and send the write completion message to the main processor on the host side; and,

[0170] (4) Receive the read data and read completion message sent by the storage array card, and send the read data and read completion message to the main processor.

[0171] The specific execution process of (1) to (4) above can be found in the description of the above embodiments. The implementation principle and technical effect are similar, and will not be repeated here.

[0172] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0173] Based on the same inventive concept, embodiments of this application also provide a data storage system for implementing the request processing method described above, see below. Figure 1 As shown, the data storage system includes: a storage array end, a storage array card of the storage array end, a host end, and a host card of the host end; the storage array end includes a storage processor, and the host end includes a main processor;

[0174] The main processor is used to send read and write requests to the storage processor via the host card and storage array card;

[0175] Storage processor, used to perform such Figures 2-4 The steps of the method in any of the embodiments;

[0176] The host card is used to perform tasks such as Figure 7 The steps of the method in any of the embodiments.

[0177] The communication method between the main processor and the host card can be, but is not limited to, parallel communication or serial communication; at the same time, the communication method between the storage processor and the storage array card can also be, but is not limited to, parallel communication or serial communication.

[0178] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0179] Furthermore, based on the same inventive concept, this application also provides a request processing apparatus for implementing the request processing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more request processing apparatus embodiments provided below can be found in the limitations of the request processing method described above, and will not be repeated here.

[0180] In one embodiment, Figure 8 This is a schematic diagram of the structure of a request processing device in one embodiment of this application. The request processing device provided in this embodiment can be applied to a storage processor at the storage array end. Figure 8 As shown, the request processing apparatus of this application embodiment may include: an adding module 11 and a task processing module 12, wherein:

[0181] Add module 11 is used to add read data corresponding to read requests from the host to the task queue according to a preset data volume; wherein, if a write request from the host is detected during the process of adding read data to the task queue, the addition of read data is stopped and the write data request corresponding to the write request is added to the task queue instead.

[0182] The task processing module 12 is used to process each task in the task queue in sequence.

[0183] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0184] In one embodiment, the adding module 11 includes: a first adding unit, wherein:

[0185] The first adding unit is used to add the read data corresponding to the read request to the task queue when the length of the read data is less than or equal to a preset length threshold.

[0186] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0187] In one embodiment, the adding module 11 includes: a data splitting unit and a second adding unit, wherein:

[0188] The data splitting unit is used to split the read data according to the preset length threshold when the length of the read data is greater than the preset length threshold, so as to obtain multiple sub-data corresponding to the read data;

[0189] The second adding unit is used to add each sub-data to the task queue to complete the addition of read data to the task queue.

[0190] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0191] In one embodiment, the read data includes multiple sub-data; the adding module 11 includes: an acquisition unit, a third adding unit, and a fourth adding unit, wherein:

[0192] The acquisition unit is used to obtain the number of unprocessed tasks in the task queue as counted by the global counter for any given sub-data.

[0193] The third addition unit is used to add sub-data to the task queue if the amount of unprocessed tasks is less than the preset amount of data, based on the amount of unprocessed tasks and the maximum count value of the global counter.

[0194] The fourth addition unit is used to add sub-data to the task queue if the amount of unprocessed tasks is equal to the preset amount of data, and if the amount of unprocessed tasks in the task queue is less than the preset amount of data.

[0195] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0196] In one embodiment, the third adding unit is specifically used for:

[0197] If the number of unprocessed tasks is less than the maximum count, the sub-data will be added to the task queue.

[0198] If the number of unprocessed tasks is equal to m times the maximum count value, then the maximum count value of the global counter is configured to n1 times the maximum count value, and the sub-data is added to the task queue.

[0199] If the unprocessed task volume is less than m times the maximum count value, then the maximum count value of the global counter is configured to be n2 times the maximum count value, and the sub-data is added to the task queue; m times is less than n1 and greater than n2.

[0200] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0201] In one embodiment, the read data includes multiple sub-data; the request processing device further includes an execution module, wherein:

[0202] An execution module is used to add at least one sub-data that has not been added to the task array when a write data request is added to the task array.

[0203] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0204] In one embodiment, the task processing module 12 is specifically used for:

[0205] Each task in the task queue is sent to the storage array card on the storage array end in turn.

[0206] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0207] In one embodiment, the task is a read data or write data request; the request processing device further includes: a first feedback module and a second feedback module, wherein:

[0208] The first feedback module is used to send a read completion message to the storage array card when the read data is sent to the storage array card, so as to complete the read data processing;

[0209] The second feedback module is used to send a write completion message to the storage array card when the write data corresponding to the write data request is obtained, so as to complete the processing of the write data request.

[0210] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0211] In another embodiment, Figure 9 This is a schematic diagram of the structure of a request processing device in one embodiment of this application. The request processing device provided in this embodiment can be applied to a host card on the host side. Figure 9 As shown, the request processing apparatus of this application embodiment may include: a sending module 21 and a response module 22, wherein:

[0212] The sending module 21 is used to send a write request to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor, so that during the process of adding the read data corresponding to the read request to the task queue, the addition of read data is stopped and the write data request corresponding to the write request is added to the task queue, and each task in the task queue is processed in turn.

[0213] The response module 22 is used to respond to the write data request sent by the storage processor through the storage array card, and to send the write data corresponding to the write data request to the storage array card.

[0214] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0215] In one embodiment, the request processing apparatus further includes: a first receiving module and a second receiving module, wherein:

[0216] The first receiving module is used to receive write completion messages sent by the storage array card and send the write completion messages to the main processor on the host side; and,

[0217] The second receiving module is used to receive read data and read completion messages sent by the storage array card, and then send the read data and read completion messages to the main processor.

[0218] The request processing apparatus provided in this application embodiment can be used to execute the technical solutions in the above-described request processing method embodiments of this application. Its implementation principle and technical effects are similar, and will not be repeated here.

[0219] For specific limitations regarding the request processing apparatus, please refer to the limitations regarding the request processing method above, which will not be repeated here. Each module in the aforementioned request processing apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0220] In one embodiment, a computer device is also provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides processing power. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores read and write data. The network interface communicates with external endpoints via a network connection. When executed by the processor, the computer program implements a request processing method.

[0221] Those skilled in the art will understand that Figure 10The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0222] In one embodiment, a computer device is also provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the technical solutions in the above-described claims processing method embodiments of this application. The implementation principle and technical effects are similar, and will not be repeated here.

[0223] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the technical solution of the above-described request processing method of this application. Its implementation principle and technical effect are similar, and will not be described again here.

[0224] In one embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the technical solution of the request processing method described above in this application. The implementation principle and technical effects are similar and will not be repeated here.

[0225] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0226] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0227] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A request processing method, characterized in that, The method, applied to a storage processor at the storage array end, includes: According to the preset data volume, add read data corresponding to the read request from the host to the task queue; wherein, if a write request from the host is detected during the process of adding read data to the task queue, stop adding read data and switch to adding the write data request corresponding to the write request to the task queue. Each task in the task queue is processed sequentially.

2. The method according to claim 1, characterized in that, Adding the read data corresponding to the read request from the host to the task queue includes: If the length of the read data is less than or equal to a preset length threshold, the read data corresponding to the read request is added to the task queue.

3. The method according to claim 1, characterized in that, Adding the read data corresponding to the read request from the host to the task queue includes: If the length of the read data is greater than a preset length threshold, the read data is split according to the preset length threshold to obtain multiple sub-data corresponding to the read data. Each of the sub-data items is added to the task queue to complete the addition of the read data to the task queue.

4. The method according to any one of claims 1-3, characterized in that, The read data includes multiple sub-data; the step of adding the read data corresponding to the host-side read request to the task queue according to a preset data volume includes: For any sub-data, obtain the number of unprocessed tasks in the task queue as counted by the global counter; If the amount of unprocessed tasks is less than the preset amount of data, then the sub-data is added to the task queue according to the amount of unprocessed tasks and the maximum count value of the global counter. If the amount of unprocessed tasks is equal to the preset amount of data, then if it is detected that the amount of unprocessed tasks in the task queue is less than the preset amount of data, the sub-data is added to the task queue.

5. The method according to claim 4, characterized in that, The step of adding the sub-data to the task queue based on the amount of unprocessed tasks and the maximum count value of the global counter includes: If the number of unprocessed tasks is less than the maximum count value, then the sub-data is added to the task queue; If the amount of unprocessed tasks is equal to m times the maximum count value, then the maximum count value of the global counter is configured to be n1 times the maximum count value, and the sub-data is added to the task queue; If the amount of unprocessed tasks is less than the maximum count value of m times, then the maximum count value of the global counter is configured to be the maximum count value of n2 times, and the sub-data is added to the task queue; the m times is less than n1 and greater than n2.

6. The method according to any one of claims 1-3, characterized in that, The read data includes multiple sub-data; the method further includes: When the write data request is added to the task array, at least one sub-data that was not added is added to the task array.

7. The method according to any one of claims 1-3, characterized in that, The sequential processing of each task in the task queue includes: Each task in the task queue is sent sequentially to the storage array card on the storage array end; Correspondingly, the task is a read data or write data request; the method further includes: When the read data is sent to the storage array card, a read completion message for the read data is sent to the storage array card to complete the processing of the read data; Upon obtaining the write data corresponding to the write data request, a write completion message for the write data is sent to the storage array card to complete the processing of the write data request.

8. A request processing method, characterized in that, The method, applied to a host card on the host side, includes: A write request is sent to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor, so that during the process of adding read data corresponding to the read request to the task queue, the addition of read data is stopped and the write data request corresponding to the write request is added to the task queue, and each task in the task queue is processed in sequence; wherein, the storage processor adds the read data to the task queue according to a preset data amount. In response to the write data request sent by the storage processor through the storage array card, the write data corresponding to the write data request is sent to the storage array card.

9. The method according to claim 8, characterized in that, The method further includes: Receive the write completion message of the written data sent by the storage array card, and send the write completion message to the main processor on the host side; and, The system receives the read data and the read completion message sent by the storage array card, and then sends the read data and the read completion message to the main processor.

10. A data storage system, characterized in that, The system includes: a storage array terminal, a storage array card of the storage array terminal, a host terminal, and a host card of the host terminal; the storage array terminal includes a storage processor, and the host terminal includes a main processor; The main processor is used to send read requests and write requests to the storage processor through the host card and the storage array card; The storage processor is configured to perform the steps of the method as described in any one of claims 1-7; The host card is used to perform the steps of the method as described in any one of claims 8-9.

11. A request processing apparatus, characterized in that, The device includes: The addition module is used to add read data corresponding to read requests from the host to the task queue according to a preset data volume; wherein, during the process of adding read data to the task queue, if a write request from the host is detected, the addition of read data is stopped and the write data request corresponding to the write request is added to the task queue. The task processing module is used to process each task in the task queue in sequence.

12. A request processing apparatus, characterized in that, The device includes: The sending module is used to send a write request to the storage array card at the storage array end, instructing the storage array card to forward the write request to the storage processor, so that during the process of adding the read data corresponding to the read request to the task queue, the addition of the read data is stopped and the write data request corresponding to the write request is added to the task queue, and each task in the task queue is processed in turn. The response module is used to respond to the write data request sent by the storage processor through the storage array card, and to send the write data corresponding to the write data request to the storage array card.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-7.