Multistage flow control method, device and medium

By dividing traffic into dedicated and shared thresholds in a PCIe centralized NTB and adopting a multi-level control strategy, the problem of data transmission blockage caused by excessive load on the target end is solved, and the stability and flexibility of data transmission are improved.

CN120896901APending Publication Date: 2025-11-04JINAN MAIWEI INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511236087.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-31
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

In a PCIe centralized NTB many-to-one topology, excessive load on the target end can lead to data transmission blockage and topology failure.

Method used

By dividing the responder's traffic into preset shared threshold traffic and dedicated threshold traffic, the transmission requirements are determined according to the initiator's data transmission needs, and the data transmission traffic is controlled, including multi-level control strategies such as normal, deceleration, back pressure, and drop.

Benefits of technology

It effectively reduces congestion during data transmission, improves the stability and flexibility of data transmission, and ensures that the responder is always in a load-bearing state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120896901A_ABST
    Figure CN120896901A_ABST
Patent Text Reader

Abstract

The invention provides a multistage flow control method and device and a medium, and is applied to the technical field of cross-domain access. The multi-level flow control method comprises the following steps: acquiring a request message of each initiator for realizing data transmission with the initiator; determining a transmission requirement of data to be transmitted in each initiator according to a corresponding relationship between the data transmission traffic represented by each request message and a preset exclusive threshold traffic and a preset shared threshold traffic; and sending a response message representing the transmission requirement to each initiator, and receiving / discarding the to-be-transmitted data transmitted by the initiator according to the transmission requirement corresponding to the response message. According to the invention, all the traffic of the user is divided into the preset shared threshold traffic and each preset exclusive threshold traffic. And then different transmission requirements are determined according to the corresponding relationship between the data transmission flow and the preset exclusive threshold flow as well as the preset shared threshold flow, so that the purpose of controlling the transmission flow is achieved, and the probability of a data blocking phenomenon in a data transmission process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cross-domain access, and in particular to a multi-level flow control method, device and medium. BACKGROUND

[0002] PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) centralized NTB (Non-Transparent Bridge) is a centralized communication architecture realized based on PCIe technology, mainly used for connecting multiple independent hosts or subsystems to realize efficient communication between them. Since it is based on PCIe bus architecture, it can fully utilize the high-speed serial transmission characteristics of PCIe to meet the high-performance computing and data center requirements of high-performance communication, and since it connects multiple independent hosts or subsystems, its PCIe centralized NTB is widely used in cross-domain access scenarios.

[0003] According to the current implementation mode of PCIe centralized NTEP, the topology structure and link relationship of the source (initiator) and the target (responder) can be one-to-one or many-to-one. When the topology structure and link relationship of the source (initiator) and the target (responder) are many-to-one, that is, when multiple sources simultaneously send a large amount of data to the same target at a certain time period, the target's flow and load will be in contention, and therefore the target may not be able to load. And at this time, it will also block the transmission channel as a common path and the main transmission path, thereby affecting other unrelated data transmission, and even causing serious data transmission problems such as paralysis of the topology structure data.

[0004] It can be seen that how to alleviate the load pressure of the target and quickly unblock the data flow path is a problem that needs to be solved by those skilled in the art. SUMMARY

[0005] The purpose of the embodiments of the present application is to provide a multi-level flow control method, device and medium, which can solve the problem that when the topology structure and link relationship of the source and the target are many-to-one, the target cannot load, and the transmission channel as a common path and the main transmission path is blocked, thereby affecting other unrelated data transmission, and even causing serious data transmission problems such as paralysis of the topology structure data in the prior art.

[0006] To solve the above technical problems, on the one hand, the embodiments of the present application provide a multi-level flow control method applied to a responder, comprising:

[0007] acquire request messages from each initiator of data transmission;

[0008] determine transmission requirements of the data to be transmitted from each initiator according to a correspondence between data transmission flow represented by each request message and preset exclusive threshold flow and preset shared threshold flow, wherein each preset exclusive threshold flow is configured by the responder for each initiator, and the preset shared threshold flow is a difference flow between total flow of the responder and each preset exclusive threshold flow;

[0009] send response messages representing the transmission requirements to each initiator, and receive / discard the data to be transmitted from each initiator according to the transmission requirement corresponding to the response message.

[0010] In some embodiments, determining transmission requirements of the data to be transmitted from each initiator according to a correspondence between data transmission flow represented by each request message and preset exclusive threshold flow and preset shared threshold flow includes:

[0011] if the data transmission flow is not greater than the corresponding preset exclusive threshold flow, the transmission requirement of the data to be transmitted is a normal transmission requirement;

[0012] if the data transmission flow is greater than the corresponding preset exclusive threshold flow, and a difference between the data transmission flow and the corresponding preset exclusive threshold flow is not greater than an alarm line flow corresponding to the preset shared threshold flow, the transmission requirement of the data to be transmitted is a slowdown transmission requirement;

[0013] if the data transmission flow is greater than the corresponding preset exclusive threshold flow, the difference between the data transmission flow and the corresponding preset exclusive threshold flow is greater than the alarm line flow, and is less than a discard line flow corresponding to the preset shared threshold flow, the transmission requirement of the data to be transmitted is a backpressure transmission requirement;

[0014] if the data transmission flow is greater than the corresponding preset exclusive threshold flow, and the difference between the data transmission flow and the corresponding preset exclusive threshold flow is greater than the discard line flow, the transmission requirement of the data to be transmitted is a discard requirement.

[0015] In some embodiments, receiving / discarding the data to be transmitted from each initiator according to the transmission requirement corresponding to the response message includes:

[0016] when the transmission requirement represented by the response message is a normal transmission requirement, receiving the data to be transmitted from each initiator based on the corresponding preset exclusive threshold flow;

[0017] When the transmission requirement represented by the response message is the deceleration transmission requirement or the back pressure transmission requirement, the receiving initiator transmits the exclusive transmission data corresponding to the preset exclusive threshold traffic and the shared transmission data corresponding to the preset shared threshold traffic based on the transmission requirement, and updates the remaining preset shared threshold traffic; wherein the exclusive transmission data is data corresponding to the preset exclusive threshold traffic, and the shared transmission data is remaining data in the non-exclusive transmission data in the to-be-transmitted data;

[0018] When the transmission requirement represented by the response message is the discard requirement, the discard initiator transmits the to-be-transmitted data corresponding to the preset exclusive threshold traffic and the preset shared threshold traffic based on the transmission requirement.

[0019] In some embodiments, when the transmission requirement represented by the response message is the normal transmission requirement, the receiving initiator transmits the to-be-transmitted data corresponding to the preset exclusive threshold traffic, including:

[0020] The receiving initiator transmits the to-be-transmitted data within the corresponding preset exclusive threshold traffic at a normal data transmission rate.

[0021] In some embodiments, when the transmission requirement represented by the response message is the deceleration transmission requirement, the receiving initiator transmits the exclusive transmission data corresponding to the preset exclusive threshold traffic and the shared transmission data corresponding to the preset shared threshold traffic based on the transmission requirement, including:

[0022] The receiving initiator transmits the exclusive transmission data in the corresponding preset exclusive threshold traffic at a normal data transmission rate;

[0023] The receiving initiator transmits the shared transmission data in the alarm line traffic corresponding to the preset shared threshold traffic at a deceleration data transmission rate.

[0024] In some embodiments, when the transmission requirement represented by the response message is the back pressure transmission requirement, the receiving initiator transmits the exclusive transmission data corresponding to the preset exclusive threshold traffic and the shared transmission data corresponding to the preset shared threshold traffic based on the transmission requirement, including:

[0025] The receiving initiator transmits the exclusive transmission data in the corresponding preset exclusive threshold traffic at a normal data transmission rate;

[0026] The receiving initiator transmits the shared transmission data in the discard line traffic corresponding to the preset shared threshold traffic at a normal data transmission rate or a deceleration data transmission rate after the initiator receives the transmission signal representing the data continues to transmit.

[0027] In some embodiments, when the transmission requirement represented by the response message is the discard requirement, the discard initiator transmits the to-be-transmitted data corresponding to the preset exclusive threshold traffic and the preset shared threshold traffic based on the transmission requirement, further including:

[0028] determine whether the preset shared threshold flow and the preset exclusive threshold flow of the initiator meet the flow requirement of the to-be-transmitted data transmitted by the initiator;

[0029] If the preset shared threshold flow and the preset exclusive threshold flow of the initiator meet the flow requirement, a retransmission signal representing data retransmission is sent to the initiator, and after the initiator receives the retransmission signal, the to-be-transmitted data transmitted by the initiator based on the preset shared threshold flow and the preset exclusive threshold flow is received.

[0030] In some embodiments, after receiving / dropping the to-be-transmitted data transmitted by the initiator according to the transmission requirement corresponding to the response packet, the method further comprises:

[0031] According to the data transmission flow corresponding to the to-be-transmitted data transmitted by each initiator, the preset exclusive threshold flow corresponding to each initiator is reconfigured, and the preset shared threshold flow is updated.

[0032] In another aspect, the present application also provides an electronic device, comprising:

[0033] a memory for storing a computer program;

[0034] a processor for executing the computer program to realize the steps of the multi-level flow control method.

[0035] In another aspect, the present application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the multi-level flow control method.

[0036] In another aspect, the present application also provides a computer program product, comprising a computer program / instruction, which is executed by a processor to realize the steps of the multi-level flow control method.

[0037] Therefore, the present application firstly divides the total flow into a preset shared threshold flow and a preset exclusive threshold flow set for each initiator. Then, according to the corresponding relationship between the data transmission flow corresponding to the to-be-transmitted data in different initiators and the preset exclusive threshold flow and the preset shared threshold flow, different transmission requirements, i.e. different flow level transmission requirements, are determined. In different transmission requirements, the initiator transmits data to the responder according to the corresponding transmission requirement, so as to achieve the purpose of controlling the transmission flow, so that the responder is always in a loadable state, and the probability of data congestion phenomenon in the data transmission process is reduced, and the stability of data transmission is improved. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings described in the following embodiments are only some of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0039] Figure 1 A schematic diagram of PCIe centralized NTB request data flow;

[0040] Figure 2 A scene diagram for NTB many-to-one data transmission;

[0041] Figure 3 A flowchart of a multi-level flow control method provided by the embodiment of the present application;

[0042] Figure 4 A schematic diagram of a responder multi-level flow control provided by the embodiment of the present application;

[0043] Figure 5 A complete flowchart of a multi-level flow control method provided by the embodiment of the present application

[0044] Figure 6 A schematic diagram of a micro device structure provided by the embodiment of the present application;

[0045] Figure 7 A structural diagram of an electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0046] The technical solutions in the embodiments of the present application will be described clearly and completely in the embodiments of the present application in combination with the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present application.

[0047] The terms "include" and "have" and any variations of the terms "include" and "have" in the specification and the above drawings of the present application are intended to cover the non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can include steps or units not listed.

[0048] In order to make the person skilled in the art better understand the present application, the present application will be further described in detail in combination with the drawings and specific embodiments.

[0049] A schematic diagram of a centralized NTB implementation scheme based on PCIe protocol is as follows Figure 1As shown, including the host HOSTA and host HOSTB. In the host HOSTA corresponding upstream port (Upstream Port, USP_A) and downstream port (Downstream Port, DSP_A1 and DSP_A2) corresponding to the hanging module (routing module A0, routing module A1 and routing module A2), and the downstream port (DSP_A1 and DSP_A2) also hanging corresponding external device (EPA1 and EPA2), and in the host HOSTA also includes a NTB important device (NTBA0) connected with routing module A0; similarly, in the host HOSTB corresponding upstream port (Upstream Port, USP_B) and downstream port (Downstream Port, DSP_B1) corresponding to the hanging module (routing module B0 and routing module B1), and the downstream port (DSP_B1) also hanging corresponding external device (EPB1), and in the host HOSTB also includes a NTB important device (NTBB0) connected with routing module B0. Host HOSTA as initiator (also can be understood as the source domain and source end), the host HOSTB as the respondent (also can be understood as the target domain and target end), the request data flow (also can be understood as data transmission process) of cross domain access as follows, its answer data flow is the inverse process of the request data flow:

[0050] 1、Source domain (host HOSTA) in the data will be routed to the source domain with USP_A connected routing module A0.

[0051] 2、Routing module A0 will be source domain NTEPA0 not processed data to the NTEPA0 of the domain.

[0052] 3、Source domain NTEPA0 after processing, will its configuration of the target domain (host HOSTB) corresponding relationship and mapping relationship, and information into the message, transfer to the routing module A0 of the domain.

[0053] 4、Routing module A0 will be source domain NTEPA0 processing data to the transmission bridge, through the transmission bridge routing to the routing module B0 of the target domain.

[0054] 5、Routing module B0 will be target domain NTEPB0 not processed data to the NTEPB0 of the domain.

[0055] 6、Target domain NTEPB0 after processing, will its configuration of the target domain corresponding relationship and mapping relationship, and information into the message, transfer to the routing module B0 of the domain.

[0056] 7、Routing module B0 will be target domain NTEPB0 processing data to the transmission bridge module, through the transmission bridge routing to the final access device.

[0057] Based on the above PCIe centralized NTB scheme, the scene and topology structure are expanded, and it is found that multiple source NTEPs send the same target domain NTEP, as shown in the following figure. Figure 2 As shown in the following figure, Figure 2 The figure includes a host HOSTA, a host HOSTB and a host HOSTC, wherein the connection relationship of the host HOSTA and the host HOSTB is the same as that of Figure 1 The connection relationship of the host HOSTC is the same as that of the host HOSTB, the corresponding uplink port of the host HOSTC is USP_C, the downlink port is DSP_C1, the routing modules are routing module C0 and routing module C1, the external device is EPC1, and the important device of the NTB is NTBC0.

[0058] When the host HOSTA and the host HOSTB are source domains and the host HOSTC is a target domain, it can be seen that the topology structure and the link relationship of the source domain and the target domain are many-to-one. When multiple source domains (the host HOSTA and the host HOSTB) simultaneously transmit a large amount of data to the same target domain in a time period, the traffic and the load of the target domain host HOSTC will be disputed, and therefore the target domain host HOSTC may not be able to bear the load. At this time, the transmission channel as a public path and a main transmission path will be blocked, thereby affecting other irrelevant data transmission, and even causing serious data transmission problems such as paralysis of the topology structure data.

[0059] Therefore, the following will introduce in detail a multi-level flow control method, device and medium provided by the embodiment of the application, which is used to solve the above problems.

[0060] Figure 3 The flow chart of the multi-level flow control method provided by the embodiment of the application is shown in the following figure, and includes the following steps. Figure 3 As shown in the following figure,

[0061] S10: Obtain a request message of each initiator for realizing data transmission.

[0062] S11: Determine the transmission requirement of the to-be-transmitted data in each initiator according to the corresponding relationship between the data transmission flow represented by each request message and the preset exclusive threshold flow and the preset shared threshold flow.

[0063] S12: Send a response message representing the transmission requirement to each initiator, and receive / discard the to-be-transmitted data transmitted by the initiator according to the transmission requirement corresponding to the response message.

[0064] Each preset exclusive threshold flow is configured by the responder for each initiator, and the preset shared threshold flow is the difference flow between the total flow corresponding to the responder and each preset exclusive threshold flow.

[0065] In an embodiment, the multi-level flow control method provided by the present application is written from the perspective of the responder (target domain). There is a certain flow index in the responder, that is, during the data receiving process of the responder, only when the received data is less than the current flow index, the data can be normally transmitted. Once the current flow index is exceeded, data congestion will occur. Therefore, the responder in the present application takes part of the total flow of the responder as exclusive flow at the beginning, and the remaining flow as a preset shared threshold flow. This part of the exclusive flow is allocated to each initiator (source domain) as a preset exclusive threshold flow configured for each initiator. However, it should be noted that the responder configures the corresponding preset exclusive threshold flow for each initiator, which does not mean that this part of flow is directly given to each initiator, but that the initiator has a corresponding flow index in the responder for the transmitted data. The preset shared threshold flow is used as a shared index, that is, only when the flow index of the initiator is not enough, the data transmission can continue through the shared index.

[0066] As shown in Figure 4 , it is assumed that is the preset exclusive threshold flow of each initiator in the current responder (but in a specific implementation, the preset exclusive threshold flow of each responder can be different), is the total flow of the responder, and the preset shared threshold flow reserved by the responder is calculated as: . In the preset shared threshold flow shown in Figure 4 , an alarm line flow and a discard line flow are set, which increases the protection mechanism during the data transmission using the preset shared threshold flow.

[0067] Before data transmission (or can be understood as before cross-domain access), each initiator sends a corresponding request message to the responder, and the responder can parse each request message after obtaining the request message. At this time, the initiator name, location, and PCIe domain number corresponding to the request message can be obtained, and the corresponding preset exclusive threshold traffic is determined by querying the table. Then the responder determines the transmission requirement of the to-be-transmitted data of each initiator according to the corresponding relationship between the data transmission traffic represented by each request message and the preset exclusive threshold traffic and the preset shared threshold traffic, and sends a response message corresponding to the transmission requirement to the corresponding initiator. In this way, the initiator can parse the response message and realize the transmission of the to-be-transmitted data according to the transmission requirement obtained by parsing. Finally, the responder receives / drops the to-be-transmitted data transmitted by the initiator according to the transmission requirement corresponding to the response message, that is, realizes / rejects cross-domain access.

[0068] In the process of sending the response message representing the transmission requirement to each initiator, the responder determines the transmission requirement, binds it with the TAG value representing the initiator name and address in the request message, and stores it in the mapping table buffer. After responding to the request message, the transmission requirement is reflected by table lookup according to the TAG value, and is encapsulated into the prefix field of the message user-defined field, and then forwarded to the initiator by the routing module.

[0069] In addition, it should be noted that when each initiator and the responder perform data transmission (or can be understood as: the initiator accesses the responder), the corresponding preset exclusive threshold traffic is used first, and the preset shared threshold traffic is used after the preset exclusive threshold traffic is used up.

[0070] For example, the number of initiators is three, which are initiator 1, initiator 2, and initiator 3. The total traffic of the responder is 100MB, the preset exclusive threshold traffic corresponding to initiator 1 is 20MB, the preset exclusive threshold traffic corresponding to initiator 2 is 20MB, the preset exclusive threshold traffic corresponding to initiator 3 is 10MB, the reserved preset shared threshold traffic is 50MB, the corresponding alarm line traffic is 20MB, and the discard line traffic is 40MB (which can be understood as an increase of 20MB based on the alarm line traffic).

[0071] If the data transmission traffic of the to-be-transmitted data of initiator 1 at this time is 15MB, it can be determined that the current required data transmission traffic (15MB) is less than the corresponding preset exclusive threshold traffic (20MB), and data transmission can be realized through the corresponding preset exclusive threshold traffic of itself at this time.

[0072] If the data transmission flow of the to-be-transmitted data required by the initiator 2 at this time is 25 MB, it can be determined that the current required data transmission flow (25 MB) is greater than the corresponding preset exclusive threshold flow (20 MB), and the specific greater flow (5 MB) is less than the alarm line flow (20 MB), so part of the data in the to-be-transmitted data is transmitted through the preset exclusive threshold flow of the initiator 2, and the remaining data is transmitted through the alarm line flow in the preset shared threshold flow.

[0073] If the data transmission flow of the to-be-transmitted data required by the initiator 3 at this time is 55 MB, it can be determined that the current required data transmission flow (55 MB) is greater than the corresponding preset exclusive threshold flow (10 MB), and the specific greater flow (45 MB) is greater than the discard line flow (40 MB), so data transmission cannot be realized at this time, that is, the responder can also be understood as discarding the to-be-transmitted data.

[0074] As can be seen from the above technical solution, the multi-level flow control method provided by the application is applied to the responder, and includes: obtaining request messages of each initiator for realizing data transmission with the responder; determining transmission requirements of to-be-transmitted data in each initiator according to a corresponding relationship between data transmission flows represented by each request message and preset exclusive threshold flows and a preset shared threshold flow; wherein each preset exclusive threshold flow is configured by the responder for each initiator, and the preset shared threshold flow is a difference flow between the total flow of the responder and each preset exclusive threshold flow; sending response messages representing the transmission requirements to each initiator, and receiving / dropping to-be-transmitted data transmitted by the initiator according to the transmission requirement corresponding to the response message. As can be seen, the application first divides the total flow of the responder into the preset shared threshold flow and the preset exclusive threshold flow set for each initiator. Then, different transmission requirements, i.e., different flow level transmission requirements, are determined according to a corresponding relationship between data transmission flows of to-be-transmitted data in different initiators and the preset exclusive threshold flow and the preset shared threshold flow. In different transmission requirements, the initiator transmits data to the responder according to the corresponding transmission requirement, so as to control the transmission flow, so that the responder is always in a loadable state, and the probability of data congestion in the data transmission process is reduced, and the stability of data transmission is improved.

[0075] In some embodiments, when the alarm line flow and the discard line flow are set in the preset shared threshold flow, there are four cases according to the corresponding relationship between the data transmission flow represented by each request message and the preset exclusive threshold flow and the preset shared threshold flow, as follows:

[0076] The first case: the data transmission flow is not greater than the corresponding preset exclusive threshold flow, and the transmission requirement of the to-be-transmitted data is a normal transmission requirement.

[0077] In this case, the process of the initiator analyzing the reply packet is: keeping the sending status and deleting the prefix field, and then forwarding to the device corresponding to the initiator.

[0078] When the transmission requirement is a normal transmission requirement, it means that the initiator can realize the transmission of the to-be-transmitted data based on the corresponding preset exclusive threshold flow, and the transmission speed is a normal data transmission rate.

[0079] The first case of the embodiment can refer to the case of the initiator 1 in the above-mentioned embodiment.

[0080] The second case: the data transmission flow is greater than the corresponding preset exclusive threshold flow, and the difference between the data transmission flow and the corresponding preset exclusive threshold flow is not greater than the alarm line flow corresponding to the preset shared threshold flow, and the transmission requirement of the to-be-transmitted data is a deceleration transmission requirement.

[0081] The third case: the data transmission flow is greater than the corresponding preset exclusive threshold flow, the difference between the data transmission flow and the corresponding preset exclusive threshold flow is greater than the alarm line flow and less than the discard line flow corresponding to the preset shared threshold flow, and the transmission requirement of the to-be-transmitted data is a back pressure transmission requirement.

[0082] For the second case and the third case, the initiator cannot realize the transmission of the to-be-transmitted data based on the single preset exclusive threshold flow, and needs the preset shared threshold flow to a certain extent, that is, the responder receives the exclusive transmission data transmitted by the initiator based on the corresponding preset exclusive threshold flow and the shared transmission data transmitted based on the preset shared threshold flow, and updates the remaining preset shared threshold flow; wherein the exclusive transmission data is the data corresponding to the preset exclusive threshold flow, and the shared transmission data is the remaining data in the non-exclusive transmission data in the to-be-transmitted data.

[0083] It should be noted that, since the second case and the third case involve the use of the preset shared threshold flow, the preset shared threshold flow can be updated after data transmission. In the two cases, the process of the initiator analyzing the reply packet is: deleting the prefix field, and then forwarding to the device corresponding to the initiator.

[0084] Further, for the second case, the initiator divides the data to be transmitted into exclusive transmission data and shared transmission data. The exclusive transmission data needs to consume the entire preset exclusive threshold flow to be transmitted, while the shared transmission data only needs to consume a small part of the preset shared threshold flow to be transmitted. The initiator transmits the exclusive transmission data at a normal data transmission rate (for example: N) in the corresponding preset exclusive threshold flow, and transmits the shared transmission data at a reduced data transmission rate (for example: 1 / N) in the alarm line flow corresponding to the preset shared threshold flow.

[0085] The current fourth case can refer to the case of the initiator 3 in the above embodiment.

[0086] Further, for the third case, the initiator divides the data to be transmitted into exclusive transmission data and shared transmission data. The initiator transmits the exclusive transmission data at a normal data transmission rate in the corresponding preset exclusive threshold flow; if the initiator receives a transmission signal representing data transmission at this time, the shared transmission data is transmitted at a normal data transmission rate or a reduced data transmission rate in the discard line flow corresponding to the preset shared threshold flow.

[0087] The fourth case: the data transmission flow is greater than the corresponding preset exclusive threshold flow, and the difference between the data transmission flow and the corresponding preset exclusive threshold flow is greater than the discard line flow, and the transmission requirement of the data to be transmitted is a discard requirement.

[0088] When the transmission requirement represented by the reply message is a discard requirement, it means that the data transmission flow corresponding to the data to be transmitted transmitted by the initiator has exceeded the preset exclusive threshold flow and the discard line flow corresponding to the preset shared threshold flow, which has threatened the load capacity of the responder, so the responder needs to discard the data to be transmitted transmitted by the initiator based on the corresponding preset exclusive threshold flow and the preset shared threshold flow. It can also be understood that the initiator does not transmit data in this case.

[0089] The current fourth case can refer to the case of the initiator 3 in the above embodiment.

[0090] In addition, after discarding the data to be transmitted transmitted by the initiator based on the corresponding preset exclusive threshold flow and the preset shared threshold flow, it can be judged whether the remaining preset shared threshold flow and the corresponding preset exclusive threshold flow of the initiator meet the flow requirement of the data to be transmitted transmitted by the initiator; if the remaining shared threshold flow and the corresponding preset exclusive threshold flow of the initiator meet the flow requirement, a retransmission signal representing data retransmission is sent to the initiator, and after the initiator receives the retransmission signal, the data to be transmitted transmitted by the initiator based on the corresponding preset exclusive threshold flow and the remaining preset shared threshold flow is received.

[0091] That is, in the fourth case, if the responder is scaled up, and the remaining shared threshold flow of the responder at a certain moment and the preset exclusive threshold flow of the responder itself can realize the transmission of the to-be-transmitted data, and there is a safe flow margin, which does not threaten the load capacity of the responder, at this time, a retransmission signal representing data retransmission is sent to the initiator, so that the initiator transmits the to-be-transmitted data based on the corresponding preset exclusive threshold flow and the remaining preset shared threshold flow.

[0092] Based on the above embodiments, it can be known that in the first case, the preset exclusive threshold flow is greater than the required data transmission flow; and in the second case, the third case and the fourth case, the preset exclusive threshold flow is less than the required data transmission flow. Therefore, the specific value of the preset exclusive threshold flow configured in real time can be adjusted, and the preset shared threshold flow is updated after the adjustment or the scaling up of the responder. Thus, the flexibility of the multi-level flow control is improved.

[0093] As can be known from the above, the complete flowchart of the multi-level flow control method is as shown in Figure 5 , and includes the following processes:

[0094] S20: Start.

[0095] S21: Analyze the request message to determine the PCIe domain number of the responder corresponding to the current request message.

[0096] S22: Look up the table to determine the preset exclusive threshold flow corresponding to the current PCIe domain number.

[0097] S23: Determine whether the data transmission flow is not greater than the preset exclusive threshold flow.

[0098] S24: If yes, the transmission requirement is a normal transmission requirement, and S30 is entered.

[0099] S25: If no, determine the alarm line flow and the discard line flow in the preset shared threshold flow.

[0100] S26: Determine whether the data transmission flow is not greater than the alarm line flow.

[0101] S27: If yes, the transmission requirement is a slowdown transmission requirement, and S30 is entered.

[0102] S28: If no, determine whether the data transmission flow is not greater than the alarm line flow.

[0103] S29: If yes, the transmission requirement is a backpressure transmission requirement, and S30 is entered.

[0104] S30: Bundle the transmission requirement and the TAG value into the mapping table buffer for carrying after response reflection.

[0105] S31: If no, discard the data to be transmitted.

[0106] S32: End.

[0107] Wherein, since steps S20-S32 are summarized in the above embodiment, the present application will not be described here.

[0108] It can be seen that the present application firstly divides all the flow into preset shared threshold flow and preset exclusive threshold flow set for each initiator. According to the corresponding relationship between the data transmission flow corresponding to the data to be transmitted in different initiators and the preset exclusive threshold flow and the preset shared threshold flow, different transmission requirements, i.e. different flow level transmission requirements, are determined. In different transmission requirements, the initiator transmits data to the responder according to the corresponding transmission requirement, so as to achieve the purpose of controlling the transmission flow, so that the responder is always in a loadable state, and the probability of data congestion phenomenon in the data transmission process is reduced, and the stability of data transmission is improved. And the preset shared threshold flow and the preset exclusive threshold flow in the present application can be reconfigured and updated, etc., further increasing the flexibility of multi-level flow control.

[0109] The above embodiment is written from the perspective of macro initiator (source domain) and responder (target domain). In actual application, there may be micro initiators or responders in the internal of a single initiator or responder. The micro device structure diagram corresponding to the current scene is as shown in Figure 6 The micro initiator and responder are taken as the source end and the target end, so as to distinguish them. It includes: shunt module 1, source end request packet module 2, target end request packet module 3, target end response packet module 4, source end response packet module 5, source end flow control module 6, target end flow mapping calculation module 7, request flow mapping table 8, target end flow organization module 9, source end flow analysis module 10 and arbitration module 11.

[0110] Specific module functions are as follows:

[0111] Shunt module 1: according to the message content analysis, it is determined that the current message comes from the source end or the target end, and then it is shunted according to the source end and the target end in two directions.

[0112] Source end request packet module 2: according to the request message of the mapping recombination address and BDF (Bus-Device-Function, routing field) of the source end, the message is sent.

[0113] Target end request packet module 3: according to the request message of the mapping recombination address and BDF of the target end, the message is sent.

[0114] Target end response packet recombination module 4: the module recombines the response packet of BDF according to the mapping of the target end, and then sends the packet.

[0115] Source end response packet recombination module 5: the module recombines the response packet of BDF according to the mapping of the source end, and then sends the packet.

[0116] Source end flow control module 6: the module controls the sending end according to the transmission requirement parsed from the received response packet, and processes according to normal sending / slow sending / back pressure sending.

[0117] Target end flow mapping calculation module 7: the module calculates the PCIe domain number of the current request packet, queries the preset exclusive threshold flow and the preset shared threshold flow corresponding to the PCIe domain number, judges the transmission requirement of the to-be-transmitted data of the current request packet according to the two flows, and updates the new preset shared threshold flow.

[0118] Request flow mapping table 8: the module stores the transmission requirement of the request packet according to the TAG value of the request packet, for the reflection mapping query of the response packet.

[0119] Target end flow organization module 9: the module recombines the response packet of the target end after obtaining the corresponding transmission requirement of the response packet of the target end by querying the mapping table according to the TAG value.

[0120] Source end flow analysis module 10: the module analyzes the prefix field of the response packet of the source end, sends the parsed transmission requirement to the source end flow control module 6, deletes the prefix field data with the transmission requirement, and recombines the response packet.

[0121] Arbitration module 11: arbitrate the output of multiple outputs according to the round robin arbitration.

[0122] The embodiment of the current scenario is only a micro-embodiment of the above-mentioned embodiment, and therefore has the beneficial effects of the above-mentioned embodiment, and the present application will not be repeated here.

[0123] Figure 7 A structural diagram of an electronic device provided by the embodiment of the present application is shown in Figure 7 The electronic device includes a memory 60 for storing a computer program.

[0124] A processor 61 for executing the computer program to implement the steps of the multi-level flow control method of the above-mentioned embodiment.

[0125] The electronic device provided by the embodiment can include but is not limited to a smart phone, a tablet computer, a notebook computer or a desktop computer, etc.

[0126] The processor 61 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA), etc. The processor 61 can also include a main processor and a coprocessor. The main processor is a processor for processing data in a wake-up state, also known as a central processing unit (CPU). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 61 can be integrated with a graphics processing unit (GPU) that is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 61 can further include an artificial intelligence (AI) processor for processing computing operations related to machine learning.

[0127] The memory 60 can include one or more computer-readable storage media that can be non-transitory. The memory 60 can further include a high-speed random access memory, and a nonvolatile memory such as one or more disk storage devices, flash storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein the computer program is loaded and executed by the processor 61, and can implement the related steps of the multi-level flow control method disclosed in any of the preceding embodiments. In addition, the resources stored in the memory 60 can further include an operating system 602 and data 603, etc., and the storage mode can be temporary storage or permanent storage. The operating system 602 can include Windows, Unix, Linux, etc.

[0128] In some embodiments, the electronic device can further include a display screen 62, an input / output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.

[0129] Those skilled in the art can understand that, Figure 7 The structure shown in the figure does not constitute a limitation on the electronic device, and can include more or fewer components than those shown in the figure.

[0130] It can be understood that if the multi-level flow control method in the above embodiments is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and performs all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, a magnetic disk or an optical disk, and various media that can store program codes.

[0131] Based on this, the embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the multi-level flow control method.

[0132] Based on this, the embodiment of the present application further provides a computer program product, which includes computer programs / instructions. The computer programs / instructions are executed by a processor to implement the steps of the multi-level flow control method.

[0133] The above describes in detail the multi-level flow control method, device and medium provided by the embodiment of the present application. The embodiments in the specification are described in a progressive manner, and each embodiment mainly describes the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the related parts can be referred to the method part.

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

[0135] The above describes in detail the multi-level flow control method, device and medium provided by the present application. The principles and implementation manners of the present application are described by using specific examples, and the above description of the examples is only used to help understand the method of the present application and the core idea thereof. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A multi-stage flow control method, characterized in that, Applied to the respondent, including: Obtain request messages from each initiator that initiates data transmission with itself; The transmission requirements of the data to be transmitted in each initiator are determined according to the correspondence between the data transmission traffic represented by each request message and the preset dedicated threshold traffic and the preset shared threshold traffic; wherein, each preset dedicated threshold traffic is configured by the responder for each initiator, and the preset shared threshold traffic is the difference between the total traffic corresponding to the responder and each preset dedicated threshold traffic. Send a response message representing the transmission request to each of the initiators, and receive / discard the data to be transmitted by the initiators according to the transmission request corresponding to the response message.

2. The multi-stage flow control method according to claim 1, characterized in that, The step of determining the transmission requirements of the data to be transmitted in each initiator based on the correspondence between the data transmission traffic represented by each request message and the preset dedicated threshold traffic and preset shared threshold traffic includes: If the data transmission traffic is not greater than the corresponding preset dedicated threshold traffic, then the transmission requirement of the data to be transmitted is a normal transmission requirement. If the data transmission traffic is greater than the corresponding preset dedicated threshold traffic, and the difference between the data transmission traffic and the corresponding preset dedicated threshold traffic is not greater than the alarm line traffic corresponding to the preset shared threshold traffic, then the transmission requirement of the data to be transmitted is a decelerated transmission requirement. If the data transmission traffic is greater than the corresponding preset dedicated threshold traffic, and the difference between the data transmission traffic and the corresponding preset dedicated threshold traffic is greater than the alarm line traffic and less than the discard line traffic corresponding to the preset shared threshold traffic, then the transmission requirement of the data to be transmitted is a backpressure transmission requirement. If the data transmission traffic is greater than the corresponding preset dedicated threshold traffic, and the difference between the data transmission traffic and the corresponding preset dedicated threshold traffic is greater than the discard line traffic, then the transmission requirement for the data to be transmitted is a discard requirement.

3. The multi-stage flow control method according to claim 2, characterized in that, Receiving / discarding the data to be transmitted by the initiator according to the transmission request corresponding to the response message includes: When the transmission request represented by the response message is the normal transmission request, the data to be transmitted by the initiator based on the corresponding preset dedicated threshold traffic is received; When the transmission request represented by the response message is the deceleration transmission request or the backpressure transmission request, the system receives the dedicated transmission data transmitted by the initiator based on the corresponding preset dedicated threshold traffic and the shared transmission data transmitted based on the preset shared threshold traffic, and updates the remaining preset shared threshold traffic; wherein, the dedicated transmission data is the data corresponding to the preset dedicated threshold traffic, and the shared transmission data is the remaining data in the data to be transmitted that is not the dedicated transmission data; When the transmission request represented by the response message is a drop request, the data to be transmitted by the initiator based on the corresponding preset dedicated threshold traffic and preset shared threshold traffic is discarded.

4. The multi-stage flow control method according to claim 3, characterized in that, When the transmission request represented by the response message is the normal transmission request, the data to be transmitted by the initiator based on the corresponding preset dedicated threshold traffic is received, including: Receive the data to be transmitted from the initiator at the normal data transmission rate within the corresponding preset dedicated threshold traffic.

5. The multi-stage flow control method according to claim 3, characterized in that, When the transmission request represented by the response message is the decelerated transmission request, receiving the dedicated transmission data transmitted by the initiator based on the corresponding preset dedicated threshold traffic and the shared transmission data transmitted based on the preset shared threshold traffic includes: Receive the dedicated transmission data transmitted by the initiator at the normal data transmission rate within the corresponding preset dedicated threshold traffic; Receive the shared transmission data transmitted by the initiator in the alarm line traffic corresponding to the preset shared threshold traffic at a reduced data transmission rate.

6. The multi-stage flow control method according to claim 3, characterized in that, When the transmission request represented by the response message is the backpressure transmission request, receiving the dedicated transmission data transmitted by the initiator based on the corresponding preset dedicated threshold traffic and the shared transmission data transmitted based on the preset shared threshold traffic includes: Receive the dedicated transmission data transmitted by the initiator at the normal data transmission rate within the corresponding preset dedicated threshold traffic; Send a transmission signal indicating that data transmission will continue to the initiator, and after the initiator receives the transmission signal, receive the shared transmission data transmitted by the initiator in the discard line traffic corresponding to the preset shared threshold traffic at the normal data transmission rate or the decelerated data transmission rate.

7. The multi-stage flow control method according to claim 3, characterized in that, When the transmission request represented by the response message is a drop request, after discarding the data to be transmitted by the initiator based on the corresponding preset dedicated threshold traffic and preset shared threshold traffic, the method further includes: Determine whether the remaining preset shared threshold traffic and the preset dedicated threshold traffic corresponding to the initiator meet the traffic requirements corresponding to the data to be transmitted by the initiator; If the remaining shared threshold traffic and the preset dedicated threshold traffic corresponding to the initiator meet the traffic requirements, a retransmission signal representing data retransmission is sent to the initiator. After the initiator receives the retransmission signal, the initiator receives the data to be transmitted again based on the corresponding preset dedicated threshold traffic and the remaining preset shared threshold traffic.

8. The multi-stage flow control method according to any one of claims 1-7, characterized in that, After receiving / discarding the data to be transmitted by the initiator according to the transmission request corresponding to the response message, the method further includes: Based on the data transmission traffic corresponding to the data to be transmitted by each of the initiators, the corresponding preset exclusive threshold traffic and the preset shared threshold traffic are reconfigured.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the multi-level flow control method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the multi-level flow control method as described in any one of claims 1 to 8.