Request delivery method and device and computer readable storage medium

By putting the requests to be delivered into multiple sorting queues and sorting, the problem of small IO sorting window and long response time is solved, and the parallel sorting of multiple requests to be delivered and the response time is shortened.

CN119065609AInactive Publication Date: 2024-12-03WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411205017.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the IO sorting window is small and the response time is long. The search time of the mechanical hard disk accounts for 70%, and the response time of the sequential IO is relatively long.

Method used

By putting the requests to be delivered into multiple sorting queues and sorting them, the requests to be output for each queue are determined, thereby sorting in parallel, realizing scrolling sorting, and improving the sorting window and response time.

Benefits of technology

It realizes parallel sorting of multiple requests to be delivered, shortens the response time, expands the sorting window, and improves the IO sorting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065609A_ABST
    Figure CN119065609A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a request delivery method and device and a computer readable storage medium, and the method comprises the steps: obtaining at least one to-be-delivered request, and putting the at least one to-be-delivered request into a sorting queue of a queue set; sorting the to-be-delivered requests in the plurality of sorting queues, and determining to-be-output requests corresponding to the plurality of sorting queues; the to-be-output request is a to-be-delivered request located in a first arrangement position in a sorting queue; and determining a target request from the to-be-output requests corresponding to the plurality of sorting queues, and delivering the target request to the corresponding disk array. Therefore, the delivery target request is determined from the plurality of to-be-output requests, and the plurality of sorting queues are sorted in parallel, so that the response time is short. The sequencing queue depth multiplied by the sequencing queue is a sequencing window, and sequencing and delivery are carried out in a pipelined manner, so that rolling sequencing is realized, and the sequencing window is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a request delivery method, device and computer-readable storage medium. Background Art

[0002] The access delay of mechanical hard disks is about 10ms. The seek time is the longest in the delay composition, accounting for 70%, so reducing the seek time is very critical, and sequential IO can reduce the seek time. Currently, linked list insertion is usually used to implement IO sorting. The maximum sorting length is 32, the sorting window is relatively small, and the sorting time of a round of disk arrays reaches milliseconds, and the response time is also relatively long. Summary of the invention

[0003] In view of the above problems, embodiments of the present invention provide a request delivery method, device and computer-readable storage medium, which are used to solve the problems of small IO sorting window and long response time existing in the prior art.

[0004] According to one aspect of an embodiment of the present invention, a request delivery method is provided, the method comprising:

[0005] Obtain at least one request to be delivered, and put the at least one request to be delivered into a sorting queue of a queue set; the type of the request to be delivered is an input / output request; the queue set includes a plurality of sorting queues;

[0006] Sort the pending delivery requests in the multiple sorting queues respectively, and determine the pending output requests corresponding to the multiple sorting queues; the pending output request is the pending delivery request located in the first arrangement position in the sorting queue;

[0007] A target request is determined from the pending output requests corresponding to the multiple sorting queues, and the target request is delivered to the corresponding disk array.

[0008] In an optional implementation, placing at least one to-be-delivered request into a sorting queue of a queue set includes:

[0009] Get the current queue in the queue set; the current queue is the sorting queue where the last request to be delivered is placed;

[0010] According to the queue order in the queue set, starting from the next sorting queue of the current queue, one request to be delivered is put into the sorting queue one by one.

[0011] In an optional implementation, sorting the requests to be delivered in a plurality of sorting queues respectively includes:

[0012] In response to the placement of the request to be delivered, the request to be delivered is compared with the sorted requests in the sorting queue to obtain the comparison information of the request to be delivered corresponding to each sorted request; the sorted request is the sorted request to be delivered in the sorting queue;

[0013] Based on the comparison information, determine the target arrangement position of the request to be delivered in the sorting queue;

[0014] Put the sorted requests in the target sorting position and the sorting position after the target sorting position in the sorting queue into the sorting position after the corresponding sorting position in sequence;

[0015] Place the request to be delivered into the target queue position.

[0016] In an optional implementation, the request to be delivered is compared with the sorted requests in the sorting queue to obtain comparison information of the request to be delivered corresponding to each sorted request, including:

[0017] Compare the keyword information of the request to be delivered with the keyword information of each sorted request;

[0018] If the keyword information of the request to be delivered is greater than the keyword information of the sorted request, determining that the comparison information of the request to be delivered corresponding to the sorted request is a first preset value;

[0019] If the keyword information of the request to be delivered is less than the keyword information of the sorted request, it is determined that the comparison information of the request to be delivered corresponding to the sorted request is a second preset value.

[0020] In an optional implementation, determining a target arrangement position of the request to be delivered in the sorting queue based on the comparison information includes:

[0021] Comparing the comparison information of the sorted requests in two adjacent sorting positions in the sorting queue;

[0022] If the comparison information of the sorted requests in two adjacent arrangement positions is different, the arrangement position where the sorted request whose corresponding comparison information is the second preset value is located is determined as the target arrangement position.

[0023] In an optional implementation, determining a target request from the to-be-output requests corresponding to the multiple sorting queues includes:

[0024] Based on the binary search method, the keyword information of multiple requests to be output is compared;

[0025] The request to be output with the smallest keyword information among the multiple requests to be output is determined as the target request.

[0026] In an optional embodiment, the method further includes:

[0027] If the disk array is in a back pressure state or the bandwidth count corresponding to the disk array is greater than the preset bandwidth, the target request is delivered to the waiting queue;

[0028] If the disk array is released from the back pressure state or the bandwidth count corresponding to the disk array is less than the preset bandwidth, the target request is taken out from the waiting queue and delivered to the corresponding disk array.

[0029] According to another aspect of an embodiment of the present invention, a request delivery device is provided, the device comprising:

[0030] A request acquisition module, used for acquiring at least one request to be delivered, and placing the at least one request to be delivered into a sorting queue of a queue set; the type of the request to be delivered is an input / output request; the queue set includes a plurality of sorting queues;

[0031] A sorting module is used to sort the pending delivery requests in the plurality of sorting queues respectively, and determine the pending output requests corresponding to the plurality of sorting queues; the pending output request is the pending delivery request located in the first arrangement position in the sorting queue;

[0032] The request delivery module is used to determine a target request from the pending output requests corresponding to the multiple sorting queues, and deliver the target request to the corresponding disk array.

[0033] According to another aspect of an embodiment of the present invention, there is provided a computer device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0034] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute any operation of the request delivery method described above.

[0035] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which at least one executable instruction is stored. When the executable instruction is executed on a request delivery apparatus or a computer device, the request delivery apparatus or the computer device executes any operation of the request delivery method described above.

[0036] The embodiment of the present invention puts the acquired requests to be delivered into multiple sorting queues respectively, and sorts the multiple sorting queues respectively, determines the request to be output corresponding to each sorting queue after sorting, thereby determining the target request to be delivered from the multiple requests to be output, and can sort multiple requests to be delivered at the same time, and multiple sorting queues are sorted in parallel, with a short response time. The sorting window is the multiplication of the sorting queue depth and the sorting window. Since the sorting and delivery are performed in a pipeline, rolling sorting is achieved, thereby increasing the sorting window.

[0037] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0039] Figure 1 It is a flowchart of a request delivery method provided by an embodiment of the present invention;

[0040] Figure 2 It is a structural diagram of a queue set in a request delivery method provided by an embodiment of the present invention;

[0041] Figure 3 It is a flow chart of placing a request to be delivered into a sorting queue in a request delivery method provided by an embodiment of the present invention;

[0042] Figure 4 It is a schematic diagram of a flow chart of sorting delivery requests in a request delivery method provided by an embodiment of the present invention;

[0043] Figure 5 It is a schematic diagram of obtaining comparison information in a request delivery method provided by an embodiment of the present invention;

[0044] Figure 6 It is a schematic diagram of a process of determining a target request in a request delivery method provided by an embodiment of the present invention;

[0045] Figure 7 It is a schematic diagram of comparing keyword information of a request to be output in a request delivery method provided by an embodiment of the present invention;

[0046] Figure 8 It is a timing diagram of a request delivery method provided by an embodiment of the present invention;

[0047] Fig. 9 is a structural diagram of an embodiment of a request delivery device provided by an embodiment of the present invention;

[0048] Fig.10 It is a schematic diagram of the structure of an embodiment of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0049] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0050] The access delay of a mechanical hard disk is about 10ms. The seek time is the longest in the delay structure, accounting for 70%, so reducing the seek time is very critical, and sequential IO can reduce the seek time. Currently, linked list insertion is usually used to implement IO sorting. The longest sorting length is 32, the sorting window is relatively small, and the sorting time of a round of disk arrays reaches the millisecond level, and the response time is also relatively long. In addition, the sorting and chain removal of IO can only be performed serially. The chain can only be removed after the sorting is completed, and the sorting cannot be performed during the chain removal process. The ping-pong method is currently used to improve the parallelism of sorting and chain removal. However, since the sorting time is often long, reaching the microsecond level, and the chain removal time is very short, only about 100ns, the parallelism of the ping-pong method is very small.

[0051] Based on this, an embodiment of the present invention provides a request delivery method, which includes: obtaining at least one request to be delivered, and placing at least one request to be delivered into a sorting queue of a queue set; the type of the request to be delivered is an input and output request; the queue set includes multiple sorting queues; sorting the requests to be delivered in the multiple sorting queues respectively, and determining the output requests corresponding to the multiple sorting queues; the output requests are the requests to be delivered in the first arrangement position in the sorting queue; from the output requests corresponding to the multiple sorting queues, determine the target request, and deliver the target request to the corresponding disk array. In this way, by placing the acquired requests to be delivered into multiple sorting queues respectively, and sorting the multiple sorting queues respectively, determining the output requests corresponding to each sorting queue after sorting, and thus determining the target request to be delivered from the multiple output requests, multiple requests to be delivered can be sorted at the same time, and multiple sorting queues are sorted in parallel, and the response time is short. The depth of the sorting queue multiplied by the sorting queue is the sorting window. Since the sorting and delivery are performed in a pipeline, rolling sorting is realized, thereby increasing the sorting window.

[0052] The request delivery method provided in the embodiment of the present invention can be applied to a system or circuit for sorting input and output requests, and can also be used in other systems or circuits that need to be sorted. At the same time, the request to be delivered that is sorted in the embodiment of the present invention is replaced with other corresponding information that needs to be sorted.

[0053] The following describes a specific embodiment of a request delivery method of the present invention. Figure 1It is a flowchart of a request delivery method provided by an embodiment of the present invention. This specification provides method operation steps such as the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in the order of the method shown in the embodiment or the accompanying drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 1 As shown, the method may include:

[0054] Step 110: Obtain at least one request to be delivered, and put the at least one request to be delivered into a sorting queue of the queue set.

[0055] In the embodiment of the present invention, the type of request to be delivered is an input / output request, that is, an IO input to the system. The queue set of the system includes multiple sorting queues, and the multiple sorting queues are parallel and independent. The sorting between the sorting queues and the input / output of the requests are independent of each other.

[0056] In an optional embodiment, Figure 2 is a schematic diagram of the structure of a queue set in a request delivery method provided by an embodiment of the present invention, such as Figure 2 As shown, the queue set, that is, Figure 2 The sort_matrix (sort matrix) shown in FIG contains n sorting queues, namely queue 0, queue 1, ..., queue n-1, and each sorting queue can hold m requests to be delivered. The queue set can hold n*m queues to be delivered at the same time, thereby expanding the IO sorting window.

[0057] Step 120: Sort the requests to be delivered in the multiple sorting queues respectively, and determine the requests to be output corresponding to the multiple sorting queues.

[0058] In the embodiment of the present invention, the requests to be delivered in the plurality of sorting queues are sorted respectively, and the requests to be delivered are arranged in the sorting queue in ascending order. Specifically, the request to be delivered at the first arrangement position in the sorting queue is the smallest input / output request, and the order increases from the first arrangement position to the back. The request to be output is the request to be delivered at the first arrangement position in the sorting queue, that is, the smallest input / output request in each sorting queue.

[0059] Step 130: Determine a target request from the to-be-output requests corresponding to the multiple sorting queues, and deliver the target request to the corresponding disk array.

[0060] In the embodiment of the present invention, in order to ensure that the input / output request finally delivered is the smallest input / output request among all the requests to be delivered, the smallest request to be delivered is selected from the requests to be delivered corresponding to each sorting queue, and is used as the target request, and the target request is delivered to the disk array corresponding to it. In this way, it is ensured that the target request delivered each time is the smallest input / output request among all the requests to be delivered, so that the requests to be delivered can be delivered to the corresponding disk array in the order from small to large.

[0061] In an optional embodiment, if Figure 2 As shown, each sorting queue in the sorting set outputs its corresponding to-be-output request to the cmp_low unit. The cmp_low unit is a sorting unit, which sorts the to-be-output requests therein, finds the smallest input / output request among multiple to-be-output requests, and delivers it as the target request.

[0062] In an optional implementation, when all sorting queues in the queue set are filled with requests to be delivered, or no requests to be delivered are received for more than a preset time, that is, when all requests to be delivered have been received, the target request starts to be delivered to the corresponding disk array.

[0063] In an optional embodiment, if Figure 2 As shown, after the sorting unit (cmp_low unit) determines the target request, it will send the target request to the ARB unit, and the target request will be delivered to its corresponding disk array (storage_crtl) through the ARB unit. At the same time, in order to avoid the situation where the disk array is in a back pressure state or the bandwidth exceeds the upper limit of the system performance and continues to deliver the request to be delivered, resulting in the blocking of the request to be delivered, when the disk array is in a back pressure state or the bandwidth exceeds the upper limit of the system performance, the target request is first placed in the waiting queue. Specifically, if the disk array is in a back pressure state or the bandwidth count corresponding to the disk array is greater than the preset bandwidth, the target request is delivered to the waiting queue (wait_q); if the disk array is released from the back pressure state or the bandwidth count corresponding to the disk array is less than the preset bandwidth, the target request is taken out from the waiting queue (wait_q) and delivered to the corresponding disk array through the ARB unit.

[0064] In an optional embodiment, Figure 3 FIG. 1 is a flow chart of placing a request to be delivered into a sorting queue in a request delivery method provided by an embodiment of the present invention, such as Figure 3 As shown, in the above step 110, placing at least one request to be delivered into the sorting queue of the queue set may include the following steps:

[0065] Step 310: Get the current queue in the queue set.

[0066] In the embodiment of the present invention, the current queue is the sorting queue that the last request to be delivered was placed in. For example, for n sorting queues, the sorting queue that last placed the request to be delivered is sorting queue No. 3, then sorting queue No. 3 is the current queue.

[0067] Step 320: According to the queue order in the queue set, starting from the next sorting queue of the current queue, one request to be delivered is put into the sorting queue in sequence.

[0068] In an embodiment of the present invention, according to the queue order in the queue set, that is, according to the numbering order of the sorting queues, starting from the next sorting queue of the current queue, a request to be delivered is placed in each sorting queue in turn, until all the acquired requests to be delivered are placed in the sorting queue, or all the sorting queues in the queue set are filled. For example, for n sorting queues, sorting queue No. 3 is the current queue, then the request to be delivered is placed starting from sorting queue No. 4, and the request to be delivered is placed one by one in the order of No. 4-No. 5-...n-No. 1-No. 0-No. 1-No. 2-No. 3, thereby forming a loop to ensure that the number of requests to be delivered contained in each sorting queue is consistent as much as possible, and at the same time, the requests to be delivered are placed in the order of the queues to ensure that each sorting queue can be sorted at the same time, thereby improving the parallelism of sorting.

[0069] In an optional embodiment, Figure 4 FIG. 1 is a flow chart of sorting delivery requests in a request delivery method provided by an embodiment of the present invention. Figure 4 As shown, in the above step 120, sorting the requests to be delivered in the multiple sorting queues may include the following steps:

[0070] Step 410: In response to the placement of the request to be delivered, the request to be delivered is compared with the sorted requests in the sorting queue to obtain comparison information of the request to be delivered corresponding to each sorted request.

[0071] In the embodiment of the present invention, the sorted request is a request to be delivered that has been sorted in the sorting queue, that is, a request to be delivered that has been placed in the sorting queue and sorted before the currently received request to be delivered is placed. In fact, each time the sorting queue receives a request to be delivered, it will sort it once to ensure that all the requests to be delivered placed in the sorting queue are sorted requests, that is, the requests to be delivered in the sorting queue are arranged and placed in order.

[0072] In the embodiment of the present invention, the request to be delivered is compared with the sorted requests in the sorting queue, and based on the size relationship between the request to be delivered and the compared sorted requests, the comparison information of the request to be delivered corresponding to each sorted request is determined respectively.

[0073] In an optional embodiment, Figure 5 is a schematic diagram of obtaining comparison information in a request delivery method provided by an embodiment of the present invention, such as Figure 5 As shown, entry k-1 Corresponding to the sorted request at the kth sort position in the sort queue, keyword k-1 is the keyword information of the sorted request at the kth ranking position. Compare the keyword information of the request to be delivered with the keyword information of each sorted request; if the keyword information of the request to be delivered is greater than the keyword information of the sorted request, determine that the comparison information of the request to be delivered corresponding to the sorted request is the first preset value; if the keyword information of the request to be delivered is less than the keyword information of the sorted request, determine that the comparison information of the request to be delivered corresponding to the sorted request is the second preset value. Figure 5 For example, the first preset value is set to 1 and the second preset value is set to 0. If the keyword information of the request to be delivered is greater than the keyword information of the sorted request, the comparison information bit of the request to be delivered corresponding to the sorted request is k-1 = 1, if the keyword information of the request to be delivered is less than the keyword information of the sorted request, then the comparison information bit of the request to be delivered corresponding to the sorted request k-1 =0.

[0074] Step 420: Based on the comparison information, determine the target arrangement position of the request to be delivered in the sorting queue.

[0075] In an embodiment of the present invention, the size relationship of the request to be delivered relative to each sorted request is determined based on the change in comparison information of the request to be delivered corresponding to each sorted request, thereby determining the arrangement position of the request to be delivered in each sorted request, and obtaining the target arrangement position of the request to be delivered in the sorting queue.

[0076] In an optional implementation, the comparison information of the sorted requests in two adjacent arrangement positions in the sorting queue is compared. If the comparison information of the sorted requests in the two adjacent arrangement positions is different, the arrangement position where the sorted request corresponding to the comparison information is a second preset value is determined as the target arrangement position, thereby determining the target arrangement position. Figure 5 For example, after comparison, we can see that entry k-1 The corresponding sorted request, that is, the sorted request at the kth position, has a comparison information of 1, and entry kThe corresponding sorted request, that is, the comparison information corresponding to the sorted request at the k+1th arrangement position is 0, which indicates that the keyword information of the request to be delivered is between the keyword information of the sorted request at the kth arrangement position and the sorted request at the k+1th arrangement position. Therefore, the position of the request to be delivered in the sorting queue should be after the sorted request at the kth arrangement position and before the sorted request at the k+1th arrangement position. It can be concluded that the target arrangement position of the request to be delivered should be the k+1th arrangement position.

[0077] Step 430: sequentially place the sorted requests in the target sorting position and the sorting position after the target sorting position in the sorting queue into the sorting position after the corresponding sorting position.

[0078] In the embodiment of the present invention, in order to place the request to be delivered into the target arrangement position in the sorting queue, it is necessary to adjust the positions of the sorted requests originally placed in the target arrangement position and the arrangement positions after it, and make the target arrangement position vacant. Therefore, the sorted requests in the target arrangement position and the arrangement positions after the target arrangement position in the sorting queue are sequentially placed into the arrangement positions after the corresponding arrangement positions, so that the placement positions of these sorted requests are moved back by one arrangement position, and the target arrangement position is vacated.

[0079] Step 440: Place the request to be delivered into the target arrangement position.

[0080] In the embodiment of the present invention, the request to be delivered is placed in the target arrangement position, so that the sorted request before the request to be delivered is smaller than it, and the sorted request after the request to be delivered is larger than it, thereby completing the sorting of the sorting queue.

[0081] In an optional implementation, the arrangement method shown above is to arrange the requests to be delivered in the sorting queue in order from small to large, that is, the request to be delivered placed in the first arrangement position is the smallest, and accordingly, the request to be output corresponding to the sorting queue is the request to be delivered placed in the first arrangement position. In addition, the requests to be delivered in the sorting queue can also be arranged in order from large to small, that is, the request to be delivered placed in the first arrangement position is the largest, and accordingly, the request to be output corresponding to the sorting queue is the request to be delivered placed in the end arrangement position. It should be noted that in the present invention, the sorting method used by the sorting queue is not specifically limited and can be set according to actual needs, but the sorting method used by each sorting queue in the sorting set should remain consistent.

[0082] In an optional embodiment, Figure 6 FIG. 1 is a flow chart of determining a target request in a request delivery method provided by an embodiment of the present invention. Figure 6As shown, in the above step 130, determining the target request from the to-be-output requests corresponding to the multiple sorting queues may include the following steps:

[0083] Step 610: Based on the binary search method, compare the keyword information of multiple requests to be output.

[0084] In the embodiment of the present invention, based on the binary search method, the keyword information of the to-be-output requests corresponding to the multiple sorting queues are compared in pairs to screen out the to-be-output request with the smallest keyword information among the multiple to-be-output requests.

[0085] Step 620: Determine the request to be output with the smallest keyword information among the multiple requests to be output as the target request.

[0086] In the embodiment of the present invention, based on the binary method, keyword information of multiple requests to be output is compared respectively, so as to screen out the request to be output with the smallest keyword information among the multiple requests to be output, and determine the request to be output as the target request.

[0087] In an optional embodiment, Figure 7 FIG. 1 is a schematic diagram of comparing keyword information of a request to be output in a request delivery method provided by an embodiment of the present invention, such as Figure 7 As shown, a binary search method is adopted to divide the multiple sorting queues into multiple levels, and the output requests corresponding to the multiple sorting queues are grouped into two groups. The keyword information is compared within the group to select the output request with smaller keyword information.

[0088] In the first level, the sorting queues are grouped in order of their numbers. The sorting queues numbered 0, sort_q0, and 1, sorting queues sort_q1, are grouped together. The sorting queues numbered 2, sort_q2, and 3, sorting queues sort_q3, are grouped together. And so on. The sorting queues numbered 2k, sort_q 2k and sort_q, a sorting queue numbered 2k+1 2k+1 The requests to be output are divided into a group, so that all the requests to be output are grouped, and the keyword information is compared within the group, and the requests to be output with smaller keyword information are output to the corresponding position of the second level. For example, the group where the sorting queue sort_q0 with the number 0 and the sorting queue sort_q1 with the number 1 in the first level are located corresponds to the keywoed in the second level. 0’ The groups of sort queues numbered 2, sort_q2, and 3, sort queues numbered 3, sort_q3, correspond to the keywoed in the second level. 2’ , and so on, the sort queue sort_q numbered 2k in the first level 2k and sort_q, a sorting queue numbered 2k+12k+1 The group corresponds to the keywoed in the second level 2k’ In the second level, the groups are divided into two groups according to the grouping method in the first level, and the keyword information is compared within the group. The request to be output with smaller keyword information is output to the corresponding position of the third level. The corresponding relationship between the corresponding positions of the small groups in the second level and the third level is the same as the corresponding relationship between the small groups in the first level and the corresponding positions of the small groups in the second level. By analogy, until the log2nth level, there is only one small group, that is, only two requests to be output. The keyword information of the two requests to be output is compared, and the request to be output with smaller keyword information is determined as the target request.

[0089] In an optional embodiment, Figure 8 This is a timing diagram of a request delivery method provided by an embodiment of the present invention. Figure 8 The request delivery method provided by the embodiment of the present invention is further described. Figure 8 As shown, at time T0, the keyword information of the requests to be output in each sorting queue is compared. At this time, the keyword information of the request to be output in the sort_q1 queue is the smallest among all sorting queues. The request to be output in the sort_q1 queue is taken as the target request, and the POP operation is performed to pop the target request. After the target request is popped, the remaining requests to be delivered in the sort_q1 queue are all moved down, and the other sorting queues remain unchanged. At time T1, the PUSH operation is performed to input a new request to be delivered in the sort_q1 queue, and the sorting in the queue is completed. At time T2, the keyword information of the requests to be output in each sorting queue is compared. At this time, the keyword information of the request to be output in the sort_q2 queue is the smallest among all sorting queues. The request to be output in the sort_q2 queue is taken as the target request, and the POP operation is performed to pop the target request. After the target request is popped, the remaining requests to be delivered in the sort_q2 queue are all moved down, and the other sorting queues remain unchanged. At time T3, the PUSH operation is performed to input a new request to be delivered in the sort_q2 queue, and the sorting in the queue is completed. The above process is repeated to ensure that the input and output requests are delivered in ascending order. Since the sorting and retrieval are fluid, there is always an m*n rolling sorting window in the entire sorting process, thereby expanding the sorting window and realizing the sorting of a larger number of input and output requests.

[0090] The request delivery method provided by the embodiment of the present invention includes: obtaining at least one request to be delivered, and placing at least one request to be delivered into a sorting queue of a queue set; the type of the request to be delivered is an input and output request; the queue set includes multiple sorting queues; sorting the requests to be delivered in the multiple sorting queues respectively, and determining the requests to be output corresponding to the multiple sorting queues; the requests to be output are the requests to be delivered in the first arrangement position in the sorting queues; determining the target request from the requests to be output corresponding to the multiple sorting queues, and delivering the target request to the corresponding disk array. In this way, by placing the acquired requests to be delivered into multiple sorting queues respectively, and sorting the multiple sorting queues respectively, determining the requests to be output corresponding to each sorting queue after sorting, and thus determining the target request to be delivered from the multiple requests to be output, thereby increasing the sorting window, being able to sort multiple requests to be delivered at the same time, and sorting multiple sorting queues in parallel, and having a short response time.

[0091] The embodiment of the present invention also provides a request delivery device, Fig. 9 is a schematic diagram of the structure of an embodiment of a request delivery device provided by an embodiment of the present invention, such as Fig. 9 As shown, the device 900 includes:

[0092] The request acquisition module 910 is used to acquire at least one request to be delivered, and put the at least one request to be delivered into a sorting queue of a queue set; the type of the request to be delivered is an input / output request; the queue set includes a plurality of sorting queues;

[0093] The sorting module 920 is used to sort the pending delivery requests in the plurality of sorting queues respectively, and determine the pending output requests corresponding to the plurality of sorting queues; the pending output request is the pending delivery request in the first arrangement position in the sorting queue;

[0094] The request delivery module 930 is used to determine a target request from the to-be-output requests corresponding to the multiple sorting queues, and deliver the target request to the corresponding disk array.

[0095] In an optional implementation, the request acquisition module 910 includes:

[0096] The current queue acquisition unit is used to acquire the current queue in the queue set; the current queue is the sorting queue into which the last request to be delivered is placed;

[0097] The request delivery unit is used to place a request to be delivered into the sorting queue in sequence according to the queue order in the queue set, starting from the next sorting queue of the current queue.

[0098] In an optional implementation, the sorting module 920 includes:

[0099] A comparison information determination unit is used to compare the request to be delivered with the sorted requests in the sorting queue in response to the placement of the request to be delivered, and obtain the comparison information of the request to be delivered corresponding to each sorted request; the sorted request is the request to be delivered that has been sorted in the sorting queue;

[0100] An arrangement position determination unit, configured to determine a target arrangement position of the request to be delivered in the sorting queue based on the comparison information;

[0101] An ordered request adjustment unit, used to sequentially place the ordered requests in the target arrangement position and the arrangement position after the target arrangement position in the arrangement queue into the arrangement position after the corresponding arrangement position;

[0102] The delivery request placement unit is used to place the delivery request into the target arrangement position.

[0103] In an optional implementation, the comparison information determination unit includes:

[0104] A keyword comparison subunit, used to compare the keyword information of the request to be delivered with the keyword information of each sorted request;

[0105] a comparison information determination subunit, configured to determine that the comparison information of the request to be delivered corresponding to the sorted request is a first preset value if the keyword information of the request to be delivered is greater than the keyword information of the sorted request;

[0106] The comparison information determination subunit is further configured to determine that the comparison information of the request to be delivered corresponding to the sorted request is a second preset value if the keyword information of the request to be delivered is less than the keyword information of the sorted request.

[0107] In an optional implementation, the arrangement position determining unit includes:

[0108] A comparison information comparison subunit is used to compare the comparison information of the sorted requests in two adjacent arrangement positions in the sorting queue;

[0109] The target arrangement position determination subunit is used to determine the arrangement position of the sorted request whose corresponding comparison information is a second preset value as the target arrangement position if the comparison information of the sorted requests in two adjacent arrangement positions is different.

[0110] In an optional implementation, the request delivery module 930 includes:

[0111] A keyword information comparison unit, used for comparing keyword information of multiple requests to be output based on a binary search method;

[0112] The target request determination unit is used to determine the request to be output with the smallest keyword information among the multiple requests to be output as the target request.

[0113] In an optional embodiment, the device further comprises:

[0114] The request delivery module 930 is further used to deliver the target request to the waiting queue if the disk array is in a back pressure state or the bandwidth count corresponding to the disk array is greater than the preset bandwidth;

[0115] The request delivery module 930 is further configured to take out the target request from the waiting queue and deliver it to the corresponding disk array if the disk array is released from the back pressure state or the bandwidth count corresponding to the disk array is less than the preset bandwidth.

[0116] The device and method embodiments in the embodiments of this application are based on the same application concept.

[0117] Fig.10 The schematic diagram of the structure of the embodiment of the computer device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.

[0118] like Fig.10 As shown, the computer device may include: a processor (processor) 1002 , a communication interface (Communications Interface) 1004 , a memory (memory) 1006 , and a communication bus 1008 .

[0119] The processor 1002, the communication interface 1004, and the memory 1006 communicate with each other via the communication bus 1008. The communication interface 1004 is used to communicate with other devices such as a client or other server network elements. The processor 1002 is used to execute the program 1010, which can specifically execute the relevant steps in the above-mentioned method for requesting delivery.

[0120] Specifically, the program 1010 may include program code, which includes computer-executable instructions.

[0121] The processor 1002 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0122] The memory 1006 is used to store the program 1010. The memory 1006 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0123] Program 1010 may be specifically called by processor 1002 to enable the computer device to execute the relevant steps in the above-mentioned method embodiment for requesting delivery.

[0124] It can be understood by those skilled in the art that Fig.10 The structure shown is only for illustration and does not limit the structure of the above-mentioned device. Fig.10 More or fewer components as shown, or with Fig.10 Different configurations shown.

[0125] An embodiment of the present invention provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a request delivery device or a computer device, the request delivery device or the computer device executes the request delivery method in any of the above method embodiments.

[0126] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.

[0127] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof.

[0128] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.

[0129] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of protection of the present invention. The word "comprising" does not exclude the existence of elements or steps not listed in the present invention. The word "one" or "an" preceding an element does not exclude the existence of multiple such elements. The present invention can be implemented by means of hardware including several different elements and by means of appropriately programmed computers. In the embodiments in which several devices are listed, several of these devices can be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.

Claims

1. A request delivery method, characterized in that: The method comprises: Obtain at least one request to be delivered, and put at least one of the request to be delivered into a sorting queue of a queue set; the type of the request to be delivered is an input / output request; the queue set includes a plurality of the sorting queues; Sort the requests to be delivered in the plurality of sorting queues respectively, and determine the requests to be output corresponding to the plurality of sorting queues; the requests to be output are the requests to be delivered in the first arrangement position in the sorting queues; A target request is determined from the to-be-output requests corresponding to the plurality of sorted queues, and the target request is delivered to the corresponding disk array.

2. The method according to claim 1, characterized in that Placing at least one of the to-be-delivered requests into a sorted queue of a queue set includes: Obtaining a current queue in the queue set; the current queue is the sorting queue into which the previous request to be delivered is placed; According to the queue sequence in the queue set, starting from the next sorting queue of the current queue, the to-be-delivered request is sequentially placed into the sorting queue.

3. The method according to claim 1, characterized in that The step of respectively sorting the to-be-delivered requests in the plurality of sorting queues comprises: In response to the placing of the request to be delivered, the request to be delivered is compared with the sorted requests in the sorting queue to obtain comparison information of the request to be delivered corresponding to each of the sorted requests; the sorted request is the sorted request to be delivered in the sorting queue; Based on the comparison information, determining a target arrangement position of the request to be delivered in the sorting queue; Sequentially placing the sorted requests in the target sorting position and the sorting position after the target sorting position in the sorting queue into the sorting position after the corresponding sorting position; The request to be delivered is placed in the target arrangement position.

4. The method according to claim 3, characterized in that The step of comparing the request to be delivered with the sorted requests in the sorting queue to obtain comparison information of the request to be delivered corresponding to each of the sorted requests, includes: Comparing the keyword information of the request to be delivered with the keyword information of each of the sorted requests; If the keyword information of the request to be delivered is greater than the keyword information of the sorted request, determining that the comparison information of the request to be delivered corresponding to the sorted request is a first preset value; If the keyword information of the request to be delivered is less than the keyword information of the sorted request, it is determined that the comparison information of the request to be delivered corresponding to the sorted request is a second preset value.

5. The method according to claim 3, characterized in that: The determining, based on the comparison information, a target arrangement position of the request to be delivered in the sorting queue includes: Comparing comparison information of sorted requests in two adjacent arrangement positions in the sorting queue; If the comparison information of the sorted requests in two adjacent arrangement positions is different, the arrangement position where the sorted request whose corresponding comparison information is a second preset value is located is determined as the target arrangement position.

6. The method according to claim 1, characterized in that The step of determining a target request from the to-be-output requests corresponding to the plurality of sorted queues includes: Based on the binary search method, the keyword information of the plurality of requests to be output is compared; The request to be output with the smallest keyword information among the multiple requests to be output is determined as the target request.

7. The method according to claim 1, characterized in that The method further comprises: If the disk array is in a back pressure state or the bandwidth count corresponding to the disk array is greater than the preset bandwidth, the target request is delivered to the waiting queue; If the disk array is released from the back pressure state or the bandwidth count corresponding to the disk array is less than the preset bandwidth, the target request is taken out from the waiting queue and delivered to the corresponding disk array.

8. A request delivery device, characterized in that: The device comprises: A request acquisition module, used for acquiring at least one request to be delivered, and placing at least one of the request to be delivered into a sorting queue of a queue set; the type of the request to be delivered is an input / output request; the queue set includes a plurality of the sorting queues; A sorting module, used to sort the requests to be delivered in the plurality of sorting queues respectively, and determine the requests to be output corresponding to the plurality of sorting queues; the requests to be output are the requests to be delivered in the first arrangement position in the sorting queue; The request delivery module is used to determine a target request from the to-be-output requests corresponding to the plurality of sorting queues, and deliver the target request to the corresponding disk array.

9. A computer device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the request delivery method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction, and when the executable instruction is executed on the request delivery device or computer equipment, the request delivery device or computer equipment executes the operation of the request delivery method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for performing I / O request buffer memory based on magnetic disc and SAN memory apparatus

    CN101299181A

  • Magnetic disk energy consumption optimization method based on request dynamic delay dispatching

    CN102508618A

  • Disk addressing method and device

    CN102929801A

  • IO scheduling method and apparatus

    CN105549910A

  • Method and apparatus for increasing service quality in file system

    CN105677744A