Transaction flow processing system, method, and related apparatus

By using execution order flags (RO, SO, NO) in the transaction flow to adjust the transaction execution order, the problem of time extension in connectionless communication is solved, system performance is improved, and the correctness and efficiency of transaction processing are ensured.

WO2024221433A1PCT designated stage expired Publication Date: 2024-10-31HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/091720
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

The communication delay in connectionless communication is long, resulting in low system processing performance, and it is difficult to effectively improve the processing performance of connectionless communication with existing technology.

Method used

By introducing execution order flags (such as RO, SO, NO) into the transaction flow, we can flexibly arrange the execution order of transactions, reduce the waiting time caused by strictly following the transaction queuing order, improve communication efficiency, and indicate the execution order in the transaction flow. Constraint information to ensure correct handling of dependencies.

Benefits of technology

It reduces the transaction communication delay, improves the system's processing performance, ensures the correctness and efficiency of transaction processing logic, and concisely and effectively indicates the execution sequence between transactions to facilitate network card identification and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023091720_31102024_PF_FP_ABST
    Figure CN2023091720_31102024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are a transaction flow processing system, a method, and a related apparatus. The system comprises a first apparatus and a second apparatus. The first apparatus is used for sending a first transaction, the first transaction being a transaction of which the serial number is smaller than that of a second transaction and which comprises a first execution order flag or a second execution order flag, the first execution order flag and the second execution order flag both being used for indicating the execution order of the transactions, and the first transaction and the second transaction belonging to the same transaction flow; the second apparatus is used for receiving the first transaction and executing the first transaction. The first apparatus is further used for sending the second transaction after execution of all of the first transaction in the transaction flow, the second transaction comprising the second execution order flag, and the second execution order flag indicating execution of the second transaction after the execution of all of the first transaction in the transaction flow. The second apparatus is further used for receiving the second transaction and executing the second transaction. The present application can improve processing performance in communication.
Need to check novelty before this filing date? Find Prior Art

Description

System, method and related device for processing transaction flow Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a system, method and related apparatus for processing transaction flows. Background Art

[0002] In technologies such as remote direct memory access (RDMA), unified bus (UB), or multi-threaded concurrent programming, if all work queue elements (WQEs) in a source's transaction queue (TAQ) can only be sent to the same destination, the communication between the source and the destination is connection-oriented. If the WQEs in the source's TAQ can be sent to multiple destinations, the communication between the source and the multiple destinations is connectionless.

[0003] Connection-oriented communication is suitable for transmission services that require end-to-end reliability, high bandwidth, and low latency, and has been widely used in scenarios such as high-performance computing and data center networks. However, as the scale of computing devices and data center networks increases, connection-oriented communication requires establishing more connections, increasing processing complexity and additional resource overhead. To address this problem, existing technologies, such as Amazon's Scalable Reliable Datagram (SRD) technology, effectively reduce the number of connections through connectionless communication, making it capable of deployment in large-scale networks with more than 10,000 nodes.

[0004] However, in connectionless communication, the WQE in the source's SQ can be sent to multiple destinations. Each destination will process the received transactions and provide completion status feedback to the source. However, this connectionless communication currently has long communication latency, resulting in low system processing performance. Therefore, improving the processing performance of connectionless communication is a technical problem that those skilled in the art urgently need to solve.

[0005] Summary of the Invention

[0006] The present application provides a system, method and related apparatus for processing transaction flows, which can improve processing performance in communications.

[0007] In a first aspect, the present application provides a system for processing a transaction flow, the system comprising a first device and a second device;

[0008] The first device is used to send a first transaction, the first transaction is a transaction with a smaller number than a second transaction and includes a first execution sequence flag or a second execution sequence flag, the first execution sequence flag and the second execution sequence flag are both used to indicate an execution order of the transactions, and the first transaction and the second transaction belong to the same transaction flow;

[0009] The second device is configured to receive the first transaction and execute the first transaction;

[0010] The first device is further configured to send the second transaction after all the first transactions in the transaction flow are executed, the second transaction including the second execution sequence flag, the second execution sequence flag indicating that the second transaction is to be executed after all the first transactions in the transaction flow are executed;

[0011] The second device is further configured to receive the second transaction and execute the second transaction.

[0012] For example, in the UB transport layer and transaction layer specifications, the first execution order flag can be represented by RO. RO is short for relaxed order. Alternatively, the first execution order flag can also be called a relaxed execution order flag.

[0013] For example, in the UB transport layer and transaction layer specifications, the second execution order flag can be represented by SO. SO is short for strong order. Alternatively, the second execution order flag can also be called a strict execution order flag.

[0014] Optionally, the first execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the first transaction, the second execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the second transaction, and the third execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the third transaction.

[0015] A transaction flow is a sequence of transactions arranged in sequence. For example, a transaction flow is a sequence of transactions that enter the same transaction queue (TAQ). Alternatively, for example, a transaction flow is a sequence of transactions that is arranged in sequence in the transaction layer through a data structure such as an array or a linked list. In the embodiments of the present application, the transaction flow is mainly introduced as a sequence of transactions that enter the same TAQ. Each transaction in the TAQ is provided with a sequence number (referred to as the TAQ number), and the sequence number of the transaction that enters the TAQ first is smaller than the sequence number of the transaction that enters later.

[0016] In this solution, the constraint information indicating the execution order of a transaction (such as the above-mentioned first execution order flag or the second execution order flag) can flexibly arrange the execution order of transactions, reduce the waiting time for transaction sending caused by strictly executing the transactions in the queuing order in the transaction flow (sorted by number), thereby reducing the communication delay and performance loss of the transaction. For example, the above-mentioned first execution order flag is a loose execution order flag, which can be used in conjunction with the above-mentioned second execution order flag as a strict execution order flag. Exemplarily, the sending of a transaction carrying the first execution order flag may not be constrained by the queuing order of the transaction in the transaction flow, while the sending of a transaction carrying the second execution order flag must meet certain conditions. The condition is that the transaction can only be sent after all transactions in the transaction flow with a number smaller than that of the transaction and carrying the first execution order flag and / or the second execution order flag are executed. Transactions carrying the first execution order flag can be understood as dependent transactions, and transactions carrying the second execution order flag can be understood as dependent transactions. This solution, on the one hand, reduces the performance loss caused by strictly following the queue order of transactions in the transaction flow, and on the other hand, allows transactions with dependencies to be executed in the order of their dependencies, ensuring the correctness of transaction processing logic. Furthermore, the constraint information indicating the execution order within a transaction is simple to implement and can concisely and effectively indicate the execution order between transactions. It also facilitates network card recognition and operation, improving processing efficiency.

[0017] In a possible implementation, the first device is further configured to send a third transaction in the transaction flow, where the third transaction includes a third execution sequence flag, and the third execution sequence flag is configured to indicate that the transaction including the third execution sequence flag has no execution order constraint.

[0018] For example, in the UB transport layer and transaction layer specifications, the third execution order flag can be represented by NO, which is short for no order. Alternatively, the third execution order flag can also be called an out-of-order execution flag.

[0019] In this solution, the third execution order flag is an out-of-order execution flag. Its execution order is not constrained by the order in which transactions are queued in the transaction flow. Alternatively, transactions carrying the third execution order flag can be interpreted as independent of other transactions. Therefore, transactions can be sent without waiting for the execution results of other transactions, reducing the waiting time, communication latency, and performance loss.

[0020] In one possible implementation, the first device is further used to send a fourth transaction while waiting for the first transactions to be executed. The fourth transaction includes the first execution sequence flag and the fourth transaction number is greater than the second transaction. The fourth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

[0021] In this solution, if the transaction number in the transaction flow is smaller than the transaction carrying the second execution sequence flag (i.e., the second transaction), and the transactions carrying the first execution sequence flag and / or the second execution sequence flag (i.e., the first transaction) have not been fully executed, the second transaction will be skipped and the transaction carrying the first execution sequence flag following the second transaction will be sent first, thereby not blocking the queue, reducing communication delay, and improving system performance.

[0022] In one possible implementation, the first device is further used to send a fifth transaction while waiting for the first transactions to be executed. The fifth transaction includes a third execution sequence flag, and the third execution sequence flag indicates that the transaction including the third execution sequence flag has no execution order constraints, and the number of the fifth transaction is greater than that of the second transaction. The fifth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

[0023] In this solution, if the transaction number in the transaction flow is smaller than the transaction carrying the second execution sequence flag (i.e., the second transaction), and the transactions carrying the first execution sequence flag and / or the second execution sequence flag (i.e., the first transaction) have not been fully executed, the second transaction will be skipped and the transaction carrying the third execution sequence flag following the second transaction will be sent first, thereby not blocking the queue, reducing communication delay, and improving system performance.

[0024] In one possible implementation, the first device is further used to: send the sixth transaction when all transactions with numbers smaller than the sixth transaction in the transaction stream have been executed; the sixth transaction includes a fourth execution sequence flag, and the fourth execution sequence flag indicates that the sixth transaction will be executed after all transactions with numbers smaller than the sixth transaction in the transaction stream have been executed.

[0025] In this solution, transactions in the transaction flow carry the FENCE flag (the fourth execution order flag mentioned above). This flag indicates that transactions carrying this flag should be sent only after all previous transactions in the transaction flow have completed. This means that this solution is also compatible with the FENCE mechanism, providing flexible application scenarios.

[0026] In one possible implementation, the first device is further used to send a first completion sequence flag to the second device, where the first completion sequence flag is associated with the first transaction, and the first completion sequence flag is used to instruct the second device to generate completion information of the first transaction in order (referred to as the first completion sequence flag for short), or to instruct the second device to generate completion information of the first transaction out of order (referred to as the second completion sequence flag for short), and the completion information of the first transaction indicates that the first transaction has been executed.

[0027] For example, in the UB transport layer and transaction layer specifications, the first completion sequence flag may also be represented by NO, which is called an out-of-order completion flag.

[0028] For example, in the UB transport layer and transaction layer specifications, the second completion order flag may also be represented by CO. CO is the abbreviation of Completion Order, and may also be called an order-preserving completion flag.

[0029] Optionally, the first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer of a message corresponding to the first transaction.

[0030] In this solution, when the first device sends the first transaction to the second device, it also carries a completion sequence flag to indicate when the second device generates completion information, thereby providing flexible notification of transaction completion. For example, if the completion sequence flag indicates that completion information is generated in order, it is compatible with existing interface semantics for order-preserving completions. If the completion sequence flag indicates that completion information can be generated out of order after the transaction is completed without waiting, it can effectively meet the requirements of low-latency transactions. The specific choice can be made based on needs, with high flexibility and strong applicability.

[0031] In a second aspect, the present application provides a method for processing a transaction flow, the method comprising:

[0032] Sending a first transaction, where the first transaction has a smaller number than the second transaction and includes a first execution sequence flag or a second execution sequence flag, where the first execution sequence flag and the second execution sequence flag are both used to indicate an execution order of the transactions, and the first transaction and the second transaction belong to the same transaction flow;

[0033] After all the first transactions in the transaction flow are executed, the second transaction is sent. The second transaction includes the second execution sequence flag, and the second execution sequence flag indicates that the second transaction is executed after all the first transactions in the transaction flow are executed.

[0034] In a possible implementation, the method further includes: sending a third transaction in the transaction flow, where the third transaction includes a third execution sequence flag, and the third execution sequence flag indicates that the third transaction has no execution order constraint.

[0035] In one possible implementation, the method further includes: while waiting for the first transactions to be executed, sending a fourth transaction, the fourth transaction including the first execution sequence flag and having a larger number than the second transaction, and the fourth transaction, the first transaction, and the second transaction all belonging to the same transaction flow.

[0036] In one possible implementation, the method further includes: while waiting for the first transactions to be executed, sending a fifth transaction, the fifth transaction including a third execution sequence flag, the third execution sequence flag indicating that the transaction including the third execution sequence flag has no execution order constraints, and the fifth transaction is numbered greater than the second transaction, and the fifth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

[0037] In one possible implementation, the method further includes: sending the sixth transaction when all transactions numbered smaller than the sixth transaction in the transaction flow have been executed; the sixth transaction includes a fourth execution sequence flag, and the fourth execution sequence flag indicates that the sixth transaction will be executed after all transactions numbered smaller than the sixth transaction in the transaction flow have been executed.

[0038] In one possible implementation, the method further includes: sending a first completion sequence flag to a second device, the first completion sequence flag being associated with the first transaction, the first completion sequence flag being used to instruct the second device to generate completion information of the first transaction in order, or to instruct the second device to generate completion information of the first transaction out of order, the completion information of the first transaction indicating that the first transaction has been executed.

[0039] In a possible implementation, the first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer in a message corresponding to the first transaction.

[0040] In one possible implementation, the first execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the first transaction, the second execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the second transaction, and the third execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the third transaction.

[0041] In a third aspect, the present application provides a method for processing a transaction flow, the method comprising:

[0042] receiving a first transaction and a first completion sequence flag, wherein the first completion sequence flag is associated with the first transaction, the first completion sequence flag being used to instruct a second device to generate completion information of the first transaction in a preserved order, or to instruct the second device to generate completion information of the first transaction out of order, the completion information of the first transaction indicating that the first transaction has been executed to completion;

[0043] executing the first transaction;

[0044] Completion information of the first transaction is generated based on the first completion sequence flag.

[0045] In a possible implementation, the first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer in a message corresponding to the first transaction.

[0046] In a fourth aspect, the present application provides a device for processing a transaction flow, the device comprising:

[0047] a sending unit, configured to send a first transaction, where the first transaction has a smaller number than a second transaction and includes a first execution sequence flag or a second execution sequence flag, where the first execution sequence flag and the second execution sequence flag are both used to indicate an execution order of the transactions, and the first transaction and the second transaction belong to the same transaction flow;

[0048] The sending unit is further used to send the second transaction after all the first transactions in the transaction flow are executed. The second transaction includes the second execution sequence flag, and the second execution sequence flag indicates that the second transaction is executed after all the first transactions in the transaction flow are executed.

[0049] In a possible implementation, the sending unit is further configured to: send a third transaction in the transaction flow, where the third transaction includes a third execution sequence flag, and the third execution sequence flag indicates that the third transaction has no execution order constraint.

[0050] In one possible implementation, the sending unit is further used to: while waiting for the first transactions to be executed, send a fourth transaction, where the fourth transaction includes the first execution sequence flag and the fourth transaction number is greater than the second transaction, and the fourth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

[0051] In one possible implementation, the sending unit is further configured to: while waiting for the completion of execution of all the first transactions, send a fifth transaction, where the fifth transaction includes a third execution sequence flag, where the third execution sequence flag indicates that there are no execution order constraints for transactions including the third execution sequence flag, and the fifth transaction is numbered greater than the second transaction, and the fifth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

[0052] In one possible implementation, the sending unit is further used to: send the sixth transaction when all transactions with numbers smaller than the sixth transaction in the transaction flow are executed; the sixth transaction includes a fourth execution sequence flag, and the fourth execution sequence flag indicates that the sixth transaction should be executed after all transactions with numbers smaller than the sixth transaction in the transaction flow are executed.

[0053] In one possible implementation, the sending unit is further used to: send a first completion sequence flag to the second device, where the first completion sequence flag is associated with the first transaction, and the first completion sequence flag is used to instruct the second device to generate completion information of the first transaction in order, or to instruct the second device to generate completion information of the first transaction out of order, and the completion information of the first transaction indicates that the first transaction has been executed.

[0054] In a possible implementation, the first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer in a message corresponding to the first transaction.

[0055] In one possible implementation, the first execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the first transaction, the second execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the second transaction, and the third execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the third transaction.

[0056] In a fifth aspect, the present application provides a device for processing a transaction flow, the device comprising:

[0057] a receiving unit, configured to receive a first transaction and a first completion sequence flag, wherein the first completion sequence flag is associated with the first transaction, the first completion sequence flag being used to instruct the second device to generate completion information of the first transaction in order, or to instruct the second device to generate completion information of the first transaction out of order, the completion information of the first transaction indicating that the first transaction has been executed and completed

[0058] A processing unit is configured to execute the first transaction; and generate completion information of the first transaction based on the first completion sequence flag.

[0059] In a possible implementation, the first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer in a message corresponding to the first transaction.

[0060] In a sixth aspect, the present application provides an apparatus for processing transaction flows, the apparatus comprising a processor and a memory. The memory is coupled to the processor, and when the processor executes a computer program or computer instructions stored in the memory, the method described in any one of the second aspects above can be implemented. The apparatus for processing transaction flows can also include a communication interface, the communication interface being used for the apparatus for processing transaction flows to communicate with other apparatuses. Exemplarily, the communication interface can be a transceiver, circuit, bus, module, or other type of communication interface.

[0061] In a possible implementation, the device for processing a transaction flow may include:

[0062] Memory for storing computer programs or computer instructions;

[0063] Processor for:

[0064] Sending a first transaction through a communication interface, where the first transaction has a smaller number than a second transaction and includes a first execution sequence flag or a second execution sequence flag, where the first execution sequence flag and the second execution sequence flag are both used to indicate an execution order of the transactions, and the first transaction and the second transaction belong to the same transaction flow;

[0065] After all the first transactions in the transaction flow are executed, the second transaction is sent through the communication interface, and the second transaction includes the second execution sequence flag, which indicates that the second transaction is executed after all the first transactions in the transaction flow are executed.

[0066] It should be noted that the computer programs or computer instructions in the memory of this application can be pre-stored or downloaded from the Internet when using the device for processing transaction flows. This application does not specifically limit the source of the computer programs or computer instructions in the memory. The coupling in the embodiments of this application is an indirect coupling or connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.

[0067] In one possible implementation, the above-mentioned device for processing transaction flow can be a communication device that can implement any method described in the above-mentioned second aspect, or it can be a chip, processor, processing system, network card in the communication device, or a component module obtained by any combination thereof.

[0068] In a seventh aspect, the present application provides an apparatus for processing transaction flows, the apparatus comprising a processor and a memory. The memory is coupled to the processor, and when the processor executes a computer program or computer instructions stored in the memory, the method described in any one of the third aspects can be implemented. The apparatus for processing transaction flows can also include a communication interface, which is used for the apparatus for processing transaction flows to communicate with other apparatuses. Exemplarily, the communication interface can be a transceiver, circuit, bus, module, or other type of communication interface.

[0069] In a possible implementation, the device for processing a transaction flow may include:

[0070] Memory for storing computer programs or computer instructions;

[0071] Processor for:

[0072] receiving, through a communication interface, a first transaction and a first completion sequence flag, wherein the first completion sequence flag is associated with the first transaction, the first completion sequence flag being used to instruct a second device to generate completion information of the first transaction in a preserved order, or to instruct the second device to generate completion information of the first transaction out of order, the completion information of the first transaction indicating that the first transaction has been executed to completion;

[0073] Execute the first transaction; and generate completion information of the first transaction based on the first completion sequence flag.

[0074] It should be noted that the computer programs or computer instructions in the memory of this application can be pre-stored or downloaded from the Internet when using the device for processing transaction flows. This application does not specifically limit the source of the computer programs or computer instructions in the memory. The coupling in the embodiments of this application is an indirect coupling or connection between devices, units or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.

[0075] In one possible implementation, the above-mentioned device for processing transaction flow can be a communication device that can implement any method described in the above-mentioned third aspect, or it can be a chip, processor, processing system, network card in the communication device, or a component module obtained by any combination thereof.

[0076] In an eighth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program or computer instructions, and the computer program or computer instructions are executed by a processor to implement the method described in any one of the second aspects above.

[0077] In a ninth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program or computer instructions, and the computer program or computer instructions are executed by a processor to implement the method described in any one of the third aspects above.

[0078] In a tenth aspect, the present application provides a computer program product. When the aforementioned computer program product is executed by a processor, the method described in any one of the aforementioned second aspects will be implemented.

[0079] In an eleventh aspect, the present application provides a computer program product. When the aforementioned computer program product is executed by a processor, the method described in any one of the aforementioned third aspects will be implemented.

[0080] The solutions provided in the second to eleventh aspects are used to implement or cooperate with the corresponding systems provided in the first aspect, and therefore can achieve the same or corresponding beneficial effects as the corresponding systems in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 shows a schematic diagram of a connectionless communication protocol stack architecture;

[0082] FIG2 is a schematic diagram showing the architecture of a connectionless communication system;

[0083] FIG3 is a flow chart showing a method for processing transaction flows;

[0084] FIG4 is a schematic structural diagram of a communication device;

[0085] Figure 5 shows a schematic diagram of transaction dependencies;

[0086] FIG6 is a schematic structural diagram of a communication device;

[0087] Figures 7 to 11 are schematic diagrams of related bitmap markings;

[0088] FIG12 is a schematic diagram showing the structure of a transaction;

[0089] FIG13 is a schematic diagram showing a partial structure of a control domain segment;

[0090] FIG14 is a schematic diagram showing the structure of the transaction layer header of a message;

[0091] FIG15 is a schematic diagram showing transaction execution sequence control;

[0092] FIG16 is a schematic diagram of a system for processing transaction flows and its transaction flow processing flow;

[0093] 17 to 19 are schematic diagrams showing the structure of the device. DETAILED DESCRIPTION

[0094] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms "first", "second", "third" and "fourth" in the specification and claims of this application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0095] The various embodiments of this application are, on the one hand, independent of each other, meaning that the embodiments do not restrict or constrain each other. On the other hand, unless otherwise specified or logically conflicting, the terms and / or descriptions of the various embodiments are consistent and can be referenced across them. Technical features from different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0096] First, the relevant terms in the embodiments of this application are explained:

[0097] 1. Transaction: An independent operation initiated by a user. Exemplarily, the operation can be a memory operation or a message operation. For example, in RDMA, a bilateral operation or a unilateral operation is a transaction. The bilateral operation is, for example, a send / receive operation. The unilateral operation is, for example, a write operation or a read operation. Alternatively, for example, a write operation, a read operation, or a send / receive operation in a unified bus (UB) communication technology can be a transaction. Alternatively, for example, in multi-threaded concurrent programming, an asynchronous atomic memory operation of compare and swap (CAS) is a transaction. It will be understood that the examples given here do not constitute a limitation on the embodiments of the present application.

[0098] 2. Source and Destination: In the embodiments of this application, the device that sends a transaction is the source, and the device that receives and executes the transaction sent by the source is the destination. For example, the source and destination can be, for example, a communication device, a network card and / or processor included in the communication device, etc.

[0099] 3. Transaction flow: It is a sequence of transactions in which multiple transactions are arranged in order. For example, a transaction flow is a sequence of transactions that enter the same transaction layer queue (TAQ). Or, for example, a transaction flow is a sequence of transactions arranged in order in the transaction layer through data structures such as arrays or linked lists. In the embodiments of the present application, the transaction flow is mainly introduced as a sequence of transactions that enter the same TAQ. Each transaction in the TAQ is provided with a sequence number (referred to as the TAQ number for short), and the sequence number of the transaction that enters the TAQ first is smaller than the sequence number of the transaction that enters later. If the sequence number of transaction A is smaller than the sequence number of transaction B, then transaction A is said to be the transaction that precedes transaction B. In other words, transaction B is the transaction that follows transaction A.

[0100] 4. Transaction Placement Order: The order in which transactions within the same transaction flow are executed at the destination. Generally, transactions in a transaction layer queue are dispatched from the transaction layer queue to a transport layer queue (TPQ), sent to the destination, and then executed at the destination. The present embodiment uses transaction placement order to control the order in which transactions are dispatched at the source, and thus the order in which transactions are executed at the destination. For specific implementation details, please refer to the description of the subsequent embodiments and will not be elaborated here.

[0101] 5. Source Completion Order of Transactions: After transactions in the same transaction flow are completed, a completion queue element (CQE) is generated at the source end to notify the upper-layer application of the source end of the order in which the transactions were completed. For example, the source completion order of transactions can also be referred to as the send completion order of transactions. For example, the source end can be informed that the transaction has been completed by receiving a transaction layer acknowledgment character (ACK) from the destination end. For an introduction to the transaction layer ACK, please refer to the relevant description in step S330 in Figure 3, which will not be described in detail here.

[0102] 6. Transaction destination completion order: After transactions within the same transaction flow complete, a CQE is generated on the destination end to notify the destination end's upper-layer application of the transaction completion order. For example, the transaction destination completion order can also be called the transaction reception completion order.

[0103] 7. Order Preservation: In the same transaction flow, if transaction A precedes transaction B and is executed before transaction B at the destination, the execution order of transactions A and B is said to be preserved. Similarly, if transaction A precedes transaction B and notifies the upper-layer application at the source before transaction B, the source completion order of transactions A and B is preserved. If transaction A precedes transaction B and notifies the upper-layer application at the destination before transaction B, the destination completion order of transactions A and B is preserved. Transactions that do not meet the order preservation requirements are said to be out-of-order.

[0104] 8. Strong transaction ordering: This means that the execution order, source completion order, and destination completion order of all transactions in the same transaction flow are preserved. The execution order, source completion order, and destination completion order of transactions are collectively referred to as transaction ordering.

[0105] 9. Weak transaction ordering: Weak transactions require only dependent transactions within a transaction flow to be executed in order-preserving order; the execution order of transactions without dependencies is not constrained. In one possible implementation, the source completion order of a transaction flow with weak transaction ordering must be preserved. In another possible implementation, transactions within a transaction flow with weak transaction ordering can be configured to complete in either order-preserving or out-of-order mode at the same destination.

[0106] 10. Connection-oriented communication / connectionless communication: If all work queue elements (WQEs) in the transaction layer queue of the source can only be sent to the same destination, the communication between the source and the destination is connection-oriented. If the WQEs in the transaction layer queue of the source can be sent to multiple destinations, the communication between the source and the multiple destinations is connectionless.

[0107] 11. Transaction Dependencies: If transaction A can only execute after transaction B completes, then transaction A is said to be dependent on transaction B. Transaction A is the dependent transaction, and transaction B is the dependent transaction. For example, if transaction A can only execute after transaction B completes, then transactions A and B are said to have an order-preserving requirement. Alternatively, transaction A and transaction B, on which it depends, have an order-preserving requirement. If a transaction has no dependencies, then it has no order-preserving requirement.

[0108] The following describes the system architecture and application scenarios of the embodiments of the present application.

[0109] For example, see Figure 1, which shows a schematic diagram of a connectionless communication protocol stack architecture, which includes an application layer, a transaction layer, a transport layer, a network layer, a data link layer, and a physical layer.

[0110] The application layer directly faces users and provides them with specific or commonly used applications (Application, APP). For example, embodiments of the present application can support a variety of application scenarios, such as high-performance computing, machine learning, distributed storage, and database applications. In the application layer, applications corresponding to application scenarios can be provided to users.

[0111] The application layer and the transaction layer communicate with each other through an application programming interface (API). For example, applications in the application layer can issue transactions to the transaction layer through the API. For example, applications can issue send / receive bilateral operation transactions, write operation transactions, or read operation transactions to the transaction layer through the API. In addition, in the embodiment of the present application, the API also defines a transaction sequence flag to implement weak transaction sequence control of the transaction flow in the embodiment of the present application. Please refer to the subsequent introduction for details, which will not be repeated here.

[0112] The transaction layer can process transaction layer queues, transport layer queue lookup tables, and transaction sequence control logic.

[0113] The transaction layer queue is used to store transactions from the application layer in sequence. Transactions in the transaction layer queue can also be called work queue elements WQE. For example, in the Unified Bus Transport and Baseline Transaction Specification, the transaction layer queue can also be called JFS, which is the abbreviation of jetty for send. It can be understood that the transaction layer queue can also be called other names, as long as it has the functions or characteristics that can be achieved by the transaction layer queue described in the embodiments of the present application, it belongs to the transaction layer queue described in the embodiments of the present application.

[0114] The transport layer queue is located in the transport layer and is used to store transactions scheduled from the transaction layer queue. The transport layer queue lookup table includes a mapping relationship between the identifier of the destination end of the transaction and the number of the transport layer queue. Through the destination end identifier carried in the transaction, the identifier of the transport layer queue used to send the transaction can be found in the transport layer queue lookup table (for example, the number of the transport layer queue, etc., which is used to identify the transport layer queue. The embodiment of the present application takes the number as an example to introduce), so that the transaction can be scheduled from the transaction layer queue to the corresponding transport layer queue to wait for sending. Alternatively, in another possible implementation, the identifier of the transport layer queue can be carried in the transaction, so that the transport layer queue used to send the transaction can be determined without looking up the transport layer queue lookup table. In the subsequent description of the embodiment of the present application, the destination end identifier carried in the transaction is introduced as an example.

[0115] The transaction sequence control logic is mainly used to control the execution sequence, source completion sequence, and destination completion sequence of transactions in the transaction layer queue. The specific implementation is described in the subsequent introduction and will not be repeated here.

[0116] The transport layer can process transport layer queues according to the UB connectionless transport layer protocol, establish communication connections through the link building module, perform congestion control and multi-path transmission, etc. The link building module is used to establish transport layer queues, and transactions in the same transport layer queue are sent to the same destination to ensure the reliability of transaction transmission. Congestion control can alleviate congestion in the transmission path and improve transmission efficiency. The specific congestion control method is not limited in the embodiments of this application. In multi-path transmission, transactions in the same transport layer queue can reach the destination through multiple paths, and the multi-path transmission module is responsible for path maintenance and load balancing.

[0117] The network layer primarily determines end-to-end routing, transmitting data packets between source and destination addresses through a series of routers.

[0118] The main function of the data link layer is to forward messages between network layer devices.

[0119] The physical layer is responsible for establishing, maintaining, and disconnecting physical connections. Hardware devices such as the host's network card, Ethernet interface, and network cable all fall under the physical layer.

[0120] It can be understood that the above is only an illustrative introduction to the composition of the communication protocol stack architecture and the achievable functions. The achievable functions in the specific implementation are not limited to the above introduction, and may also include more or fewer functions that can be implemented, which is determined according to actual needs. The embodiments of this application do not impose any restrictions on this.

[0121] For example, refer to Figure 2, which shows a schematic diagram of the architecture of a connectionless communication system 100. The communication system 100 is shown as an example including a communication device 110, a communication device 120, and a communication device 130. For example, it is assumed that each of the three communication devices runs two applications, and a local transaction layer queue TAQ is established for each application. For example, application 1 and application 2 are run in the communication device 110, and TAQs corresponding to application 1 and application 2 are established respectively. Application 3 and application 4 are run in the communication device 120, and TAQs corresponding to application 3 and application 4 are established respectively. Application 5 and application 6 are run in the communication device 130, and TAQs corresponding to application 5 and application 6 are established respectively.

[0122] In addition, a set (or one) transport layer queue (TPQ) is established between each two communication devices. TPQs ensure end-to-end transmission reliability. For example, communication device 110 establishes TPQ 0 and communication device 120 establishes TPQ 2 to implement transaction transmission between the two communication devices. Communication device 110 establishes TPQ 1 and communication device 130 establishes TPQ 4 to implement transaction transmission between the two communication devices. Communication device 120 establishes TPQ 3 and communication device 130 establishes TPQ 5 to implement transaction transmission between the two communication devices.

[0123] In practice, WQEs in a TAQ are scheduled for transmission using different TPQs depending on their destination. A WQE in a TAQ on a communication device can be sent to any application process on any of the other two communication devices. For ease of understanding, the following uses the TAQ of application 1 on communication device 110 as an example.

[0124] For example, a WQE in the TAQ of application 1 can be transmitted to communication device 120 via TPQ 0 established in communication device 110, or can be transmitted to communication device 130 via TPQ 1 established in communication device 110. For example, if a WQE in the TAQ of application 1 carries the identifier of communication device 120, this indicates that the destination of the WQE is communication device 120. Using the identifier of communication device 120, the transport layer queue number used to send the WQE is found in the transport layer queue lookup table. As shown in FIG2 , the number is 0. The WQE can then be scheduled from the TAQ to TPQ 0 for transmission. As shown in FIG2 , the WQE will be transmitted to transport layer queue TPQ 2 of communication device 120. The WQE is then executed by communication device 120.

[0125] Exemplarily, the above-mentioned communication device can be, for example, a server or any device with computing or processing capabilities, etc. The embodiment of the present application does not limit the specific type of the communication device.

[0126] Exemplarily, the communication between any two communication devices in the above-mentioned communication system 100 can be, for example, communication based on remote direct memory access (RDMA) technology, communication based on InfiniBand (IB) technology, communication based on RDMA over converged Ethernet (RoCE), communication based on Internet wide area RDMA protocol (iWARP), communication based on high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIe) or communication based on UB and other transmission transactions.

[0127] It should be understood that the above description is merely illustrative and does not constitute a limitation on the embodiments of the present application. In a specific implementation, the communication system 100 may include two communication devices, or more communication devices. Furthermore, the number of applications running on the communication devices is not limited to the two described above; it may be one or more, and so on, and this embodiment of the present application does not impose any limitation.

[0128] For example, see Figure 3, which is a flow chart of a method for processing a transaction flow provided by an embodiment of the present application. The method includes but is not limited to steps S310 to S330. The specific implementation process of each step is described below.

[0129] S310. The first device obtains a first transaction in a transaction set; the transaction set includes multiple transactions sorted in ascending order of numbering, and the first transaction includes a first execution sequence flag, which is used to control the execution order of the first transaction.

[0130] Exemplarily, the first device can be, for example, any one of the communication devices in the communication system 100 shown in FIG2 (referred to as the first communication device for short), or the first device can be a network card (referred to as the first network card for short) or a processor in the first communication device, or can be a device obtained by combining the first network card and the processor, etc.

[0131] In a specific implementation, the above-mentioned transaction set is located in a transaction layer queue. For ease of understanding, an exemplary introduction is given below in conjunction with Figure 4. Figure 4 exemplarily shows a schematic structural diagram of the above-mentioned first communication device. It includes software and hardware parts. The software part includes specific applications and drivers. The driver can be used to implement the functions of the API shown in Figure 1 above, such as setting a transaction sequence flag in a transaction and issuing a transaction. Exemplarily, the driver can also be used to implement other functions, which can be exemplified by the description related to the subsequent Figure 6, which will not be described in detail here. The hardware part includes host memory and a first network card. The software part is called and executed by the processor of the first communication device, and therefore, the execution subject of the software part is the processor.

[0132] 4 , in a specific implementation, the application sends an application request to the driver based on the user's request. The application request is used to request the initiation of a transaction. The request carries the execution sequence flag of the transaction. After receiving the application request, the driver constructs the transaction according to the application request, and the constructed transaction includes the execution sequence flag. Then, the driver writes the transaction into the transaction layer queue TAQ. As shown in FIG4 , the TAQ is located in the host memory. In addition to the transaction, the TAQ also includes one or more other transactions, which are constructed and written to the TAQ by the driver according to the request from the application. These transactions will also carry corresponding execution sequence flags, which are specifically determined according to the application request. In addition, these transactions are arranged in the order of writing in the TAQ. For example, the sequence of transactions arranged in order in the TAQ is the above-mentioned transaction set. Then, the sequence number of the transaction in the transaction set is the aforementioned TAQ number.

[0133] In a specific implementation, the execution sequence flags of the above transactions may include three types, which are introduced below respectively.

[0134] The first execution order flag is used to indicate that a transaction has no dependencies and no execution order constraints. If a transaction carries the first execution order flag, it indicates that the transaction is neither a dependent transaction nor a dependent transaction, and its execution order is not constrained.

[0135] For example, in the UB transport layer and transaction layer specifications, the first execution order flag can be represented by NO. NO is an abbreviation for no order. Alternatively, the first execution order flag can also be called an out-of-order execution flag. It is understood that the representation of the first execution order flag introduced here is only an example and does not constitute a limitation on the embodiments of the present application. In a specific implementation, the first execution order flag can be represented by other custom identifiers, and the embodiments of the present application do not limit this.

[0136] The second execution order flag is used to indicate that a transaction is a dependent transaction and has no execution order constraints. If a transaction carries this second execution order flag, it indicates that the transaction is a dependent transaction and its execution order is not constrained. However, transactions that depend on it must wait for the dependent transaction to complete before they can execute.

[0137] For example, in the UB transport layer and transaction layer specifications, the second execution order flag can be represented by RO. RO is short for relaxed order. Alternatively, the second execution order flag can also be called a relaxed execution order flag. It will be understood that the representation of the second execution order flag introduced here is only an example and does not constitute a limitation on the embodiments of the present application. In a specific implementation, the second execution order flag can be represented by other custom identifiers, and the embodiments of the present application do not limit this.

[0138] The third execution order flag is used to indicate that a transaction in a transaction set (e.g., the aforementioned TAQ) should be executed after the target transaction completes, without blocking the execution of transactions in the TAQ that carry the first and second execution order flags and are queued after the transaction. The target transaction includes transactions in the TAQ that precede the transaction and carry a preset flag. That is, the target transaction includes transactions in the TAQ that have a TAQ number lower than that of the transaction and carry a preset flag. If a transaction (referred to as transaction 1) carries the third execution order flag, it indicates that transaction 1 is a dependent transaction, and its execution order is constrained by whether the transactions it depends on have completed. That is, transaction 1 must wait until the dependent transactions complete before it can be scheduled for execution, to ensure the correct transaction processing logic. Furthermore, if there are transactions in the TAQ that carry the first and / or second execution order flags (referred to as transaction 2) that are queued after transaction 1, transaction 2 can be scheduled first while transaction 1 waits for the dependent transactions to complete.

[0139] For example, in the UB transport layer and transaction layer specifications, the third execution order flag can be represented by SO. SO is short for strong order. Alternatively, the third execution order flag can also be called a strict execution order flag. It is understood that the representation of the third execution order flag introduced here is only an example and does not constitute a limitation on the embodiments of the present application. In a specific implementation, the third execution order flag can be represented by other custom identifiers, and the embodiments of the present application do not limit this.

[0140] In the embodiment of the present application, the completion of the transaction on which Transaction 1 depends is determined by determining whether the transaction carrying the above-mentioned preset flag has been completed. Exemplarily, the preset flag includes the second execution sequence flag described above, and optionally, the third execution sequence flag may also be included. For ease of understanding, please refer to Figure 5 for example.

[0141] Figure 5(a) illustrates the dependency relationships among five transactions: A, B, C, D, and E. Specifically, transactions C and D are dependent on transaction A, meaning they can only be executed after A completes. There are no other dependencies. Transaction A is the dependent transaction, and the user can set its execution sequence flag to the second type, such as RO. Transactions C and D are dependent transactions, and their execution sequence flags can be set to the third type, such as SO. Transactions B and E have no dependency relationship, and their execution sequence flags can be set to the first type, such as NO. The five transactions A, B, C, D, and E are then sequentially dispatched to the same TAQ, as shown in Figure 5(b). In this case, transactions A and B can be scheduled directly, while transaction C must wait for transaction A to complete before it can be scheduled. Similarly, transaction D must wait for transactions A and C to complete before it can be scheduled. Transaction E, on the other hand, does not need to wait for other transactions to complete and can be scheduled directly. The ultimate effect is to ensure that transactions A, C, and D are executed in the order of transaction A first, then transaction C, and then transaction D. However, transactions B and E can execute out of order. Therefore, transactions C and D with the SO flag must wait for all preceding transactions in the TAQ with the RO and SO flags to complete before they can be scheduled. Only after they are scheduled can they be sent to the destination for execution. Furthermore, while transactions C and D are waiting for transaction A to complete, transaction E can be scheduled first, thus preventing it from being blocked.

[0142] In one possible implementation, if a transaction is both a dependent transaction and a dependent transaction, then the execution order flag can be set for this transaction as a dependent transaction. That is, the execution order flag of this transaction is set to the third execution order flag. For example, in Figure 5(c) above, if there is also a transaction F that depends on transaction C and is written to the TAQ after transaction E, as shown in Figure 5(d), then this transaction C is both a dependent transaction (depending on A) and a dependent transaction (depending on transaction F). To ensure the execution order of transaction C, the execution order flag of transaction C is set as a dependent transaction, and the execution order flag of transaction C is still set to SO. Transaction F is also a dependent transaction, and its execution order flag is set to SO. Then, transaction F needs to wait until the transactions preceding it in the TAQ and carrying the RO and SO flags (i.e., transactions A, C, and D) are executed before it can be scheduled.

[0143] As can be seen from the example of FIG5 , the execution order flags set in this embodiment can simply approximate the complex dependency relationships between transactions, ensuring that the execution order of transactions does not violate the dependency relationships without affecting the execution of transactions without dependency relationships, thereby effectively improving transaction processing efficiency.

[0144] In one possible implementation, the execution sequence flag of the above-mentioned transaction may further include a reserve (Rvs) sequence flag. The reserve sequence flag is a reserved field used to improve compatibility. For example, in the above-mentioned UB transport layer and transaction layer specifications, the reserve sequence flag may be represented by RSV. It will be understood that this is merely an example and does not constitute a limitation on the embodiments of the present application. In a specific implementation, the reserve sequence flag may be represented by other custom identifiers, which is not limited by the embodiments of the present application.

[0145] In a specific implementation, a TAQ has a corresponding transaction queue context (TAQC). In one possible implementation, after the driver writes a transaction to the TAQ, it updates the transaction queue context accordingly. Specifically, the execution sequence flag carried by the transaction can be added to the transaction queue context to facilitate subsequent processing. This will be described later and will not be detailed here.

[0146] In one possible implementation, after the driver writes the transaction into the TAQ, it notifies the first network card to schedule the transaction in the TAQ. Alternatively, in another possible implementation, as shown in Figure 6, after the driver writes the transaction into the TAQ, the driver can schedule the transaction in the TAQ, that is, the processor can schedule the transaction in the TAQ. The first network card and the processor are collectively referred to as the first device. Then, the first device can obtain a transaction from the TAQ. Exemplarily, the obtained transaction is the first transaction. The execution sequence flag carried in the first transaction is the first execution sequence flag. Optionally, the first transaction can be a transaction at any position in the TAQ. If it is the first time to obtain a transaction from the TAQ, then the obtained transaction is the transaction at the head of the queue in the TAQ.

[0147] S320: The first device sends the first transaction to the second device based on the indication of the first execution sequence flag.

[0148] After obtaining the first transaction, the first device can determine whether the first transaction can be scheduled into the transport layer queue according to the indication of the first execution sequence flag in the first transaction.

[0149] In one possible implementation, if the first execution sequence flag is the aforementioned first execution sequence flag or the aforementioned reserved sequence flag, the first transaction can be directly scheduled. For example, based on the description of the transaction layer in FIG1 , a transport layer queue lookup table is provided in the transaction layer. This transport layer queue lookup table can be stored, for example, in host memory. The transport layer queue lookup table includes a mapping between the identifier of the destination end of a transaction and the number of a transport layer queue. Therefore, the corresponding transport layer queue can be found in the transport layer queue lookup table based on the identifier of the destination end carried in the first transaction. The first transaction is then scheduled to the transport layer queue. For ease of understanding, referring to FIG4 or FIG6 , the first network interface card or processor (via a driver) obtains the first transaction from the TAQ. After determining, through execution sequence control, the first execution sequence flag is determined to be the aforementioned first execution sequence flag or the aforementioned reserved sequence flag. The first transaction is then determined to be scheduleable and is scheduled to the TPQ. The first network interface card then obtains the first transaction from the TPQ, encapsulates it into a transaction message, and sends it to the destination end, i.e., the aforementioned second device.

[0150] In one possible implementation, the transaction message may include one or more messages. For example, in another possible implementation, the message included in the transaction message may also be referred to as a packet. If multiple messages are included, the first network card may split the first transaction and encapsulate them into multiple messages for transmission.

[0151] Exemplarily, the above-mentioned second device can be, for example, any one of the communication devices other than the above-mentioned first communication device (referred to as the second communication device) in the communication system 100 shown in Figure 2, or the second device can be a network card in the second communication device (referred to as the second network card), or can be a device obtained by combining the second network card and a processor, etc.

[0152] In a possible implementation, if the above-mentioned first execution sequence flag is the above-mentioned second execution sequence flag, then the first transaction can also be directly scheduled. For specific scheduling and sending, please refer to the relevant description when the above-mentioned first execution sequence flag is the above-mentioned first execution sequence flag or the above-mentioned reserved sequence flag, which will not be repeated here. In addition, based on the previous introduction, it can be seen that the second execution sequence flag indicates that the first transaction is a dependent transaction. Other transactions that depend on the first transaction will not be scheduled until the first transaction is completed. Therefore, the first transaction can be marked as an uncompleted dependent transaction first. Therefore, before the first transaction is completed, the scheduling of other transactions that depend on the first transaction can be suspended according to the mark.

[0153] In one possible implementation, a transaction can be marked as an uncompleted dependent transaction by means of a bitmap. For example, a bitmap (referred to as the first bitmap) can be set, and each transaction in the TAQ corresponds to a bit in the first bitmap. The value in each bit is 0 by default. When a transaction needs to be marked as an uncompleted dependent transaction, the bit corresponding to the transaction can be set to 1. For example, the bit corresponding to the above-mentioned first transaction can be set to 1. It will be understood that this is only an example and does not constitute a limitation on the embodiments of the present application. Alternatively, in another possible implementation, the value in the bit of the first bitmap is 1 by default. When a transaction needs to be marked as an uncompleted dependent transaction, the bit corresponding to the transaction can be set to 0. Alternatively, the default value is not limited to 0 or 1, and can also be other values ​​such as 2 or 3. The value used for marking is also not limited to 0 or 1. Similarly, it can be other values. The default value can be selected according to actual needs. If it is other values, then two or more bits can be used to mark a transaction, which is not limited in the embodiments of the present application. The same applies to the subsequent values ​​in the bitmap, so I will not go into details.

[0154] In one possible implementation, in the first bitmap, after a transaction is marked as an uncompleted dependent transaction (e.g., marked as 1), if the transaction is completed, the bit corresponding to the transaction in the first bitmap can be restored to the default value (e.g., restored to 0), or a preset value can be marked (the preset value is set according to the actual application and is not limited by the embodiment of the present application). The same is true for each subsequent bitmap. If the condition for marking the transaction is not met, the mark in the bitmap is unmarked. For details, please refer to the description of the first bitmap, which will not be repeated later.

[0155] In another possible implementation, a transaction can be marked as an uncompleted dependent transaction in the form of a list. Exemplarily, a list (referred to as the first list for short) can be set up, which can be used to store the indexes of the dependent transactions that have been scheduled but not completed in the above-mentioned TAQ. The index can be, for example, the sorting number of the transaction in the TAQ, or it can be other information that can be used to identify the transaction, and the embodiments of the present application do not limit this. When a transaction needs to be marked as an uncompleted dependent transaction, the index of the transaction can be added to the list. For example, the index of the above-mentioned first transaction can be added to the list. It can be understood that this is only an example and does not constitute a limitation to the embodiments of the present application.

[0156] In one possible implementation, after a transaction index is added to the first list, if the transaction is completed, the transaction index can be removed from the first list. The same applies to subsequent lists: if the conditions for marking a transaction are no longer met, the transaction is unmarked from the list. For more details, please refer to the description of the first list.

[0157] The above method of marking uncompleted dependent transactions is merely an example and does not limit the embodiments of the present application.

[0158] In one possible implementation, if the first execution order flag is the third execution order flag, the first device determines whether the first transaction can be scheduled based on the indication of the third execution order flag. Based on the previous description of the third execution order flag, it can be seen that the third execution order flag indicates that the first transaction is a dependent transaction and must wait for the transaction that precedes the first transaction in the TAQ and carries the above-mentioned preset flags (e.g., RO and SO flags) (hereinafter referred to as the first target transaction) to be executed and completed first.

[0159] Exemplarily, in one possible implementation, the first device may mark the incomplete status of the transaction carrying the above-mentioned preset flag through a bitmap. Exemplarily, a bitmap (referred to as the second bitmap for short) may be set, and each transaction in the TAQ corresponds to a bit in the second bitmap. The initial value of each bit defaults to 0. In the case where a transaction carrying the above-mentioned preset flag is scheduled but not completed, or the transaction is suspended from scheduling, the transaction needs to be marked as an uncompleted transaction. The bit corresponding to the transaction in the second bitmap can be set to 1. For ease of understanding, please refer to Figure 7 for example.

[0160] In (a) of Figure 7 , the transactions included in the TAQ and the execution order flags carried by the transactions are shown in the figure. Assuming that the first transaction is transaction C in the TAQ, the transaction that precedes transaction C and carries the above-mentioned preset flag is transaction A (carrying RO mark), and transaction A has not been completed. Therefore, the bit in the second bitmap corresponding to transaction A is set to 1. The other bits in the second bitmap are set to 0. Referring again to (b) of Figure 7 , assuming that the first transaction is transaction D in the TAQ, the transactions that precede transaction D and carry the above-mentioned preset flag are transaction A (carrying RO mark) and transaction C (carrying SO mark), and transaction A and transaction C have not been completed. Therefore, the bit in the second bitmap corresponding to transaction A and transaction C is set to 1. The other bits in the second bitmap are set to 0. It will be understood that this is only an example and does not constitute a limitation to the embodiments of the present application.

[0161] For example, in another possible implementation, a bitmap (referred to as the third bitmap) can be set up to be used in conjunction with the first bitmap to mark the incomplete status of transactions carrying the above-mentioned preset flags. Specifically, based on the above description, the first bitmap marks the dependent transactions that have not been completed, that is, it marks the transactions that have not been completed and carry the above-mentioned second execution order flag (such as the RO flag). Then, the third bitmap only needs to mark the transactions that have not been completed and carry the third execution order flag (such as the SO flag). For ease of understanding, please refer to Figure 8 for example.

[0162] In Figure 8, it is assumed that the first transaction is transaction D in the TAQ, and that the transactions preceding transaction D and carrying the preset flag are transaction A (carrying the RO flag) and transaction C (carrying the SO flag), and that transaction A and transaction C have not yet completed. Then, the bit corresponding to transaction A in the first bitmap is set to 1, and the other bits are set to 0. The bit corresponding to transaction C in the third bitmap is set to 1, and the other bits are set to 0. It will be understood that this is merely an example and does not constitute a limitation on the embodiments of the present application.

[0163] In another possible implementation, the incomplete status of transactions carrying the above-mentioned preset flags can be marked in the form of a list. A list (referred to as the second list for short) can be set up, which can be used to store the indexes of transactions that carry the above-mentioned preset flags and have not been completed. The index can be, for example, the sorting number of the transaction in the TAQ, or it can be other information that can be used to identify the transaction, and the embodiments of the present application do not limit this. In the case where a transaction carrying the above-mentioned preset flag is scheduled but not completed, or the transaction is suspended from scheduling, the transaction needs to be marked as an uncompleted transaction. The index of the transaction can be added to the list. It will be understood that this is only an example and does not constitute a limitation to the embodiments of the present application.

[0164] Alternatively, in another possible implementation, a list (referred to as the third list) may be provided for use in conjunction with the first list to mark the incomplete status of transactions carrying the preset flag. For specific details on the use of the first and third bitmaps, please refer to the description of the use of the first and third bitmaps, which will not be repeated here.

[0165] Based on the above description, the above-mentioned first device can obtain the mark in the above-mentioned second bitmap based on the indication of the third execution sequence flag in the above-mentioned first transaction, or obtain the marks of the above-mentioned third bitmap and the first bitmap, or obtain the transaction index in the above-mentioned second list, or obtain the transaction index in the above-mentioned third list and the first list to determine whether the above-mentioned first target transaction has been executed.

[0166] In one possible implementation, the bitmap mark obtained or the transaction index in the obtained list indicates that the first target transaction has not been fully executed. The first device then suspends scheduling of the first transaction. For example, taking the mark obtained in the second bitmap as an example, see (b) in Figure 7 for an example. Assuming that the first transaction is transaction D in the TAQ, the first target transaction includes transaction A carrying the RO mark and transaction C carrying the SO mark. The bits corresponding to transaction A and transaction C in the second bitmap are 1, indicating that execution has not been completed. Therefore, the first device cannot schedule transaction D yet and must wait for transaction A and transaction C to complete. For another example, taking the transaction index obtained in the second list as an example, if the second list includes the indexes of some or all transactions in the first target transaction, it indicates that the first target transaction has not been fully executed and it is necessary to wait and suspend scheduling of the first transaction. In addition, the determination of whether the first target transaction has been fully executed by obtaining the mark in the third bitmap and the first bitmap, or obtaining the transaction index in the third list and the first list, will not be further described.

[0167] For example, after the first device determines to suspend scheduling of the first transaction, the first transaction becomes an uncompleted transaction carrying the third execution order flag. The transaction can be marked, for example, by setting the bit corresponding to the first transaction in the second bitmap to 1. Alternatively, the index of the first transaction can be added to the second list.

[0168] Although the first device mentioned above suspends scheduling the first transaction, it can continue to obtain the transaction (referred to as the second transaction) that is arranged behind the first transaction in the TAQ for processing. In a specific implementation, after the first device obtains the second transaction, it needs to obtain the execution sequence flag in the second transaction to determine whether the second transaction can be scheduled. The specific implementation can refer to the description of the first transaction mentioned above, which will not be repeated here. For ease of understanding, for example, still taking (b) in Figure 7 above as an example, after transaction D suspends scheduling, the first device can obtain transaction E that is arranged behind transaction D and determine whether transaction E can be scheduled. Similarly, the execution sequence flag carried by transaction E is obtained, which is shown as the NO flag in the figure. Then, it indicates that transaction E is a transaction without dependency and can be directly scheduled to the transport layer queue to wait for sending.

[0169] In another possible implementation, if the execution order flag carried by transaction E in FIG7(b) is the RO flag, then transaction E can also be directly scheduled, but transaction E needs to be marked as an uncompleted dependent transaction. For a specific implementation, please refer to the description of the case where the first execution order flag carried by the first transaction is the second execution order flag described above, and will not be repeated here.

[0170] In another possible implementation, if the execution sequence flag carried by transaction E in FIG7(b) is the SO flag, then it is necessary to determine whether transaction E can be scheduled based on the indication of the SO flag. For a specific implementation, refer to the description of the case where the first execution sequence flag carried by the first transaction is the third execution sequence flag described above, which is not repeated here.

[0171] In addition, after the first device determines to suspend scheduling of the first transaction, it can mark the first transaction as a transaction waiting to be scheduled. So that scheduling can be quickly achieved when the conditions for scheduling the first transaction are met later. Exemplarily, a bitmap (referred to as the fourth bitmap for short) can be set to mark. A transaction in the TAQ corresponds to a bit in the fourth bitmap. The value in each bit is 0 by default. When a transaction needs to be marked as a transaction waiting to be scheduled, the bit corresponding to the transaction can be set to 1. Alternatively, it can be marked in the form of a list. For example, a list (referred to as the fourth list for short) can be set, and the fourth list can be used to store the index of the transaction waiting to be scheduled. The index can be, for example, the sorting number of the transaction in the TAQ, or it can be other information that can be used to identify the transaction, and the embodiment of the present application does not limit this. When a transaction needs to be marked as a transaction waiting to be scheduled, the index of the transaction can be added to the list. It will be understood that this is only an example and does not constitute a limitation to the embodiment of the present application.

[0172] In another possible implementation, if the bitmap mark obtained above or the transaction index of the obtained list indicates that the first target transaction has been fully executed, the first device schedules the first transaction to the transport layer queue to wait for sending. For example, taking the mark in the second bitmap as an example, if the bits corresponding to the first target transaction in the second bitmap are all 0, it indicates that the first target transaction has been fully executed. Then, the first device schedules the first transaction. For another example, taking the case of obtaining the transaction index in the second list as an example. If the second list does not include the index of any transaction in the first target transaction, it indicates that the first target transaction has been fully executed and the first transaction can be scheduled. In addition, as to whether the first target transaction has been fully executed by obtaining the mark of the third bitmap and the first bitmap, or obtaining the transaction index in the third list and the first list, it will not be repeated.

[0173] In a possible implementation, the bitmap or list described above can be stored in the transaction layer queue context of the TAQ, or can be stored in a preset storage space, which is not limited in the embodiment of the present application.

[0174] Based on the above description, if the first transaction is determined to be dispatchable based on the indication of the first execution order flag, the first device may schedule the first transaction to a transport layer queue. Then, the first network interface card retrieves the first transaction from the transport layer queue, encapsulates it into a transaction message, and transmits it to the second device.

[0175] S330: The second device receives the first transaction and executes the first transaction.

[0176] In a specific implementation, the second device receives the transaction message, obtains the first transaction after parsing, and executes the first transaction accordingly.

[0177] Exemplarily, the second network card is taken as the second network card in the above-mentioned second communication device. After receiving the above-mentioned transaction message, the second network card first performs transport layer processing. For example, the message included in the transaction message is written into the corresponding memory, the receiving bitmap of the local transport layer queue is updated, and a transport layer confirmation character (ACK) is sent to the above-mentioned first network card. The transport layer ACK is used to inform the first network card that the message in the transaction message has been received. Then, after completing the execution of the above-mentioned first transaction, the second network card will start the transaction layer processing flow, for example, sending a transaction layer ACK to the first network card. This is used to notify the first network card that the first transaction has been completed. Exemplarily, the transaction layer ACK carries the identifier of the first transaction, which can be, for example, the sequence number (i.e., TAQ number) of the first transaction in the above-mentioned transaction layer queue TAQ, etc. Exemplarily, the TAQ number of the first transaction can be carried in the above-mentioned transaction message sent to the second network card.

[0178] In one possible implementation, after receiving a transaction layer ACK from the second network card, the first network card may determine, based on the transaction layer ACK, whether to trigger reprocessing of the previously suspended scheduled transaction. Alternatively, the first network card may notify the processor in the first communication device of the completion of the first transaction based on the transaction layer ACK, and the processor (via the driver) may then determine whether to trigger reprocessing of the previously suspended scheduled transaction.

[0179] For example, based on the description in step S310 above, a TAQ has a corresponding transaction layer queue context, which records the execution sequence flags of each transaction in the TAQ. In a specific implementation, the first device (i.e., the processor in the first network card or the first communication device) can obtain the identifier of the first transaction in the transaction layer ACK. Using this identifier, the first execution sequence flag of the first transaction can be obtained from the transaction layer queue context of the TAQ corresponding to the first transaction.

[0180] For example, if the first execution order flag is the first type of execution order flag or the reserved order flag, it indicates that the first transaction has no dependency relationship, and there is no need to consider whether to trigger reprocessing of the suspended scheduled transaction.

[0181] For example, if the first execution sequence flag is the second execution sequence flag or the third execution sequence flag, it indicates that the first transaction has a dependency relationship, and it is necessary to consider whether to trigger reprocessing of the suspended scheduling transaction. For example, based on the previous description, it can be seen that the suspended scheduling transactions have been marked in advance, for example, by the fourth bitmap or fourth list. Then, it can be determined based on the fourth bitmap or fourth list whether there is a suspended scheduling transaction.

[0182] If it is determined that there is no suspended transaction, then the first device continues to schedule the transaction in the TAQ. If it is determined that there is a suspended transaction, it is further determined whether the suspended transaction can be rescheduled. For ease of understanding, the second bitmap is used as an example.

[0183] The second bitmap marks the incomplete status of transactions carrying the above-mentioned preset flags (such as the second execution sequence flag RO and the third execution sequence flag SO). The above-mentioned first device knows that the first transaction has been completed based on the above-mentioned received transaction layer ACK, then the mark of the first transaction not being completed in the second bitmap can be eliminated. For example, the bit corresponding to the first transaction is changed from 1 to 0. Then, in the second bitmap, find out whether all transactions that are arranged before the suspended transaction and carry the above-mentioned preset flags have been completed. That is, determine whether the bits corresponding to the transactions that are arranged before the suspended transaction and carry the above-mentioned preset flags in the second bitmap are all 0. If so, the suspended transaction can be rescheduled. If not, the suspended transaction cannot be rescheduled. For example, you can wait for the trigger judgment of the next transaction layer ACK. For ease of understanding, for example, please refer to Figure 9 for example.

[0184] In Figure 9, assume that transaction A in the TAQ is the first transaction described above. Furthermore, assume that the first device in the TAQ receives a transaction layer ACK for transaction A when it has already scheduled transaction E, thereby notifying the first device of the completion of transaction A. Since transaction A has completed, the bit corresponding to transaction A in the second bitmap is set to 0. Since transaction A had not completed before transaction E was scheduled, the bits corresponding to transactions C and D in the second bitmap are set to 1, indicating that transactions C and D are incomplete and carry the aforementioned preset flag. Furthermore, the bits corresponding to transactions C and D in the fourth bitmap are set to 1, indicating that transactions C and D are suspended. After receiving the transaction layer ACK for transaction A, the first device determines that transaction A has completed and identifies transactions C and D as suspended in the fourth bitmap. First, it determines whether transaction C can be scheduled. In the second bitmap, it finds that all bits preceding transaction C are 0, indicating that all transactions preceding transaction C and carrying the aforementioned preset flag have completed. Therefore, transaction C can be scheduled. Then, the bit corresponding to transaction C in the fourth bitmap is set to 0, indicating that it has been scheduled.

[0185] In one possible implementation, after transaction C is scheduled, the process can continue to wait for the next transaction layer ACK to trigger a determination of whether transaction D can be scheduled. Alternatively, after scheduling transaction C, the process can continue to determine whether transaction D can be scheduled. Obviously, since transaction C has not yet completed, transaction D cannot be scheduled. Therefore, the process can continue to wait for the next transaction layer ACK to trigger a determination of whether transaction D can be scheduled. It should be understood that this is merely an example and does not constitute a limitation of the embodiments of the present application.

[0186] In addition, the above description of determining whether a suspended transaction can be rescheduled is mainly based on the second bitmap. In another possible implementation, the determination can also be based on the second list, or based on the information in the third list and the first list, which will not be repeated here.

[0187] In one possible implementation, after the first network card receives the transaction layer ACK of the first transaction, it can update the source completion bitmap corresponding to the TAQ where the first transaction is located. The source completion bitmap is used to mark the completion status of the transaction in the TAQ, so as to generate a CQE to notify the upper-layer application. For example, a transaction in the TAQ corresponds to a bit of the source completion bitmap. The value in each bit is 0 by default. After receiving the transaction layer ACK of a transaction, the bit corresponding to the transaction can be set to 1 to indicate that the transaction has been executed. Then, after receiving the transaction layer ACK of the first transaction, the bit corresponding to the first transaction can be set to 1. It can be understood that this is only an example and does not constitute a limitation to the embodiments of the present application.

[0188] Exemplarily, after the bit corresponding to the first transaction in the completion bitmap on the source side is set to 1, it can be determined whether all transactions preceding the first transaction in the TAQ have been completed. For example, if the bits corresponding to the transactions preceding the first transaction in the completion bitmap on the source side are all set to 1, it indicates that all these transactions have been completed. Then, when determining whether all transactions preceding the first transaction in the TAQ have been completed, the CQEs corresponding to the transactions are generated in sequence according to the order in which these completed transactions are arranged in the TAQ. For example, see Figure 4 or Figure 6. After the first network card generates the CQE, the CQE is sent to the upper-level driver in the order in which it is generated. The driver generates a corresponding completion event to notify the upper-level application. In this embodiment, the source side generates the completion information of the transaction in an order-preserving manner, which can be compatible with the existing semantics without modifying the application program, thereby improving the applicability of this solution.

[0189] For example, after the first network card generates CQEs in sequence, they are first stored in the completion queue in the order of generation. Then, CQEs are obtained from the completion queue in a "first-in, first-out" order and sent to the upper-layer driver. In the UB transport layer and transaction layer specifications, the completion queue can also be called a completion container (JFC). It is understandable that the completion queue can also be called by other names. As long as it has the functions or characteristics that can be achieved by the completion queue described in the embodiments of the present application, it belongs to the completion queue described in the embodiments of the present application.

[0190] In one possible implementation, in step S330, the transaction message received by the second network interface card may include, in addition to the first transaction, a completion sequence flag for the first transaction. This completion sequence flag is used to control the order in which the second network interface card generates completion information for the first transaction after the first transaction completes. Exemplarily, this completion information may be a CQE. An exemplary description is provided below.

[0191] In a specific implementation, the application request sent by the application to the driver to initiate the first transaction includes, in addition to the first execution sequence flag, a completion sequence flag of the first transaction (referred to as the first completion sequence flag). Then, when the driver constructs the first transaction based on the application request, it adds the first completion sequence flag to the constructed first transaction. That is, the first transaction carries the first completion sequence flag.

[0192] In a specific implementation, the completion sequence flag of the first transaction may include two types, which are introduced below respectively.

[0193] The first completion order flag indicates that the order in which the completion information for the first transaction is generated by the second NIC is unconstrained, or in other words, there is no ordering requirement. After the second NIC completes the first transaction, it can generate a CQE for the first transaction without waiting. For example, in the UB transport layer and transaction layer specifications, this first completion order flag can also be represented by "NO," known as the out-of-order completion flag.

[0194] The second completion sequence flag indicates that the completion information of the first transaction is generated after the completion information of the second target transaction is generated. That is, the completion sequence of the first transaction has an order-preserving requirement. The second target transaction includes the transaction that precedes the first transaction in the transport layer queue to which the first transaction is scheduled (or the transaction whose TP message sequence number (TPMSN) is less than the TPMSN of the first transaction). For example, in the UB transport layer and transaction layer specifications, the second completion sequence flag can be represented by CO. CO is the abbreviation of completion order, which can also be called the order-preserving completion flag.

[0195] For example, based on the previous description, transactions in the transaction layer queue are scheduled to the transport layer queue for transmission. Transactions in the same transport layer queue are sent to the same destination. Transactions scheduled to the transport layer queue are reassigned a sequence number, which is used to identify the order of transactions in the transport layer queue. For example, this sequence number is the aforementioned TPMSN. That is, after being scheduled to the transport layer queue, transactions are arranged in ascending order of TPMSN. The TPMSN of transactions that enter the transport layer queue first is smaller than the TPMSN of transactions that enter later.

[0196] For ease of understanding, please refer to Figure 10A for example. Assume that the transport layer queue includes transactions A, B, C, D, and E, and the destination of these transactions is the second network interface card (NIC). The TPMSNs of transactions A, B, C, D, and E are 1, 2, 3, 4, and 5, respectively. If transaction D in the transport layer queue is the first transaction mentioned above, and the first transaction carries the second completion sequence flag, then the second network interface card is instructed to generate completion information for transaction D after generating completion information for transactions A, B, and C.

[0197] In one possible implementation, transactions scheduled to the same transport layer queue may be from one or more transaction layer queues. Taking multiple transaction layer queues as an example, for example, multiple transaction layer queues are generated in the above-mentioned first communication device. The transactions in the multiple transaction layer queues may come from the same application or from different applications, and the embodiment of the present application does not limit this. And there are transactions with the same destination in the multiple transaction layer queues, for example, there are transactions that need to be sent to the above-mentioned second network card. Then, the above-mentioned first device can schedule the transactions in the multiple transaction layer queues whose destination is the second network card to the same transport layer queue.

[0198] The above exemplary descriptions of the completion sequence flag are provided. The following describes the implementation process of the second network card generating the completion information of the transaction based on the indication of the completion sequence flag.

[0199] After the above-mentioned driver structure completes the first transaction, it sends the first transaction to the transaction layer queue. Then, after scheduling the first transaction to the transport layer queue, the above-mentioned first network card obtains the first transaction from the transport layer queue. The first transaction is encapsulated into the above-mentioned transaction message. And during the encapsulation process, the first completion sequence flag is added to the transaction layer header (TAH) of the message included in the transaction message. After the encapsulation is completed, the transaction message is sent to the above-mentioned second network card. For example, if the transaction message includes multiple messages, the first completion sequence flag can be added to the transaction layer headers of the multiple messages. Alternatively, the first completion sequence flag can be added to the transaction layer headers of some messages in the multiple messages. The specific transaction layer headers of which messages the first completion sequence flag is added can be determined according to actual needs, and the embodiments of the present application do not impose any restrictions on this.

[0200] After receiving the transaction message, the second network interface card parses the transaction message to obtain the first transaction and the first completion sequence flag in the transaction layer header. In addition to the operations performed by the second network interface card as described above, the second network interface card also determines how to generate a CQE for the first transaction based on the indication of the first completion sequence flag in the transaction layer header of the transaction message.

[0201] In a specific implementation, if the second network card does not consume the receive work queue element (Receive WQE) in the local transaction layer queue (referred to as the receiving end transaction layer queue) during the process of receiving the transaction message, then after the execution of the first transaction is completed, there is no need to generate the CQE of the transaction, and a transaction layer ACK can be generated and sent to the first network card. For example, in the UB transport layer and transaction layer specifications, the receiving end transaction layer queue can also be referred to as JFR. JFR is the abbreviation of jetty forreceive. It can be understood that the receiving end transaction layer queue can also be other names, as long as it has the functions or characteristics that can be achieved by the receiving end transaction layer queue described in the embodiment of the present application, it belongs to the receiving end transaction layer queue described in the embodiment of the present application.

[0202] If the second NIC consumes the Receive WQE in the receiving-end transaction layer queue while receiving the transaction message, then after the first transaction is completed, the second NIC needs to generate a CQE to notify its upper-layer application. For example, if the transaction message is generated based on a user-initiated SEND operation or WRITE_WITH_IMM operation, then upon receiving it, the second NIC will consume the Receive WQE in its local transaction layer queue. Consuming the Receive WQE means writing the payload of the message included in the transaction message to the address pointed to by the Receive WQE. Therefore, a Receive WQE is not fully consumed until the payloads of all messages included in the transaction message are written to the address pointed to by the Receive WQE. The Receive WQEs in the receiving-end transaction layer queue are also arranged in order, but there is no correspondence between Receive WQEs and received transactions. Regardless of which transaction requires Receive WQE consumption, the first Receive WQE in the receiving-end transaction layer queue can be consumed. After the Receive WQE is consumed, it will be removed from the receiving end transaction layer queue.

[0203] In a possible implementation, if the first completion sequence flag is the first type of completion sequence flag, the second network card can generate a CQE for the first transaction after completing the first transaction without waiting.

[0204] In one possible implementation, if the first completion sequence flag is the second completion sequence flag, the second network card determines the timing of generating a CQE based on the indication of the first completion sequence flag after completing the first transaction.

[0205] In one possible implementation, the second network card sets a destination completion bitmap to mark the completion of transactions from the first network card. Regardless of whether the received transaction consumes the Receive WQE in the receiving end transaction layer queue, it will be marked in the destination completion bitmap.

[0206] For example, using the first transaction as an example, the transaction message carrying the first transaction sent by the first network interface card to the second network interface card carries the TP message sequence number of the first transaction. Specifically, the message included in the transaction message may carry the TP message sequence number of the first transaction. The same applies to other transactions and is not further described.

[0207] After the second network card receives the transaction message sent by the first network card, it can obtain the TP message sequence number in the transaction message. Then, the TP message sequence number is associated with a bit in the destination completion bitmap. For example, a mapping relationship list of TP message sequence numbers and bits can be established to achieve association, etc. The embodiment of the present application does not limit the specific implementation method of the association. After the transaction obtained from the transaction message is completed, the transaction corresponding to the TP message sequence number is marked in the associated bit as having been completed. For example, the second network card can pre-create the destination completion bitmap, and the length of the destination completion bitmap can be set according to a default value or according to the instruction of the first network card, etc. The embodiment of the present application does not limit this. The destination completion bitmap is used to mark the completion status of the corresponding transaction in ascending order of the TP message sequence numbers. For ease of understanding, please refer to Figure 10B for example.

[0208] In Figure 10B (a), assume that the transport layer queue includes transactions A, B, and C, and the destination of these transactions is the second network interface card. The TP message sequence numbers for transactions A, B, and C are 1, 2, and 3, respectively. Assume that the default value of the bits in the destination completion bitmap pre-created by the second network interface card is 0. The length of the destination completion bitmap in Figure 10B (a) is only an example. In a specific implementation, the length of the destination completion bitmap can be greater than or equal to the number of transactions in the transport layer queue. Following the "first in, first out" principle, the first network interface card first retrieves transaction A from the transport layer queue, encapsulates it into transaction message A, and sends it to the second network interface card. Transaction message A carries transaction A's TP message sequence number "1." After receiving transaction message A, the second network interface card retrieves transaction A's TP message sequence number "1" and finds that it is the first transaction from the first network interface card. It then associates this TP message sequence number "1" with the first bit in the destination completion bitmap. After completing transaction A, it sets this first bit to 1. The first network card then sequentially retrieves transactions B and C from the transport layer queue, encapsulates them into transaction messages B and C, respectively, and sends them to the second network card. Due to multipath transmission, transaction message C may be transmitted to the second network card before transaction message B. In this case, the second network card first obtains the TP message sequence number "3" in transaction message C. It detects that this is the third transaction from the first network card. It then associates the TP message sequence number "3" with the third bit of the destination completion bitmap, and then sets the third bit to 1 after executing and completing transaction C. At this point, since transaction message B has not yet been received, the second bit in the destination completion bitmap is still 0. It is not until the second network card receives transaction message B and executes and completes transaction B that the second bit in the destination completion bitmap is set to 1.

[0209] Based on the above description, after receiving the transaction request message including the first transaction, the second network interface card may mark the corresponding bit in the destination completion bitmap based on the TP message sequence number of the first transaction in the transaction request message. Furthermore, because the first completion sequence flag is the second type of completion sequence flag, the second network interface card obtains the relevant flag in the destination completion bitmap based on the second type of completion sequence flag to determine whether a CQE for the first transaction can be generated.

[0210] If the mark in the destination completion bitmap indicates that all transactions preceding the first transaction (transactions with TP message sequence numbers less than the TP message sequence number of the first transaction) have not been completed, the second network interface card does not generate a CQE for the completion of the first transaction. If the mark in the destination completion bitmap indicates that all transactions preceding the first transaction have been completed, then corresponding CQEs may be generated sequentially based on the TP message sequence numbers of these completed transactions, in ascending order.

[0211] For ease of understanding, let's take Figure 10B as an example. In (b) of Figure 10B, it is assumed that transaction C is the first transaction mentioned above. After transaction C is executed by the second network card and marked in the destination completion bitmap, if the destination completion bitmap is as shown in the figure, the bits corresponding to the TP message sequence number that is less than the TP message sequence number of transaction C are all set to 1. This indicates that the transactions (transaction A and transaction B) whose TP message sequence number is less than the TP message sequence number of transaction C have all been executed. Thus, CQEs can be generated in order from small to large according to the TP message sequence numbers of transaction A, transaction B, and transaction C. That is, the CQE of transaction A is generated first, then the CQE of transaction B is generated, and then the CQE of transaction C is generated. It will be understood that the description here is only an example and does not constitute a limitation to the embodiments of the present application.

[0212] In one possible implementation, if a CQE has already been generated before executing the first transaction, it is not generated again. For example, if the second network card receives a transaction (referred to as the third transaction) with a completion sequence flag set to the first type of completion sequence flag before receiving the first transaction, the third transaction is also encapsulated into a transaction message and sent to the second network card after the first type of completion sequence flag is added to the transaction layer header of the transaction message. For details, please refer to the aforementioned description of sending the first transaction and will not be repeated here. After the second network card completes the third transaction, it can generate a CQE for the third transaction without waiting. Then, if the first network card completes the first transaction and the destination completion bitmap indicates that CQEs can be generated for the first transaction and transactions that have already been executed and completed before the first transaction, the CQE for the third transaction will not be generated again. In addition, for example, if the transaction received by the second network card is the transaction corresponding to the first position in the destination completion bitmap, regardless of the completion sequence flag of the transaction, the corresponding CQE can be generated immediately after execution is completed, without waiting. For these already generated CQEs, they will not be generated again in the subsequent process of generating CQEs according to the TP message sequence numbers of the completed transactions in ascending order. For example, the second network card can set a destination CQE generation bitmap to mark the CQE generation status of the transaction after the transaction is completed.

[0213] In one possible implementation, the length of the destination CQE generation bitmap can be the same as the length of the above-mentioned destination completion bitmap. The bits in the destination CQE generation bitmap correspond to the bits in the destination completion bitmap in sequence. Assume that the default value of the bit in the destination CQE generation bitmap is 0. Then, if the transaction corresponding to a certain bit is completed and a CQE is generated, the value of the bit can be set to 1. In addition, based on the previous description, if the second network card receives a transaction that consumes the Receive WQE in the above-mentioned receiving end transaction layer queue, the second network card will generate the corresponding CQE only after the transaction is completed. If a transaction is received without consuming the Receive WQE, then the second network card will not generate a CQE after the transaction is completed. Instead, it generates a transaction layer ACK and sends it to the above-mentioned first network card (it can be understood that after the aforementioned transaction that needs to generate a CQE is completed, the second network card will also generate a corresponding transaction layer ACK and send it to the first network card to notify the completion of the transaction execution). In this case, after the transaction that does not consume the Receive WQE is completed, the corresponding bit in the destination CQE generation bitmap can be set to 1.

[0214] In another possible implementation, the length of the destination CQE generation bitmap is not necessarily the same as the length of the above-mentioned destination completion bitmap. Since receiving a transaction consumes Receive WQE, the second network card will generate CQE only after the transaction is completed. The destination CQE generation bitmap can be set to only mark the CQE generation status of transactions that consume Receive WQE, and can be ignored for transactions that do not consume Receive WQE. Exemplarily, in a specific implementation, the bits in the destination CQE generation bitmap can be associated with the TP message sequence number of the transaction that consumes Receive WQE. The specific implementation of the association refers to the relevant description of the destination completion bitmap above, which will not be repeated here. Then, if the second network card completes a transaction that consumes Receive WQE, it can mark the corresponding bit according to the TP message sequence number of the transaction (for example, change the default value of the bit from 0 to 1, etc.).

[0215] For ease of understanding, the following description takes the case where the length of the destination CQE generation bitmap is the same as the length of the destination completion bitmap as shown in FIG11 .

[0216] In (a) of Figure 11, the transport layer queue includes four transactions A, B, C and D, and the corresponding TP message sequence numbers are 1, 2, 3 and 4 respectively. The four TP message sequence numbers are respectively associated with the four bits of the destination completion bitmap, and similarly, they are respectively associated with the four bits of the destination CQE generation bitmap, as shown in (a) of Figure 11. Assume that the second network card receives the four transactions in the order of transaction B, transaction D, transaction C and transaction A (it is assumed here that due to multi-path transmission, the transactions are transmitted to the second network card out of order). And the reception of transaction D, transaction C and transaction A corresponds to the consumption of the Receive WQE in the receiving end transaction layer queue, as shown in (a) of Figure 11. The second network card does not consume the Receive WQE when receiving transaction B.

[0217] Assume that the completion sequence flag for transaction B in Figure 11(a) is the first type of completion sequence flag. After receiving and executing transaction B, the second network interface card can set the second bit in the destination completion bitmap to 1. Since receiving transaction B does not consume a Receive WQE and does not generate a CQE, the second bit in the destination CQE generation bitmap is still set to 1.

[0218] Then, the second network card sequentially receives and executes transaction D in (a) of Figure 11 above. The completion sequence flag of transaction D is the second completion sequence flag mentioned above. In order to facilitate understanding in association with the content introduced above, it can be assumed that transaction D is the first transaction mentioned above. After transaction D is executed, the fourth bit in the destination completion bitmap can be set to 1. Then, the mark in the destination completion bitmap is obtained to determine whether a CQE for transaction D can be generated. As shown in (a) of Figure 11, since transaction A and transaction C have not been received or have been received but not completed, the first bit and the third bit corresponding to the TP message sequence number of transaction A and transaction C in the destination completion bitmap are still 0. Therefore, the CQE for transaction D cannot be generated yet.

[0219] Then, the second network card receives and executes transaction C. The completion sequence flag of transaction C is the first completion sequence flag described above. To facilitate understanding in conjunction with the content described above, it can be assumed that transaction C is the third transaction described above. After transaction C is executed, the third bit in the destination completion bitmap is set to 1, as shown in Figure 11 (b). It is also determined whether a CQE for transaction C can be generated. Since the completion sequence flag of transaction C is the first completion sequence flag described above, the CQE for transaction C can be generated without waiting. The third bit in the destination CQE generation bitmap is set to 1, as shown in Figure 11 (b).

[0220] Then, after the second network card receives and executes transaction A in (a) of FIG11 , it can set the first bit in the destination completion bitmap to 1. Since transaction A corresponds to the first position in the destination completion bitmap, there are no other transactions preceding it. Therefore, after executing transaction A, the second network card can generate a CQE for transaction A and set the first bit in the destination CQE generation bitmap to 1. See FIG11 (c). Then, based on the mark in the destination completion bitmap, the second network card determines that all transactions before transaction D have completed execution, and only then triggers the CQE generation process for transaction D. Specifically, the mark of the destination CQE generation bitmap can be obtained (as shown in (c) of FIG11 ). The mark in the destination CQE generation bitmap indicates that CQEs have already been generated for the transactions before transaction D (transaction A, transaction B, and transaction C). Therefore, CQE generation for the transaction is no longer repeated. A CQE for transaction D is then generated accordingly, and the fourth bit in the destination CQE generation bitmap is set to 1.

[0221] It will be understood that the above description of FIG11 is merely an example and does not constitute a limitation to the embodiments of the present application.

[0222] In another possible implementation, after the second network card completes the first transaction, determining the timing of generating the CQE based on the first completion sequence flag of the first transaction can also be implemented in the following manner, which is exemplified below.

[0223] Exemplarily, based on the above description, it can be seen that the transaction scheduled to the transport layer queue will be encapsulated into one or more messages and sent. The message is also assigned a number for identifying the message. The numbers of the messages corresponding to multiple transactions in the transport layer queue are continuous. This number can be called the TP packet sequence number (TP packet sequence number, TPPSN). Multiple messages corresponding to the same transaction carry their own TP message sequence numbers. In addition, these messages also carry information indicating whether to generate CQE, for example, see Figure 13, carried in the transaction control field of the message header. Exemplarily, the information indicating whether to generate CQE may be carried in one or more of these multiple messages. Alternatively, the information indicating whether to generate CQE may be carried in the last message (the message with the largest TP message sequence number) among these multiple messages (the following description takes this as an example). It will be understood that this is only an example and does not constitute a limitation to the embodiments of the present application.

[0224] After receiving the message corresponding to the first transaction, the second network interface card can parse the message to obtain the TP message sequence number and information indicating whether to generate a CQE. Based on this information, the second network interface card can mark the relevant information in a preset bitmap (referred to as the receiving end marking bitmap). The receiving end marking bitmap is first described below.

[0225] Exemplarily, the receiving end mark bitmap corresponds to a received message at a granularity of 4 bits. That is, in the bitmap, the information of a received message is marked by 4 bits. In a specific implementation, the association between the TP message sequence number of the message and the TP message sequence number carried by the message can be recorded. In addition, the TP message sequence number of the received message can be associated with the 4 bits. For details, please refer to the aforementioned description of associating the TP message sequence number with a bit in the destination end completion bitmap and the exemplary introduction of Figure 10B, which will not be repeated here. The meaning of the 4 bits is shown in Table 1 below.

[0226] Table 1

[0227] As shown in Table 1, among the four bits corresponding to a message, one bit (referred to as bit 1 for short) is used to mark whether the message has arrived (for example, in the above-mentioned UB transport layer and transaction layer specifications, the name of this bit can be abbreviated as Pkt_vld_bm). For example, if the value of bit 1 is 0, it indicates that the message has not arrived; if the value of this bit is 1, it indicates that the message has arrived. One bit of the four bits (referred to as bit 2 for short) is used to mark whether the message is the last message of the transaction message (in the above-mentioned UB transport layer and transaction layer specifications, the name of this bit can be abbreviated as Msg_flg_bm). For example, if the value of bit 2 is 0, it indicates that the message is the first or middle message of the transaction message; if the value of this bit is 1, it indicates that the message is the last or only message of the transaction message. One of the four bits (referred to as bit 3 for short) is used to mark whether the transaction corresponding to the message needs to generate CQE (exemplarily, in the above-mentioned UB transport layer and transaction layer specifications, the name of this bit can be abbreviated as Cqe_flg_bm). Exemplarily, if the value of bit 3 is 0, it means that CQE is not generated, and if the value of this bit is 1, it means that CQE is generated. One of the four bits (referred to as bit 4 for short) is used to mark whether an error occurs during the process of receiving the message (exemplarily, in the above-mentioned UB transport layer and transaction layer specifications, the name of this bit can be abbreviated as Err_flg_bm). Exemplarily, if the value of bit 4 is 0, it means no error, and if the value of this bit is 1, it means an error.

[0228] Based on the above description, after receiving the message corresponding to the first transaction, the second network card parses the message to obtain the TP message sequence number and the indication information of whether to generate a CQE. Then, the four bits corresponding to the TP message sequence number in the receiving end mark bitmap are marked accordingly. For example, the Pkt_vld_bm bit is marked as 1. If the received message is the last message, the Msg_flg_bm bit is marked as 1. If the last message indicates the generation of a CQE, the Cqe_flg_bm bit is marked as 1. If there are no errors during the reception of the message, the Err_flg_bm bit is marked as 0, and so on.

[0229] Then, after the execution of the above-mentioned first transaction is completed, if the bit corresponding to the TP message sequence number of the message corresponding to the first transaction in the receiving end mark bitmap indicates the generation of CQE, it is necessary to further determine whether the CQE can be generated immediately based on the indication of the first completion sequence flag of the first transaction. If the first completion sequence flag is the first completion sequence flag described above, the second network card can generate the CQE of the first transaction after completing the first transaction without waiting. After the CQE of the first transaction is generated, the Cqe_flg_bm bit of the last message corresponding to the first transaction in the receiving end mark bitmap can be set to 0, indicating that it has generated a CQE.

[0230] If the first completion sequence flag is the second completion sequence flag, then after the second network card completes the first transaction, it is also necessary to determine whether all transactions before the first transaction (transactions whose TP message sequence number is less than the TP message sequence number of the first transaction) have been completed. For example, at the receiving end, the transaction that arrives first is executed first, and the execution speed is very fast. Therefore, if the last message of a transaction has arrived, and all messages with TP message sequence numbers less than the last message have arrived (i.e., the messages are in sequence), it can be determined that the transaction and the transactions before the transaction have been completed. Whether the message is in sequence can be determined by the Pkt_vld_bm bit in the receiving end mark bitmap.

[0231] Based on the above description, if it is determined that all transactions before the first transaction have been completed, then the corresponding CQEs can be generated sequentially according to the TP message sequence numbers of these completed transactions in ascending order. In addition, if the CQEs generated before the execution of the first transaction are not generated repeatedly, illustratively, after determining that all transactions before the first transaction have been completed, the receiving end flag bitmap can be traversed sequentially according to the TP message sequence numbers in ascending order and the previously recorded association between the TP message sequence numbers and the TP message sequence numbers. If the Cqe_flg_bm bit corresponding to the TP message sequence number is 1, a CQE for the transaction corresponding to the TP message sequence number is generated. If the Cqe_flg_bm bit corresponding to the TP message sequence number is 0, the CQE is skipped and the traversal continues to the value of the Cqe_flg_bm bit corresponding to the next TP message sequence number.

[0232] Here, the Cqe_flg_bm bit corresponding to the TP message sequence number is 0. One possibility is that the second network card does not need to consume the Receive WQE when receiving the transaction message, so the transaction message message indicates that no CQE needs to be generated. The Cqe_flg_bm bit corresponding to this transaction is set to 0 on the receiving end. Another possibility is that the second network card consumed the Receive WQE when receiving the transaction message, and the transaction message message also indicates that a CQE needs to be generated. However, the CQE for this transaction has already been generated. Therefore, after generating the CQE for this transaction, the second network card sets the Cqe_flg_bm bit corresponding to this transaction in the receiving end mark bitmap to 0. This avoids repeated generation of CQE.

[0233] It is understandable that the above description mainly uses the marking by bitmap as an example. In the specific implementation, it is not limited to marking by bitmap, for example, it can also be marked by lists, arrays or linked lists, etc., which are not described in detail in the embodiments of the present application.

[0234] In one possible implementation, the transaction constructed by the driver can be a structure, that is, a structure that describes the transaction. During the construction of the structure, a pre-set bit in the structure can indicate the execution sequence of the transaction. In another possible implementation, another pre-set bit in the structure can indicate the completion sequence of the transaction.

[0235] For example, in the above UB transport layer and transaction layer specifications, the execution order flag of a transaction may be indicated by two bits.

[0236] For example, based on the previous description, the execution sequence flag may include the first execution sequence flag, the second execution sequence flag, and the third execution sequence flag. Optionally, a reserved sequence flag may also be included. The corresponding relationship between the different values ​​of the two bits and the execution sequence flag can be seen in Table 2.

[0237] Table 2

[0238] As can be seen in Table 2, if the value is 00, it indicates the first execution sequence flag. If the value is 01, it indicates the second execution sequence flag. If the value is 10, it indicates the third execution sequence flag. If the value is 11, it indicates the reserved order flag. It can be understood that the correspondence between the two different bit values ​​and the execution sequence flag is only an example. In a specific implementation, the correspondence can be adjusted, and the embodiments of the present application do not limit the specific correspondence.

[0239] For example, in the above UB transport layer and transaction layer specifications, a completion sequence flag of a transaction may be indicated by one bit.

[0240] For example, based on the above description, the completion sequence flag may include the first completion sequence flag and the second completion sequence flag. The corresponding relationship between the different values ​​of the one bit and the completion sequence flag can be seen in Table 3.

[0241] Table 3

[0242] As can be seen in Table 3, if the value is 0, it indicates the first completion sequence flag. If the value is 1, it indicates the second completion sequence flag. It can be understood that the correspondence between the two different bit values ​​and the completion sequence flag is only an example. In a specific implementation, the correspondence can be adjusted. For example, if the value is 0, it indicates the second completion sequence flag. If the value is 1, it indicates the first completion sequence flag. The embodiments of the present application do not limit the specific correspondence.

[0243] In a possible implementation, in the above-mentioned UB transport layer and transaction layer specifications, the transaction execution sequence flag and the transaction completion sequence flag can be collectively referred to as the order (ODR) flag. The ODR flag is indicated by three bits consisting of the above-mentioned two bits for indicating the transaction execution sequence flag and the above-mentioned one bit for indicating the transaction completion sequence flag. Exemplarily, the above-mentioned structure for describing the transaction may include a control field segment, and one or more scatter / gather element (SGE) field segments, each SGE field segment is a data segment (Data Segment). Please refer to Figure 12 for an example. The control field segment is used to describe the command type, enable configuration, describe the ODR flag, etc. Please refer to Figure 13, which exemplifies a partial structural diagram of the control field segment.

[0244] As shown in Figure 13, the control field segment includes a command type (opcode) field, an inline field, a fence field, an ODR field, a CQE field, an owner flag field, a solicited event (SE) field, an rsge_num field, an sge_num field, and the like.

[0245] The opcode field is used to indicate the command type supported by the transaction, including, for example, send, send with immediate, send with invalidate, write, write with immediate, read, atomic CAS, atomic fetch and add (FAA), masked atomic CAS, or masked atomic FAA.

[0246] The inline field is used to describe the inline data carried in the transaction. The fence field is used to configure the fence type order preservation, which is enabled when configured to 1. The CQE field is used to indicate whether to generate a CQE, which is generated when configured to 1. The owner flag field is used to identify the owner. The SE field is used to configure the request event enable, which is enabled when configured to 1. The rsge_num field is used to indicate the number of SGEs for remote data in RDMA operations. The sge_num field is used to indicate the number of SGEs for local data.

[0247] The ODR field occupies three bits, as shown in Figure 13. These three bits are bits 3, 4, and 5 in Byte 2. Bits 3 and 4 are used to indicate the execution sequence of the transaction. Bit 5 is used to indicate the completion sequence of the transaction. The specific values ​​of these three bits and the relationship between the corresponding sequence flags can be found in Tables 2 and 3 above and will not be repeated here.

[0248] It is understandable that this is only an example. In a specific implementation, the execution sequence flag and completion sequence flag of the transaction can be indicated by the bits of other bytes in the transaction structure, and the embodiments of the present application do not limit this.

[0249] In one possible implementation, in the UB transport layer and transaction layer specifications, the structure of the transaction layer header of the message included in the transaction message can be exemplified in Figure 14. As can be seen, the transaction layer header includes a TA opcode field, a user-defined function (UDF) field, a transaction layer protocol version (TAVER) field, a source TA segment sequence number (SRC_TASSN) field, an ODR field, and the like. Other fields not shown are not described here; please refer to the UB transport layer and transaction layer specifications for details.

[0250] The TA opcode field indicates the command types supported by the message. For more information about command types, refer to the description of the opcode field in Figure 13 and are not detailed here. The UDF field allows the data sender to specify the function to be calculated for this message. This can be customized by the user and is not restricted by the protocol. The TAVER field indicates the protocol version number. The SRC_TASSN field indicates the transaction sequence number in the transaction layer.

[0251] The above-mentioned ODR field occupies three bits, as shown in Figure 14. The three bits are the 5th, 6th and 7th bits in Byte4 in the transaction layer header. The 5th and 6th bits are used to indicate the execution sequence flag of the transaction. The 7th bit is used to indicate the completion sequence flag of the transaction. The specific values ​​of the three bits and the relationship between the corresponding sequence flags can be referred to the introduction of Table 2 and Table 3 above, and will not be repeated here. It can be understood that this is only an example. In a specific implementation, the completion sequence flag of the transaction can be indicated by the bits of other bytes in the transaction layer header, and the embodiments of the present application are not limited thereto.

[0252] The transaction layer header of the message carries the transaction's execution sequence flag. This maintains scalability while also maintaining consistency with the execution sequence flag and completion sequence flag carried in the transaction. To reduce data transmission resource overhead, another possible implementation might include only the transaction completion sequence flag in the message's transaction layer header, without carrying the transaction's execution sequence flag. The specific implementation depends on the actual application requirements and is not limited in this embodiment of the present application.

[0253] In one possible implementation, the embodiment described above can also be implemented in conjunction with a fence flag. The fence flag is also an execution order flag. A transaction carrying the fence flag must wait until all transactions with a TAQ number smaller than the transaction in the same transaction flow (e.g., the same transaction layer queue) are completed and receive a transaction layer ACK from the destination before it can be sent out. Otherwise, the transaction carrying the fence flag will continue to wait in the transaction layer queue and block subsequent transactions from being sent, resulting in head-of-line blocking.

[0254] The following is an example in which the second execution sequence flag is represented by RO and the third execution sequence flag is represented by SO. In the above embodiment, the SO flag does not block the scheduling and sending of subsequent transactions. If it is implemented in combination with the FENCE flag, then the transaction carrying the FENCE flag must be sent after all transactions with smaller TAQ numbers are executed, and it is impossible to send a transaction with a larger TAQ number first by skipping the transaction carrying the FENCE flag. For example, the same transaction can carry the SO flag alone, or can carry the FENCE flag alone, or can carry both the SO flag and the FENCE flag at the same time.

[0255] As an example, the following describes, in conjunction with FIG15 , a scheme for implementing the above-mentioned embodiment in conjunction with the FENCE flag. FIG15 first defines two conditions. Condition ① is that within the same transaction layer queue (or transaction flow), there exists an uncompleted transaction with a smaller TAQ number. Condition ② is that within the same transaction layer queue, there exists an uncompleted transaction with a smaller TAQ number and carrying an SO or RO. In a specific implementation, it is assumed that the transaction layer queue of the first device is in a normal state, that is, in a normal scheduling state, with no blocked or skipped transactions. During the normal scheduling of the transaction layer queue, the first device obtains a transaction (referred to as the fifth transaction) from the transaction layer queue. If the fifth transaction carries the FENCE flag, the first device first determines whether there are any uncompleted transactions in the transaction layer queue with a TAQ number smaller than the fifth transaction, that is, whether condition ① is satisfied. If condition ① is satisfied, scheduling of the fifth transaction is suspended, and the transaction layer queue changes from a normal state to a blocked state. In this blocking state, transactions with TAQ numbers greater than the fifth transaction are no longer scheduled, and the process waits for transactions with TAQ numbers less than the fifth transaction to be completed.

[0256] During this waiting process, if the first device receives a transaction layer ACK, indicating that a transaction has been completed, the first device determines the completed transaction based on the transaction identifier in the transaction layer ACK. It then re-determines whether the fifth transaction meets condition ①. If it still meets condition ①, it continues waiting. If the fifth transaction no longer meets condition ①, it can be unblocked and scheduled and sent normally.

[0257] Furthermore, in another possible implementation, as shown in FIG. 15 , during normal scheduling of the transaction layer queue, the first device retrieves a transaction (e.g., the first transaction described above) from the transaction layer queue. If the first transaction carries only the SO flag and satisfies condition ②, scheduling of the first transaction is suspended. However, the first transaction can be skipped and subsequent transactions carrying the NO or RO flags can continue to be scheduled. The transaction layer queue then transitions from a normal state to a skipped state. In this skipped state, the scheduling and sending of subsequent transactions are not blocked. For a detailed implementation, please refer to the aforementioned description of the third execution order flag and will not be elaborated upon here. In this skipped state, if the first device receives a transaction layer ACK, indicating that a transaction has completed execution, the first device identifies the completed transaction based on the transaction identifier in the transaction layer ACK. The first device then re-determines whether the first transaction satisfies condition ②. If it still does, the first transaction remains in the skipped state. If the first transaction no longer satisfies condition ②, meaning that all previously skipped transactions have completed execution, the skipped state can be released, and the first transaction can be scheduled and sent normally.

[0258] In another possible implementation, as shown in FIG15 , in the skip state, if the next transaction in the transaction layer queue after the first transaction is skipped is a transaction carrying the FENCE flag, the first device first determines whether the transaction in the transaction layer queue with a TAQ number smaller than the transaction carrying the FENCE flag satisfies condition ①. If condition ① is satisfied, scheduling of the transaction carrying the FENCE flag is suspended, and the transaction layer queue changes from a normal state to a blocked state.

[0259] The above-mentioned normal state, blocking state and skipping state can be switched multiple times, as shown in Figure 15. It can be understood that the above description is only an example and does not constitute a limitation to the embodiments of the present application.

[0260] For example, the embodiments introduced above are mainly introduced by taking the case where the transport layer is reliable but not sequence-guaranteed as an example. In another possible implementation, for the case where the transport layer is reliable and sequence-guaranteed, the message sent by the first device to the second device may also carry the above-mentioned execution sequence flag and / or completion sequence flag. The difference is that, in the case where the transport layer is reliable and sequence-guaranteed, there is no need to judge whether the corresponding transaction can be scheduled and sent based on the indication of the execution sequence flag, and the transaction can be directly scheduled from the transaction layer queue to the transport layer queue for sending. In this implementation method, the receiving end is required to have the ability to ensure the execution order of transactions, and the specific implementation of the embodiments of the present application is not limited.

[0261] In summary, in this solution, the constraint information indicating the execution or completion order of transactions allows for flexible scheduling of transaction execution and completion, avoiding the performance penalty associated with strictly following the order in which transactions are queued in the transaction layer queue. Furthermore, the constraint information indicating the execution order of transactions is simple to implement, effectively and concisely representing the order in which transactions are executed. This also facilitates network card identification and operation, improving processing efficiency. Furthermore, in this solution, source-side order preservation generates CQE, which is compatible with existing order-preserving completion interface semantics.

[0262] In another possible embodiment, as exemplified in FIG16 , a system for processing transaction flows and a transaction flow processing process implemented by the system according to an embodiment of the present application is shown. The system includes a first device and a second device. The transaction processing process includes but is not limited to the following steps:

[0263] S1601. A first device is used to send a first transaction, where the first transaction is numbered smaller than a second transaction and includes a first execution sequence flag or a second execution sequence flag. The first execution sequence flag and the second execution sequence flag are both used to indicate the execution order of transactions, and the first transaction and the second transaction belong to the same transaction flow.

[0264] Exemplarily, the first execution sequence flag is the second execution sequence flag, such as the RO flag. The second execution sequence flag is the third execution sequence flag, such as the SO flag.

[0265] S1602: The second device is used to receive the first transaction and execute the first transaction.

[0266] S1603. The first device is further configured to send the second transaction after all first transactions in the transaction flow are executed. The second transaction includes the second execution sequence flag, which indicates that the second transaction is executed after all first transactions in the transaction flow are executed.

[0267] S1604: The second device is further configured to receive the second transaction and execute the second transaction.

[0268] The specific implementation of steps S1601 to S1604 can refer to the relevant description of "in one possible implementation, if the above-mentioned first execution sequence flag is the above-mentioned second execution sequence flag" in step S320 shown in Figure 3, and the relevant description in step S330 shown in Figure 3, which will not be repeated here.

[0269] In one possible implementation, the first device is further used to send a third transaction in the transaction flow, and the third transaction includes a third execution sequence flag, and the third execution sequence flag is used to indicate that the transaction including the third execution sequence flag has no execution order constraint. Exemplarily, the third execution sequence flag is the above-mentioned first execution sequence flag, such as the above-mentioned NO flag. For specific implementation, please refer to the relevant description of the case of "in one possible implementation, if the above-mentioned first execution sequence flag is the above-mentioned first execution sequence flag" in step S320 shown in Figure 3, which will not be repeated here.

[0270] In one possible implementation, the first device is further configured to, while waiting for the first transactions to complete execution, send a fourth transaction, wherein the fourth transaction includes the first execution sequence flag and has a larger number than the second transaction, and the fourth transaction, the first transaction, and the second transaction all belong to the same transaction flow. For a specific implementation, reference may be made to the description of "in one possible implementation, if the first execution sequence flag is the second execution sequence flag" in step S320 of FIG. Such description will not be repeated here.

[0271] In one possible implementation, the first device is further configured to, while waiting for the first transactions to complete execution, send a fifth transaction, the fifth transaction including a third execution sequence flag, the third execution sequence flag indicating that transactions including the third execution sequence flag are not subject to execution order constraints, the fifth transaction having a greater number than the second transaction, and the fifth transaction, the first transaction, and the second transaction all belonging to the same transaction flow. For a specific implementation, reference may be made to the description of "in one possible implementation, if the first execution sequence flag is the second execution sequence flag" in step S320 shown in FIG. Such description will not be repeated here.

[0272] In one possible implementation, the first device is further configured to: send the sixth transaction when all transactions numbered less than the sixth transaction in the transaction stream have been executed; the sixth transaction includes a fourth execution sequence flag, which indicates that the sixth transaction should be executed after all transactions numbered less than the sixth transaction in the transaction stream have been executed. Exemplarily, the fourth execution sequence flag is the aforementioned FENCE flag. For specific implementation, please refer to the aforementioned description of the FENCE flag, which will not be repeated here.

[0273] In one possible implementation, the first device is further used to send a first completion sequence flag to the second device, where the first completion sequence flag is associated with the first transaction, and the first completion sequence flag is used to instruct the second device to generate completion information of the first transaction in order, or to instruct the second device to generate completion information of the first transaction out of order, and the completion information of the first transaction indicates that the first transaction has been executed.

[0274] For example, if the first completion sequence flag is used to instruct the second device to generate completion information for the first transaction in order, then the first completion sequence flag may be the aforementioned first type of completion sequence flag, also known as an out-of-order completion flag, and may be represented by NO. If the first completion sequence flag is used to instruct the second device to generate completion information for the first transaction out of order, then the first completion sequence flag may be the aforementioned second type of completion sequence flag, also known as an order-preserving completion flag, and may be represented by CO. For specific implementations, please refer to the aforementioned description of the two types of completion sequence flags and will not be elaborated upon here.

[0275] In a possible implementation, the first completion sequence flag is located in the fourth byte of a field corresponding to the transaction layer of the message corresponding to the first transaction.

[0276] In one possible implementation, the first execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the first transaction, the second execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the second transaction, and the third execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the third transaction.

[0277] Regarding the positions of the above-mentioned execution sequence flag and completion sequence flag in the message, please refer to the introduction in Figure 14 above, and will not be repeated here.

[0278] The above mainly introduces the transaction flow processing flow provided by the embodiment of the present application. It is understandable that, in order to realize the corresponding functions mentioned above, each device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0279] The embodiment of the present application can divide the functional modules of the device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.

[0280] In the case of dividing each functional module according to each function, the embodiment of the present application also provides an apparatus for implementing any of the above method embodiments. For example, the provided apparatus includes units (or means) for implementing each step in any of the above method embodiments.

[0281] For example, please refer to Figure 17, which is a schematic diagram of the structure of a transaction flow processing device 1700 provided in an embodiment of the present application. The transaction flow processing device 1700 shown in Figure 17 can be used to implement the above-mentioned first device. The transaction flow processing device 1700 may include a sending unit 1701. In which:

[0282] A sending unit 1701 is configured to send a first transaction, where the first transaction has a smaller number than a second transaction and includes a first execution sequence flag or a second execution sequence flag, where both the first execution sequence flag and the second execution sequence flag are used to indicate an execution order of the transactions, and the first transaction and the second transaction belong to the same transaction flow;

[0283] The sending unit 1701 is further configured to send the second transaction after all first transactions in the transaction flow are executed. The second transaction includes the second execution sequence flag, which indicates that the second transaction is executed after all first transactions in the transaction flow are executed.

[0284] In a possible implementation, the sending unit 1701 is further configured to: send a third transaction in the transaction flow, where the third transaction includes a third execution sequence flag, and the third execution sequence flag indicates that the third transaction has no execution order constraint.

[0285] In one possible implementation, the sending unit 1701 is further used to: while waiting for the first transaction to be executed, send a fourth transaction, the fourth transaction includes the first execution sequence flag and the fourth transaction number is greater than the second transaction, and the fourth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

[0286] In one possible implementation, the sending unit 1701 is further used to: while waiting for the first transaction to be executed, send a fifth transaction, where the fifth transaction includes a third execution sequence flag, where the third execution sequence flag indicates that the transaction including the third execution sequence flag has no execution order constraints, and the fifth transaction is numbered greater than the second transaction, and the fifth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

[0287] In one possible implementation, the sending unit 1701 is further configured to: send the sixth transaction when all transactions numbered less than the sixth transaction in the transaction stream have been executed; the sixth transaction includes a fourth execution sequence flag, and the fourth execution sequence flag indicates that the sixth transaction should be executed after all transactions numbered less than the sixth transaction in the transaction stream have been executed.

[0288] In one possible implementation, the sending unit 1701 is further used to: send a first completion sequence flag to the second device, where the first completion sequence flag is associated with the first transaction, and the first completion sequence flag is used to instruct the second device to generate the completion information of the first transaction in order, or to instruct the second device to generate the completion information of the first transaction out of order, and the completion information of the first transaction indicates that the first transaction has been executed.

[0289] In a possible implementation, the first completion sequence flag is located in the fourth byte of a field corresponding to the transaction layer of the message corresponding to the first transaction.

[0290] In one possible implementation, the first execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the first transaction, the second execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the second transaction, and the third execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the third transaction.

[0291] The specific operations and beneficial effects of each unit in the transaction flow processing device 1700 shown in Figure 17 can be found in the corresponding description of the first device in Figures 3 and 16 and their possible embodiments, and will not be repeated here.

[0292] For example, please refer to Figure 18, which is a schematic diagram of the structure of a transaction stream processing device 1800 provided in an embodiment of the present application. The transaction stream processing device 1800 shown in Figure 18 can be used to implement the above-mentioned second device. The transaction stream processing device 1800 may include a receiving unit 1801 and a processing unit 1802. Among them:

[0293] Receiving unit 1801 is used to receive a first transaction and a first completion sequence flag, where the first completion sequence flag is associated with the first transaction, and the first completion sequence flag is used to instruct the second device to generate completion information of the first transaction in order, or to instruct the second device to generate completion information of the first transaction out of order, and the completion information of the first transaction indicates that the first transaction has been executed.

[0294] The processing unit 1802 is configured to execute the first transaction; and generate completion information of the first transaction based on the first completion sequence flag.

[0295] In a possible implementation, the first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer in a message corresponding to the first transaction.

[0296] The specific operations and beneficial effects of each unit in the transaction flow processing device 1800 shown in Figure 18 can be found in the corresponding description of the second device in Figures 3 and 16 and their possible embodiments, and will not be repeated here.

[0297] It should be understood that the division of the various units in the above server or mobile device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or they can be physically separated. In addition, the units in the device can be implemented in the form of a processor calling software; for example, the device includes a processor, the processor is connected to a memory, and the memory stores instructions. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of the various units of the device, where the processor is, for example, a general-purpose processor, such as a central processing unit (CPU) or a microprocessor, and the memory is a memory within the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all of the units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), which realizes the functions of some or all of the above units by designing the logical relationship of the components in the circuit. For another example, in another implementation, the hardware circuit can be implemented by a programmable logic device (PLD). Taking a field programmable gate array (FPGA) as an example, it can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by configuring the configuration file, thereby realizing the functions of some or all of the above units. All units of the above devices can be implemented in the form of software called by the processor, or in the form of hardware circuits, or in part by software called by the processor, and the rest by hardware circuits.

[0298] In an embodiment of the present application, a processor is a circuit with data processing capabilities. In one implementation, the processor can be a circuit with instruction reading and execution capabilities, such as a CPU, a microprocessor, a graphics processing unit (GPU) (which can be understood as a microprocessor), or a digital signal processor (DSP); in another implementation, the processor can implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit is fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document and implementing the hardware circuit configuration can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a neural network processing unit (NPU), a tensor processing unit (TPU), a deep learning processing unit (DPU), etc.

[0299] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0300] In addition, the various units in the above devices can be fully or partially integrated together, or can be implemented independently. In one implementation, these units are integrated together and implemented in the form of a system-on-a-chip (SOC). The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the various units of the device. The type of the at least one processor can be different, for example, including a CPU and FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0301] For example, see Figure 19 , which is a schematic diagram of a possible physical entity structure of a transaction stream processing device provided in this application. The transaction stream processing device 1900 shown in Figure 19 may be the server in the method described in the above embodiment. The transaction stream processing device 1900 includes: a processor 1901, a memory 1902, and a communication interface 1903. The processor 1901, the communication interface 1903, and the memory 1902 may be interconnected or connected to each other via a bus 1904.

[0302] Exemplarily, the memory 1902 is used to store computer programs and data of the transaction flow processing device 1900. The memory 1902 may include but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or portable read-only memory (CD-ROM), etc.

[0303] The software or program codes required for all or part of the functions of the server in the above method embodiment are stored in the memory 1902 .

[0304] In one possible implementation, if the software or program code required for some functions is stored in the memory 1902, the processor 1901, in addition to calling the program code in the memory 1902 to implement some functions, can also cooperate with other components (such as the communication interface 1903) to jointly complete other functions described in the method embodiment (such as the function of receiving or sending data).

[0305] There can be multiple communication interfaces 1903 to support the transaction flow processing device 1900 to communicate, such as receiving or sending data or signals.

[0306] Exemplarily, processor 1901 may be a CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of the aforementioned processor types. Processor 1901 may be configured to read programs stored in memory 1902 and execute the operations performed by the first device in the methods described in FIG. 3 , FIG. 16 , and their possible embodiments. Alternatively, in another possible implementation, processor 1901 may be configured to read programs stored in memory 1902 and execute the operations performed by the second device in the methods described in FIG. 3 , FIG. 16 , and their possible embodiments.

[0307] The specific operations and beneficial effects of the transaction flow processing device 1900 shown in Figure 19 can be found in the corresponding descriptions of Figures 3 and 16 and their possible embodiments, and will not be repeated here.

[0308] In one possible implementation, the transaction flow processing device shown in Figures 17 to 19 can be implemented as the communication device shown in Figure 2, or as a chip, processor, processing system, network card or any combination thereof in the communication device. Component module, etc.

[0309] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program or computer instructions, and the computer program or computer instructions are executed by a processor to implement the method implemented by the first device in Figures 3, 16 and possible embodiments thereof.

[0310] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program or computer instructions, and the computer program or computer instructions are executed by a processor to implement the method implemented by the second device in the above-mentioned Figures 3, 16 and possible embodiments thereof.

[0311] An embodiment of the present application also provides a computer program product. When the computer program product is read and executed by a computer, the operations implemented by the first device in any of the methods described in Figures 3, 16 and their possible embodiments will be executed.

[0312] An embodiment of the present application also provides a computer program product. When the computer program product is read and executed by a computer, the operations implemented by the second device in any of the methods described in Figures 3, 16 and their possible embodiments will be executed.

[0313] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. It should be noted that for the aforementioned method embodiments, in order to simplify the description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited to the order of the actions described, because according to this application, some steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for this application.

[0314] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0315] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0316] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A system for processing transaction flows, characterized in that: The system comprises a first device and a second device; The first device is used to send a first transaction, the first transaction is a transaction with a smaller number than a second transaction and includes a first execution sequence flag or a second execution sequence flag, the first execution sequence flag and the second execution sequence flag are both used to indicate the execution order of the transactions, and the first transaction and the second transaction belong to the same transaction flow; The second device is used to receive the first transaction and execute the first transaction; The first device is further configured to send the second transaction after all the first transactions in the transaction flow are executed, the second transaction comprising the second execution sequence flag, the second execution sequence flag indicating that the second transaction is executed after all the first transactions in the transaction flow are executed; The second device is further configured to receive the second transaction and execute the second transaction.

2. The system according to claim 1, characterized in that The first device is further used to send a third transaction in the transaction flow, wherein the third transaction includes a third execution sequence flag, and the third execution sequence flag is used to indicate that the transaction including the third execution sequence flag has no execution order constraint.

3. The system according to claim 1 or 2, characterized in that: The first device is further configured to, while waiting for the first transaction to be completed, A fourth transaction is sent, where the fourth transaction includes the first execution sequence flag and the number of the fourth transaction is greater than that of the second transaction, and the fourth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

4. The system according to any one of claims 1 to 3, characterized in that: The first device is further used to send a fifth transaction while waiting for the first transactions to be executed. The fifth transaction includes a third execution sequence flag, and the third execution sequence flag indicates that the transaction including the third execution sequence flag has no execution order constraint, and the number of the fifth transaction is greater than the second transaction. The fifth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

5. The system according to any one of claims 1 to 3, characterized in that: The first device is also used for: When all transactions with numbers smaller than the sixth transaction in the transaction flow are executed, the sixth transaction is sent; the sixth transaction includes a fourth execution sequence flag, and the fourth execution sequence flag indicates that the sixth transaction is executed after all transactions with numbers smaller than the sixth transaction in the transaction flow are executed.

6. The system according to any one of claims 1 to 5, characterized in that: The first device is also used to send a first completion sequence flag to the second device, the first completion sequence flag is associated with the first transaction, the first completion sequence flag is used to instruct the second device to generate completion information of the first transaction in order, or to instruct the second device to generate completion information of the first transaction out of order, and the completion information of the first transaction indicates that the first transaction has been executed.

7. The system according to claim 6, characterized in that The first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer of a message corresponding to the first transaction.

8. The system according to claim 2, characterized in that The first execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the first transaction, the second execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the second transaction, and the third execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the third transaction.

9. A method for processing a transaction flow, characterized in that: The method comprises: Sending a first transaction, where the first transaction is a transaction with a smaller number than the second transaction and includes a first execution sequence flag or a second execution sequence flag, where the first execution sequence flag and the second execution sequence flag are both used to indicate an execution order of transactions, and the first transaction and the second transaction belong to the same transaction flow; After all the first transactions in the transaction flow are executed, the second transaction is sent, and the second transaction includes the second execution sequence flag, and the second execution sequence flag indicates that the second transaction is executed after all the first transactions in the transaction flow are executed.

10. The method according to claim 9, characterized in that The method further comprises: A third transaction in the transaction flow is sent, wherein the third transaction includes a third execution order flag, and the third execution order flag indicates that the third transaction has no execution order constraint.

11. The method according to claim 9 or 10, characterized in that: The method further comprises: While waiting for the first transactions to be executed, a fourth transaction is sent, the fourth transaction includes the first execution sequence flag and the fourth transaction number is greater than the second transaction, and the fourth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

12. The method according to any one of claims 9 to 11, characterized in that: The method further comprises: While waiting for the first transactions to be executed, a fifth transaction is sent, the fifth transaction includes a third execution sequence flag, the third execution sequence flag indicates that the transaction including the third execution sequence flag has no execution order constraint, and the fifth transaction is numbered greater than the second transaction, and the fifth transaction, the first transaction, and the second transaction all belong to the same transaction flow.

13. The method according to any one of claims 9 to 11, characterized in that: The method further comprises: When all transactions with numbers smaller than the sixth transaction in the transaction flow are executed, the sixth transaction is sent; the sixth transaction includes a fourth execution sequence flag, and the fourth execution sequence flag indicates that the sixth transaction is executed after all transactions with numbers smaller than the sixth transaction in the transaction flow are executed.

14. The method according to any one of claims 9 to 13, characterized in that: The method further comprises: A first completion sequence flag is sent to a second device, where the first completion sequence flag is associated with the first transaction, and the first completion sequence flag is used to instruct the second device to generate completion information of the first transaction in order, or to instruct the second device to generate completion information of the first transaction out of order, and the completion information of the first transaction indicates that the first transaction has been executed.

15. The method according to claim 14, characterized in that The first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer of a message corresponding to the first transaction.

16. The method according to claim 10, characterized in that The first execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the first transaction, the second execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the second transaction, and the third execution sequence flag is located in the fourth byte of the field corresponding to the transaction layer of the message corresponding to the third transaction.

17. A method for processing a transaction flow, characterized in that: The method comprises: receiving a first transaction and a first completion sequence flag, wherein the first completion sequence flag is associated with the first transaction, the first completion sequence flag is used to instruct the second device to generate completion information of the first transaction in order, or to instruct the second device to generate completion information of the first transaction out of order, and the completion information of the first transaction indicates that the first transaction has been executed and completed; executing the first transaction; Completion information of the first transaction is generated based on the first completion sequence flag.

18. The method according to claim 17, characterized in that The first completion sequence flag is located in the fourth byte of a field corresponding to a transaction layer of a message corresponding to the first transaction.

19. A device for processing transaction flow, characterized in that: The device for processing a transaction flow comprises a unit for executing the method according to any one of claims 9 to 16.

20. A device for processing transaction flow, characterized in that: The device for processing a transaction flow comprises a unit for executing the method according to claim 17 or 18.

21. A device for processing transaction flow, characterized in that: It comprises a processor, a communication interface and a memory, wherein the memory is used to store computer programs and / or data, and the processor is used to execute the computer program stored in the memory, so that the device for processing transaction flows executes the method described in any one of claims 9 to 16.

22. A device for processing transaction flow, characterized in that: It comprises a processor, a communication interface and a memory, wherein the memory is used to store computer programs and / or data, and the processor is used to execute the computer program stored in the memory, so that the device for processing transaction flows executes the method described in claim 17 or 18.

23. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 9 to 16; or The computer program is executed by a processor to implement the method of claim 17 or 18.

24. A computer program, characterized in that When the computer program product is read and executed by a computer, the method according to any one of claims 9 to 16 or the method according to claim 17 or 18 will be executed.

25. A chip comprising a processor and a communication interface, characterized in that: The chip is configured to execute the method according to any one of claims 9 to 16; or, The chip is configured to execute the method according to any one of claims 17 or 18.

Citation Information

Patent Citations

  • Task processing method and processing device and computer system

    CN110489213A

  • Method and device for hierarchically and asynchronously processing transactions

    CN111580939A

  • Data synchronization method and device based on parallel execution

    CN111858626A

  • Multi-task scheduling method and device, electronic equipment and readable storage medium

    CN112199180A

  • Method for processing multiple tasks, processing equipment and heterogeneous computing system

    CN115237582A