A data processing method, apparatus and computing device

By constructing a shared transport layer queue resource pool in a unified bus protocol network and dynamically managing the association between transport layer connections and queues, the problem of transport layer queues occupying storage resources is solved, achieving efficient utilization of storage resources and reduction of task latency.

CN120675952BActive Publication Date: 2026-04-10HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-02-23
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In networks based on a unified bus protocol, when computing devices communicate with multiple devices, the transport layer queues consume a large amount of storage resources, resulting in low storage resource utilization.

Method used

By building a shared transport layer queue resource pool, computing devices dynamically request and release transport layer queues for each transport layer connection when communication is needed, avoiding each connection being fixed to a single queue, flexibly adjusting queue usage, and ensuring efficient utilization of resources.

Benefits of technology

This effectively avoids the transport layer queue from occupying storage resources when not executing tasks, improving the utilization rate of storage resources and reducing task latency and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120675952B_ABST
    Figure CN120675952B_ABST
Patent Text Reader

Abstract

The application provides a data processing method and device and a computing device. The method comprises: a first computing device obtaining one or more task descriptors, wherein each task descriptor comprises address information of data to be transmitted by the first computing device to a second computing device; after the first computing device selects a first TP connection from a TP connection established between the first computing device and the second computing device to transmit the data to be transmitted, and determines that the first TP connection is not associated with a TPQ, the first computing device selects a first TPQ from idle TPQs or creates the first TPQ, establishes an association between the first TP connection and the first TPQ, and caches the one or more task descriptors to the first TPQ. The computing device configures a TPQ for a TP connection only when the TP connection needs to cache a task descriptor, thereby avoiding the TP connection from occupying a TPQ resource when the TP connection does not execute a task, avoiding the problem of a TPQ occupying too many storage resources, and improving the utilization rate of storage resources.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application, the original application number is 202410205867.4, the original application date is February 23, 2024, and the entire contents of the original application are incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of computers, in particular to a data processing method and device and a computing device. BACKGROUND

[0003] In a network based on a unified bus (UB) protocol, one or more transport layer (TP) connections need to be established between two computing devices that communicate with each other. One computing device can communicate with multiple computing devices, so the computing device can establish TP connections with multiple computing devices. Each TP connection needs to allocate a transport queue (TPQ) to cache the task descriptor corresponding to the TP connection. If a computing device establishes a large number of TP connections with other computing devices, the TPQ in the computing device will occupy a large amount of storage resources of the computing device. SUMMARY

[0004] The present application provides a data processing method, device and computing device, which can reduce the occupation of TPQ to storage resources in a network using the UB protocol, and improve the utilization rate of storage resources.

[0005] In a first aspect, the present application provides a data processing method applied to a network comprising a plurality of computing devices. Any two computing devices in the plurality of computing devices establish one or more TP connections, and the TP connections are used for communication between the two computing devices. The method comprises:

[0006] When the first computing device needs to transmit the to-be-transmitted data to the second computing device, the first computing device selects a first TP connection from the TP connections established between the first computing device and the second computing device to transmit the to-be-transmitted data. Then, the first computing device determines whether the first TP connection is associated with a TPQ. If the first computing device determines that the first TP connection is not associated with a TPQ, the first computing device establishes an association relationship between the first TP connection and a first TPQ. Then, the first computing device caches one or more task descriptors to the first TPQ. The first TPQ is one of one or more TPQs created by the first computing device, or the first TPQ is a TPQ created by the first computing device according to a demand capacity. The demand capacity is the capacity required by the first computing device to cache the one or more task descriptors. Each task descriptor comprises address information of the to-be-transmitted data. The first computing device and the second computing device belong to the plurality of computing devices.

[0007] By implementing the above method, the computing device configures one or more TPQs for the TP connection only when the TP connection is needed to communicate with other computing devices to complete a task, and associates the one or more TPQs with the TP, that is, each TP connection is not fixedly associated with a TPQ, and each time whether the TP connection is associated with a TPQ is determined, it is indicated that after the TP connection is associated with a TPQ, the first computing device also releases the association relationship between the TP connection and the TPQ, which can avoid the case that the TP connection occupies the TPQ resource when the task is not performed, avoid the problem that the TPQ occupies too many storage resources, and improve the storage resource utilization rate. The computing device in the embodiment of the application can also be referred to as a host, a computing node or a computing module, and the like, which is a device, a chip or a module having a computing capability.

[0008] In a possible implementation, the first computing device determines whether the first TP connection is associated with a TPQ. If the first computing device determines that the first TP connection is associated with a second TPQ, the storage capacity of the second TPQ is obtained. If the storage capacity of the second TPQ is less than the demand capacity, the first computing device establishes an association relationship between the first TP connection and the first TPQ, and caches one or more task descriptors to the first TPQ.

[0009] The first TP connection can also be associated with a TPQ. Then, the first computing device first confirms whether the storage capacity of the second TPQ currently associated with the first TP connection can cache the one or more task descriptors. If the second TPQ cannot cache the one or more task descriptors, the first TPQ with a larger storage capacity is used to replace the second TPQ, so that the first computing device can continue to use the first TP connection to transmit the to-be-transmitted data. By implementing the above method, each TP connection is not fixedly associated with a TPQ, so that the TPQ associated with the TP connection can be flexibly adjusted, and the case that the storage capacity of the TPQ associated with the TP connection is small and cannot cache multiple task descriptors corresponding to a task is avoided, so that the delay caused by replacing the TP connection to implement the task is avoided.

[0010] In a possible implementation, before the first computing device establishes the association relationship between the first TP connection and the first TPQ, the first computing device further deletes configuration information of the second TPQ recorded in a first transport layer context (TP context, TPC) corresponding to the first TP connection. Each TP connection is associated with a TPC, and the TPC is used to record configuration information of the TPQ associated with the corresponding TP connection. The configuration information includes a start address and a storage capacity of the TPQ.

[0011] In a possible implementation, the first computing device establishes N TP connections with other computing devices and creates M TPQs, where M is less than N; the first TPQ and the second TPQ belong to the M TPQs; the association between the first TP connection and the first TPQ includes that the first computing device acquires a TPQ in an idle state, determines the first TPQ according to the demand capacity and the storage capacity of each TPQ in the idle state, and then writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection to achieve the association between the first TP connection and the first TPQ. The storage capacity of the first TPQ is greater than or equal to the demand capacity, and the TPQ in the idle state refers to a TPQ not associated with a TP connection; each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, and the configuration information includes the start address and the storage capacity of the TPQ.

[0012] The first computing device can create a TPQ when establishing a TP connection with other computing devices, and select a TPQ with a storage capacity greater than the demand capacity of the task descriptor to be cached according to the demand capacity of the task descriptor to be cached, and then associate the TPQ with the TP connection. When associating, only the configuration information of the TPQ needs to be written into the TPC associated with the TP connection, so as to achieve the association between the TP connection and the TPQ.

[0013] In a possible implementation, the association between the first TP connection and the first TPQ includes that the first computing device creates the first TPQ according to the demand capacity of one or more task descriptors, and writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection.

[0014] In this application, the first computing device can also create a TPQ with a storage capacity greater than the demand capacity of the task descriptor to be cached according to the demand capacity of the task descriptor to be cached when the TPQ is needed to cache the task descriptor, and then associate the TPQ with the TP connection. When associating, only the configuration information of the TPQ needs to be written into the TPC associated with the TP connection, so as to achieve the association between the TP connection and the TPQ.

[0015] In a possible implementation, after the first computing device caches one or more task descriptors into the first TPQ, the method further includes that the first computing device reads the task descriptor from the first TPQ and executes the communication task indicated by the task descriptor, and when the first computing device determines that there is no task descriptor in the first TPQ, the first computing device releases the first TPQ, that is, deletes the configuration information of the first TPQ recorded in the first TPC, and releases the association between the first TP and the first TPQ.

[0016] After the task indicated by the task descriptor in the TPQ is completed, the computing device can release the TPQ, so that other TP connections can use the TPQ, avoid the case that a TP connection occupies the resource of the TPQ when the task is not executed, avoid the problem that the TPQ occupies too much storage resource, and improve the utilization rate of the storage resource.

[0017] In a possible implementation, after the first computing device caches the one or more task descriptors to the first TPQ, the method further includes: determining, by the first computing device, that there is no task descriptor in the first TPQ and that the first quantity of TPQs in the idle state is less than the first threshold, and deleting the configuration information of the first TPQ recorded in the first TPC.

[0018] If there is no task descriptor cached in the TPQ associated with a TP connection and the quantity of TPQs in the idle state is small, the TPQ associated with the TP connection but without the cached task descriptor is released, so that the TP connection needing to use the TPQ can find the TPQ in the idle state in time. If there is no task descriptor cached in the TPQ associated with a TP connection and the quantity of TPQs in the idle state is large, the association between the TP connection and the TPQ is maintained, so that the TP connection does not need to search for the available TPQ for association when the TP connection needs to use the TPQ to cache the task descriptor again, and the time delay of task execution is reduced.

[0019] In a possible implementation, after the first computing device caches the one or more task descriptors to the first TPQ, the method further includes: determining, by the first computing device, that there is no task descriptor in the first TPQ and that the first TPQ has not cached a new task descriptor within the first time length, and deleting the configuration information of the first TPQ recorded in the first TPC.

[0020] If there is no task descriptor cached in the TPQ associated with a TP connection and the TPQ has not cached a task descriptor for a period of time, the TPQ associated with the TP connection but without the cached task descriptor is released, so that the TP connection needing to use the TPQ can find the TPQ in the idle state in time. If there is no task descriptor cached in the TPQ associated with a TP connection, but the TP connection may need the TPQ to cache the task descriptor in a short time, the association between the TP connection and the TPQ is maintained for a period of time, so that the TP connection does not need to search for the available TPQ for association when the TP connection needs to use the TPQ to cache the task descriptor again, and the time delay of task execution is reduced.

[0021] In a second aspect, the present application provides a data processing method, which is applied to a network comprising a plurality of computing devices, and one or more transport layer (TP) connections are established between any two computing devices in the plurality of computing devices, and the TP connections are used for communication between the two computing devices; the method comprises:

[0022] When the first computing device needs to transmit the to-be-transmitted data to the second computing device, the first computing device selects the first TP connection from the TP connections established between the first computing device and the second computing device to transmit the to-be-transmitted data, and then the first computing device determines whether the first TP connection is associated with a TPQ; if the first computing device determines that the first TP connection is associated with a second TPQ, the first computing device acquires the storage capacity of the second TPQ; if the storage capacity of the second TPQ is less than the required capacity, the first computing device establishes an association relationship between the first TP connection and a first TPQ; and then the first computing device caches one or more task descriptors to the first TPQ; wherein the first TPQ is one of the one or more TPQs created by the first computing device, or the first TPQ is a TPQ created by the first computing device according to the required capacity, and the required capacity is the capacity required by the first computing device to cache the one or more task descriptors.

[0023] In the case where the first TP connection has been associated with a TPQ, the first computing device will first determine whether the storage capacity of the second TPQ currently associated with the first TP connection can cache the one or more task descriptors; if the second TPQ cannot cache the one or more task descriptors, the first TPQ with a larger storage capacity is used to replace the second TPQ, so that the first computing device can continue to use the first TP connection to transmit the to-be-transmitted data. By implementing the above method, each TP connection is not fixedly associated with a TPQ, so that the TPQ associated with the TP connection can be flexibly adjusted, and the situation that the storage capacity of the TPQ associated with a TP connection is small and cannot cache a plurality of task descriptors corresponding to a task, so that the delay caused by the replacement of the TP connection by the task is avoided.

[0024] In a possible implementation, the first computing device establishes N TP connections with other computing devices and creates M TPQs, where M is less than N; the first TPQ and the second TPQ belong to the M TPQs; the association between the first TP connection and the first TPQ is established by the following steps: the first computing device acquires a TPQ in an idle state, determines the first TPQ according to the demand capacity and the storage capacity of each TPQ in the idle state, and then writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection, to realize the association between the first TP connection and the first TPQ. The storage capacity of the first TPQ is greater than or equal to the demand capacity, and the TPQ in the idle state refers to a TPQ that is not associated with a TP connection; each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, and the configuration information includes the start address and the storage capacity of the TPQ.

[0025] In a possible implementation, the association between the first TP connection and the first TPQ is established by the following steps: the first computing device creates the first TPQ according to the demand capacity of one or more task descriptors, and writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection.

[0026] In a possible implementation, before the association between the first TP connection and the first TPQ is established, the first computing device further releases a second TPQ, deletes the configuration information of the second TPQ recorded in the first TPC, and disassociates the first TP connection from the second TPQ.

[0027] In a possible implementation, after the first computing device caches one or more task descriptors to the first TPQ, the method further includes the following steps: the first computing device reads the task descriptor from the first TPQ and performs the communication task indicated by the task descriptor, and when the first computing device determines that there is no task descriptor in the first TPQ, the first computing device releases the first TPQ, i.e., deletes the configuration information of the first TPQ recorded in the first TPC, and disassociates the first TP from the first TPQ.

[0028] After the task indicated by the task descriptor in a TPQ is completed, the computing device can release the TPQ, so that other TP connections can use the TPQ, and the situation that a TP connection occupies a TPQ resource when no task is performed can be avoided, the problem that a TPQ occupies too much storage resource can be avoided, and the utilization rate of storage resource is improved.

[0029] In a possible implementation, after the first computing device caches the one or more task descriptors to the first TPQ, the method further includes: determining, by the first computing device, that there is no task descriptor in the first TPQ and that the first quantity of TPQs currently in an idle state is less than the first threshold, and deleting configuration information of the first TPQ recorded in the first TPC.

[0030] If there is no task descriptor cached in the TPQ associated with the TP connection and the quantity of TPQs currently in an idle state is small, the TPQ associated with the TP connection but without a cached task descriptor is released, so that the TP connection needing to use the TPQ can find an idle TPQ in time. If there is no task descriptor cached in the TPQ associated with the TP connection and the quantity of TPQs currently in an idle state is large, the association between the TP connection and the TPQ is maintained, so that the TP connection does not need to search for an available TPQ for association when the TP connection needs to use the TPQ to cache a task descriptor again, and the time delay of task execution is reduced.

[0031] In a possible implementation, after the first computing device caches the one or more task descriptors to the first TPQ, the method further includes: determining, by the first computing device, that there is no task descriptor in the first TPQ and that the first TPQ has not cached a new task descriptor in a first time length, and deleting configuration information of the first TPQ recorded in the first TPC.

[0032] In a third aspect, the present application provides a data processing method, applied to a network including a plurality of computing devices, and there is one or more transport layer (TP) connections between any two computing devices in the plurality of computing devices, the TP connection being used for communication between the two computing devices; the method includes: receiving, by a first computing device, a first message sent by a third computing device through a second TP connection, the first message including to-be-written data, and the second TP connection being one of TP connections established between the first computing device and the third computing device; determining, by the first computing device, whether the second TP connection is associated with a TPQ, and if the second TP connection is not associated with a TPQ, establishing an association between the second TP connection and a third TPQ, and then caching first completion information to the third TPQ; wherein the third TPQ is one of one or more TPQs created by the first computing device, or the third TPQ is created by the first computing device after determining that the second TP connection is not associated with a TPQ; writing, by the first computing device, the to-be-written data to a storage space, generating first completion information corresponding to the first message, and the first completion information indicating that the to-be-written data has been written to the storage space.

[0033] By implementing the method, the computing device configures a TPQ for the TP connection only when the TPQ is needed to cache the completion information when receiving the packet, associates the TPQ with the TP, that is, each TP connection is not fixedly associated with a TPQ, and each time it is determined whether the TP connection is associated with the TPQ for caching the completion information, which indicates that the first computing device also releases the association between the TP connection and the TPQ after associating the TPQ, so as to avoid the case that the TP connection occupies the TPQ resource when not performing the task, avoid the problem that the TPQ occupies too many storage resources, and improve the storage resource utilization rate.

[0034] In a possible implementation, the first computing device establishes N TP connections with other computing devices and creates K TPQs for caching the completion information, where K is less than N; the third TPQ belongs to the K TPQs; and the first computing device establishes the association between the second TP connection and the third TPQ, including: the first computing device selects the third TPQ from the idle TPQs, and then writes the configuration information of the third TPQ into the second TPC corresponding to the second TP connection; where the idle TPQ refers to a TPQ that is not associated with a TP connection; each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, and the configuration information includes the start address and the storage capacity of the TPQ.

[0035] In a possible implementation, the first computing device establishes the association between the second TP and the third TPQ, including: the first computing device creates the third TPQ, and writes the configuration information of the third TPQ into the first TPC corresponding to the first TP connection.

[0036] In a fourth aspect, the present application provides a data processing apparatus, characterized in that, applied to a first computing device, comprising:

[0037] The processing module is configured to determine whether the first TP connection is associated with a transport layer queue (TPQ), and the first TP connection is one of the TP connections established between the first computing device and a second computing device; the processing module determines that the first TP connection is not associated with a TPQ, and sends a first application request to the queue management module, where the first application request is used to apply a TPQ to the queue management module, and the TP connection is used for communication between two computing devices.

[0038] a queue management module, configured to return an identifier of a first TPQ to the processing module after receiving the first application request, wherein the first TPQ is one of one or more TPQs created by the queue management module, or the first TPQ is a TPQ created by the queue management module according to a demand capacity, and the demand capacity is a capacity required by the first computing device to cache one or more task descriptors, and each task descriptor includes address information of to-be-transmitted data, and the to-be-transmitted data is data to be transmitted by the first computing device to a second computing device;

[0039] the processing module is further configured to establish an association between the first TP connection and the first TPQ, and cache the one or more task descriptors to the first TPQ.

[0040] In a possible implementation, the processing module is further configured to: determine that the first TP connection is associated with a second TPQ, and obtain a storage capacity of the second TPQ; determine that the storage capacity of the second TPQ is less than the demand capacity, and send a second application request to the queue management module, the second application request being used to apply a TPQ to the queue management module; and the queue management module is configured to return the identifier of the first TPQ to the processing module, wherein the storage capacity of the first TPQ is greater than or equal to the demand capacity, and the idle TPQ refers to a TPQ that is not associated with a TP connection.

[0041] the processing module is further configured to establish an association between the first TP connection and the first TPQ, and cache the one or more task descriptors to the first TPQ.

[0042] In a possible implementation, the processing module is further configured to: delete configuration information of the second TPQ recorded in a first transport layer context (TPC) corresponding to the first TP connection; wherein each TP connection is associated with a TPC, and the TPC is used to record configuration information of a TPQ associated with the corresponding TP connection, and the configuration information includes a start address and a storage capacity of the TPQ.

[0043] In a possible implementation, the first computing device establishes N TP connections with other computing devices, and creates M TPQs, wherein M is less than N; the first TPQ and the second TPQ belong to the M TPQs; and the queue management module is specifically configured to:

[0044] After receiving the first application request or the second application request, the queue management module obtains the TPQs in an idle state, determines the first TPQ according to the demand capacity and the storage capacity of each TPQ in the idle state, and returns the identifier of the first TPQ to the processing module; the storage capacity of the first TPQ is greater than or equal to the demand capacity, and the TPQ in the idle state refers to a TPQ not associated with a TP connection; the processing module is specifically configured to write the configuration information of the first TPQ into the first TPC corresponding to the first TP connection; each TP connection corresponds to a TPC, and the TPC is configured to record the configuration information of the TPQ associated with the corresponding TP connection, and the configuration information includes the start address and the storage capacity of the TPQ.

[0045] In a possible implementation, the queue management module is specifically configured to, after receiving the first application request or the second application request, create the first TPQ according to the demand capacity of one or more task descriptors, and return the identifier of the first TPQ to the processing module; the storage capacity of the first TPQ is greater than or equal to the demand capacity; the processing module is specifically configured to write the configuration information of the first TPQ into the first TPC corresponding to the first TP connection; each TP connection corresponds to a TPC, and the TPC is configured to record the configuration information of the TPQ associated with the corresponding TP connection, and the configuration information includes the start address and the storage capacity of the TPQ.

[0046] In a possible implementation, after the one or more task descriptors are cached to the first TPQ, the processing module is further configured to, when the first computing device determines that there is no task descriptor in the first TPQ, release the first TPQ, that is, delete the configuration information of the first TPQ recorded in the first TPC, and cancel the association between the first TP and the first TPQ.

[0047] In a possible implementation, after the one or more task descriptors are cached to the first TPQ, the processing module is further configured to, when the first computing device determines that there is no task descriptor in the first TPQ and the first quantity of the TPQs in the idle state is less than the first threshold, delete the configuration information of the first TPQ recorded in the first TPC.

[0048] In a possible implementation, after the one or more task descriptors are cached to the first TPQ, the processing module is further configured to, when the first computing device determines that there is no task descriptor in the first TPQ and the first TPQ has not cached a new task descriptor within the first time length, delete the configuration information of the first TPQ recorded in the first TPC.

[0049] In a fifth aspect, the present application provides a data processing apparatus applied to a first computing device, comprising:

[0050] The processing module is configured to determine whether the first TP connection is associated with a transport layer queue (TPQ), determine that the first TP connection is associated with a second TPQ, obtain a storage capacity of the second TPQ, and send a second application request to the queue management module when the storage capacity of the second TPQ is less than a required capacity; the first TP connection is one of TP connections established between the first computing device and the second computing device, and the second application request is used to apply for a TPQ from the queue management module; the TP connection is used for communication between the two computing devices.

[0051] The queue management module is configured to return an identifier of a first TPQ to the processing module after receiving the second application request; the storage capacity of the first TPQ is greater than or equal to the required capacity, and the required capacity is a capacity required for buffering one or more task descriptors of the first computing device; each task descriptor includes address information of to-be-transmitted data, and the to-be-transmitted data is data to be transmitted by the first computing device to the second computing device.

[0052] The processing module is further configured to establish an association between the first TP connection and the first TPQ, and buffer the one or more task descriptors to the first TPQ.

[0053] In a possible implementation, the processing module is further configured to delete configuration information of the second TPQ recorded in a first transport protocol controller (TPC) corresponding to the first TP connection; each TP connection is associated with a TPC, and the TPC is used to record configuration information of a TPQ associated with the corresponding TP connection; the configuration information includes a start address and a storage capacity of the TPQ.

[0054] In a possible implementation, the first computing device establishes N TP connections with other computing devices, and creates M TPQs, where M is less than N; the first TPQ and the second TPQ belong to the M TPQs; the queue management module is specifically configured to obtain a TPQ in an idle state, determine the first TPQ according to the required capacity and the storage capacity of each TPQ in the idle state, and return an identifier of the first TPQ to the processing module after receiving the second application request; the storage capacity of the first TPQ is greater than or equal to the required capacity, and the TPQ in the idle state refers to a TPQ that is not associated with a TP connection; the processing module is specifically configured to write configuration information of the first TPQ into a first TPC corresponding to the first TP connection; each TP connection corresponds to a TPC, and the TPC is used to record configuration information of a TPQ associated with the corresponding TP connection; the configuration information includes a start address and a storage capacity of the TPQ.

[0055] In a possible implementation, the queue management module is specifically configured to: after receiving the second application request, create a first TPQ according to the required capacity of the one or more task descriptors, and return an identifier of the first TPQ to the processing module, where the storage capacity of the first TPQ is greater than or equal to the required capacity; and the processing module is specifically configured to: write configuration information of the first TPQ into a first TPC corresponding to the first TP connection; where each TP connection corresponds to a TPC, and the TPC is used to record configuration information of a TPQ associated with the corresponding TP connection, and the configuration information includes a start address and a storage capacity of the TPQ.

[0056] In a sixth aspect, the present application provides a data processing apparatus applied to a first computing device, comprising:

[0057] a receiving module configured to receive a first packet sent by a third computing device through a second TP connection, the first packet comprising to-be-written data, and the second TP connection being one of TP connections established between the first computing device and the third computing device;

[0058] a processing module configured to determine whether the second TP connection is associated with a TPQ, and after determining that the second TPQ is not associated with a TPQ, send a third application request to the queue management module, the third application request being used to apply a TPQ to the queue management module;

[0059] a queue management module configured to return an identifier of a third TPQ to the processing module after receiving the third application request; where the third TPQ is one of one or more TPQs created by the first computing device, or the third TPQ is created by the first computing device after determining that the second TP connection is not associated with a TPQ;

[0060] the processing module is further configured to establish an association between the second TP connection and the third TPQ, write the to-be-written data in the first packet into a storage space, and generate first completion information corresponding to the first packet, and cache the first completion information to the third TPQ, the first completion information indicating that the to-be-written data has been written into the storage space.

[0061] In a possible implementation, the first computing device establishes N TP connections with other computing devices, and creates K TPQs for caching completion information, where K is less than N; the third TPQ belongs to the K TPQs; and the queue management module is specifically configured to: after receiving the third application request, select the third TPQ from the idle TPQs, and return the identifier of the third TPQ to the processing module; the idle TPQ refers to a TPQ that is not associated with a TP connection; and the processing module is specifically configured to: write the configuration information of the third TPQ into the second TPC corresponding to the second TP connection; each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, and the configuration information includes the start address and the storage capacity of the TPQ.

[0062] In a possible implementation, the queue management module is specifically configured to: create the third TPQ, and return the identifier of the third TPQ to the processing module; and the processing module is specifically configured to: write the configuration information of the third TPQ into the first TPC corresponding to the first TP connection; each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, and the configuration information includes the start address and the storage capacity.

[0063] In a seventh aspect, the present application provides a chip, which includes a processing unit and a storage unit, the storage unit is used to store program instructions, and the processing unit is used to run the program instructions to implement the method in the first aspect or any possible implementation manner of the first aspect; and / or implement the method in the second aspect or any possible implementation manner of the second aspect; and / or implement the method in the third aspect or any possible implementation manner of the third aspect.

[0064] In an eighth aspect, the present application provides a computing device, which includes a processor, a memory, and a chip, the memory is used to store instructions, the processor is used to execute the instructions to implement the service function of the computing device, and the chip is used to implement the method in the first aspect or any possible implementation manner of the first aspect; and / or implement the method in the second aspect or any possible implementation manner of the second aspect; and / or implement the method in the third aspect or any possible implementation manner of the third aspect.

[0065] In a ninth aspect, the present application provides a computer readable storage medium, which includes computer program instructions, when the computer program instructions are executed by a computing device, the computing device is caused to implement the method in the first aspect or any possible implementation manner of the first aspect; and / or implement the method in the second aspect or any possible implementation manner of the second aspect; and / or implement the method in the third aspect or any possible implementation manner of the third aspect.

[0066] In a tenth aspect, the present application provides a computer program product, which comprises a computer program, wherein the computer program, when executed by a computing device, implements the method according to the first aspect or any possible implementation manner of the first aspect; and / or, implements the method according to the second aspect or any possible implementation manner of the second aspect; and / or, implements the method according to the third aspect or any possible implementation manner of the third aspect. BRIEF DESCRIPTION OF DRAWINGS

[0067] Figure 1 Fig. 1 is a schematic diagram of a network architecture provided by the present application;

[0068] Figure 2 Fig. 2 is a schematic diagram of a flow of a data processing method provided by the present application;

[0069] Figure 3 Fig. 3 is a schematic diagram of another flow of a data processing method provided by the present application;

[0070] Figure 4 Fig. 4 is a schematic diagram of a data processing apparatus provided by the present application;

[0071] Figure 5 Fig. 5 is a schematic diagram of a chip provided by the present application;

[0072] Figure 6 Fig. 6 is a schematic diagram of a computing device provided by the present application. DETAILED DESCRIPTION

[0073] The data processing method provided by the present application is described below with reference to the accompanying drawings.

[0074] A unified bus (UB) is a network protocol standard based on a remote direct memory access (RDMA) technology. In a network using the UB technology, a transport layer (TP) connection needs to be established between different computing devices for communication. In order to implement multi-path transmission between two computing devices, a plurality of TP connections can be established between the two computing devices, and the plurality of TP connections established between the two computing devices are referred to as a TP group (TPG).

[0075] The UB protocol defines a transaction layer and a transport layer. Two communicating computing devices are connectionless at the transaction layer. When communication is needed between two computing devices, a transport layer (TP) connection is established at the transport layer. If process A on the first computing device needs to communicate with process B on the second computing device—for example, process A sending data to process B—process A sends a data transfer command to the transaction layer. The transaction layer converts this data transfer command into a transport layer task and then issues one or more task descriptors to the transport layer. The transport layer then completes the task of sending data to process B on the second computing device based on these task descriptors.

[0076] A task descriptor is used to indicate a communication task between two computing devices. When one computing device needs to send data to another, or read data from another, the task descriptor includes the address information of the data to be transferred between the two computing devices, the length of the data to be transferred, etc. For example, if a first computing device sends data to a second computing device, and the first computing device writes the data to be transferred into the memory of the second computing device through a write operation, then the task descriptor includes the source address of the data to be transferred, the length of the data to be transferred, and the destination address; where the source address indicates the storage location of the data to be transferred in the first computing device, and the destination address indicates the location where the data to be transferred was written to the memory of the second computing device. If the first computing device sends data to the second computing device through a send operation, then the task descriptor includes the address of the data source to be transferred and the length of the data to be transferred.

[0077] For example, if the first computing device reads data to be transmitted from the second computing device, that is, the first computing device obtains the data to be transmitted from the second computing device through a read operation, the task descriptor includes the source address of the data to be transmitted, the length of the data to be transmitted, and the destination address; wherein, the source address indicates the storage location of the data to be transmitted in the second computing device, and the destination address indicates the location where the first computing device writes the data to be transmitted into memory after obtaining the data to be transmitted.

[0078] A transport layer queue (TP queue, TPQ) is used to cache task descriptors. A TPQ ​​is a segment of storage space, and each TPQ has a corresponding TPQ identifier, starting address, and storage capacity. The TPQ identifier uniquely identifies a TPQ and can be a number; for example, a computing device creates M TPQs, numbered 1 to M respectively. The starting address indicates the starting address of a TPQ in memory, and the storage capacity indicates the size of the storage space of a TPQ. In this application, the storage capacities of each TPQ can be the same, partially the same and partially different, or all different; this application does not impose specific limitations.

[0079] It should be noted that the storage capacity of the TPQ can be represented by a depth, and the depth is used to indicate the number of task descriptors that can be stored in a TPQ. Each task descriptor has the same size, and the depths of the plurality of TPQs created by a computing device can be the same, partially the same, partially different, or completely different, which is not limited in the present application. In the present application, the storage capacity of a TPQ is described by the depth.

[0080] Each TP connection corresponds to a TP context (TPC), and the TPC is a storage space. The TPC is used to record the state of the corresponding TP connection, such as whether the current TP connection is working normally. If a TP connection is associated with a TPQ, the configuration information of the TPQ associated with the TP connection is also recorded in the TPC, such as the starting address and storage capacity of the TPQ. If each TPQ corresponds to a TPQ identifier, the configuration information of the TPQ also includes the TPQ identifier.

[0081] In a network based on a unified bus (UB) protocol, one or more TP connections need to be established between two computing devices that communicate with each other. A computing device can communicate with multiple computing devices, so a computing device can establish TP connections with multiple computing devices, and each TP connection needs to create a corresponding TPQ. If a computing device establishes a large number of TP connections with other computing devices, the TPQs in the computing device will occupy a large amount of storage resources of the computing device. As the number of computing devices in the network increases, the number of TP connections will also increase, and the storage resources occupied by the TPQs will also increase.

[0082] For example, if the network includes 10,000 computing devices, a TP is established between any two computing devices, each TP includes 8 TP connections, the size of a task descriptor is 64 bytes (B), and a TPQ is set to store 256 task descriptors. The storage space occupied by the TPQ created in a computing device is: 64B x 256 x 10000 x 8 = 1.22 gigabytes (GB).

[0083] To address the aforementioned issues, this application provides a queue sharing method. By constructing a shared TPQ resource pool, each TPQ in the pool is not permanently associated with a single TP connection. When a computing device needs to communicate with other computing devices through a TP connection to complete a task, it requests one or more TPQs for that TP connection, i.e., associating these one or more TPQs with that TP. After the task is completed, the computing device can release these one or more TPQs back to the shared pool, allowing other TP connections to use them. Once the communication task indicated by the task descriptor in a TPQ associated with a TP connection is executed, the TPQ associated with that TP connection is released. This avoids a TP connection occupying TPQ resources when not executing tasks, preventing TPQs from consuming excessive storage resources and improving storage resource utilization.

[0084] like Figure 1 As shown, Figure 1 This is a schematic diagram of a network architecture provided in this application. The data processing method provided in this application can be applied to... Figure 1 The network architecture shown. Figure 1 The network includes multiple computing devices and multiple switching devices, and the network topology between the computing devices and switching devices is a fat-tree structure. The computing devices can be hosts, servers, blades in blade servers, etc. When the computing device is a server, the aforementioned switching device can be a switch; when the computing device is a blade in a blade server, the switching device can be an interconnect module in the blade server. This application does not impose specific limitations.

[0085] It should be noted that the above network topology is only an example. The method provided in this application can also be applied to network architectures with other topologies, including but not limited to traditional three-layer network topologies, spine-leaf topologies, butterfly topologies, star topologies, ring topologies, etc. This application does not make any specific limitations.

[0086] The data processing method provided in this application is described below, such as... Figure 2 As shown, Figure 2 This is a flowchart illustrating a data processing method provided in this application. The data processing method includes the following steps S201 to S207.

[0087] S201. The first computing device generates a data transmission command.

[0088] In this application, the first computing device can be any computing device in the network. N TP connections are established between the first computing device and other computing devices in the network. One or more TP connections are established between the first computing device and the second computing device. The first and second computing devices exchange data through these established TP connections. When the first computing device needs to exchange data with the second computing device, it generates a data transmission command.

[0089] Where N is a positive integer greater than or equal to 2, the data transmission command includes the address information of the first data, which refers to the data that the data transmission command indicates needs to be transmitted between the first computing device and the second computing device. The first data can be data needed by the second computing device stored in the first computing device, or data needed by the first computing device stored in the second computing device. The address information of the first data includes an address and a length. If the first data is stored in contiguous storage space, the address information of the first data includes one address and one length; if the first data is not stored in contiguous storage space, the address information of the first data includes multiple addresses and multiple lengths, with one address corresponding to one length. In this application, an address and the length corresponding to that address are referred to as a set of addresses and lengths, and a set of addresses and lengths indicates a segment of data stored in contiguous addresses in the first data.

[0090] In this application, the data transmission command includes the following three forms:

[0091] (1) The data transmission command is the send command.

[0092] If the data transfer command is a send command, then the data transfer command is used to instruct the first computing device to send data to the second computing device. The aforementioned first data is stored in the first computing device, and the address in the aforementioned address information includes the source address, which is used to indicate the storage location of the first data in the first host.

[0093] (2) Data transfer commands are write operation commands.

[0094] If the data transfer command is a write operation command, then the data transfer command is used to instruct the first computing device to write data to the second computing device. The aforementioned first data is stored in the first computing device, and the address information includes a source address and a destination address. The source address indicates the storage location of the first data in the first computing device, and the destination address indicates the location where the first data is written when it is written to the memory of the second computing device.

[0095] (3) The data transfer command is a read operation command.

[0096] If the data transmission command is a read operation command, i.e., the data transmission command is used to instruct the first computing device to read data from the second computing device into the first computing device. The first data is stored in the second computing device, and the address in the address information includes a source address and a destination address, the source address is used to indicate the storage location of the first data in the second computing device, and the destination address is used to indicate the location to which the first computing device writes the first data after obtaining the first data.

[0097] In a possible implementation, one or more processes run in the first computing device and the second computing device, and the processes of the first computing device and the second computing device interact with each other through one or more TP connections between the first computing device and the second computing device. The data transmission command is generated when the first process in the first computing device needs to interact with the second process in the second computing device. The first process issues the data transmission command to the transaction layer after generating the data transmission command.

[0098] S202. The first computing device generates one or more task descriptors according to the data transmission command.

[0099] The data transmission command includes address information of the first data, and the address information can include multiple sets of addresses and lengths. Since the size of a task descriptor is limited, the number of addresses and lengths that can be carried by a task descriptor is limited. The first computing device divides the data transmission command into one or more task descriptors according to the size of a task descriptor and the size of each set of addresses and lengths. For example, the size of the multiple sets of addresses and lengths included in the data transmission command is 1 megabyte (MB), but the size of a task descriptor is 4 kilobytes (KB), and the first computing device generates 256 task descriptors according to the data transmission command.

[0100] Each task descriptor includes at least one set of addresses and lengths in the data transmission command. The data indicated by the set of addresses and lengths in the task descriptor is referred to as to-be-transmitted data. For the convenience of description, an example in which a task descriptor includes a set of addresses and lengths is taken, i.e., a task descriptor includes addresses and lengths of to-be-transmitted data.

[0101] If the data transmission command is a write operation command, the address of the data to be transmitted includes a source address and a destination address, the source address is used to indicate the storage location of the data to be transmitted in the first computing device, and the destination address is used to indicate the location where the data to be transmitted is written when the data to be transmitted is written to the second computing device. If the data transmission command is a send command, the address of the data to be transmitted includes a source address, which is used to indicate the storage location of the data to be transmitted in the first computing device. If the data transmission command is a read operation command, the address of the data to be transmitted includes a source address and a destination address, the source address is used to indicate the storage location of the data to be transmitted in the second computing device, and the destination address is used to indicate the location where the data to be transmitted is written after the first computing device obtains the data to be transmitted.

[0102] In a possible implementation, a plurality of processes run in the first computing device, to ensure that the plurality of processes in the first computing device can timely interact with processes in other computing devices, for a first process in the first computing device, if the amount of data to be transmitted by the first process is large, the data to be transmitted by the first process is subjected to a slicing operation, the data to be transmitted by the first process is divided into a plurality of slices, and the amount of data in each slice is less than the data amount threshold, after the first process completes transmission of the data amount of one slice, the data transmission of the first process is suspended until other processes that currently need to transmit data also complete transmission of the data amount of one slice, and then the data transmission corresponding to the first process is performed.

[0103] For example, if only two TP links are established between the first computing device and the second computing device, but five pairs of processes between the first computing device and the second computing device need to transmit data, and the amount of first data to be transmitted between the first process of the first computing device and the second process of the second computing device is greater than the data amount threshold, the first data is divided into a plurality of slices, and after the first process completes transmission of the data corresponding to one slice through one TP connection, the first process will temporarily stop using the TP connection for data transmission, and the first computing device will use the TP connection to transmit data to be transmitted by other processes.

[0104] In this application, after the first process generates the data transmission command, the data transmission command is issued to the transaction layer, and the transaction layer performs the slicing operation and generates one or more task descriptors according to the data transmission command.

[0105] S203. The first computing device determines that the communication task indicated by the one or more task descriptors is completed through the first TP connection, judges whether the first TP connection is associated with a TPQ; if the first TP connection is not associated with a TPQ, S204 is performed; if the first TP connection is associated with a first TPQ, S205 is performed.

[0106] After obtaining the one or more task descriptors, the first computing device needs to cache the one or more task descriptors to one or more TPQs, so that a device such as a network card obtains the task descriptor from the TPQ and performs the corresponding communication task according to the task descriptor. In this application, each task descriptor also includes the IP address of the target computing device (i.e. the second computing device) and the process number of the target process (i.e. the second process). The first computing device first determines that the task descriptor indicates a communication task between the first computing device and the second computing device according to the IP address in the task descriptor, determines one or more TP connections established between the first computing device and the second computing device, and then selects a TP connection from the one or more TP connections established between the first computing device and the second computing device for implementing the communication task between the first process and the second process. This application takes the first TP connection for implementing the communication task between the first process and the second process as an example for introduction.

[0107] In this application, after the first computing device determines to implement the communication task between the first process and the second process through the first TP connection, the first computing device obtains the first TPC corresponding to the first TP connection. If the configuration information of the TPQ is recorded in the first TPC, it indicates that the first TP connection has been associated with the TPQ. If there is no configuration information of the TPQ in the first TPC, it indicates that the first TP connection is not associated with the TPQ.

[0108] S204. The first computing device establishes an association relationship between the first TP connection and the first TPQ, and caches the one or more task descriptors to the first TPQ.

[0109] In this application, if the first TP connection is not associated with the TPQ, the first computing device can cache the one or more task descriptors to the TPQ in two ways, which are introduced below.

[0110] (1) When the first computing device and other computing devices establish N TP connections, the first computing device creates M TPQs

[0111] When the first computing device and other computing devices establish N TP connections, the first computing device creates M TPQs. Among them, M is less than N, each TPQ corresponds to a TPQ identifier, a start address and a depth, and the depths of the M TPQs can be the same, partially the same, partially different, or all different, which is not limited in this application.

[0112] If the first TP connection is not associated with a TPQ, the first computing device first acquires a TPQ currently in an idle state and a required capacity, wherein the TPQ in the idle state refers to a TPQ not associated with a TP connection, and the required capacity refers to a storage space size required for caching the one or more task descriptors; then determines a TPQ with a storage capacity greater than or equal to the required capacity, for example, a first TPQ, according to the storage capacities of the TPQs in the idle state and the required capacity; writes configuration information of the first TPQ into the first TPC; and finally caches the one or more task descriptors into the first TPQ.

[0113] Optionally, if each TP connection can be associated with one or more TPQs. If the first TP connection is not associated with a TPQ, the first computing device selects one or more TPQs in an idle state from the TPQs currently in the idle state, and the storage capacities of the one or more TPQs in the idle state are greater than or equal to the required capacity; then writes configuration information of the one or more TPQs in the idle state into the first TPC; and finally caches the one or more task descriptors into the one or more TPQs in the idle state.

[0114] (2) When the first computing device and the other computing devices establish N TP connections, the first computing device does not create a TPQ

[0115] When the first computing device and the other computing devices establish N TP connections, the first computing device does not create a TPQ, but creates a shared TPQ pool in the memory. When the first TP connection needs to use a TPQ to cache a task descriptor, the first computing device first creates a new TPQ, for example, a first TPQ, in the shared TPQ pool according to a required capacity of the one or more task descriptors, the storage capacity of the first TPQ is greater than or equal to the required capacity, and the first TPQ is configured with a TPQ identifier; then writes configuration information of the first TPQ into the first TPC; and finally caches the one or more task descriptors into the newly created first TPQ.

[0116] S205. The first computing device caches the one or more task descriptors into the first TPQ.

[0117] In this application, if the first TP connection is associated with a TPQ, the process of the first computing device caching the one or more task descriptors into the TPQ includes the following two cases:

[0118] (1) The first TP connection is already associated with a first TPQ, and the storage capacity of the first TPQ is greater than or equal to the required capacity

[0119] If the first TP connection has associated the first TPQ, and the storage capacity of the first TPQ is greater than or equal to the demand capacity, i.e. the depth of the first TPQ is greater than or equal to the number of the one or more task descriptors, the first computing device caches the one or more task descriptors into the first TPQ according to the start address of the first TPQ recorded in the first TPC. The first TPQ belongs to the N TPQs.

[0120] Optionally, each TP connection can be associated with one or more TPQs. If the first TP connection has associated one or more TPQs, and the sum of the depths of the one or more TPQs is greater than or equal to the number of the one or more task descriptors, the one or more task descriptors are cached into the TPQs associated with the first TP connection. The one or more TPQs associated with the first TP connection belong to the N TPQs.

[0121] (2) The storage capacity of the TPQ associated with the first TP connection is less than the demand capacity

[0122] If the first TP connection has associated a TPQ, for example, the first TP connection is currently associated with a second TPQ, but the storage capacity of the second TPQ is less than the demand capacity, i.e. the depth of the second TPQ is less than the number of the one or more task descriptors, the first computing device can release the second TPQ, i.e. disassociate the first TP connection from the second TPQ, and delete the configuration information of the second TPQ recorded in the first TPC, wherein the configuration information of the second TPQ includes TPQ identifier, start address and depth.

[0123] If the first computing device and other computing devices establish N TP connections, and the first computing device creates M TPQs, the first computing device obtains the TPQ currently in an idle state and the demand capacity; then determines a TPQ with a storage capacity greater than or equal to the demand capacity, for example, a first TPQ, according to the storage capacities of the TPQs in the idle state and the demand capacity; writes the configuration information of the first TPQ into the first TPC; and finally caches the one or more task descriptors into the first TPQ.

[0124] Optionally, if each TP connection can be associated with one or more TPQs. If the first TP connection has associated TPQs, but the sum of the depths of the TPQs associated with the first TP connection is less than the number of the one or more task descriptors, the first computing device can select one or more idle TPQs from the idle TPQs currently in the idle state, so that the sum of the depths of the TPQs associated with the first TP is greater than or equal to the number of the one or more task descriptors; then write the configuration information of the one or more idle TPQs to the first TPC; and cache the one or more task descriptors in the one or more TPQs associated with the first TP connection.

[0125] If the first computing device does not create a TPQ when establishing N TP connections with other computing devices, but creates a shared TPQ pool in memory, the first computing device first creates a new TPQ, for example, a first TPQ, in the shared TPQ pool according to the required capacity of the one or more task descriptors, the storage capacity of the first TPQ is greater than or equal to the required capacity, and configures a TPQ identifier for the first TPQ; then write the configuration information of the first TPQ to the first TPC; and cache the one or more task descriptors in the newly created first TPQ.

[0126] It should be noted that the TPQ created by the first computing device includes a transmit TPQ (TX TPQ) and a receive TPQ (RX TPQ). The N TPQs described above refer to TX TPQs, which are used to cache task descriptors, and RX TPQs, which are used to cache completion information. Details of the completion information are described later.

[0127] In this application, after the transaction layer performs the slicing operation according to the data transmission command and generates one or more task descriptors, the transaction layer sends the generated one or more task descriptors to the transport layer, and the transport layer performs the operations described in S203-S205. It should be understood that the transaction layer and the transport layer each have a corresponding hardware unit for implementing the functions of the transaction layer and the transport layer.

[0128] S206. The first computing device performs a communication task between the first computing device and the second computing device according to the task descriptor in the TPQ.

[0129] After the first computing device caches one or more task descriptors in the TPQ, for example, in the first TPQ described above, the first computing device performs a communication task corresponding to each task descriptor according to the one or more task descriptors cached in the first TPQ, to complete the data interaction between the first process and the second process.

[0130] Since the data transmission command includes three forms, the following three cases are included when performing data interaction between the first process and the second process:

[0131] (1) The data transmission command is a send command

[0132] If the data transmission command is a send command, each task descriptor includes a source address of the data to be transmitted, a length of the data to be transmitted, an address of the second computing device, a process number of the second process, and the like. The network card of the first computing device reads a source address of the data to be transmitted and a length of the data to be transmitted from the first TPQ, acquires a copy of the data to be transmitted from the memory of the first computing device according to the read source address of the data to be transmitted and the length of the data to be transmitted, generates one or more packets according to the data to be transmitted, the address of the second computing device, the process number of the second process, and the like, and then sends the packets carrying the data to be transmitted to the second computing device. The network card of the first computing device reads a source address of the data to be transmitted and a length of the data to be transmitted from the first TPQ each time, and then generates one or more packets according to the above method and sends the packets to the second computing device until the communication task corresponding to the one or more task descriptors is executed.

[0133] It should be understood that if the length of the data to be transmitted is greater than a maximum transmission unit (MTU), the data to be transmitted is sent to the second computing device through multiple packets.

[0134] (2) The data transmission command is a write operation command

[0135] If the data transmission command is a write operation command, each task descriptor includes a source address of the data to be transmitted, a destination address of the data to be transmitted, a length of the data to be transmitted, an address of the second computing device, a process number of the second process, and the like. The network card of the first computing device reads a source address of the data to be transmitted, a destination address of the data to be transmitted, and a length of the data to be transmitted from the first TPQ, acquires a copy of the data to be transmitted from the memory of the first computing device according to the read source address of the data to be transmitted and the length of the data to be transmitted, generates one or more packets according to the data to be transmitted, the destination address of the data to be transmitted, the address of the second computing device, the process number of the second process, and the like, and then sends the packets carrying the data to be transmitted to the second computing device. The network card of the first computing device reads a source address of the data to be transmitted, a destination address of the data to be transmitted, and a length of the data to be transmitted from the first TPQ each time, and then generates one or more packets according to the above method and sends the packets to the second computing device until the communication task corresponding to the one or more task descriptors is executed.

[0136] (3) the data transfer command is a read operation command

[0137] If the data transfer command is a read operation command, each task descriptor includes a source address of the data to be transferred, a destination address of the data to be transferred, a length of the data to be transferred, an address of the second computing device, and the like. The network card of the first computing device reads a task descriptor from the first TPQ, and then generates a read request according to the source address of the data to be transferred, the length of the data to be transferred, and the address of the second computing device, and sends the read request to the second computing device. The network card of the second computing device acquires the data to be transferred from the memory of the second computing device according to the source address of the data to be transferred and the length of the data to be transferred, and then encapsulates the data to be transferred into a packet and sends the packet to the first computing device. After receiving the data to be transferred, the first computing device writes the data to be transferred into a position indicated by the destination address of the data to be transferred.

[0138] S207. The first computing device determines that the task descriptors in the TPQ associated with the first TP connection are executed, and releases the TPQ associated with the first TP connection.

[0139] After the network card of the first computing device reads all the task descriptors from the first TPQ and executes them, the first computing device releases the first TPQ. That is, the first computing device releases the association between the first TP connection and the first TPQ, and deletes the configuration information of the first TPQ recorded in the first TPC. If the first TP connection is associated with multiple TPQs, the first computing device deletes the configuration information of the multiple TPQs recorded in the first TPC.

[0140] In a possible implementation, if the first computing device creates M TPQs when creating N TP connections, the first computing device can acquire a first number of TPQs currently in an idle state at a first period, and if the first number is less than a first threshold, the first computing device acquires a TPQ currently associated with a TP connection but without a cached task descriptor, and the first computing device releases the TPQ associated with the TP connection but without the cached task descriptor. For example, the first computing device polls a TPC corresponding to each TP connection, and for any TPC, for example, the first TPC, if the first TPC records a TPQ identifier, the TPQ identifier indicates the first TPQ, the first computing device determines whether the first TPQ caches a task descriptor, if the first TPQ does not cache the task descriptor, the first computing device releases the first TPQ and deletes the configuration information of the first TPQ in the first TPC, and if the first TPQ caches the task descriptor, the first computing device does not release the first TPQ. If the first number is greater than or equal to the first threshold, even if there is a TPQ currently associated with a TP connection but without a cached task descriptor, the TPQ does not need to be released.

[0141] If the first computing device does not create a TPQ when creating N TP connections, but creates a shared TPQ pool in memory, when a TP connection needs to use a TPQ to store a task descriptor, the first computing device creates a new TPQ in the shared TPQ pool according to the required capacity of the task descriptor to be cached, and uses the new TPQ to cache the task descriptor. Then, when the task descriptors in the TPQ associated with the TP connection are all executed, the first computing device releases the TPQ associated with the TP connection, and releases the space occupied by the TPQ associated with the TP connection to the shared TPQ pool. Alternatively, when the size of the remaining storage space in the shared TPQ pool is less than the capacity threshold, the space occupied by the TPQ associated with the TP connection is released.

[0142] In a possible implementation, if there is no task descriptor cached in the TPQ associated with a TP connection, and no new task descriptor is cached in the TPQ within a first time length, the TPQ associated with the TP connection is released, that is, the configuration information of the TPQ in the TPC corresponding to the TP connection is deleted.

[0143] It should be noted that the above is an example of implementing a communication task between the first process and the second process through the first TP connection, and introduces the communication process between the first process and the second process. In this application, the first process and the second process can also complete the above communication task through multiple TP connections established between the first computing device and the second computing device. If the first process and the second process complete the above communication task through multiple TP connections established between the first computing device and the second computing device, the first computing device generates multiple task descriptors according to the data transmission command, and caches the multiple task descriptors in the TPQs associated with the multiple TP connections. The process of each of the multiple TP connections to implement communication between the first process and the second process can refer to the process of implementing communication between the first process and the second process through the first TP connection, and will not be described here.

[0144] It should be understood that if the first TP connection is not associated with a TPQ, and there is no available TPQ at present, or the first TP connection is associated with a TPQ, but the storage capacity of the associated TPQ is less than the required capacity, and there is no available TPQ at present, the first computing device will temporarily cache the one or more task descriptors in the storage space corresponding to the transaction layer, and wait to be reissued to the transport layer. Wherein, the available TPQ refers to a TPQ that is not associated with a TP connection and has a storage capacity greater than or equal to the required capacity. For example, the transaction layer includes a queue for caching task descriptors that need to be issued to the transport layer, and if one or more task descriptors that have been issued to the transport layer do not have an available TPQ, the one or more task descriptors are cached at the tail of the queue, and wait to be reissued to the transport layer.

[0145] The above is an example of the first computing device sending a message carrying data to be transmitted to the second computing device or the first computing device sending a read request to the second computing device, and introduces the data processing method based on the shared TPQ queue provided by the application. In the present application, the first computing device can also receive data sent by other computing devices based on the shared TPQ. As shown in Figure 3 Figure 3 is a flow diagram of another data processing method provided by the application.

[0146] S301. The first computing device receives a first message sent by the third computing device through the second TP connection.

[0147] The first computing device and the third computing device have established one or more TP connections. If the third process in the third computing device needs to send data to the first process in the first computing device, the third computing device can send multiple messages to the first computing device through the one or more TP connections. Wherein the one or more TP connections include the second TP connection, the method for the third process of the third computing device to send data to the first process of the first computing device can refer to the method for the first process in the first computing device to send first data to the second process in the second computing device, which will not be described here.

[0148] Since the first computing device and the third computing device have established one or more TP connections, the third computing device can send multiple messages to the first computing device through the one or more TP connections. If the third computing device sends multiple messages to the first computing device through multiple TP connections, the multiple messages may be out of order to the first computing device.

[0149] S302. The first computing device determines whether the second TP connection is associated with an RX TPQ. If the second TP connection is associated with an RX TPQ, S303 is performed, and if the second TP connection is not associated with an RX TPQ, S304 is performed.

[0150] In the present application, if the transport layer needs to report in order after receiving multiple messages and writing the data to be written in the multiple messages into the corresponding storage space to the first process, the transport layer will generate the completion information corresponding to the message after receiving a message and writing the data to be written in the message into the corresponding storage space. The completion information needs to be cached in the RX TPQ. Therefore, the first computing device needs to determine whether the second TP connection is associated with an RX TPQ after receiving the message through the second TP connection. Wherein the completion information includes a first indication message indicating whether the data to be written has been written into the target storage space, and a second indication message indicating whether to report in order.

[0151] ​The in-order reporting refers to that the transport layer reports to the first process whether each message is successfully received according to the sending order of the received messages. The successful reception refers to that the data in the message has been written into the corresponding storage space.

[0152] For example, the third process of the third computing device sends the first message, the second message and the third message to the first process of the first computing device in sequence, but the third computing device does not receive the first message, the second message and the third message in sequence. For example, the transport layer of the first computing device receives the third message, the first message and the second message in sequence. After successfully receiving the third message, the transport layer does not report to the first process that the third message has been successfully received, but reports to the first process that the third message has been successfully received after successfully receiving the first message and reporting, and successfully receiving the second message and reporting.

[0153] The first computing device receives the message sent by the third computing device through the second TP connection. The first computing device determines whether the second TP connection is associated with a TPQ according to the information in the second TPC corresponding to the second TP connection. If the second TPC includes the identifier of the RX TPQ, it is determined that the second TPQ is associated with the RX TPQ. If the second TPC does not include the identifier of the RX TPQ, it is determined that the second TPQ is not associated with the RX TPQ.

[0154] S303. The first computing device writes the to-be-written data carried in the first message into the corresponding storage space, and generates the first completion information. The completion information is cached to the third TPQ.

[0155] The first computing device determines that the second TP connection has been associated with the RX TPQ. Then, the first computing device parses the received first message to obtain the to-be-written data carried in the first message, writes the to-be-written data into the corresponding storage space, and then generates the first completion information corresponding to the first message. The first completion information is cached to the third TPQ associated with the second TP connection, wherein the third TPQ belongs to the RX TPQ. The first completion message is used to indicate the first indication message indicating whether the to-be-written data in the first message has been written into the target storage space, and the second indication message indicating whether in-order reporting is required.

[0156] In this application, the first indication information and the second indication information can each include one bit. For example, when the one bit included in the first indication information is 1, it indicates that the data in the message has been successfully written into the storage space. When the one bit included in the first indication information is 0, it indicates that the data in the message fails to be written into the storage space. When the one bit included in the second indication information is 1, it indicates that in-order reporting is required. When the one bit included in the second indication information is 0, it indicates that in-order reporting is not required.

[0157] S304. The first computing device establishes an association between the second TP connection and the third TPQ, writes the data to be written carried in the first message into a corresponding storage space, and generates first completion information, and caches the completion information to the third TPQ.

[0158] In the present application, if the second TP connection is not associated with an RX TPQ, the first computing device can cache the above-mentioned first completion information to the RX TPQ in two ways, which will be introduced below.

[0159] (1) When the first computing device and other computing devices establish N TP connections, the first computing device creates K RX TPQs

[0160] When the first computing device establishes N TP connections with other computing devices, the first computing device creates K RX TPQs for caching completion information. After the first computing device receives a message through a TP connection, if the TP connection is not associated with an RX TPQ, the first computing device first configures an RX TPQ in an idle state for the TP connection, writes the configuration information of the RX TPQ into the TPC corresponding to the TP connection, then parses the message to obtain the data to be written carried by the message, writes the data to be written into the storage space, generates the completion information corresponding to the message, and finally caches the completion information corresponding to the message to the RX TPQ. The RX TPQ in an idle state refers to an RX TPQ that does not cache completion information and is not associated with a TP connection. If there is no RX TPQ in an idle state, the message is discarded.

[0161] For example, the first computing device receives a first message sent by the third computing device through the second TP connection, and after determining that the second TP connection is not associated with an RX TPQ, the first computing device selects a third TPQ in an idle state from the TPQs in an idle state, writes the configuration information of the third TPQ into the second TPC corresponding to the second TP connection, then parses the first message to obtain the data to be written and writes it into the storage space, generates the first completion information corresponding to the first message, and finally caches the first completion information to the third TPQ.

[0162] (2) When the first computing device and other computing devices establish N TP connections, the first computing device does not create TPQ

[0163] If the first computing device does not create RX TPQs when creating N TP connections, but creates a shared TPQ pool in memory, the first computing device creates a new RX TPQ in the shared TPQ pool for buffering completion information when a TP connection needs to use the RX TPQ buffer to complete information. For example, an RX TPQ is created, and the RX TPQ is configured with a TPQ identifier; then the configuration information of the RX TPQ is written to the TPC corresponding to the TP connection; the message is parsed to obtain the data to be written, the data to be written is written to the storage space, and the completion information corresponding to the message is generated, and finally the completion information corresponding to the message is buffered to the RX TPQ.

[0164] For example, the first computing device receives a first message through a second TP connection, and after determining that the second TP connection is not associated with an RX TPQ, the first computing device creates a third TPQ in the shared TPQ pool, and writes the configuration information of the third TPQ to the second TPC corresponding to the second TP connection; then the first message is parsed to obtain the data to be written and written to the storage space, and the first completion information corresponding to the first message is generated, and finally the first completion information is buffered to the third TPQ.

[0165] In this application, if the first computing device creates K RX TPQs for buffering completion information when establishing N TP connections, the first computing device can obtain a second number of RX TPQs currently in an idle state at a second period, and if the second number is less than a second threshold, the first computing device obtains RX TPQs currently associated with TP connections but without buffering completion information, and the first computing device releases the RX TPQs associated with TP connections but without buffering completion information. If the RX TPQs have buffered completion information, the RX TPQs are not released. If the second number is greater than or equal to the second threshold, even if there are RX TPQs currently associated with TP connections but without buffering completion information, these RX TPQs do not need to be released.

[0166] If the first computing device does not create RX TPQs when creating N TP connections, but creates a shared TPQ pool in memory, the first computing device creates a new RX TPQ in the shared TPQ pool for buffering completion information when a TP connection needs to use the RX TPQ buffer to complete information. When the completion information in the RX TPQ associated with a TP connection is processed, the first computing device releases the RX TPQ associated with the TP connection, and the space occupied by the RX TPQ associated with the TP connection is released to the shared TPQ pool.

[0167] In the present application, the transport layer will query whether there is corresponding completion information in the RX TPQ according to the sending order of the message in the case of needing to report in order, and if so, report to the first process that it has been successfully received. For example, the third process of the third computing device sends the first message, the second message and the third message to the first process of the first computing device in turn, but the third computing device does not receive the first message, the second message and the third message in turn, for example, the transport layer of the first computing device receives the third message, the first message and the second message in turn, and after successfully receiving the third message and generating the third completion information, the transport layer will not report to the first process that the third message has been successfully received, but will cache the third completion information in the third TPQ. After successfully receiving the first message and generating the first completion information, the first completion information is cached in the third TPQ, and after successfully receiving the second message and generating the second completion information, the second completion information is cached in the third TPQ.

[0168] When the transport layer of the first computing device reports in order, according to the sending order of the message, the first completion information corresponding to the first message is queried in the third TPQ, if there is no first completion information in the third TPQ, but there is third completion information, the transport layer will not report to the first process that the third message is successfully received, until the first completion information corresponding to the first message is queried, the transport layer reports to the first process that the first message is successfully received; then the second completion information corresponding to the second message is queried in the third TPQ, if there is no second completion information in the third TPQ, but there is third completion information, the transport layer will not report to the first process that the third message is successfully received, until the second completion information corresponding to the second message is queried, the transport layer reports to the first process that the second message is successfully received; and then the third completion information corresponding to the third message is queried in the third TPQ, if there is third completion information in the third TPQ, the transport layer reports to the first process that the third message is successfully received.

[0169] For the above method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the action order described. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily necessary for the present application. Based on the above description, other reasonable step combinations that those skilled in the art can think of also belong to the protection scope of the present application.

[0170] The present application also provides a data processing device, as shown in Figure 4 , Figure 4 is a schematic diagram of a data processing device provided by the present application. The data processing device 400 is used to implement the above Figure 2 or Figure 3The method in the method embodiment shown, i.e., for implementing the method implemented by the first computing device, the data processing apparatus 400 comprises an acquisition module 410, a processing module 420 and a queue management module 430.

[0171] The acquisition module 410 is configured to acquire one or more task descriptors, each task descriptor comprising address information of data to be transmitted, the data to be transmitted being data to be transmitted by the first computing device to the second computing device. Wherein, the related description of the task descriptor can be referred to the related description of S201 and S202 in the method embodiment described above, and will not be repeated here.

[0172] The processing module 420 is configured to determine whether the first TP connection is associated with a transport layer queue TPQ, the first TP connection being one of the TP connections established between the first computing device and the second computing device; the processing module determines that the first TP connection is not associated with the TPQ, and sends a first application request to the queue management module, the first application request being used to apply a TPQ to the queue management module. The method for determining whether the first TP connection is associated with the transport layer queue TPQ by the processing module 420 can be referred to the related description in S203 described above, and will not be repeated here.

[0173] The queue management module 430 is configured to return the identifier of the first TPQ to the processing module after receiving the first application request; wherein the first TPQ is one of the one or more TPQs created by the queue management module, or the first TPQ is a TPQ created by the queue management module according to the demand capacity, the demand capacity being the capacity required to cache one or more task descriptors. The method for selecting the first TPQ or creating the first TPQ by the queue management module 430 can be referred to the related description in S204 and S205 described above, and will not be repeated here.

[0174] The processing module 420 is further configured to establish an association relationship between the first TP connection and the first TPQ, and cache one or more task descriptors to the first TPQ.

[0175] In a possible implementation, the processing module 420 is further configured to determine that the first TP connection is associated with a second TPQ, and acquire the storage capacity of the second TPQ; determine that the storage capacity of the second TPQ is less than the demand capacity, and send a second application request to the queue management module 430, the second application request being used to apply a TPQ to the queue management module; the queue management module 430 is configured to return the identifier of the first TPQ to the processing module; wherein the storage capacity of the first TPQ is greater than or equal to the demand capacity, and the idle state TPQ refers to the TPQ not associated with the TP connection. The method for selecting the first TPQ or creating the first TPQ by the queue management module 430 can be referred to the related description in S204 and S205 described above, and will not be repeated here.

[0176] In a possible implementation, the first computing device establishes N TP connections with other computing devices and creates M TPQs, where M is less than N; the first TPQ and the second TPQ belong to the M TPQs. After the queue management module 430 receives the first application request or the second application request, the queue management module 430 obtains a TPQ in an idle state, determines the first TPQ according to the requirement capacity and the storage capacity of each TPQ in the idle state, and returns the identifier of the first TPQ to the processing module; the storage capacity of the first TPQ is greater than or equal to the requirement capacity, and the TPQ in the idle state refers to a TPQ that is not associated with a TP connection; the processing module 420 writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection; each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, and the configuration information includes the start address and the storage capacity of the TPQ.

[0177] In a possible implementation, after the queue management module 430 receives the first application request or the second application request, the queue management module 430 creates the first TPQ according to the requirement capacity of one or more task descriptors, and returns the identifier of the first TPQ to the processing module, where the storage capacity of the first TPQ is greater than or equal to the requirement capacity; the processing module 420 writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection.

[0178] In a possible implementation, after the one or more task descriptors are buffered to the first TPQ, the processing module 420 determines that there is no task descriptor in the first TPQ, and then releases the first TPQ, that is, deletes the configuration information of the first TPQ recorded in the first TPC, and releases the association between the first TP and the first TPQ. For details of the method for releasing the first TPQ by the processing module 420, refer to the related description in S207, which is not described here again.

[0179] The above describes the operation process of the data processing apparatus 400 for implementing the operation of the first computing device when sending data. When the data processing apparatus 400 is used to implement the sending of data, the operations implemented by each module can refer to the related description in the method embodiment described above, which is not described here again. Figure 2

[0180] The above data processing apparatus 400 can also be used to implement the operation of the first computing device when receiving data. When the data processing apparatus 400 is used to implement the receiving of data, the data processing apparatus 400 further includes a receiving module 440, which is configured to receive a first packet sent by a third computing device through a second TP connection, the first packet including to-be-written data, and the second TP connection is one of the TP connections established between the first computing device and the third computing device.

[0181] ​The processing module 420 is configured to determine whether the second TP connection is associated with a TPQ, and send a third application request to the queue management module 430 after determining that the second TPQ is not associated with a TPQ, the third application request being used to apply for an RX TPQ for caching completion information from the queue management module;

[0182] The queue management module 430 is configured to return an identifier of a third TPQ to the processing module 420 after receiving the third application request, wherein the third TPQ is one of one or more TPQs created by the first computing device, or the third TPQ is created by the first computing device after determining that the second TP connection is not associated with a TPQ. The processing module 420 is further configured to establish an association between the second TP connection and the third TPQ, write the to-be-written data in the first message to the storage space, generate first completion information corresponding to the first message, and cache the first completion information to the third TPQ, the first completion information indicating that the to-be-written data in the first message has been written to the storage space.

[0183] In a possible implementation, the first computing device and other computing devices establish N TP connections, and create K TPQs for caching completion information, wherein K is less than N; the third TPQ belongs to the K TPQs; and the queue management module 430 selects the third TPQ from the idle TPQs and returns the identifier of the third TPQ to the processing module after receiving the third application request. The processing module 420 writes the configuration information of the third TPQ to the second TPC corresponding to the second TP connection.

[0184] In a possible implementation, the queue management module 430 creates the third TPQ after receiving the third application request, and returns the identifier of the third TPQ to the processing module; and the processing module 420 is specifically configured to write the configuration information of the third TPQ to the first TPC corresponding to the first TP connection.

[0185] The operations of the modules in the data processing apparatus 400 when receiving data can refer to the related descriptions in the above method embodiments, which will not be repeated here. Figure 3

[0186] It should be understood that Figure 4 The data processing apparatus 400 is only an exemplary division manner, and in actual applications, the data processing apparatus 400 can also have other division manners, which are not limited in the present application.

[0187] The present application also provides a chip, as shown in Figure 5 Figure 5 ​​is a schematic diagram of a chip provided by the present application. The chip 500 includes a processing unit 510 and a storage unit 520, the storage unit 520 is configured to store program instructions, and the processing unit 510 is configured to execute the program instructions to implement the method described above Figure 2 or Figure 3 in the corresponding method implementation. The processing unit 510 includes the data processing apparatus 400 shown in the above Figure 4 .

[0188] The present application also provides a computing device, as shown in Figure 6 , Figure 6 is a schematic diagram of a computing device provided by the present application. The computing device 600 includes a bus 602, a processor 604, a memory 606, a communication interface 608 and a chip 610. The processor 604, the memory 606 and the communication interface 608 communicate through the bus 602. It should be understood that the number of processors and memories in the computing device 600 is not limited by the present application.

[0189] The bus 602 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 only one line is used in the figure, but it does not mean that there is only one bus or one type of bus. The bus 602 can include a path for transmitting information between various components (for example, the memory 606, the processor 604, the communication interface 608, the chip 610) of the computing device 600.

[0190] The processor 604 mentioned above can be a central processing unit (CPU), or it can include a CPU and other hardware chips. The hardware chips can be of various types, such as coprocessor units including graphics processing units (GPUs), tensor processing units (TPUs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or digital signal processors (DSPs). The computing device 600 can include one or more hardware chips of any of the above types, or it can include multiple types of the above hardware chips. This application does not make any specific limitation.

[0191] Memory 606 may include volatile memory, such as random access memory (RAM). Memory 606 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). Memory 606 stores executable program instructions and data, and processor 604 executes the executable program code to implement the business functions of the computing device.

[0192] Chip 610 is as described above Figure 5 The chip 500 shown, and the chip 610 include a processing unit and a storage unit. The storage unit is used to store program instructions, and the processing unit is used to execute the program instructions to implement the above-described functionality. Figure 2 or Figure 3 The methods described in the corresponding implementation will not be repeated here.

[0193] The communication interface 608 can be a wired or wireless interface, used for communicating with other modules or devices. For example, it can receive the aforementioned tracing request, or receive configuration information input by the user through the configuration interface. The wired interface can be an Ethernet interface, a local interconnect network (LIN), etc., while the wireless interface can be a cellular network interface or a wireless LAN interface.

[0194] The present application also provides a computer program product containing instructions. The computer program product can be a software or program product containing instructions, which can be run on a computing device or stored in any available medium. When the computer program product is run on the computing device, the computing device is caused to implement the data processing method in the embodiments shown. Figure 2 or Figure 3 the embodiments shown.

[0195] The present application also provides a computer readable storage medium. The computer readable storage medium can be any available medium that the computing device can store or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium, or a semiconductor medium (for example, a solid state disk), etc. The computer readable storage medium contains instructions, which instruct the computing device to implement the data processing method in the embodiments shown. Figure 2 or Figure 3 the embodiments shown.

[0196] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the protection scope of the technical solutions of the embodiments of the present application.

Claims

1. A data processing method, characterized in that, The method is applied to a network comprising multiple computing devices, wherein one or more transport layer (TP) connections are established between any two computing devices, and the TP connections are used for communication between the two computing devices; the method includes: A first computing device determines that a first TP connection is not associated with a transport layer queue (TPQ), and establishes an association between the first TP connection and the first TPQ. The first TP connection is one of the TP connections established between the first computing device and the second computing device, and the first computing device and the second computing device belong to the plurality of computing devices. The first TPQ is one of one or more TPQs already created by the first computing device, or the first TPQ is a TPQ created by the first computing device based on required capacity, where required capacity is the capacity needed by the first computing device to cache one or more task descriptors. Each task descriptor includes address information of data to be transmitted, and the data to be transmitted is data that the first computing device wants to transmit to the second computing device. The first computing device caches the one or more task descriptors in the first TPQ; After the first computing device determines that the task descriptor in the first TPQ has been executed, it releases the first TPQ associated with the first TP connection.

2. The method according to claim 1, characterized in that, The method further includes: The first computing device determines that the first TP connection is associated with the second TPQ and obtains the storage capacity of the second TPQ; The first computing device determines that the storage capacity of the second TPQ is less than the required capacity. The first computing device establishes an association between the first TP connection and the first TPQ, and caches the one or more task descriptors in the first TPQ.

3. The method according to claim 2, characterized in that, Before the first computing device establishes the association between the first TP connection and the first TPQ, it further includes: The first computing device deletes the configuration information of the second TPQ recorded in the first transport layer context (TPC) corresponding to the first TP connection; wherein, each TP connection is associated with a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity of the TPQ.

4. The method according to claim 2 or 3, characterized in that, The first computing device establishes N TP connections with other computing devices and creates M TPQs, where M is less than N; the first TPQ and the second TPQ belong to the M TPQs. Establishing the association between the first TP connection and the first TPQ includes: The first computing device acquires idle TPQs and determines the first TPQ based on the required capacity and the storage capacity of each idle TPQ; wherein, the storage capacity of the first TPQ is greater than or equal to the required capacity, and the idle TPQ refers to a TPQ without associated TP connection; The first computing device writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection; wherein, each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity of the TPQ.

5. The method according to any one of claims 1-3, characterized in that, Establishing the association between the first TP connection and the first TPQ includes: The first computing device creates the first TPQ according to the required capacity of the one or more task descriptors, and writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection; wherein, each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity.

6. The method according to claim 4, characterized in that, After the first computing device determines that the task descriptor in the first TPQ has been executed, it releases the first TPQ associated with the first TP connection, including: The first computing device determines that there is no task descriptor in the first TPQ and deletes the configuration information of the first TPQ recorded in the first TPC.

7. The method according to claim 4, characterized in that, After the first computing device determines that the task descriptor in the first TPQ has been executed, it releases the first TPQ associated with the first TP connection, including: The first computing device determines that there is no task descriptor in the first TPQ and the first number of TPQs currently in an idle state is less than a first threshold, and deletes the configuration information of the first TPQ recorded in the first TPC.

8. The method according to claim 4, characterized in that, After the first computing device determines that the task descriptor in the first TPQ has been executed, it releases the first TPQ associated with the first TP connection, including: The first computing device determines that there is no task descriptor in the first TPQ and that the first TPQ has not cached any new task descriptors within a first time period, and deletes the configuration information of the first TPQ recorded in the first TPC.

9. A data processing method, characterized in that, The method is applied to a network comprising multiple computing devices, wherein one or more transport layer (TP) connections are established between any two computing devices, and the TP connections are used for communication between the two computing devices; the method includes: The first computing device determines that the first TP connection is associated with the second transport layer queue TPQ, and obtains the storage capacity of the second TPQ, wherein the first TP connection is one of the TP connections established between the first computing device and the second computing device, and the first computing device and the second computing device belong to the plurality of computing devices; The first computing device determines that the storage capacity of the second TPQ is less than the required capacity, and establishes an association between the first TP connection and the first TPQ; wherein, the first TPQ is one of one or more TPQs created by the first computing device, or the first TPQ is a TPQ created by the first computing device according to the required capacity, wherein the required capacity is the capacity required by the first computing device to cache one or more task descriptors, each task descriptor includes address information of data to be transmitted, wherein the data to be transmitted is the data to be transmitted by the first computing device to the second computing device; The first computing device caches the one or more task descriptors in the first TPQ; After the first computing device determines that the task descriptor in the first TPQ has been executed, it releases the first TPQ associated with the first TP connection.

10. The method according to claim 9, characterized in that, The first computing device establishes N TP connections with other computing devices and creates M TPQs, where M is less than N; the first TPQ and the second TPQ belong to the M TPQs. Establishing the association between the first TP connection and the first TPQ includes: The first computing device acquires idle TPQs and determines the first TPQ based on the required capacity and the storage capacity of each idle TPQ; wherein, the storage capacity of the first TPQ is greater than or equal to the required capacity, and the idle TPQ refers to a TPQ without associated TP connection; The first computing device writes the configuration information of the first TPQ into the first transport layer context (TPC) corresponding to the first TP connection; wherein, each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity.

11. The method according to claim 9, characterized in that, Establishing the association between the first TP connection and the first TPQ includes: The first computing device creates the first TPQ according to the required capacity of the one or more task descriptors, and writes the configuration information of the first TPQ into the first TPC corresponding to the first TP connection; wherein, each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity.

12. The method according to claim 10 or 11, characterized in that, Before establishing the association between the first TP connection and the first TPQ, the method further includes: The first computing device deletes the configuration information of the second TPQ recorded in the first TPC.

13. The method according to claim 10 or 11, characterized in that, After the first computing device determines that the task descriptor in the first TPQ has been executed, it releases the first TPQ associated with the first TP connection, including: The first computing device determines that there is no task descriptor in the first TPQ and deletes the configuration information of the first TPQ recorded in the first TPC.

14. The method according to claim 10 or 11, characterized in that, After the first computing device determines that the task descriptor in the first TPQ has been executed, it releases the first TPQ associated with the first TP connection, including: The first computing device determines that there is no task descriptor in the first TPQ and the first number of TPQs currently in an idle state is less than a first threshold, and deletes the configuration information of the first TPQ recorded in the first TPC; wherein, the idle TPQ refers to a TPQ without an associated TP connection.

15. The method according to claim 10 or 11, characterized in that, After the first computing device determines that the task descriptor in the first TPQ has been executed, it releases the first TPQ associated with the first TP connection, including: The first computing device determines that there is no task descriptor in the first TPQ and that the first TPQ has not cached any new task descriptors within a first time period, and deletes the configuration information of the first TPQ recorded in the first TPC.

16. A data processing method, characterized in that, The method is applied to a network comprising multiple computing devices, wherein one or more transport layer (TP) connections are established between any two computing devices, and the TP connections are used for communication between the two computing devices; the method includes: The first computing device receives a first message sent by the third computing device through the second TP connection. The first message includes data to be written. The second TP connection is one of the TP connections established between the first computing device and the third computing device. The first computing device determines that the second TP connection is not associated with a TPQ, and establishes an association between the second TP connection and a third TPQ, wherein the third TPQ is one of one or more TPQs that the first computing device has already created, or the third TPQ is created by the first computing device after determining that the second TP connection is not associated with a TPQ; The first computing device writes the data to be written into the storage space and generates first completion information corresponding to the first message. The first completion information indicates that the data to be written has been written into the storage space. The first computing device caches the first completion information in the third TPQ; After the first computing device determines that there is no cached completion information in the third TPQ, it releases the third TPQ.

17. The method according to claim 16, characterized in that, The first computing device establishes N TP connections with other computing devices and creates K TPQs for caching completion information, where K is less than N; the third TPQ belongs to the K TPQs. Establishing the association between the second TP connection and the third TPQ includes: The first computing device selects the third TPQ from the idle TPQs, wherein the idle TPQ refers to a TPQ without an associated TP connection; The configuration information of the third TPQ is written into the second TPC corresponding to the second TP connection; wherein, each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity of the TPQ.

18. The method according to claim 16, characterized in that, Establishing the association between the second TP connection and the third TPQ includes: The first computing device creates the third TPQ and writes the configuration information of the third TPQ into the two TPCs corresponding to the second TP connection; wherein, each TP connection corresponds to one TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity.

19. A data processing apparatus, characterized in that, Applied to a first computing device, including: The processing module is used to determine that the first transport layer TP connection is not associated with a transport layer queue TPQ, and send a first request to the queue management module. The first request is used to request a TPQ from the queue management module. The first TP connection is one of the TP connections established between the first computing device and the second computing device. The queue management module is configured to return the identifier of the first TPQ to the processing module after receiving the first application request; wherein, the first TPQ is one of one or more TPQs created by the queue management module, or the first TPQ is a TPQ created by the queue management module according to the required capacity, wherein the required capacity is the capacity required by the first computing device to cache one or more task descriptors, each task descriptor includes address information of data to be transmitted, wherein the data to be transmitted is data to be transmitted by the first computing device to the second computing device; The processing module is further configured to establish the association between the first TP connection and the first TPQ, and cache the one or more task descriptors to the first TPQ; The processing module is further configured to release the first TPQ associated with the first TP connection after determining that the task descriptor in the first TPQ has been executed.

20. The apparatus according to claim 19, characterized in that, The processing module is further configured to: determine that the first TP connection is associated with the second TPQ, and obtain the storage capacity of the second TPQ; If it is determined that the storage capacity of the second TPQ is less than the required capacity, a second request is sent to the queue management module. The second request is used to request a TPQ from the queue management module. The queue management module is used to return the identifier of the first TPQ to the processing module; wherein the storage capacity of the first TPQ is greater than or equal to the required capacity; The processing module is further configured to: establish an association between the first TP connection and the first TPQ, and cache the one or more task descriptors in the first TPQ.

21. The apparatus according to claim 20, characterized in that, The processing module is also used for: Delete the configuration information of the second TPQ recorded in the first transport layer context (TPC) corresponding to the first TP connection; wherein, each TP connection is associated with a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity of the TPQ.

22. The apparatus according to claim 20 or 21, characterized in that, The first computing device establishes N TP connections with other computing devices and creates M TPQs, where M is less than N; the first TPQ and the second TPQ belong to the M TPQs. The queue management module is specifically used for: Obtain an idle TPQ, determine the first TPQ based on the required capacity and the storage capacity of each idle TPQ, and return the identifier of the first TPQ to the processing module; wherein, the storage capacity of the first TPQ is greater than or equal to the required capacity, and the idle TPQ refers to a TPQ without an associated TP connection; The processing module is specifically used for: Write the configuration information of the first TPQ into the first TPC corresponding to the first TP connection; wherein, each TP connection corresponds to one TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity of the TPQ.

23. The apparatus according to any one of claims 19-21, characterized in that, The queue management module is specifically used for: The first TPQ is created based on the required capacity of the one or more task descriptors, and the identifier of the first TPQ is returned to the processing module, wherein the storage capacity of the first TPQ is greater than or equal to the required capacity. The processing module is specifically used for: The configuration information of the first TPQ is written into the first TPC corresponding to the first TP connection; wherein, each TP connection corresponds to one TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity of the TPQ.

24. A data processing apparatus, characterized in that, Applied to a first computing device, including: The processing module is used to determine that the first transport layer TP connection is associated with the second transport layer queue TPQ, and to obtain the storage capacity of the second TPQ. The first TP connection is one of the TP connections established between the first computing device and the second computing device. If it is determined that the storage capacity of the second TPQ is less than the required capacity, a second request is sent to the queue management module. The second request is used to request a TPQ from the queue management module. The required capacity is the capacity required by the first computing device to cache one or more task descriptors. Each task descriptor includes address information of the data to be transmitted. The data to be transmitted is the data that the first computing device wants to transmit to the second computing device. The queue management module is used to return the identifier of the first TPQ to the processing module; wherein the storage capacity of the first TPQ is greater than or equal to the required capacity; The processing module is further configured to establish an association between the first TP connection and the first TPQ, and cache the one or more task descriptors in the first TPQ; The processing module is further configured to release the first TPQ associated with the first TP connection after determining that the task descriptor in the first TPQ has been executed.

25. A data processing apparatus, characterized in that, Applied to a first computing device, including: The receiving module is used to receive a first message sent by a third computing device through a second transport layer (TP) connection. The first message includes data to be written. The second TP connection is one of the TP connections established between the first computing device and the third computing device. The processing module, after determining that the second TP connection is not associated with a TPQ, sends a third request to the queue management module. The third request is used to request a TPQ from the queue management module. The queue management module is used to return the identifier of the third TPQ to the processing module after receiving the third application request; wherein the third TPQ is one of one or more TPQs created by the first computing device, or the third TPQ is created by the first computing device after determining that the second TP connection has no associated TPQ; The processing module is further configured to establish the association between the second TP connection and the third TPQ, write the data to be written into the storage space, and generate the first completion information corresponding to the first message, wherein the first completion information indicates that the data to be written has been written into the storage space. The first completion information is cached in the third TPQ; After the first computing device determines that there is no cached completion information in the third TPQ, it releases the third TPQ.

26. The apparatus according to claim 25, characterized in that, The first computing device establishes N TP connections with other computing devices and creates K TPQs for caching completion information, where K is less than N; the third TPQ belongs to the K TPQs. The queue management module is specifically used for: Select the third TPQ from the idle TPQs and return the identifier of the third TPQ to the processing module; wherein, the idle TPQ refers to a TPQ without an associated TP connection; The processing module is specifically used for: The configuration information of the third TPQ is written into the second TPC corresponding to the second TP connection; wherein, each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity of the TPQ.

27. The apparatus according to claim 25, characterized in that, The queue management module is specifically used for: Create the third TPQ and return the identifier of the third TPQ to the processing module; The processing module is specifically used for: The configuration information of the third TPQ is written into the second TPC corresponding to the second TP connection; wherein, each TP connection corresponds to a TPC, and the TPC is used to record the configuration information of the TPQ associated with the corresponding TP connection, the configuration information including the starting address and storage capacity.

28. A chip, characterized in that, The chip includes a processing unit and a storage unit. The storage unit is used to store program instructions, and the processing unit is used to run the program instructions to implement the method as described in any one of claims 1-8; and / or, to implement the method as described in any one of claims 9-15; and / or, to implement the method as described in any one of claims 16-18.

29. A computing device, characterized in that, It includes a processor, a memory, and a chip, wherein the memory is used to store instructions, the processor is used to execute the instructions stored in the memory to implement the business functions of the computing device, and the chip is used to implement the method as described in any one of claims 1-8; And / or, implement the method as described in any one of claims 9-15; and / or, implement the method as described in any one of claims 16-18.

30. A computer-readable storage medium, characterized in that, The method includes computer program instructions that, when executed by a computing device, cause the computing device to perform the method as described in any one of claims 1-8; and / or cause the computing device to perform the method as described in any one of claims 9-15; and / or cause the computing device to perform the method as described in any one of claims 16-18.

Citation Information

Patent Citations

  • Method for processing messages and computing equipment

    CN105871739A

  • Systems and method for single queue multi-stream traffic shaping

    CN107181698A