A queue management method, a data center distributed system and a communication connection device
By designing queue queuing mechanisms and resource release conditions in the queue management method of the data center, and activating and converting idle queues, the problem of queue resource waste is solved, and the concurrent processing capability and queue resource utilization of the data center are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PURPLE MOUNTAIN LAB
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-05
Smart Images

Figure CN122160341A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data communication technology, and in particular to a queue management method, a data center distributed system, and a communication connection device. Background Technology
[0002] With the increasing demand for data communication, data centers are constantly increasing their network bandwidth requirements, leading to an explosive growth in the capacity of switch chips. This has resulted in a significant increase in the number of communication requests that can be processed simultaneously in data centers. In large-scale data communication connections, data centers need to handle millions of concurrent communication requests simultaneously. Each request may involve complex service calls and computational synchronization, and each has corresponding performance metrics to meet. In real-world scenarios, large-scale concurrent communication requests also pose challenges to the concurrent processing capabilities of data centers. Queue scheduling strategies in related technologies cannot effectively utilize queue resources under such communication scales, resulting in wasted queue resources. Therefore, there is an urgent need to propose a method to improve the concurrent processing capabilities of data centers. Summary of the Invention
[0003] This application provides a queue management method, a data center distributed system, and a communication connection device. By designing a queue queuing mechanism and resource release conditions for active queues, the software queues utilizing hardware queue resources are rotated and switched, increasing the number of active software queues and improving the utilization rate of hardware queue resources.
[0004] To achieve the above objectives, the main technical solutions adopted in this application include: In a first aspect, embodiments of this application provide a queue management method applied to the sending end of a data center distributed system, the method comprising: The sender's idle queue is activated to obtain a send queue. If there are idle queue resources in the sending end, the sending queue is allocated resources to obtain a sending active queue; wherein, the sending active queue has a corresponding receiving active queue at the receiving end of the data center distributed system. Message processing is performed through the active sending queue and the active receiving queue. When the active sending queue meets the resource release conditions, the queue resources of the active sending queue are released to switch to the idle sending queue.
[0005] The queue management method proposed in this application activates the sender's idle queue, putting it into a queuing state to obtain a send queuing queue. If idle queue resources exist, they are allocated to the send queuing queue, resulting in a send active queue capable of message processing. Message processing is performed through the send active queue and its corresponding receive active queue. When the send active queue meets the resource release conditions, its queue resources are released, switching it to a send idle queue. Compared with related technologies, this application designs resource release conditions for the active queues performing message processing. When the number of software queues requiring data exchange exceeds the number of hardware queues, the software queues actually processing messages can be periodically switched through resource release conditions, ensuring multiple software queues are active on the software side. This maximizes queue resource utilization and increases the number of queues in an active interactive state. Furthermore, this application activates idle queues into queuing queues through a queue queuing mechanism, reducing the occurrence of repeated queue resource requests from idle queues, lowering the computational cost required for idle queue calls, and improving queue resource utilization.
[0006] Optionally, activating the send idle queue of the sending end to obtain a send queuing queue includes: The queuing status of the send idle queue is queried according to the queuing list to obtain the queuing query result of the send idle queue; When the queue query result indicates that the sending idle queue is in the queue list, the sending idle queue in the queue list is added as a sending queue queue; When the queue query result indicates that the send idle queue is not in the queue list, the send idle queue is added to the queue list to obtain the send queue.
[0007] Optionally, the step of allocating resources to the sending queue to obtain a sending active queue includes: Assign a transmission queue number to the transmission queue and allocate the idle queue resources to the transmission queue; The queue information is retrieved based on the sending queue number to obtain the queue information of the sending queue, so as to convert the sending queue into the sending active queue; wherein the queue information is stored in the local space of the sending end.
[0008] Optionally, before message processing via the active sending queue and the active receiving queue, the method further includes: Send the sending queue number and the queue information to the receiving end to request an active queue from the receiving end; The receiver receives a queue establishment success message from the receiving end and establishes queue connection information between the sending active queue and the receiving active queue for message processing; wherein, the queue establishment success message indicates that the receiving active queue has been successfully established in the receiving end.
[0009] Optionally, the determination of whether the sending active queue meets the resource release conditions can be made in the following way: Service traffic monitoring is performed on the message processing process to obtain the message service traffic of the message processing process; If the message service traffic indicates that the active sending queue has completed message processing and is in an idle state, it is determined that the active sending queue meets the resource release condition. If the packet service traffic indicates that the number of packets processed by the active sending queue has reached the packet processing limit, then the active sending queue is deemed to meet the resource release condition.
[0010] Optionally, after releasing queue resources for the active sending queue to switch to an idle sending queue, the method further includes: If there are pending messages in the sent idle queue, the sent idle queue is added to the queuing list to be added as a sent queue. If there is no pending message in the sent idle queue, the sent idle queue is added to the idle queue pool. The sent idle queue in the idle queue pool is used to add a sent queue when a preset condition is met.
[0011] Secondly, embodiments of this application provide a queue management method applied to the receiving end of a data center distributed system, wherein the data center distributed system further includes a sending end; the method includes: In response to the active queue request sent by the sending end, the receiving idle queue of the receiving end is activated to obtain the receiving queue. If there are idle queue resources in the receiving end, the receiving queue is allocated resources to obtain a receiving active queue; wherein, the receiving active queue corresponds to a sending active queue in the sending end of the data center distributed system. Message processing is performed through the active sending queue and the active receiving queue. When the active receiving queue meets the resource release conditions, the queue resources of the active receiving queue are released to switch it to the idle receiving queue.
[0012] Optionally, the step of allocating resources to the receiving queue to obtain an active receiving queue includes: Assign a receiving queue number to the receiving queue and allocate the idle queue resources to the receiving queue; The queue information is retrieved according to the receiving queue number to obtain the queue information of the receiving queue, so as to convert the receiving queue into the receiving active queue; wherein the queue information is stored in the local space of the receiving end.
[0013] Thirdly, embodiments of this application provide a communication connection device, characterized in that it is used to perform the method described in any one of the above embodiments.
[0014] Fourthly, embodiments of this application provide a data center distributed system, including a sending end and a receiving end. The sending end performs queue management using the method described in any one of the above embodiments, and the receiving end performs queue management using the method described in any one of the above embodiments. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating the steps of the queue management method provided in this application embodiment; Figure 2 This is a functional block diagram of the queue management method in the embodiments of this application; Figure 3 This is a block diagram of the main functions of the queue management method in the embodiments of this application; Figure 4 This is a diagram illustrating the steps for activating the idle queue in an embodiment of this application; Figure 5 This is a diagram illustrating the steps involved in allocating queuing resources in an embodiment of this application. Figure 6 This is a diagram illustrating the interaction steps between the sending end and the receiving end in an embodiment of this application; Figure 7 This is a block diagram of the active queue processing function of the sending end in an embodiment of this application; Figure 8 This is a schematic diagram of active queue connections between multiple terminals in an embodiment of this application; Figure 9 This is a diagram illustrating the steps for determining resource release conditions in an embodiment of this application; Figure 10 This is a diagram illustrating the processing steps of sending an idle queue in an embodiment of this application; Figure 11 A flowchart illustrating the steps of the queue management method provided in this application embodiment; Figure 12 This is a diagram illustrating the steps involved in receiving queue resource allocation in an embodiment of this application. Figure 13 A block diagram of a queue management device provided in an embodiment of this application; Figure 14 A block diagram of a queue management device provided in an embodiment of this application; Figure 15 This is a schematic diagram of the interconnection of communication connection devices in the embodiments of this application; Figure 16 This is a system block diagram of the data center distributed system in the embodiments of this application; Figure 17 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0018] With the increasing demand for data communication, data centers are constantly increasing their network bandwidth requirements, leading to an explosive growth in the capacity of switch chips. This has resulted in a significant increase in the number of communication requests that can be processed simultaneously in data centers. In large-scale data communication connections, data centers need to handle millions of concurrent communication requests simultaneously. Each request may involve complex service calls and computational synchronization, and each has corresponding performance metrics to meet. In real-world scenarios, large-scale concurrent communication requests also pose challenges to the concurrent processing capabilities of data centers. Queue scheduling strategies in related technologies cannot effectively utilize queue resources under such communication scales, resulting in wasted queue resources. Therefore, there is an urgent need to propose a method to improve the concurrent processing capabilities of data centers.
[0019] To address the aforementioned issues, this application provides a queue management method, a data center distributed system, and a communication connection device, applied to the sending end of a data center distributed system. The method involves activating the sending idle queue at the sending end to obtain a sending queuing queue. If idle queue resources exist at the sending end, resource allocation is performed on the sending queuing queue to obtain a sending active queue. The sending active queue has a corresponding receiving active queue at the receiving end. Message processing is performed through the sending active queue and the receiving active queue. When the sending active queue meets the resource release conditions, the queue resources of the sending active queue are released to switch it to a sending idle queue.
[0020] The queue management method provided in this application activates the send idle queue at the sending end, causing the send idle queue to enter a queuing state, thus obtaining a send queuing queue; when idle queue resources exist, the idle queue resources are allocated to the send queuing queue, thus obtaining a send active queue capable of message processing; message processing is performed through the send active queue and its corresponding receive active queue, and when the send active queue meets the resource release conditions, the queue resources of the send active queue are released, and it is switched to a send idle queue.
[0021] Compared to related technologies, this application designs resource release conditions for active queues that process messages. When the number of software queues requiring data exchange exceeds the number of hardware queues, the software queues actually processing messages can be periodically switched through resource release conditions. This ensures that multiple software queues remain active on the software side, thereby maximizing queue resource utilization and increasing the number of queues in an active interactive state. Furthermore, this application activates idle queues as queuing queues through a queue queuing mechanism, reducing the occurrence of idle queues repeatedly requesting queue resources, lowering the computational cost required for idle queue invocation, and improving queue resource utilization.
[0022] According to an embodiment of this application, a queue management method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0023] Reference Figure 1 As shown, this embodiment provides a queue management method applied to the sending end of a data center distributed system. The method includes: S100. Activate the send idle queue at the sending end to obtain the send queuing queue.
[0024] S200. If there are idle queue resources in the sending end, allocate resources to the sending queue to obtain the sending active queue; wherein, the sending active queue has a corresponding receiving active queue in the receiving end of the data center distributed system.
[0025] S300. Message processing is performed through the active sending queue and the active receiving queue. When the active sending queue meets the resource release conditions, the queue resources of the active sending queue are released to switch to the idle sending queue.
[0026] Among them, the sending queuing queue, the sending active queue, and the sending idle queue can be software queues with the ability to process messages. The idle queue resource can be a hardware queue in an idle state, used as a carrier for the software queue and providing a message processing channel for the software queue.
[0027] Resource release conditions can include processing completion conditions and round-robin processing conditions. The processing completion condition can be whether the active sending queue has completed processing all required packets. Once the active sending queue has completed processing all required packets, it is determined that the active sending queue meets the resource release condition. The round-robin processing condition can be whether the active sending queue has reached the packet processing limit set for the current processing round. Once the active sending queue has reached the packet processing limit set for the current processing round, it is determined that the active sending queue meets the resource release condition. It is understandable that the round-robin processing condition can prevent active sending queues with high packet traffic from occupying queue resources for extended periods, thus preventing other packets from being processed in a timely manner and affecting packet processing efficiency.
[0028] Reference Figure 2As shown, the transmitting end of a data center distributed system may include a host system, a serial bus (PCIe, Peripheral Component Interconnect Express), a massive queuing management module, an active queue module, and an access control module (NIC MAC, Network Interface Card Media Access Control). The massive queuing management module and the active queue module can be hardware devices supporting massive numbers of connections, including FPGAs (Field-Programmable Gate Arrays) and SoCs (System on Chips). All of these modules use standard Ethernet packet formats and are compatible with standardized protocols at different levels, including Layer 3 protocols such as IPv4 / IPv6 and Layer 4 protocols such as TCP / UDP. This allows protocol packets designed by the transmitting end to be transmitted in general-purpose network products, reducing the impact on existing general-purpose network products.
[0029] Specifically, refer to Figure 3 As shown, the sending end is first initialized, and a link connection is established between the modules using a standard network card circuit. Responding to the application requirements of the actual scenario, the host system selects any idle sending queue for activation and sends the doorbell signal of this activated queue to the large-scale queue management module. Upon receiving the doorbell signal, the large-scale queue management module filters the idle sending queue using a queue filter. If the idle sending queue is not in a queued state, it is added to the queue list, resulting in a sending queue. It is understandable that the application requirements of the actual scenario may include system initialization, dynamic resource adjustment, and sudden changes in traffic.
[0030] In some embodiments, the queuing list can be a FIFO (First In, First Out) queue structure for managing the sending queuing queue. The FIFO queue structure of the queuing list can also be extended into the host system memory. When the queuing list of the ultra-large-scale queue management module is fully occupied, the sending queuing queue can be stored in the host system memory, reducing the occurrence of queue data loss.
[0031] Furthermore, if the queuing list is not empty, meaning at least one sending queuing queue exists, the large-scale queue management module initiates an active queue resource request to the active queue module. Upon receiving the request, the active queue module searches for available resources within its own active queues to determine if any are available. If available, the resource is allocated to the sending queuing queue based on its queuing priority, thus switching the sending queuing queue to a sending active queue. If no available resources exist, no resource allocation occurs until any currently active sending queue exits the message processing process and, after resource release, becomes available for allocation.
[0032] It should be noted that the data center distributed system also includes a receiving end corresponding to the sending end. The receiving end, as the recipient of message data, can parse and verify the received message data, and then submit the processed message data to the upper-layer application for further business processing. The receiving end has a corresponding active receiving queue, which is used to connect to the active sending queue to perform differentiated processing on the message data sent by the sending end. The active sending queue and the active receiving queue can be obtained simultaneously before message processing, and their acquisition methods can be the same or different.
[0033] Furthermore, for any active sending queue allocated to an idle queue resource, the queue information of that active sending queue is obtained and sent to the active queue module to update the software-hardware (ActiveQue Map Real Que) mapping table in the active queue module. This establishes a corresponding connection between the software queue and the hardware queue, determining which hardware queues will carry the software queue for message processing. Based on the software-hardware mapping table, functional units are allocated to the active sending queues, and a message processing pipeline is constructed according to the business logic and state context of each active sending queue. It can be understood that, based on the message processing pipeline, hardware resources can be assembled into processing links according to the business requirements of the software queues, enabling different functional units within the hardware resources to work in parallel and autonomously complete various operations in the message processing process, thereby improving message processing efficiency.
[0034] Furthermore, a round-robin (RR) scheduling process is used for all active sending queues to allocate message processing bandwidth among them. After receiving an external message, the sender processes the message through the active sending and receiving queues according to the message processing pipeline and the allocated bandwidth. Understandably, the message service status of the active sending queues can be monitored during message processing to determine the message traffic already processed and whether the queues are idle.
[0035] Based on the obtained message service status, it can be determined whether each active sending queue needs resource release. If the message service status of any active sending queue indicates that the active sending queue meets the resource release conditions, the active sending queue module releases the queue resources for that active sending queue, switches it to an idle sending queue, and allocates the obtained idle queue resources to any active sending queue. If the message service status of any active sending queue indicates that the active sending queue does not meet the resource release conditions, it means that the active sending queue still has message data to be processed within the current active period. In this case, no resource release is performed on the active sending queue, allowing it to continue processing messages until the active sending queue meets the resource release conditions.
[0036] Understandably, when any active sending queue meets the resource release condition, it indicates that the active sending queue has completed the packet data processing required within the current active period. The packet processing results generated by this active sending queue within the current active period are then written back to the host system memory to ensure that the packet processing results are effectively recorded, allowing the active sending queue to continue packet processing when subsequently invoked. For example, the packet processing results may include a header pointer, a tail pointer, connection information, and active handle information, where the connection information may include the source IP address (SIP), destination IP address (DIP), source MAC address (SMAC), and destination MAC address (DMAC).
[0037] It should be noted that in some embodiments, each active sending queue may also correspond to a designated switching flag and a prohibited switching flag to control the priority of active queue switching. The designated switching flag can be used to release resources for any active sending queue before the resource release condition is met, thereby interrupting the message processing of that active sending queue and allocating the idle queue resources to the sending queue. The prohibited switching flag can be used to control any active sending queue to continue message processing without judging the resource release condition or releasing resources, thereby improving the reliability and integrity of critical message processing.
[0038] In some embodiments, after a sending active queue meets the resource release condition, there may be a situation where the resources of the sending active queue are not released in a timely manner, causing the sending active queue to remain in an active state. To address this, aging release conditions can be set for all sending active queues, and all sending active queues can be periodically checked according to the aging release conditions. When any sending active queue meets the aging release condition, it indicates that the resources of that sending active queue need to be released. The aging release condition can include a queue idle condition and a release command condition. The queue idle condition can be achieved by periodically checking all sending active queues at preset time intervals. If any sending active queue has not received any packets and has not been invoked and processed packets for multiple time intervals, it is determined that the resources of that sending active queue need to be released. The release command condition can include a sending queue command condition and a receiving queue command condition. For sending active queues and receiving active queues with a corresponding relationship, if either of the active queues receives a resource release command, it is determined that the resources of both need to be released.
[0039] The queue management method provided in this embodiment activates the send idle queue at the sending end, causing the send idle queue to enter a queuing state, thus obtaining a send queuing queue; when idle queue resources exist, the idle queue resources are allocated to the send queuing queue, thus obtaining a send active queue capable of message processing; message processing is performed through the send active queue and its corresponding receive active queue, and when the send active queue meets the resource release conditions, the queue resources of the send active queue are released, and it is switched to a send idle queue.
[0040] Compared to related technologies, this application designs resource release conditions for active queues that process messages. When the number of software queues requiring data exchange exceeds the number of hardware queues, the software queues actually processing messages can be periodically switched through resource release conditions. This ensures that multiple software queues remain active on the software side, thereby maximizing queue resource utilization and increasing the number of queues in an active interactive state. Furthermore, this application activates idle queues as queuing queues through a queue queuing mechanism, reducing the occurrence of idle queues repeatedly requesting queue resources, lowering the computational cost required for idle queue invocation, and improving queue resource utilization.
[0041] Reference Figure 4 As shown, in one embodiment of this application, the sender's idle queue is activated to obtain a send queuing queue, including: S110. Query the queuing status of the send idle queue according to the queuing list, and obtain the queuing query result of the send idle queue.
[0042] S120. When the queue query result indicates that the send idle queue is in the queue list, add the send idle queue in the queue list as a send queue.
[0043] S130. If the queue query result indicates that the send idle queue is not in the queue list, add the send idle queue to the queue list to obtain the send queue.
[0044] The queuing list can be a collection of all sending queues, containing a queue identifier (QID) for each sending queue. The sending queues in the queuing list can be arranged in priority order, with the first sending queue in the list being the highest priority queue, and resources will be allocated to it first if there are available free queue resources.
[0045] Specifically, for any idle sending queue that needs to be activated, after the ultra-large-scale queue management module receives the doorbell signal, it queries the queue status in the queue list based on the queue identifier of that idle sending queue, obtaining the queue query result for that idle sending queue, indicating whether that idle sending queue is already in a queued state. For example, the queue query result can be a binary decision result, including 0 and 1, where 0 can indicate that the queue identifier of that idle sending queue is not in the queue list, i.e., that the idle sending queue is not in a queued state; 1 can indicate that the queue identifier of that idle sending queue is in the queue list, i.e., that the idle sending queue is in a queued state.
[0046] Furthermore, when the queuing query result indicates that any given send idle queue is in the queuing list, that send idle queue is already in a queuing state. To avoid duplicate requests for queue resources, the queue identifier of that send idle queue is discarded without further processing, and the corresponding send queuing queue is added to the queuing list for that send idle queue.
[0047] Furthermore, if the queuing query result indicates that any given idle sending queue is not in the queuing list, then that given idle sending queue is not in a queuing state. In this case, the given idle sending queue is added to the queuing list, resulting in the corresponding sending queue. After the given idle sending queue is added to the queuing list, the queuing query result for that given idle sending queue is modified to indicate that it has been added to the queuing list, and there is no need to repeat the queue addition process subsequently.
[0048] Understandably, by querying the queue status in the queue list based on the queue identifier of the send idle queue, it can be determined whether the send idle queue is already in a queue state, thereby reducing the situation of the idle queue repeatedly requesting queue resources, reducing the computational cost required for idle queue calls, and improving the utilization rate of queue resources.
[0049] Reference Figure 5 As shown, in one embodiment of this application, resource allocation is performed on the sending queuing queue to obtain a sending active queue, including: S210. Assign a transmission queue number to the transmission queue and allocate idle queue resources to the transmission queue.
[0050] S220. Retrieve queue information based on the sending queue number to obtain the queue information of the sending queue, so as to convert the sending queue into a sending active queue; wherein, the queue information is stored in the local space of the sending end.
[0051] Specifically, for the highest-priority transmission queue in the queuing list, a transmission queue number is assigned to that queue, and idle queue resources are allocated to it, allowing it to acquire idle queue resources. It can be understood that the transmission queue number can serve as an identifier for the transmission queue as an active queue, and it can be dynamically allocated in response to this resource allocation. The transmission queue number is stored in a dynamic queue number pool at the transmitting end, corresponding to hardware queue resources. When allocating a transmission queue number, the transmission queue number corresponding to an idle queue resource is selected from the dynamic queue number pool and allocated to that queue.
[0052] Furthermore, the sending queue is output from the queue list, and queue information is retrieved from the host system according to the sending queue number assigned to it. This queue information is then read from the host system and stored in the local space of the sending end for updating the active queue module. It is understood that the queue information describes the queue status and configuration of the sending queue, allowing the active queue module to control and manage it. In some embodiments, the queue information may include a head pointer, a tail pointer, link information, and processing reservation information, where the link information may include source IP address, destination IP address, source MAC address, and destination MAC address.
[0053] Furthermore, after obtaining the queue information and updating the active queue module, the sending queue number is sent from the ultra-large-scale queue management module to the active queue module to notify the active queue module that the sending queue can be scheduled as an active queue, thereby obtaining the active sending queue that can be scheduled.
[0054] Reference Figure 6 As shown, in one embodiment of this application, before message processing via the sending active queue and the receiving active queue, the method further includes: S240. Send the sending queue number and queue information to the receiving end to request an active queue from the receiving end.
[0055] S250. Receive the queue establishment success message from the receiving end, and establish queue connection information between the sending active queue and the receiving active queue for message processing; wherein, the queue establishment success message indicates that the receiving active queue has been successfully established in the receiving end.
[0056] Specifically, in related technologies, during message processing, only the sending active queue is requested at the sending end, without prior requesting a receiving active queue at the receiving end. This results in the receiving end only being able to request an active queue after receiving message data, and then using the requested receiving active queue to process the message data. In this case, the receiving end's active queue request takes a certain amount of time, which usually exceeds the time that message data can reside in cache form. This makes the message data easily replaced by other subsequently arriving message data. After the message data is replaced, the receiving active queue must query the message data through the host system and pull the message data to local space before message processing can begin, thus limiting the message processing efficiency of the receiving end and affecting message processing performance.
[0057] Reference Figure 7As shown, the active queue module is used for queue management of active sending queues, including a queue resource reclamation mechanism, a queue resource allocation mechanism, and a message descriptor acquisition mechanism. The queue resource reclamation mechanism reclaims the queue resources of any active sending queue when it has completed message processing and can release resources. The reclaimed queue resources are then used as idle queue resources for allocation to subsequently scheduled sending queues. Figure 7 In the illustrated embodiment, the queue resource reclamation mechanism may include a queue resource reclamation unit connected to the ultra-large-scale queue management module to reclaim queue resources based on the queue status in the ultra-large-scale queue management module and generate idle queue resources.
[0058] The queue resource allocation mechanism is used to allocate idle queue resources to the sending queuing queue, enabling the sending queuing queue to obtain available queue resources and become a sending active queue for message processing. In such cases... Figure 7 In the embodiment shown, the queue resource allocation mechanism can be connected to the ultra-large-scale queue management module. When the ultra-large-scale queue management module sends a queue application success signal, that is, when there is available idle queue resource for any sending queue, the idle queue resource is allocated to that sending queue.
[0059] The message descriptor acquisition mechanism is used to obtain the message descriptors required for the processing of messages after the sending queuing queue is converted into a sending active queue. Figure 7 In the illustrated embodiment, the message descriptor scheduling mechanism may include a message descriptor scheduling unit, a direct memory access unit, and a message descriptor output unit connected in sequence. The message descriptor scheduling unit schedules corresponding message descriptors to describe the storage location of data packets related to the message in the host system memory, based on the message content to be processed. The direct memory access unit acquires the corresponding message data packets using Direct Memory Access (DMA) based on the message descriptors. The message descriptor output unit outputs the acquired message data packets as the data basis for message processing.
[0060] Considering the aforementioned issues, the active queue module in this embodiment also includes a receiver resource preparation mechanism. In such cases... Figure 7In the illustrated embodiment, the receiving end resource preparation mechanism includes a remote queue application unit, an application result receiving unit, a receiving idle queue management unit, and a receiving queue resource reclamation unit. The remote queue application unit is used to apply for a receiving queue from a remote end connected to the sending end, thereby preparing queue resources in advance at the receiving end. The application result receiving unit is used to receive queue application information from the remote end and determine whether the receiving active queue is ready at the receiving end. The receiving idle queue management unit is used to manage the receiving idle queue when the processing end is acting as the receiving end, so as to be able to schedule the idle queue in a timely manner after receiving a remote queue application. The receiving queue resource reclamation unit is used to release resources from the receiving active queue when the processing end is acting as the receiving end, reclaiming the queue resources of the receiving active queue for allocation to subsequent scheduled receiving queues.
[0061] Based on the aforementioned receiver resource preparation mechanism, before message processing, the receiver requests an active queue in advance based on the relevant information of the sending active queue in the sending end, thus pre-determining the receiving active queue in the receiving end. After successfully establishing the receiving active queue, the receiving end sends a queue establishment success message to the sending end, indicating that the receiving active queue has been successfully established. Upon receiving the queue establishment success message, the sending end establishes queue connection information between the sending active queue and the receiving active queue to determine the correspondence between them. It should be noted that the queue connection information is stored in the sending end's local space and used as the basis for scheduling the sending active queue during message processing. Similarly, the receiving end can also establish queue connection information between the sending active queue and the receiving active queue and store it in the receiving end's local space for use as the basis for scheduling the receiving active queue during message processing.
[0062] Reference Figure 8 As shown, the figure contains multiple such... Figure 7 The active queue modules shown correspond to their respective data center distributed systems. For example, in... Figure 8 In the illustrated embodiment, the data center distributed system corresponding to the active queue module on the left can serve as the first processing end, and the data center distributed system corresponding to the active queue module on the right can serve as the second processing end. The first and second processing ends are remote from each other and can be connected via a switch to send active queue requests and queue establishment success information. For example, the switch used for connection can be an Ethernet switch (ETH switch), and the first and second processing ends are respectively connected to the switch via Network Interface Cards (NICs).
[0063] Figure 8In this process, the first processing end can act as the sender, in which case the second processing end can act as the corresponding receiver; conversely, the second processing end can also act as the sender, in which case the first processing end can act as the corresponding receiver. Taking the first processing end as the sender as an example, after the first processing end obtains a sending active queue, it requests an active queue from the second processing end. Upon receiving the active queue request, the second processing end establishes a receiving active queue based on its own idle queue resources and sends the result of successfully establishing the receiving active queue to the first processing end. After confirming that both the first and second processing ends have corresponding active queues, message processing begins.
[0064] Understandably, during message processing, the receive active queue can be used to receive message data sent by the send active queue and process the message data quickly. This can reduce processing latency and improve message processing efficiency. On the other hand, when the receive active queue is processing messages, the message data is still in a buffered state. Processing the buffered message data can minimize the latency and energy consumption of data movement, thereby reducing the processing latency of message data.
[0065] Reference Figure 9 As shown in one embodiment of this application, the method for determining whether the active sending queue meets the resource release conditions is as follows: S310. Monitor the service traffic of the message processing process to obtain the message service traffic of the message processing process.
[0066] S320. If the message service traffic indicates that the active sending queue has completed message processing and is in an idle state, it is determined that the active sending queue meets the resource release conditions.
[0067] Alternatively, if the active sending queue has a message processing limit, and the message service traffic indicates that the number of messages processed by the active sending queue has reached the message processing limit, then the active sending queue is deemed to meet the resource release conditions.
[0068] Specifically, refer to Figure 7As shown, the active queue module also includes a queue resource reclamation mechanism to determine whether the sending active queue meets the resource release conditions and releases resources for the sending active queue that meets the conditions. In the queue resource reclamation mechanism, service traffic monitoring is first performed on the packet processing process to determine the packet traffic already processed by the sending active queue, thus obtaining the packet service traffic. In some embodiments, service traffic monitoring may be performed during packet processing by reading the packet descriptor or the Maximum Transmission Unit (MTU) from the host system memory based on the sending queue number of the sending active queue to obtain metadata of the currently processed packet data, including storage location, data length, and data status, thereby determining the packet processing status and number of packets processed by the sending active queue.
[0069] Furthermore, after obtaining the message service traffic, the processing status of the message service traffic is analyzed to determine the message processing status of the active sending queue. For example, when reading message descriptors during message processing, the message service traffic may include header pointer indices and tail pointer indices. If the header pointer indices and tail pointer indices are equal, it can be determined that the active sending queue has completed message processing, is in an idle state, and has no subsequent messages requiring processing. At this point, it can be determined that the active sending queue meets the resource release conditions, and resources can be released for the active sending queue.
[0070] Furthermore, if the active sending queue has a message processing limit, the number of messages processed can be compared with the message processing limit to determine whether the message processing quantity of the active sending queue has reached the message processing limit. When the message processing quantity reaches the message processing limit, it is determined that the active sending queue meets the resource release condition, and the resources of the active sending queue can be released. In some embodiments, if there is at least one sending queue in the queuing list and there are currently no idle queue resources, the resources of the active sending queue are released; if there is no sending queue in the queuing list, or there are currently idle queue resources, it means that the queue resources in the current sending end are sufficient and not limited by queue resources. In this case, the resources of the active sending queue do not need to be released, allowing the active sending queue to continue processing messages.
[0071] It's important to note that when there's a message processing limit for the active sending queue, intelligent switching can be performed based on this limit. This prevents high-traffic active sending queues from remaining continuously active, thus preventing other queues from processing messages. Understandably, with multiple high-traffic active sending queues, this switching mechanism allows all high-traffic active sending queues to process messages sequentially in a round-robin fashion. From a software perspective, the connection between these active sending queues and their corresponding active receiving queues can be considered continuous, significantly improving the data center's concurrent processing capabilities with limited queue resources.
[0072] Reference Figure 10 As shown in one embodiment of this application, after releasing queue resources from the active sending queue to switch to the idle sending queue, the method further includes: S410. If there are pending messages in the send idle queue, add the send idle queue to the queuing list to create a new send queue.
[0073] S420. If there is no pending message in the send idle queue, add the send idle queue to the idle queue pool. The send idle queue in the idle queue pool is used to add a send queue when the preset conditions are met.
[0074] Specifically, for high-volume active sending queues, after the active sending queue is switched to an idle sending queue following resource release, the idle sending queue still corresponds to packets awaiting processing. Therefore, in the next active cycle, the idle sending queue needs to be scheduled to continue processing packets. Thus, when there are packets awaiting processing in the idle sending queue, it can be added back to the queuing list as a new sending queue, putting it in a queued state, waiting for subsequent calls.
[0075] Furthermore, if the idle sending queue has no pending messages, it indicates that the idle sending queue has completed processing all message data and no further message processing is needed. In this case, the idle sending queue is added to the idle queue pool. It is understood that, under certain preset conditions, any idle sending queue in the idle queue pool can be re-added to the queuing list, thus becoming a new sending queue for message processing. For example, the preset condition could be that the data center distributed system receives a new message and needs to process it through a new active queue.
[0076] In some embodiments, the idle transmission queue is marked with a queuing flag when added to the queuing list, indicating that the idle transmission queue is in a queued state. If there is a pending message corresponding to the idle transmission queue, the idle transmission queue will be added back to the queuing list. In this case, the queuing flag of the idle transmission queue can be retained to indicate that the idle transmission queue is still in a queued state. If there is no pending message corresponding to the idle transmission queue, the idle transmission queue will be added to the idle queue pool and will only be added back to the queuing list when there is a subsequent call request. In this case, the queuing flag of the idle transmission queue can be removed to ensure that the idle transmission queue can be added back to the queuing list normally in subsequent calls.
[0077] Reference Figure 11 As shown, this embodiment provides a queue management method applied to the receiving end of a data center distributed system, which also includes a sending end; the method includes: S500. In response to the active queue request sent by the sender, activate the receive idle queue of the receiver to obtain the receive queue.
[0078] S600. If there are idle queue resources at the receiving end, allocate resources to the receiving queue to obtain the receiving active queue; wherein, the receiving active queue corresponds to the sending active queue at the sending end of the data center distributed system.
[0079] S700. Message processing is performed through the sending active queue and the receiving active queue. When the receiving active queue meets the resource release conditions, the queue resources of the receiving active queue are released to switch to the receiving idle queue.
[0080] Specifically, the structure of the receiving end is the same as that of the sending end, which can be referred to as follows. Figure 2 As shown. The sending end can send an active queue request to the receiving end after obtaining an active sending queue, or it can send the active queue request to the receiving end simultaneously. After receiving the active queue request from the sending end, the receiving end selects any idle receiving queue through the host system to activate the queue and sends the doorbell signal of this activated queue to the ultra-large-scale queue management module. After receiving the doorbell signal, the ultra-large-scale queue management module filters the idle receiving queue through a queue filter. If the idle receiving queue is not in a queued state, it adds the idle receiving queue to the queue list, thus obtaining the receiving queue.
[0081] Furthermore, if the queuing list is not empty, meaning at least one receive queuing queue exists, the large-scale queue management module initiates an active queue resource request to the active queue module. Upon receiving the request, the active queue module searches for available resources within its own active queues to determine if any are available. If available, the resource is allocated to the receive queuing queue based on its queuing priority, thus switching the receive queuing queue to an active receive queue. If no available resources exist, no resource allocation occurs until any currently active receive queue exits the message processing process and, after resource release, becomes available for allocation.
[0082] Furthermore, after obtaining the active receive queue, queue connection information is established between the active send queue and the active receive queue and stored in local space to determine the correspondence between them. Based on the queue connection information, message processing is performed through the active send queue and the active receive queue, and the message service status of the active receive queue is monitored. If the message service status of the active receive queue indicates that the active receive queue meets the resource release conditions, the queue resources for the active receive queue are released in the active queue module, the active receive queue is switched to an idle receive queue, and the obtained idle queue resources are allocated to other receive queues. If the message service status of the active receive queue indicates that the active receive queue does not meet the resource release conditions, it means that the active receive queue still has message data to be processed within the current active period. In this case, the resources for the active receive queue are not released, allowing the active receive queue to continue message processing until the active receive queue meets the resource release conditions.
[0083] Reference Figure 12 As shown in one embodiment of this application, the active queue application corresponds to a receiving idle queue in the receiving end, and the standby queue is not part of the receiving active queue; resource allocation is performed on the receiving queue to obtain the receiving active queue, including: S610. Assign a receiving queue number to the receiving queue and allocate idle queue resources to the receiving queue.
[0084] S620. Retrieve queue information based on the receiving queue number to obtain the queue information of the receiving queue, so as to convert the receiving queue into a receiving active queue; wherein, the queue information is stored in the local space of the receiving end.
[0085] Specifically, for the highest-priority receiving queue in the queuing list, a receiving queue number is assigned to that receiving queue, and idle queue resources are allocated to it, allowing the receiving queue to acquire idle queue resources. It is understandable that the receiving queue number can be an identifier for the receiving queue as an active queue, and it can be dynamically allocated in response to this resource allocation. The receiving queue number is stored in the receiving end's dynamic queue number pool, corresponding to hardware queue resources. When allocating a receiving queue number, the receiving queue number corresponding to an idle queue resource is selected from the dynamic queue number pool and allocated to the receiving queue.
[0086] Furthermore, the receiving queue is output from the queue list, and queue information is retrieved from the host system according to the receiving queue number assigned to it. This queue information is then read from the host system and stored in the local space of the receiving end for updating the active queue module. It is understood that the queue information describes the queue status and configuration of the receiving queue, allowing the active queue module to control and manage it.
[0087] Furthermore, after obtaining the queue information and updating the active queue module, the receiving queue number is received from the ultra-large-scale queue management module to the active queue module to notify the active queue module that the receiving queue can be scheduled as an active queue, thereby obtaining the active receiving queue that can be scheduled.
[0088] Accordingly, please refer to Figure 13 This application provides a queue management device applied to the sending end of a data center distributed system. The device includes: The idle queue activation module 1310 is used to activate the send idle queue at the sending end to obtain the send queue.
[0089] The queue resource allocation module 1320 is used to allocate resources to the sending queue when there are idle queue resources at the sending end, so as to obtain the sending active queue; wherein, the sending active queue corresponds to the receiving active queue at the receiving end of the data center distributed system.
[0090] The queue resource release module 1330 is used to process messages through the sending active queue and the receiving active queue. When the sending active queue meets the resource release conditions, the queue resources of the sending active queue are released to switch to the sending idle queue.
[0091] In some optional implementations, the idle queue activation module 1310 includes: The queuing status query unit is used to query the queuing status of the sending idle queue according to the queuing list and obtain the queuing query result of the sending idle queue.
[0092] The first queue queuing unit is used to add the idle sending queue in the queue list as a sending queue when the queuing query result indicates that the sending idle queue is in the queue list.
[0093] The second queue queuing unit is used to add the idle queue to the queue list when the queuing query result indicates that the idle queue is not in the queue list, thus obtaining the send queue.
[0094] In some alternative implementations, the queue resource allocation module 1320 includes: The queue number allocation unit is used to assign a transmission queue number to the transmission queuing queue and allocate idle queue resources to the transmission queuing queue.
[0095] The queue information retrieval unit is used to retrieve queue information based on the sending queue number to obtain the queue information of the sending queue, so as to convert the sending queue into a sending active queue; wherein, the queue information is stored in the local space of the sending end.
[0096] In some optional implementations, the queue resource allocation module 1320 further includes: The receive queue request unit is used to send the send queue number and queue information to the receiving end in order to request an active queue from the receiving end.
[0097] The connection information establishment unit is used to receive the queue establishment success information fed back by the receiving end, and establish queue connection information between the sending active queue and the receiving active queue for message processing; wherein, the queue establishment success information indicates that the receiving active queue has been successfully established in the receiving end.
[0098] In some optional implementations, the queue resource release module 1330 includes: The service traffic monitoring unit is used to monitor the service traffic during the message processing process and obtain the message service traffic during the message processing process.
[0099] The first condition judgment unit is used to perform condition judgment on the active sending queue. If the message service traffic indicates that the active sending queue has completed message processing and is in an idle state, it is determined that the active sending queue meets the resource release condition.
[0100] The second condition judgment unit is used to perform condition judgment on the active sending queue. If the packet service traffic indicates that the number of packets processed by the active sending queue has reached the packet processing limit, the active sending queue is determined to meet the resource release condition.
[0101] In some alternative embodiments, the device further includes an idle queue processing module, comprising: The first idle processing unit is used to add the idle queue to the queuing list when there are pending messages in the idle queue, so as to add it as a new queuing queue for transmission.
[0102] The second idle processing unit is used to add the idle queue to the idle queue pool when there is no corresponding message to be processed in the idle queue. The idle queue in the idle queue pool is used to add the idle queue to the transmission queue when the preset conditions are met.
[0103] Please refer to Figure 14 This application provides a queue management device applied to the receiving end of a data center distributed system, which also includes a sending end; the device includes: The idle queue activation module 1410 is used to activate the idle queue in response to the active queue request sent by the sender, and obtain the receiving queue.
[0104] The queue resource allocation module 1420 is used to allocate resources to the receiving queue when there are idle queue resources at the receiving end, so as to obtain the receiving active queue; wherein, the receiving active queue corresponds to the sending active queue at the sending end of the data center distributed system.
[0105] The queue resource release module 1430 is used to process messages through the sending active queue and the receiving active queue. When the receiving active queue meets the resource release conditions, the queue resources of the receiving active queue are released to switch to the receiving idle queue.
[0106] In some alternative implementations, the queue resource allocation module 1420 includes: The queue number allocation unit is used to assign a receiving queue number to the receiving queue and to allocate idle queue resources to the receiving queue.
[0107] The queue information retrieval unit is used to retrieve queue information based on the receiving queue number to obtain the queue information of the receiving queue, so as to convert the receiving queue into a receiving active queue; wherein, the queue information is stored in the local space of the receiving end.
[0108] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0109] In this embodiment, the queue management device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0110] This application also provides a communication connection device, characterized in that it is used to perform the method described in any one of the above embodiments. (Refer to...) Figure 15 As shown, the communication connection device (HW Device) may include a CPU, a serial bus, a large-scale queue management module, an active queue module, and an access control module. Each communication connection device can act as a transmitter or receiver. The communication connection devices can be interconnected with other communication connection devices via switches, and communication between the devices can be achieved through remote communication. The switch can be an Ethernet switch.
[0111] This application also provides a data center distributed system, including a sender and a receiver, wherein the sender performs queue management using the method applied to the sender as described in any of the above embodiments, and the receiver performs queue management using the method applied to the receiver as described in any of the above embodiments. (Refer to...) Figure 16 As shown, the sending and receiving ends in the data center distributed system have the same structure, which can include a CPU, serial bus, high-performance network card and access control module. The high-performance network card can support a very large number of connections and includes a very large-scale queue management module and an active queue module.
[0112] Please see Figure 17 , Figure 17 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application, such as... Figure 17 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 17 Take a processor 10 as an example.
[0113] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0114] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0115] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0116] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0117] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0118] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.
[0119] This application provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method of any embodiment of this application.
[0120] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.
[0121] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0122] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0123] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0125] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0126] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0127] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0128] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0129] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
[0130] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A queue management method, characterized in that, The method, applied to the sending end of a data center distributed system, includes: The sender's idle queue is activated to obtain a send queue. If there are idle queue resources in the sending end, the sending queue is allocated resources to obtain a sending active queue; wherein, the sending active queue has a corresponding receiving active queue at the receiving end of the data center distributed system. Message processing is performed through the active sending queue and the active receiving queue. When the active sending queue meets the resource release conditions, the queue resources of the active sending queue are released to switch to the idle sending queue.
2. The method according to claim 1, characterized in that, The step of activating the send idle queue at the sending end to obtain a send queuing queue includes: The queuing status of the send idle queue is queried according to the queuing list to obtain the queuing query result of the send idle queue; When the queue query result indicates that the sending idle queue is in the queue list, the sending idle queue in the queue list is added as a sending queue queue; When the queue query result indicates that the send idle queue is not in the queue list, the send idle queue is added to the queue list to obtain the send queue.
3. The method according to claim 1, characterized in that, The step of allocating resources to the sending queue to obtain an active sending queue includes: Assign a transmission queue number to the transmission queue and allocate the idle queue resources to the transmission queue; The queue information is retrieved based on the sending queue number to obtain the queue information of the sending queue, so as to convert the sending queue into the sending active queue; wherein the queue information is stored in the local space of the sending end.
4. The method according to claim 3, characterized in that, Before message processing via the active sending queue and the active receiving queue, the method further includes: Send the sending queue number and the queue information to the receiving end to request an active queue from the receiving end; The receiver receives a queue establishment success message from the receiving end and establishes queue connection information between the sending active queue and the receiving active queue for message processing; wherein, the queue establishment success message indicates that the receiving active queue has been successfully established in the receiving end.
5. The method according to claim 1, characterized in that, The following method is used to determine whether the active sending queue meets the resource release conditions: Service traffic monitoring is performed on the message processing process to obtain the message service traffic of the message processing process; If the message service traffic indicates that the active sending queue has completed message processing and is in an idle state, it is determined that the active sending queue meets the resource release condition. Alternatively, if the active sending queue has a message processing limit, and the message service traffic indicates that the number of messages processed by the active sending queue has reached the message processing limit, then the active sending queue is determined to meet the resource release conditions.
6. The method according to claim 1, characterized in that, After releasing queue resources from the active sending queue to switch to an idle sending queue, the process further includes: If there are pending messages in the sent idle queue, the sent idle queue is added to the queuing list to be added as a sent queue. If there is no pending message in the sent idle queue, the sent idle queue is added to the idle queue pool. The sent idle queue in the idle queue pool is used to add a sent queue when a preset condition is met.
7. A queue management method, characterized in that, A receiving end is applied to a data center distributed system, wherein the data center distributed system further includes a sending end; the method includes: In response to the active queue request sent by the sending end, the receiving idle queue of the receiving end is activated to obtain the receiving queue. If there are idle queue resources in the receiving end, the receiving queue is allocated resources to obtain a receiving active queue; wherein, the receiving active queue corresponds to a sending active queue in the sending end of the data center distributed system. Message processing is performed through the active sending queue and the active receiving queue. When the active receiving queue meets the resource release conditions, the queue resources of the active receiving queue are released to switch it to the idle receiving queue.
8. The method according to claim 7, characterized in that, The step of allocating resources to the receiving queue to obtain an active receiving queue includes: Assign a receiving queue number to the receiving queue and allocate the idle queue resources to the receiving queue; The queue information is retrieved according to the receiving queue number to obtain the queue information of the receiving queue, so as to convert the receiving queue into the receiving active queue; wherein the queue information is stored in the local space of the receiving end.
9. A communication connection device, characterized in that, Used to perform the method according to any one of claims 1 to 8.
10. A distributed data center system, characterized in that, It includes a sending end and a receiving end, wherein the sending end performs queue management by any one of claims 1 to 6, and the receiving end performs queue management by any one of claims 7 to 8.