Flow control processing method, electronic equipment and computer readable storage medium
By generating initial tokens in the RDMA network and issuing them in advance, the task processing delay problem caused by programmable devices is solved, and fast task startup and efficient data transmission are achieved.
Patent Information
- Application Number
- CN202410238966.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-01
- Publication Date
- 2025-09-02
AI Technical Summary
In the existing RDMA network solution, the delay-based congestion control algorithm relies on the calculation of programmable devices, resulting in a large delay in task processing and cannot effectively solve the congestion problem in network transmission.
By obtaining pending message tasks, determining the task queue group, and generating an initial token when the preset token issuance conditions are met, the hardware module issuing tokens in advance to reduce the calculation delay of programmable logic devices, and achieving rapid task startup.
It speeds up the task startup time, reduces the task processing delay, improves data transmission efficiency, avoids network congestion, and improves network performance.
Smart Images

Figure CN120583041A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to, but are not limited to, the field of communication technology, and in particular to a flow control processing method, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Remote Direct Memory Access (RDMA) is a network transmission technology that can address latency in data processing between clients and servers during network transmission. To address congestion, mainstream RDMA network solutions use latency-based algorithms to monitor the round-trip latency of connections to determine the congestion window and adjust the send rate, facilitating large-scale applications. However, these technical solutions place high demands on latency algorithms, and most employ programmable devices to iteratively upgrade them. However, programmable devices suffer from computational lags, resulting in significant processing delays. Summary of the Invention
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] The embodiments of the present application provide a flow control method, an electronic device, a computer-readable storage medium, and a computer program product, which can speed up the startup time of a task, thereby reducing the processing delay of the task.
[0005] In a first aspect, an embodiment of the present application provides a flow control processing method, the method comprising:
[0006] Get the message tasks to be processed;
[0007] Determine a task queue group according to the message tasks to be processed;
[0008] When the task queue group meets the preset token issuance conditions, an initial token is generated;
[0009] The message task to be processed is sent according to the initial token.
[0010] In a second aspect, an embodiment of the present application provides an electronic device, including:
[0011] at least one processor;
[0012] at least one memory for storing at least one program;
[0013] When at least one of the programs is executed by at least one of the processors, the flow control processing method described above is implemented.
[0014] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the flow control processing method as described above.
[0015] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program or computer instructions, wherein the computer program or the computer instructions are stored in a computer-readable storage medium, and a processor of a computer device reads the computer program or the computer instructions from the computer-readable storage medium, and the processor executes the computer program or the computer instructions, so that the computer device performs the flow control processing method as described above.
[0016] The embodiment of the present application includes: in the process of performing flow control processing, first obtaining the message task to be processed, then determining the task queue group according to the message task to be processed; then, if the task queue group meets the preset token issuance condition, generating an initial token; finally, sending the message task to be processed according to the initial token. According to the technical solution provided by the embodiment of the present application, in the process of processing the message task to be processed, only the task queue group of the message task to be processed meets the preset token issuance condition will start the forwarding of the message task, thereby speeding up the startup time of the task and thus effectively reducing the processing delay of the task. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide a further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0018] Figure 1 This is a flow chart of a flow control processing method provided by an embodiment of the present application;
[0019] Figure 2 This is a flowchart of determining a task queue group provided by an embodiment of the present application;
[0020] Figure 3 This is a flowchart of generating an initial token provided by an embodiment of the present application;
[0021] Figure 4 is a flow chart of a flow control processing method provided by another embodiment of the present application;
[0022] Figure 5 This is a flowchart of determining token cycle parameters provided by an embodiment of the present application;
[0023] Figure 6 This is a flowchart of sending a task to be processed message provided by an embodiment of the present application;
[0024] Figure 7 is a flow chart of a flow control processing method provided by another embodiment of the present application;
[0025] Figure 8 is a flow chart of a flow control processing method provided by another embodiment of the present application;
[0026] Figure 9 is a flow chart of a flow control processing method provided by another embodiment of the present application;
[0027] Figure 10 This is a flow chart of an undetermined data packet provided by one embodiment of the present application;
[0028] Figure 11 This is a principle block diagram of a flow control processing method provided by one embodiment of the present application;
[0029] Figure 12 This is a principle block diagram of implementing the issuance of initial tokens provided by an embodiment of the present application;
[0030] Figure 13 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0032] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0033] In the description of this application, "several" means one or more, "many" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The terms "first" and "second" are used solely to distinguish technical features and are not to be construed as indicating or implying relative importance, or as implicitly specifying the number or order of the technical features indicated.
[0034] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0035] The embodiments of the present application provide a flow control method, an electronic device, a computer-readable storage medium, and a computer program product. In the process of flow control processing, first, a message task to be processed is obtained, and then a task queue group is determined based on the message task to be processed; then, if the task queue group meets the preset token issuance condition, an initial token is generated; finally, the message task to be processed is sent for processing based on the initial token. According to the technical solution provided by the embodiments of the present application, in the process of processing the message task to be processed, the forwarding of the message task will be started only if the task queue group of the message task to be processed meets the preset token issuance condition, thereby speeding up the startup time of the task and thus effectively reducing the processing delay of the task.
[0036] The embodiments of the present application are further described below with reference to the accompanying drawings.
[0037] like Figure 1 As shown, an embodiment of the first aspect of the present application provides a flow chart of a flow control processing method. The method includes but is not limited to step S100, step S200, step S300 and step S400.
[0038] Step S100, obtaining a message task to be processed;
[0039] Step S200, determining a task queue group according to the message tasks to be processed;
[0040] Step S300: generating an initial token when the task queue group meets the preset token issuance conditions;
[0041] Step S400: Send the message task to be processed according to the initial token.
[0042] In an embodiment of the present application, during the process of flow control processing, first, a message task to be processed is obtained, then a task queue group is determined based on the message task to be processed; then, if the task queue group meets the preset token issuance condition, an initial token is generated for the message task to be processed; finally, the message task to be processed is sent for processing based on the initial token. According to the technical solution provided in the embodiment of the present application, during the process of processing the message task to be processed, the forwarding of the message task will be started only if the task queue group of the message task to be processed meets the preset token issuance condition, thereby speeding up the startup time of the task and thus effectively reducing the processing delay of the task.
[0043] It is worth noting that the pending message tasks are messages that need to be forwarded soon; different pending message tasks need to be carried in different task queue groups for forwarding processing; the corresponding task queue group can be determined by analyzing and processing the pending message tasks.
[0044] It is worth noting that the status of the task queue group is analyzed and processed. When the task queue group meets the preset token issuance conditions, an initial token will be generated; then the task queue group corresponding to the initial token can immediately start forwarding the message task to be processed, thereby greatly reducing the task processing delay.
[0045] It can be understood that the embodiments of the present application ensure that the packet sending can be started first when the initial token is issued, and the calculation delay of the token parameters of the programmable logic device can be offset within the time period of the initial token consumption, thereby greatly reducing the startup time of the packet sending.
[0046] It is worth noting that the flow control processing method of the embodiments of the present application can be applied to network card devices, in which multiple node servers or storage devices are connected to the network through network cards and interconnected, and the storage devices or servers send and receive messages through the network cards. The main application environments include high-performance computing, distributed storage, and disk arrays. In these applications, implementing precise network congestion flow control can improve data transmission efficiency and avoid network congestion.
[0047] It is worth noting that the hardware module in the embodiment of the present application first starts the operation and issues an initial token to the corresponding task queue group, ensuring that the packet sending can be started before the programmable device outputs the result. During the time period of the initial token consumption, the calculation delay effect of the token parameters of the programmable logic device can be offset, thereby reducing the startup time of the packet sending and improving performance.
[0048] like Figure 2 As shown, the above step S200 may include but is not limited to step S210 and step S220.
[0049] Step S210, determining a target task queue according to the message task to be processed;
[0050] Step S220 : Mapping the target task queue to a corresponding task queue group according to the characteristic attributes of the target task queue.
[0051] In some embodiments of the present application, in the process of determining the task queue group based on the message task to be processed, the target task queue is first determined based on the message task to be processed; then, it can be mapped to the corresponding task queue group based on the characteristic attributes of the target task queue; through the above technical solution, the corresponding target task queue is determined based on the attribute information of the message task to be processed; then, it is mapped to the corresponding task queue group based on the characteristic attributes of the corresponding target task queue, so as to make prerequisite preparations for data forwarding of the message to be processed.
[0052] For example, in a specific embodiment of the present application, when the software has a new task to issue, a work queue entry task will be issued to a task queue of the scheduling module of the network device, and then the scheduling module can map the task queue to the corresponding task queue group and virtual machine channel adapter level.
[0053] like Figure 3 As shown, the above step S300 may include but is not limited to step S310.
[0054] Step S310 : generating an initial token when the event state of the task queue group is in an inactive state and the real-time state of the task queue group changes from an inactive state to an active state.
[0055] In some embodiments of the present application, during the process of generating an initial token, an initial token can be generated when the event state of the task queue group is inactive and the real-time state of the task queue group changes from inactive to active.
[0056] It is worth noting that the event status of the task queue group is in the inactive state, which means that the corresponding task queue group has not previously performed data forwarding processing, and the corresponding task queue group is not in the active state; and when the real-time status of the task queue group changes from the inactive state to the active state, an initial token will be generated; the task queue group corresponding to the initial token can be started immediately, which speeds up the startup time of the task, and thus can greatly reduce the processing delay of the task.
[0057] For example, in a specific embodiment of the present application, it is first determined whether the event status of the task queue group is in an inactive state, and whether the real-time status of the task queue group changes from an inactive state to an active state; if all requirements are met, an initialization token will be issued to the token management module of the network device to ensure the rapid startup of the task queue group; if the conditions are not met, the initialization token will not be issued.
[0058] like Figure 4 As shown, after executing the above step S200, the flow control processing method may also include but is not limited to step S320, step S330 and step S340.
[0059] Step S320, obtaining scheduling information and historical token values;
[0060] Step S330, determining a token cycle parameter based on the scheduling information and the status information of the task queue group;
[0061] Step S340: Send the message task to be processed according to the historical token value and the token period parameter.
[0062] In some embodiments of the present application, after determining the task queue group based on the message task to be processed, the scheduling information and historical token value can also be obtained; then the token cycle parameter is determined based on the scheduling information and the status information of the task queue group; finally, the message task to be processed can be sent and processed based on the historical token value and the token cycle parameter to achieve control processing of the message forwarding rate.
[0063] It is worth noting that the scheduling information is the relevant information for scheduling the message task to be processed; the historical token value is the previous token value; the corresponding token cycle parameter of the task queue group is determined based on the scheduling information and the status information of the task queue group; finally, the message task to be processed can be sent and processed based on the historical token value and the token cycle parameter to realize the scheduling and control processing of the message task to be processed.
[0064] like Figure 5 As shown, the above step S330 may include but is not limited to step S331, step S332 and step S333.
[0065] Step S331, determining task queue group activation information, task queue group quantity information, and task queue group composition information according to the status information of the task queue group;
[0066] Step S332, performing flow control calculation processing based on the task queue group activation information, the task queue group quantity information, the task queue group composition information, the data sending information, and the data receiving information to obtain flow control parameters;
[0067] Step S333: Determine the token period parameter according to the flow control parameter.
[0068] In some embodiments of the present application, in the process of determining the token period parameters based on the scheduling information and the status information of the task queue group, the task queue group activation information, the task queue group quantity information and the task queue group composition information are first determined based on the status information of the task queue group; then, flow control calculation processing can be performed based on the task queue group activation information, the task queue group quantity information, the task queue group composition information, the data sending information and the data receiving information to obtain the flow control parameters; finally, the corresponding token period parameters can be determined based on the flow control parameters; through the above technical solution, the adjustment processing of the token period parameters can be well implemented, and the prerequisite preparation is made for the adjustment of the forwarding rate of subsequent messages.
[0069] It is worth noting that the task queue group activation information is the real-time status of the task queue group, which can be active or inactive; the task queue group composition information is the specific task queues that the task queue group is composed of; and the task queue group quantity information is the number of task queue groups. Data transmission information is the relevant monitoring information during the message data transmission process, and data reception information is the relevant data information received. By performing flow control calculations based on the task queue group activation information, task queue group quantity information, task queue group composition information, data transmission information, and data reception information, flow control parameters can be obtained. Finally, the token cycle parameters can be determined based on the calculated flow control parameters.
[0070] like Figure 6 As shown, the above step S340 may include but is not limited to step S341, step S342 and step S343.
[0071] Step S341, determining the task queue group token value based on the historical token value and the token cycle parameter;
[0072] Step S342, converting the task queue group token value into scheduling control information;
[0073] Step S343: Send the to-be-processed message tasks corresponding to the corresponding task queue group according to the scheduling control information.
[0074] In some embodiments of the present application, in the process of sending and processing the message task to be processed according to the historical token value and the token cycle parameter, the task queue group token value is first determined according to the historical token value and the token cycle parameter; then the task queue group token value is converted into scheduling control information; finally, the message task to be processed corresponding to the corresponding task queue group can be sent and processed according to the scheduling control information, and then the message task to be processed can be forwarded according to the corresponding scheduling control information, so that the forwarding of the message task to be processed can be more stable and reliable.
[0075] It is worth noting that after the task queue group token value is converted into scheduling control information, the scheduling control information can be analyzed and processed to determine the task queue group corresponding to the scheduling control information, and then the sending rate of the corresponding task queue group is controlled.
[0076] like Figure 7 As shown, after executing step S340, the flow control processing method may also include but is not limited to step S344, step S345, step S346 and step S347.
[0077] Step S344, updating the data sending information, data receiving information, task queue group status information and historical token value;
[0078] Step S345, updating the flow control parameters according to the updated data sending information, data receiving information and status information of the task queue group;
[0079] Step S346, determining a new token period parameter based on the updated flow control parameter;
[0080] Step S347: Send the message task to be processed according to the updated historical token value and token period parameter.
[0081] In some embodiments of the present application, after the message task to be processed is sent and processed according to the historical token value and the token cycle parameter, the data sending information, the data receiving information, the status information of the task queue group and the historical token value can also be updated; then the flow control parameters are updated for the data sending information, the data receiving information and the status information of the task queue group after the updated processing; then the new token cycle parameter is determined according to the updated flow control parameter; finally, the message task to be processed is sent and processed according to the updated historical token value and the token cycle parameter, so as to realize continuous control and adjustment of the forwarding rate of the message task to be processed, so that the sending rate of the message task to be processed can be continuously controlled.
[0082] like Figure 8 As shown, after executing step S200, the flow control processing method may also include but is not limited to step S230.
[0083] Step S230 : When the number of detections on the task queue group reaches a preset number of detections and the real-time status of the task queue is in an inactive state each time, the event status of the corresponding task queue group is switched to a deactivated state.
[0084] In some embodiments of the present application, after determining the task queue group based on the message task to be processed, the number of times the task queue group is detected can also be determined. When the number of times the task queue group is detected reaches a preset number of times and the real-time status of the task queue is in an inactive state each time, the event status of the corresponding task queue group can be switched to a deactivated state so that the initial token can continue to be issued when it is activated next time to achieve quick startup.
[0085] like Figure 9 As shown, after executing step S400, the flow control processing method may further include but is not limited to step S500.
[0086] Step S500: When the received data reception information includes an unconfirmed data packet, the sending rate of the message task to be processed is reduced.
[0087] In some embodiments of the present application, after the message to be processed is sent according to the initial token, if the subsequently received data reception information includes an unconfirmed data packet, the sending rate of the message task to be processed will be actively reduced, thereby achieving the purpose of speed reduction without relying on the switch, and at the same time improving the bandwidth utilization of effective tasks.
[0088] like Figure 10 As shown, the undetermined data packet may be obtained including but not limited to step S510, step S520, step S530 and step S540.
[0089] Step S510: generating a forwarding data packet group based on the message task to be processed, wherein the forwarding data packet group includes a plurality of data packets with consecutive data numbers;
[0090] Step S520, forwarding the corresponding data packets in sequence according to the data numbers;
[0091] Step S530: If the data numbers of the received data packets are discontinuous, it is determined to be a data packet loss state;
[0092] Step S540: Generate an undetermined data packet according to the data packet loss status.
[0093] In some embodiments of the present application, a forwarding data packet group is first generated based on a pending message task, the forwarding data packet group including multiple data packets with consecutive data numbers. The corresponding data packets are then forwarded sequentially based on the data numbers. If the received data packets have discontinuous data numbers, a data loss state is determined. Finally, an undetermined data packet is generated based on the data loss state. If the received data reception information includes an undetermined data packet, the sending rate of the pending message task is reduced.
[0094] For example, four data packets are sent in the link direction between the transmitting end of the first host and the receiving end of the second host, but the third data packet is lost on the link; the receiving end of the second host will detect the continuity of the data packet numbering, and will reply with a confirmed data packet when the packet number is continuous, and will reply with an unconfirmed data packet when it is discontinuous; the receiving end of the first host will check whether an unconfirmed data packet is received, and if an unconfirmed data packet is received, the sending rate of the task queue group corresponding to the task queue will be reduced to reduce the sending of invalid data packets, so there is no need to rely on the switch to achieve the purpose of speed reduction, and the bandwidth utilization of effective tasks can also be improved; in order to solve the above-mentioned packet loss problem, it is necessary to retransmit the third data packet.
[0095] In order to more clearly illustrate the process of the flow control processing method provided by the embodiment of the present invention, a specific example is given below for illustration.
[0096] like Figure 11 As shown, an embodiment of the present application provides a block diagram of the implementation principle of the flow control processing method. Figure 11 This article uses a network card for this introduction. The first network card consists of seven main components. The parameter collection module, parameter calculation module, and parameter distribution module are components of a programmable processor. These modules can be redefined, compiled, and updated based on the usage scenario or algorithm tuning. The remaining modules are fixed-function modules; once defined, they cannot be changed during use. The functions of the main components of the first network card are described below:
[0097] Scheduling module: According to the software tasks, the task queue (Queue Pai r, QP) is mapped to different task queue groups (Queue Pai rs, QPS) according to its characteristic attributes to facilitate unified scheduling management; at the same time, the hierarchical scheduling information is sent to the task parameter collection module in real time, and the module then adjusts the scheduling strategy according to the real-time programmable microprocessor.
[0098] The parameter collection module uses information provided by the scheduling module to identify key scheduling information, such as which QPS groups are activated and the number of QPs within each group. It also collects and aggregates link information provided by the sending and receiving modules, such as the number of packets sent, the amount of data sent, and the measured round-trip delay. This information is then regularly reported to the parameter calculation module.
[0099] Parameter Operation Module: The core of the programmable processor is composed of multiple programmable parameter operation modules. This allows for parallel computation, significantly increasing response efficiency. Each parameter operation module outputs flow control parameters based on reported information and the current usage scenario.
[0100] Parameter delivery module: regularly delivers flow control parameters to the rate management module. The period of regular delivery is software configurable.
[0101] Rate management module: Its main function is to identify which QPS the parameters sent belong to and send the parameters to the corresponding QPS.
[0102] Sending module: Part of its function is to parse the scheduling results, complete the package sending, and at the same time give the collected package parameters to the parameter collection module.
[0103] Receiving module: Its main function is to parse the received message and complete the normal packet receiving business processing. At the same time, it extracts the link status information and sends this information to the parameter collection module in real time.
[0104] like Figure 12As shown, due to the delay in the interaction of software and hardware information and the flow control operation of the programmable microprocessor, the start time of packet transmission is slow. To solve this problem, the embodiment of the present application adopts a strategy of identifying the first QPS joining in advance and allocating an initial token for optimization. Follow the following processing steps to achieve:
[0105] Scheduling analysis module: Its main function is to identify changes in the number of QPs.
[0106] When a new QP is added to the scheduling module, the scheduling module will provide the relevant information of the newly added QP to the scheduling analysis module. Based on this information, the scheduling analysis module will increase the number of QPs in the corresponding QPS statistics by 1;
[0107] When a QP exits the scheduling module, the scheduling module will provide the relevant information of the exiting QP to the scheduling analysis module. Based on this information, the scheduling analysis module will reduce the number of QPs in the corresponding QPS statistics by 1;
[0108] QPS activates the real-time status module: its main function is to detect the status of QPS in real time.
[0109] When the number of QPs in a certain QPS statistic changes from 0 to 1, the corresponding QPS real-time status changes from inactive to active.
[0110] When the number of QPs in a certain QPS statistic changes from 1 to 0, the corresponding QPS real-time status changes from active to inactive.
[0111] In addition to the two cases mentioned above, even if the number of QPs in the QPS statistics changes, the real-time QPS status remains unchanged.
[0112] Rate management module: Its main function is to issue periodic token parameters and modify the activation event status of QPS
[0113] If it is detected that a QPS has changed from an inactive state to an active state, new periodic token parameters will be calculated based on the information collected by the parameter collection module. The periodic token parameters mainly include token period, token size, etc.
[0114] If a QPS is detected to be inactive, the periodic token parameters will not be issued. If the microprocessor detects a QPS as inactive for n consecutive operation cycles (the specific number can be modified online to enhance scalability), the rate management module will issue a deactivation instruction to this QPS.
[0115] QPS activation event status module: its main function is to issue the initial token.
[0116] When the QPS activation real-time status changes from inactive to active, the QPS activation event status also changes from inactive to active. At the same time, an initialization token is sent to the token management module to achieve a quick startup effect.
[0117] When the QPS activation event status module receives a QPS deactivation instruction sent by the rate management module, the activation event status of the QPS changes from activated to inactivated, so that it can be accelerated and started again when it is activated next time.
[0118] Token management module: mainly functions as a flow control scheduling module.
[0119] The conversion is performed based on the initialization token and the token period parameters regularly issued by the microprocessor, and the rate of each QPS is controlled by iterative updates, thereby controlling the flow scheduling module.
[0120] Specifically, the process of the flow control processing method in the embodiment of the present application can be as follows:
[0121] Step 1: When the software has a new task, it will send a work queue entry to the corresponding QP of the scheduling module. The content of the work queue entry can be parsed to obtain the specific software task requirements. Based on the software task requirements and the properties of the QP, the scheduling module can map the QP to the corresponding QPS scheduling queue. At the same time, the scheduling module sends the scheduling information to the scheduling parsing module.
[0122] Step 2: The scheduling analysis module will change the real-time and event status of the QPS corresponding to the QPS activation real-time status module from inactive to active. At the same time, it will issue an initial token value to this QPS.
[0123] Step 3: The parameter collection module regularly collects the parameter information reported by the sending module, scheduling module, and receiving module, and gives it to the parameter calculation module after summarizing.
[0124] Step 4: The parameter calculation module is composed of multiple microprocessors and can process multiple QPS in parallel. Based on the information provided by the parameter collection module and the calculation results of the previous cycle, the flow control configuration parameters of each QPS are quickly sent to the parameter distribution module.
[0125] Step 5: The parameter delivery module periodically sends the calculation results to the rate management module.
[0126] Step 6: The main function of the rate management module is to identify which QPS the parameters sent belong to and give the parameters to the QPS corresponding to the token management module.
[0127] Step 7: The token management module ensures the rapid startup of this QPS based on the initialization token, and then controls the packet sending rhythm according to the token cycle parameters regularly issued by the microprocessor to ensure that the scheduling module can perform rate regulation in real time.
[0128] Step 8: Repeat the above steps in subsequent steps and continuously iteratively adjust the rate.
[0129] The above technical solution optimizes the slow startup time of traditional flow control algorithms, greatly speeds up the QP task startup time, and reduces task processing delays. The flow control algorithm of this solution is implemented using a programmable microprocessor device, and can be continuously optimized according to different usage scenarios and flow control algorithm upgrades to achieve better flow control effects.
[0130] In addition, if Figure 13 As shown, an embodiment of the present application further provides an electronic device 700, which includes:
[0131] The memory 720 , the processor 710 , and computer programs stored in the memory 720 and executable on the processor 710 .
[0132] The processor 710 and the memory 720 may be connected via a bus or other means.
[0133] It should be noted that the electronic device 700 in this embodiment and the flow control processing method in the above embodiments belong to the same inventive concept, so these embodiments have the same implementation principles and technical effects, which will not be described in detail here.
[0134] The non-transient software program and instructions required to implement the flow control processing method of the above embodiment are stored in the memory 720. When executed by the processor 710, the flow control processing method of the above embodiment is executed, for example, the flow control processing method described above is executed. Figure 1 Steps S100 to S400 of the method, Figure 2 Steps S210 to S220 of the method, Figure 3 Step S310 of the method, Figure 4 Steps S320 to S340 of the method, Figure 5 Steps S331 to S333 of the method, Figure 6 Steps S341 to S343 of the method, Figure 7 Steps S344 to S347 of the method, Figure 8 Step S230 of the method, Figure 9 Method step S500, Figure 10 Method steps S510 to S540.
[0135] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by a processor 710, for example, by a processor 710 in the embodiment of the electronic device 700, which enables the processor 710 to execute the flow control processing method in the above embodiment, for example, to execute the above-described Figure 1 Steps S100 to S400 of the method, Figure 2 Steps S210 to S220 of the method, Figure 3 Step S310 of the method, Figure 4 Steps S320 to S340 of the method, Figure 5 Steps S331 to S333 of the method, Figure 6 Steps S341 to S343 of the method, Figure 7 Steps S344 to S347 of the method, Figure 8 Step S230 of the method, Figure 9 Method step S500, Figure 10 Method steps S510 to S540.
[0136] In addition, one embodiment of the present application further provides a computer program product, including a computer program or computer instructions, wherein the computer program or the computer instructions are stored in a computer-readable storage medium, and the processor of the computer device reads the computer program or the computer instructions from the computer-readable storage medium, and the processor executes the computer program or the computer instructions, so that the computer device executes the flow control processing method in the above embodiment, for example, executing the above-described Figure 1 Steps S100 to S400 of the method, Figure 2 Steps S210 to S220 of the method, Figure 3 Step S310 of the method, Figure 4 Steps S320 to S340 of the method, Figure 5 Steps S331 to S333 of the method, Figure 6 Steps S341 to S343 of the method, Figure 7 Steps S344 to S347 of the method, Figure 8 Step S230 of the method, Figure 9 Method step S500, Figure 10 Method steps S510 to S540.
[0137] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0138] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the above implementation mode. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A flow control processing method, the method comprising: Get the message tasks to be processed; Determine a task queue group according to the message tasks to be processed; When the task queue group meets the preset token issuance conditions, an initial token is generated; The message task to be processed is sent according to the initial token.
2. The flow control processing method according to claim 1, characterized in that: Determining a task queue group according to the message tasks to be processed includes: Determine the target task queue according to the message tasks to be processed; Mapping the target task queue to a corresponding task queue group is performed according to the characteristic attributes of the target task queue.
3. The flow control processing method according to claim 1, characterized in that: When the task queue group meets the preset token issuance condition, generating an initial token includes: The initial token is generated when the event state of the task queue group is an inactive state and the real-time state of the task queue group changes from an inactive state to an active state.
4. The flow control processing method according to claim 1, characterized in that: After determining the task queue group according to the to-be-processed message tasks, the flow control processing method further includes: Get scheduling information and historical token values; Determining a token period parameter according to the scheduling information and the status information of the task queue group; The message task to be processed is sent according to the historical token value and the token period parameter.
5. The flow control processing method according to claim 4, characterized in that: The scheduling information includes data sending information and data receiving information, and determining the token cycle parameter according to the scheduling information and the status information of the task queue group includes: Determine task queue group activation information, task queue group quantity information, and task queue group composition information according to the status information of the task queue group; Perform flow control calculation processing according to the task queue group activation information, the task queue group quantity information, the task queue group composition information, the data sending information and the data receiving information to obtain flow control parameters; The token period parameter is determined according to the flow control parameter.
6. The flow control processing method according to claim 4, characterized in that: The sending of the to-be-processed message task according to the historical token value and the token period parameter includes: Determine a task queue group token value according to the historical token value and the token period parameter; Converting the task queue group token value into scheduling control information; The to-be-processed message tasks corresponding to the corresponding task queue group are sent according to the scheduling control information.
7. The flow control processing method according to claim 5, characterized in that: After sending the message task to be processed according to the historical token value and the token period parameter, the flow control processing method further includes: Updating the data sending information, the data receiving information, the status information of the task queue group and the historical token value; Updating the flow control parameters according to the updated data sending information, the data receiving information and the status information of the task queue group; Determine the new token period parameter according to the updated flow control parameter; The to-be-processed message task is sent according to the updated historical token value and the token period parameter.
8. The flow control processing method according to claim 1, characterized in that: After sending the message task to be processed according to the initial token, the flow control processing method further includes: In a case where the received data reception information includes an unconfirmed data packet, the sending rate of the to-be-processed message task is reduced.
9. The flow control processing method according to claim 8, characterized in that: The undetermined data packet is generated in the following manner: Generate a forwarding data packet group based on the message task to be processed, wherein the forwarding data packet group includes a plurality of data packets with consecutive data numbers; Forwarding the corresponding data packets in sequence according to the data numbers; When the data numbers of the received data packets are discontinuous, it is determined to be a data packet loss state; The undetermined data packet is generated according to the data packet loss status.
10. The flow control processing method according to claim 1, characterized in that: After determining the task queue group according to the to-be-processed message tasks, the flow control processing method further includes: When the number of detections on the task queue group reaches a preset number of detections and the real-time state of the task queue is in an inactive state each time, the event state of the corresponding task queue group is switched to a deactivated state.
11. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the flow control processing method according to any one of claims 1 to 10 is implemented.
12. A computer-readable storage medium storing computer-executable instructions, characterized in that: The computer-executable instructions are used to execute the flow control processing method according to any one of claims 1 to 10.
13. A computer program product comprising a computer program or computer instructions, characterized in that The computer program or the computer instruction is stored in a computer-readable storage medium, the processor of the computer device reads the computer program or the computer instruction from the computer-readable storage medium, and the processor executes the computer program or the computer instruction, so that the computer device executes the flow control processing method according to any one of claims 1 to 10.