Data transmission method and device, equipment and storage medium

By re-identifying the target queue in the network interface card's transmission queue set and performing fault recovery processing, the problem of data transmission interruption caused by user-space queue failures was solved, thereby improving the reliability and efficiency of data transmission.

CN121333897APending Publication Date: 2026-01-13DATANG MOBILE COMM EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410938007.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

In existing technologies, when the queue of a network interface card (NIC) operating in user mode malfunctions, data transmission will fail and cannot be effectively recovered, resulting in data transmission interruption.

Method used

The target transmission queue is determined from the current process's transmission queue set, and a new target queue is determined for data transmission when the target queue is abnormal. At the same time, fault recovery processing is performed on the abnormal queue, using DPDK big page memory for fault recovery, and a circular linked list structure is adopted to improve the efficiency of queue operations.

Benefits of technology

It ensures normal data transmission even in the event of a user-space queue failure, avoiding data transmission interruption and improving the reliability and efficiency of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121333897A_ABST
    Figure CN121333897A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, equipment and a storage medium. The method comprises the steps of obtaining to-be-transmitted data corresponding to a current process; according to the to-be-transmitted data, determining a target transmission queue in a transmission queue set corresponding to the current process, and transmitting the to-be-transmitted data by adopting the target transmission queue; each process corresponds to a respective transmission queue set, and the transmission queue set comprises a plurality of transmission queues; and if the target transmission queue is abnormal, determining a new target transmission queue in a transmission queue set corresponding to the current process, and continuing to transmit the to-be-transmitted data by adopting the new target transmission queue. By adopting the technical scheme provided by the invention, the normal transmission of the data can still be ensured when the queue in the network card working in the user mode fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission technology, and in particular to a data transmission method, apparatus, device, and storage medium. Background Technology

[0002] A network interface card (NIC), also known as a network interface controller or network adapter, is a device that connects a computer to an external local area network (LAN). A NIC is configured with multiple physical function (PF) devices and virtual function (VF) devices, each with multiple queues. These devices can operate in kernel mode or user mode. During NIC operation, it's inevitable that some queues operating in user mode may fail, leading to data transmission failures.

[0003] In related technologies, when a fault occurs in a queue operating in user mode, if the fault is known, a prompt message will be output to indicate that the network card has failed.

[0004] However, the above techniques can cause data transmission to be interrupted when the queue operating in user space fails. Summary of the Invention

[0005] This application provides a data transmission method, apparatus, device, and storage medium to address the shortcomings of existing technologies where data transmission is interrupted when a queue operating in user mode fails, thereby ensuring normal data transmission even when a queue operating in user mode fails.

[0006] In a first aspect, this application provides a data transmission method, comprising the following steps: Retrieve the data to be transmitted for the current process; Based on the data to be transmitted, the target transmission queue is determined from the transmission queue set corresponding to the current process, and the data to be transmitted is transmitted using the target transmission queue; each process corresponds to its own transmission queue set, which includes multiple transmission queues; If the target transmission queue is abnormal, a new target transmission queue is determined from the transmission queue set corresponding to the current process, and the new target transmission queue is used to continue transmitting the data to be transmitted.

[0007] According to a data transmission method provided in this application, the above-mentioned method involves determining a target transmission queue from the transmission queue set corresponding to the current process based on the data to be transmitted, and then using the target transmission queue to transmit the data to be transmitted, including: When transmitting data for the first time, the target transmission queue is determined in the transmission queue set corresponding to the current process, and the target transmission queue is removed from the transmission queue set and registered in the transmission resource table corresponding to the current process; each process has its own transmission resource table, which includes the correspondence between the transmitted data and the target transmission queue; When transmitting data to be transmitted in subsequent transmissions, the corresponding target transmission queue is determined from the transmission resource table of the current process based on the data to be transmitted, and the data to be transmitted is transmitted using the target transmission queue.

[0008] According to a data transmission method provided in this application, the method further includes: If the target transmission queue is abnormal, the target transmission queue is identified as the abnormal transmission queue, and the abnormal transmission queue is removed from the transmission queue set corresponding to the current process, and fault recovery processing is performed on the abnormal transmission queue. If any transmission queue with an anomaly is successfully recovered after fault recovery processing, then that transmission queue will be added back to the transmission queue set corresponding to the current process.

[0009] According to a data transmission method provided in this application, the above-mentioned fault recovery processing for a transmission queue with abnormalities includes: Add the abnormal transmission queue to the post-processing queue set corresponding to the current process, and perform fault recovery processing on the abnormal transmission queue in the post-processing queue set; each process has its own post-processing queue set, which includes at least one abnormal transmission queue. After successfully recovering from the fault in any transmission queue exhibiting an anomaly, the method further includes: Remove any transmission queue from the post-processing queue set.

[0010] According to a data transmission method provided in this application, the above-mentioned fault recovery processing for a transmission queue with abnormalities includes: The main control process performs fault recovery processing on the abnormal transmission queues in sequence according to the fault recovery level; the main process mentioned above is the main process associated with the current process. The above-mentioned fault recovery hierarchy includes at least two levels of fault recovery, and the recovery range between each level of fault recovery increases progressively.

[0011] According to a data transmission method provided in this application, the set of post-processing queues corresponding to the current process is stored in DPDK large page memory; The main process associated with the current process accesses the post-processing queue set corresponding to the current process through DPDK large page memory in order to perform fault recovery processing on the transmission queues in the post-processing queue set that have abnormalities.

[0012] According to a data transmission method provided in this application, the data structure of the aforementioned transmission queue set is a circular linked list, which is formed by connecting multiple transmission queues included in the transmission queue set.

[0013] According to a data transmission method provided in this application, each transmission queue in the aforementioned transmission queue set corresponds to carrying data of a certain data type to be transmitted.

[0014] Secondly, this application also provides a data transmission device, comprising the following modules: The acquisition module is used to acquire the data to be transmitted corresponding to the current process; The first transmission module is used to determine the target transmission queue from the transmission queue set corresponding to the current process based on the data to be transmitted, and to transmit the data to be transmitted using the target transmission queue; each process corresponds to its own transmission queue set, which includes multiple transmission queues; The second transmission module is used to determine a new target transmission queue from the transmission queue set corresponding to the current process if there is an anomaly in the target transmission queue, and to continue transmitting the data to be transmitted using the new target transmission queue.

[0015] According to a data transmission apparatus provided in this application, the aforementioned first transmission module is specifically used for...

[0016] When transmitting data for the first time, the target transmission queue is determined in the transmission queue set corresponding to the current process, and the target transmission queue is removed from the transmission queue set and registered in the transmission resource table corresponding to the current process; each process has its own transmission resource table, which includes the correspondence between the transmitted data and the target transmission queue; When transmitting data to be transmitted in subsequent transmissions, the corresponding target transmission queue is determined from the transmission resource table of the current process based on the data to be transmitted, and the data to be transmitted is transmitted using the target transmission queue.

[0017] According to a data transmission apparatus provided in this application, the apparatus further includes: The removal module is used to identify the target transmission queue as an abnormal transmission queue and remove the abnormal transmission queue from the transmission queue set corresponding to the current process if the target transmission queue is abnormal. The fault recovery module is used to perform fault recovery processing on transmission queues that have abnormalities. The add module is used to add any transmission queue that has an anomaly back to the transmission queue set corresponding to the current process if the fault recovery process is successful.

[0018] According to a data transmission device provided in this application, the aforementioned fault recovery module is specifically used for...

[0019] Add the abnormal transmission queue to the post-processing queue set corresponding to the current process, and perform fault recovery processing on the abnormal transmission queue in the post-processing queue set; each process has its own post-processing queue set, which includes at least one abnormal transmission queue. After successfully recovering from the fault in any transmission queue that has an anomaly, the removal module is also used to remove any transmission queue from the post-processing queue set.

[0020] According to a data transmission device provided in this application, the aforementioned fault recovery module is specifically used for...

[0021] The main control process sequentially performs fault recovery processing on the transmission queues with anomalies according to the fault recovery hierarchy; the aforementioned main process is the main process associated with the current process; the aforementioned fault recovery hierarchy includes at least two levels of fault recovery, and the recovery range between each level of fault recovery increases progressively.

[0022] According to a data transmission device provided in this application, the set of post-processing queues corresponding to the current process is stored in DPDK large page memory; The main process associated with the current process accesses the post-processing queue set corresponding to the current process through DPDK large page memory in order to perform fault recovery processing on the transmission queues in the post-processing queue set that have abnormalities.

[0023] According to a data transmission apparatus provided in this application, the data structure of the aforementioned transmission queue set is a circular linked list, which is formed by connecting multiple transmission queues included in the transmission queue set.

[0024] According to a data transmission apparatus provided in this application, each transmission queue in the aforementioned transmission queue set corresponds to carrying data of a certain data type to be transmitted.

[0025] Thirdly, this application also provides an electronic device, including a memory, a network card, and a processor; The memory stores computer programs; the network interface card (NIC) is used to send and receive data under the control of the processor; the processor reads the computer programs from the memory and performs the following operations: Retrieve the data to be transmitted for the current process; Based on the data to be transmitted, the target transmission queue is determined from the transmission queue set corresponding to the current process, and the network card is controlled to use the target transmission queue to transmit the data to be transmitted; each process corresponds to its own transmission queue set, which includes multiple transmission queues; If the target transmission queue is abnormal, a new target transmission queue is determined from the transmission queue set corresponding to the current process, and the network card is controlled to continue transmitting the data to be transmitted using the new target transmission queue.

[0026] According to an electronic device provided in this application, the processor described above is further configured to read a computer program from a memory and perform the following operations: When transmitting data for the first time, the target transmission queue is determined in the transmission queue set corresponding to the current process, and the target transmission queue is removed from the transmission queue set and registered in the transmission resource table corresponding to the current process; each process has its own transmission resource table, which includes the correspondence between the transmitted data and the target transmission queue; In subsequent transmissions of data to be transmitted, the corresponding target transmission queue is determined from the transmission resource table of the current process based on the data to be transmitted, and the network card is controlled to use the target transmission queue to transmit the data to be transmitted.

[0027] According to an electronic device provided in this application, the processor described above is further configured to read a computer program from a memory and perform the following operations: If the target transmission queue is abnormal, the target transmission queue is identified as the abnormal transmission queue, and the abnormal transmission queue is removed from the transmission queue set corresponding to the current process, and fault recovery processing is performed on the abnormal transmission queue. If any transmission queue with an anomaly is successfully recovered after fault recovery processing, then that transmission queue will be added back to the transmission queue set corresponding to the current process.

[0028] According to an electronic device provided in this application, the processor described above is further configured to read a computer program from a memory and perform the following operations: Add the abnormal transmission queue to the post-processing queue set corresponding to the current process, and perform fault recovery processing on the abnormal transmission queue in the post-processing queue set; each process has its own post-processing queue set, which includes at least one abnormal transmission queue. Remove any transmission queue from the post-processing queue set.

[0029] According to an electronic device provided in this application, the processor described above is further configured to read a computer program from a memory and perform the following operations: The main control process sequentially performs fault recovery processing on the transmission queues with anomalies according to the fault recovery hierarchy; the aforementioned main process is the main process associated with the current process; the aforementioned fault recovery hierarchy includes at least two levels of fault recovery, and the recovery range between each level of fault recovery increases progressively.

[0030] According to an electronic device provided in this application, the set of post-processing queues corresponding to the current process is stored in DPDK large page memory; the main process associated with the current process accesses the set of post-processing queues corresponding to the current process through DPDK large page memory to perform fault recovery processing on the transmission queues in the set of post-processing queues that have abnormalities.

[0031] According to an electronic device provided in this application, the data structure of the aforementioned transmission queue set is a circular linked list, which is formed by connecting multiple transmission queues included in the transmission queue set.

[0032] According to an electronic device provided in this application, each transmission queue in the aforementioned transmission queue set corresponds to carrying data of a certain data type to be transmitted.

[0033] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data transmission method as described above.

[0034] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the data transmission method as described above.

[0035] The data transmission method, apparatus, device, and storage medium provided in this application acquire the data to be transmitted corresponding to the current process, determine a target transmission queue from the transmission queue set corresponding to the current process based on the data to be transmitted, and transmit the data to be transmitted using the target transmission queue. If the target transmission queue is abnormal, a new target transmission queue is determined from the transmission queue set corresponding to the current process, and the data to be transmitted is transmitted using the new target transmission queue. Each process corresponds to its own transmission queue set, which includes multiple transmission queues. In this method, since the data of the current process can be transmitted through the queues operating in user mode in the network card, and a new transmission queue is determined to continue transmitting data when an abnormality occurs in the transmission queue, the data transmission process of the current process can be guaranteed not to be interrupted due to a fault in the queue operating in user mode, thus ensuring that the data of the current process can be transmitted normally. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is one of the flowcharts illustrating the data transmission method provided in the embodiments of this application.

[0038] Figure 2 This is the second flowchart illustrating the data transmission method provided in the embodiments of this application.

[0039] Figure 3 This is the third flowchart illustrating the data transmission method provided in the embodiments of this application.

[0040] Figure 4 This is a schematic diagram of the step-by-step fault recovery process provided in the embodiments of this application.

[0041] Figure 5 This is a schematic diagram of the data transmission device provided in the embodiments of this application.

[0042] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0044] The following will first explain the proper nouns that may be involved in the embodiments of this application.

[0045] DPDK: Data Plane Development Kit.

[0046] PDCP: Data Plane Development Kit, a packet data aggregation protocol.

[0047] RLC: Radio Link Control.

[0048] MAC: Media Access Control.

[0049] PL: Physical Layer.

[0050] PF: Physical Function.

[0051] VF: Virtual Function.

[0052] eMBB: Enhanced Mobile Broadband.

[0053] URLLC: Ultra Reliable Low Latency Communications.

[0054] The technical background of the embodiments of this application is illustrated by examples below.

[0055] Currently, the 5G baseband board carries multiple service subsystems for data transmission. These service subsystems, from top to bottom, include: PDCP subsystem, RLC subsystem, MAC subsystem, and PL subsystem. The downlink service data flow of the baseband board is PDCP, RLC, MAC, and PL in that order, while the uplink service data flow is exactly the reverse order. Therefore, the flow of various types of data between these processes places demands on transmission.

[0056] The 5G baseband board carries multiple service subsystems or various slave processes, such as PDCP, RLC, MAC, and PL. The PDCP subsystem, located above the network layer of the wireless communication protocol stack, is primarily responsible for processing user and control data. Its core functions include header compression and decompression, security mechanisms, user data transmission, and context management. The RLC subsystem, below PDCP, is responsible for providing reliable data transmission services on the wireless link. Its main functions include segmentation and reassembly, transmission modes, and flow control. The MAC subsystem, the layer responsible for multiple access control in the wireless communication protocol stack, has core functions including scheduling, resource allocation, multiple access technology, power control, and conflict resolution. The PL subsystem, the lowest layer responsible for signal transmission in the wireless communication protocol stack, has main functions including modulation and demodulation, channel coding and decoding, signal processing, synchronization, and multi-antenna technology. These subsystems work closely together to ensure the effective operation of the wireless communication system. The downlink service data flow on the baseband board is PDCP, RLC, MAC, and PL, while the uplink service data flow is exactly the reverse order. Various types of data can be transmitted between processes or subsystems.

[0057] Currently, 5G baseband boards primarily implement two air interface scenarios: eMBB and URLLC, corresponding to high-capacity and low-latency, high-reliability scenarios, respectively. eMBB has high requirements for PDCP and RLC capabilities, while URLLC emphasizes MAC capabilities. eMBB needs to achieve a 100MHz single cell with a maximum cell throughput of approximately 5Gbps and a single cell throughput of approximately 1Gbps, which requires PDCP user-level service sharing. To achieve PDCP user-level service sharing, PDCP can be divided into a single soft core. Considering resource independence, RLC and MAC can also be divided into separate soft cores. The capabilities of PDCP, RLC, and MAC can be scaled up by configuring affinity to meet the different application requirements of eMBB and URLLC. Therefore, each slave process needs to support dynamic loading, meaning that the type and number of each slave process can be configured according to the actual scenario.

[0058] Furthermore, existing network interface cards (NICs) have limited port resources, requiring additional switching chips on the baseband board to meet inter-board data transmission needs. While MAC address-based Layer 2 forwarding can ensure data reaches the appropriate processor on the destination board, the MAC layer's addressing capability is limited. Therefore, the IP layer is needed to complete the addressing, adding overhead and making the transmission adaptation layer "thicker," thus consuming more processor resources and resulting in higher processing costs.

[0059] Furthermore, the more functions and complex features high-performance network interface cards (NICs) currently available on the market, the more complex their characteristics become. They often have multiple physical function (PF) and virtual function (VF) devices, each with multiple queues, operating in both kernel and user modes. They support both standard and custom protocol stacks, resulting in a vast and complex data path across various scenarios. Existing NICs are configured with multiple physical function PF devices and virtual function VF devices, each with multiple queues, and each device can operate in either kernel or user mode. During NIC operation, user-mode queue failures are inevitable, leading to data transmission failures. When user-mode queue failures occur, if these failures are known, a simple message is output to indicate the NIC malfunction. However, many user-mode failures are unrecoverable; current technical solutions do not support recovery from user-mode queue failures. Even when recovery is achieved, it often involves a simple and crude processor reset. Furthermore, with multiple PFs in a NIC, a reset of one PF can passively reset other PFs, and even kernel-mode failures can affect user-mode failures, leading to service interruptions and other malicious events. Therefore, all of the above situations can cause data transmission interruptions.

[0060] Based on this, embodiments of this application provide a data transmission method, apparatus, device, and storage medium. This data transmission method is a new baseband transmission architecture with high performance and low overhead, which can partially or completely solve the above-mentioned technical problems.

[0061] The following is combined Figures 1-2 This application describes a data transmission method according to an embodiment.

[0062] Figure 1 This is one of the flowcharts illustrating the data transmission method provided in the embodiments of this application, such as... Figure 1 As shown, the method includes the following steps: S102, obtain the data to be transmitted corresponding to the current process.

[0063] The processes used for data transmission include a master process and various slave processes. The data structures of the master process and the various slave processes can be enumerated structures. The master process can be denoted as MASTER (main thread), and the various slave processes can include PDCP, RLC, MAC, PL, etc. The number of master processes is generally one, and the number of each type of slave process can be one or more. For example, there can be three slave processes for PDCP and RLC, three, six, or twelve slave processes for MAC, and one slave process for PL.

[0064] The current process can be any of the aforementioned slave processes, or it can be the main process; the current process mentioned above is a process based on the DPDK architecture. The slave processes and the main process mentioned above can be processes executed by the processor.

[0065] Taking a slave process as an example, when data needs to be transferred through this process, the data to be transferred can be obtained and denoted as the data to be transferred. The data type of the data to be transferred can be set according to the actual situation, such as business data or control data. In addition, when obtaining the data to be transferred, the destination path / destination type to which the data to be transferred is also obtained. The destination path / destination type can include, for example, main control, inter-board, intra-board, etc.

[0066] S104, Based on the data to be transmitted, determine the target transmission queue in the transmission queue set corresponding to the current process, and use the target transmission queue to transmit the data to be transmitted; each process corresponds to its own transmission queue set, which includes multiple transmission queues.

[0067] The aforementioned transmission queue is a queue operating in user mode on the network interface card (NIC), and the NIC is a NIC adapted to the DPDK architecture.

[0068] The process of transmitting data to be transmitted may include at least one of a sending process and a receiving process. That is, transmitting data to be transmitted may involve sending data to be transmitted and / or receiving data to be transmitted. In other words, the current process may send and receive data simultaneously, or it may only send data or only receive data. Each process may correspond to its own transmission queue set. The transmission queue set corresponding to each process may be a total transmission queue set, or it may be a sending queue set for sending data to be transmitted and a receiving queue set for receiving data to be transmitted. This application embodiment does not impose any limitations on this.

[0069] The following example uses a process's corresponding transmission queue set as a send queue set and a receive queue set to illustrate the relevant content of the transmission queue set.

[0070] First, taking a send queue set as an example, a send queue set can be pre-configured for each process. This send queue set includes multiple send queues, each corresponding to a send resource (i.e., a resource for sending data). The send queue sets for each process can be different, corresponding to different send resources. Furthermore, when setting the send queue set for each process, information such as data type, destination path, and hard core number can be comprehensively considered.

[0071] Additionally, for the data structure of the send queue set corresponding to each process, optionally, the data structure of the send queue set is a circular linked list. The circular linked list is formed by concatenating multiple send queues included in the send queue set. That is, during the initialization of each process, the circular linked list formed by concatenating multiple send queues in the send queue set corresponding to each process can be denoted as the send ring. Here, the send queue set uses a circular linked list. When performing insert or delete operations on the send queue in the circular linked list, it is not necessary to change the pointer of the previous node (the previous send queue). Only the pointer of the current node (the current send queue) needs to be modified to realize the insert or delete operation of the send queue. This allows for more efficient insertion and deletion operations on the send queue.

[0072] Secondly, taking the receive queue set as an example, during the initialization of each process, all the resources of the current process's receive queues can be added to the receive queue set. Here, a receive queue set can be pre-set for each process. Furthermore, the receive queue set for each process can be set considering factors such as data type, data priority, and port information. Optionally, the aforementioned receive queue set can also be a circular linked list, which can be denoted as a receive ring. Specifically, receive queues of the same type in the receive queue set can be chained together into a circular linked list, allowing for more efficient insertion and deletion operations in the receive queues.

[0073] When a process is officially loaded, it can read the receive queues from the set of receive queues corresponding to that process and add receive rules to each receive queue. These receive rules can be based on the characteristics of the received data. For example, if the MAC address of the received data meets rule 1 (rule 1 could be that the MAC addresses are arranged in the first order), then receive data using receive queue 1. Or, if the MAC address of the received data meets rule 2 (rule 2 could be that the MAC addresses are arranged in the second order), then receive data using receive queue 2, and so on.

[0074] S106 If the target transmission queue is abnormal, a new target transmission queue is determined from the transmission queue set corresponding to the current process, and the new target transmission queue is used to continue transmitting the data to be transmitted.

[0075] In this step, if the target transmission queue experiences an anomaly (i.e., a failure, such as data transmission failure or reception failure), during the process of transmitting data to be transmitted in the current process using the target transmission queue, a new target transmission queue can be matched from the transmission queue set using step S104 above to ensure uninterrupted data transmission. The new target transmission queue can then be used to continue transmitting the data to be transmitted for the current process, ensuring uninterrupted data transmission for the current process, i.e., normal transmission.

[0076] Furthermore, for each process's corresponding set of transmission queues, optionally, each transmission queue in the aforementioned set carries data of a single data type to be transmitted. In other words, the allocation of underlying queue resources is finely designed. Provided that transmission queue resources are sufficient, each transmission queue only transmits data of one data type, such as only business data or only control data. This way, when a transmission queue experiences an anomaly or failure, it will only affect the data stream of that single data type in the current process and will not impact the resources of other transmission queues.

[0077] As described above, before data transmission, the underlying queue resources can be "pooled" to obtain a memory pool. This memory pool includes multiple transmission queues (including send queues, receive queues, etc.). The data structure of this memory pool is two-dimensional. The data types that the queues in the memory pool can carry can include control or business types, and the operations can include requesting, releasing, sending, and receiving. Specifically, upper-layer applications can be dynamically associated with queue resources, that is, no binding relationship is established between upper-layer applications and queue resources in the memory pool. When a transmission queue fails, the upper-layer application can use other idle transmission queues to complete the data transmission, thereby ensuring that the data transmission process is not interrupted, that is, data transmission can proceed normally.

[0078] It should be noted that the above data transmission process can be executed by the system, which includes the main process and the slave processes, or it can be executed by the process itself; no specific limitation is made here.

[0079] In this embodiment, the data to be transmitted corresponding to the current process is obtained, and a target transmission queue is determined from the transmission queue set corresponding to the current process based on the data to be transmitted. The target transmission queue is then used to transmit the data. If the target transmission queue is abnormal, a new target transmission queue is determined from the transmission queue set corresponding to the current process, and the new target transmission queue is used to transmit the data. Each process corresponds to its own transmission queue set, which includes multiple transmission queues. In this method, since the data of the current process can be transmitted through the queues operating in user mode in the network card, and a new transmission queue is determined to continue transmitting data when an abnormality occurs in the transmission queue, the data transmission process of the current process can be guaranteed not to be interrupted due to a fault in the queue operating in user mode, thus ensuring that the data of the current process can be transmitted normally.

[0080] In the actual data transmission process, in order to improve the efficiency of data transmission using transmission queues, a scheme is proposed to register the matching target transmission queue to the resource table. The following embodiments illustrate this process.

[0081] In each embodiment, see Figure 2 The second flowchart of the data transmission method shown above, in step S104, "determine the target transmission queue in the transmission queue set corresponding to the current process according to the data to be transmitted, and use the target transmission queue to transmit the data to be transmitted" may include the following steps: S202, when transmitting data to be transmitted for the first time, determine the target transmission queue in the transmission queue set corresponding to the current process, and remove the target transmission queue from the transmission queue set and register it in the transmission resource table corresponding to the current process; each process corresponds to its own transmission resource table, which includes the correspondence between the transmitted data and the target transmission queue.

[0082] S204, when transmitting data to be transmitted in subsequent transmissions, determine the corresponding target transmission queue in the transmission resource table corresponding to the current process based on the data to be transmitted, and use the target transmission queue to transmit the data to be transmitted.

[0083] Similar to the aforementioned transmission queue set, each process here can correspond to its own transmission resource table. The transmission resource table for each process can be a general transmission resource table, or it can consist of a transmission resource table for sending data to be transmitted and a reception resource table for receiving data to be transmitted. This application embodiment does not impose any limitations on this.

[0084] The following example uses a process's corresponding transmission resource table, which consists of a sending resource table and a receiving resource table, to explain the relevant contents of the transmission resource table.

[0085] First, taking the data transmission process as an example, when the business layer sends data to be transmitted for the first time, it can select / retrieve the available target transmission queue from the transmission queue set corresponding to the current process according to the steps in S104 above. After successful retrieval, the resources of the target transmission queue can be removed from the transmission queue set, and the resources of the target transmission queue can be registered in the transmission resource table corresponding to the current process. Specifically, during registration, the index (INDEX) of the target transmission queue and the corresponding resources can be recorded. The aforementioned transmission resource table is pre-set for each process, and its data structure can be a three-dimensional array, with each process corresponding to one transmission resource table. Taking the transmission resource table of the current process as an example, this transmission resource table mainly manages the mapping relationship between the current process's port, transmission queue, and CPU (Central Processing Unit). Specifically, it can be the correspondence between the data to be transmitted by the CPU and the pre-determined target transmission queue, such as the correspondence between the data type of the data to be transmitted and the index of the target transmission queue, or other correspondences, which are not specifically limited here.

[0086] When sending data to be transmitted for the current process in subsequent transmissions, the target transmission queue corresponding to the data can be retrieved from the transmission resource table of the current process (e.g., by retrieving the index of the target transmission queue). Then, the target transmission queue can be directly used to transmit the data. Here, the transmission queue retrieved from the transmission queue set is registered in the transmission resource table of the current process for direct retrieval later, thus improving the efficiency of data transmission using queues.

[0087] Furthermore, after registering the target sending queue retrieved from the sending queue set to the corresponding sending resource table, if a sending queue in the sending resource table subsequently encounters an anomaly / failure, the anomaly / failure sending queue can be deleted from the sending resource table to obtain a new, normal target sending queue and register it to the sending resource table to continue transmitting data.

[0088] Secondly, taking the data receiving process as an example, a receiving resource table can be pre-set for each process, which can include the correspondence between received data and receiving queues. In the above embodiment, after adding receiving rules to each receiving queue of each process, the receiving queue can be registered to the receiving resource table corresponding to that process. In the future, each time data is received, the receiving resource table can be directly queried to obtain the index (INDEX) of the required receiving queue.

[0089] In this embodiment, by registering the transmission queues retrieved from the transmission queue set to the transmission resource table corresponding to the current process for direct retrieval later, the efficiency of data transmission using queues can be improved.

[0090] The above embodiments mention that the data transmission queue may have anomalies / faults. In order to facilitate further data transmission, fault recovery can be performed on the queue with anomalies / faults. The following embodiments illustrate this process.

[0091] In each embodiment, see Figure 3 The third flowchart of the data transmission method shown above may further include the following steps: S302, if the target transmission queue is abnormal, the target transmission queue is identified as the abnormal transmission queue, the abnormal transmission queue is removed from the transmission queue set corresponding to the current process, and fault recovery processing is performed on the abnormal transmission queue.

[0092] S304. If the fault recovery process for any transmission queue with an anomaly is successful, then that transmission queue is added back to the transmission queue set corresponding to the current process.

[0093] In this embodiment, if the target transmission queue for data transmission is abnormal (e.g., the target transmission queue fails to transmit data), it can be determined that the target transmission queue is faulty. In this case, the target transmission queue can be recorded as an abnormal transmission queue and removed from the corresponding transmission queue set of the current process to obtain a new transmission queue set. This avoids the possibility of subsequent data transmission failures due to mistakenly selecting the abnormal transmission queue. Simultaneously, fault handling can be performed on the abnormal transmission queue, such as restarting it separately and reallocating resources.

[0094] After performing fault recovery processing on the abnormal transmission queues, there may be multiple abnormal transmission queues. If any of the abnormal transmission queues is successfully recovered, it means that any transmission queue can be used normally for data transmission. Then, any transmission queue can be added back to the transmission queue set corresponding to the current process so that any successfully recovered transmission queue can be selected for data transmission in subsequent data transmission processes.

[0095] Furthermore, regarding the aforementioned fault recovery processing for abnormal transmission queues, to avoid conflicts between the data transmission process and the fault recovery processing process, the fault recovery processing process can be isolated. This isolation can be achieved using another set of post-processing queues. Optionally, the specific implementation process may include: adding the abnormal transmission queue to the post-processing queue set corresponding to the current process, and performing fault recovery processing on the abnormal transmission queue in the post-processing queue set; each process corresponds to its own set of post-processing queues, and the set of post-processing queues includes at least one abnormal transmission queue.

[0096] Similar to the transmission queue set mentioned above, each process here can correspond to its own post-processing queue set. Each process's post-processing queue set can be a general set, or it can be a separate set for both the sending and receiving processes. The post-processing queue sets are pre-set for each process. Each process can have one set for both the sending and receiving processes, or it can have only one general set encompassing both processes. Each post-processing queue set includes one or more sending / receiving queues that have encountered errors.

[0097] Optionally, the data structure of the above post-processing queue set is a circular linked list. This circular linked list can be formed by concatenating the sending / receiving queues that contain exceptions within the post-processing queue set, and can be denoted as a post-processing ring. Here, the post-processing queue set uses a circular linked list. When performing insertion or deletion operations on the sending / receiving queues in the circular linked list, it is not necessary to change the pointer of the previous node (the previous sending / receiving queue). Only the pointer of the current node (the current sending / receiving queue) needs to be modified to achieve the insertion or deletion operation. This allows for more efficient insertion and deletion operations on the sending / receiving queues within the post-processing queue set.

[0098] When performing fault recovery processing on abnormal transmission queues, the abnormal transmission queues can be added to the post-processing queue set corresponding to the current process. Then, the main process can be controlled to perform fault recovery processing on the transmission queues in the post-processing queue set. This fault recovery processing may include restarting the abnormal transmission queue individually and reallocating resources. The success of the recovery can be determined by the status after the fault recovery process. If any transmission queue successfully recovers, it means that the queue can be reused for data transmission. In this case, the queue can be removed from the post-processing queue set and added back to the transmission queue set corresponding to the current process, so that it can be selected again for data transmission in the next data transmission.

[0099] As described above, when performing fault recovery processing on a transmission queue with an anomaly in the post-processing queue set, the fault recovery process can be isolated from the data transmission process by the post-processing queue set. That is, the fault recovery process can be executed independently, which ensures that the fault recovery process does not affect the data transmission process, thus ensuring uninterrupted and normal data transmission.

[0100] Based on the data structures and related explanations mentioned above, including master-slave processes, memory pools, receive resource tables, send resource tables, receive rings, send rings, and post-processing rings, the following table summarizes them:

[0101] In this embodiment, by removing a transmission queue from the transmission queue set when it malfunctions and adding it back to the corresponding transmission queue set after successful fault recovery, the possibility of subsequent data transmission failures due to mistaken selection of the malfunctioning transmission queue can be avoided, ensuring normal data transmission. Simultaneously, the successfully recovered transmission queue is added back to the transmission queue set corresponding to the current process, making it convenient to select the recovered transmission queue for data transmission in subsequent data transmission processes. Furthermore, by adding the malfunctioning transmission queue to the post-processing queue set of the current process for fault recovery processing, the fault recovery process is isolated from the data transmission process, ensuring that the fault recovery process does not affect the data transmission process, thus guaranteeing uninterrupted and normal data transmission. At the same time, by performing fault recovery on the malfunctioning transmission queue through the post-processing queue set, fault recovery for the network card operating in user mode is achieved from scratch.

[0102] The following examples illustrate the specific process of fault recovery for a transmission queue with abnormalities.

[0103] In various embodiments, the "fault recovery process for the abnormal transmission queue" in S302 above may further include the following steps: The main control process performs fault recovery processing on the abnormal transmission queues in sequence according to the fault recovery level; the main process mentioned above is the main process associated with the current process.

[0104] In this embodiment, see Figure 4 The illustrated fault recovery process diagram allows for pre-setting fault recovery levels, which include at least two levels of fault recovery, with the recovery range increasing progressively between each level. Specifically, the at least two levels of fault recovery can include queue-level fault recovery, device-level fault recovery, peripheral-level fault recovery, processor-level fault recovery, and board-level fault recovery, with the recovery range increasing sequentially among these levels.

[0105] It is understandable that the above-mentioned fault recovery processing of any transmission queue in the post-processing queue set is queue-level fault recovery. The recovery range of queue-level fault recovery is the smallest, and the recovery range during fault recovery processing is the queue. The recovery ranges of device-level fault recovery, peripheral-level fault recovery, processor-level fault recovery, and board-level fault recovery increase in sequence, that is, board-level fault recovery has the largest recovery range, and the recovery range during fault recovery processing is the board.

[0106] In specific fault recovery, recovery can begin at the smallest possible scale, recovering queues, devices, peripherals, processors, and boards level by level. Queue-level recovery targets only a single queue, performing a restart and reallocating resources individually. The process checks if a single queue has recovered successfully; if so, the information is recorded and the process ends. If a single queue recovery fails, device-level recovery is performed, corresponding to an individual device (e.g., PF, VF). If a single queue restart fails, all queue resources within that device are restarted; the process checks if a single device has recovered successfully; if so, the information is recorded and the process ends. If a single device recovery fails (i.e., restarting a single device fails), peripheral-level recovery is performed, restarting all devices (including peripherals). The process checks if all devices have recovered successfully; if so, the information is recorded and the process ends. If all devices fail to recover (i.e., peripheral restarts are ineffective), processor-level and board-level recovery are performed sequentially, restarting the processor and board respectively, and the process ends after each restart.

[0107] Additionally, it should be noted that in the aforementioned device-level fault recovery, different Power Processors (PFs) and Virtual Functions (VFs) can be planned in kernel mode and user mode, ensuring that different PFs and VFs do not affect each other. Furthermore, a single VF belongs to only one process, thus avoiding cross-process use of VFs and achieving localization of resource management within the process.

[0108] In this embodiment, when the transmission queue in the post-processing queue set fails to recover from a fault, the fault recovery is performed sequentially according to different fault recovery levels. This progressive fault recovery method can reduce the impact of fault recovery and maximize the guarantee of service path capability.

[0109] The following examples illustrate the resource sharing mechanism between the master process and the slave process.

[0110] In each embodiment, the post-processing queue set corresponding to the current process is stored in the DPDK big page memory; the main process associated with the current process accesses the post-processing queue set corresponding to the current process through the DPDK big page memory to perform fault recovery processing on the transmission queues in the post-processing queue set that have abnormalities.

[0111] In this embodiment, following the principle of "master process configuration and slave process use" for DPDK queue resources, the queue usage process is basically carried out in the slave process, while the queue fault recovery process is carried out in the master process. That is, the slave process (such as the aforementioned current process) can execute processes such as sending data through the sending queue, receiving data through the receiving queue, and adding abnormal queues (including sending queues or receiving queues) to the post-processing queue set of the corresponding process. The master process can execute the fault recovery process for abnormal transmission queues in the post-processing queue set.

[0112] As mentioned above, the main process needs to perform fault recovery on the abnormal transmission queues in the post-processing queue set. This post-processing queue set is formed by the slave processes by adding abnormal transmission queues. To facilitate the main process's access to the resources of this post-processing queue set formed by the slave processes, a resource sharing mechanism between the main and slave processes can be constructed. Specifically, the resources of the post-processing queue set corresponding to each process (including each slave process and the main process) can be stored in the DPDK large page memory. Subsequently, a timed task on the main process can poll and check the post-processing queue sets of all slave processes through this DPDK large page memory, and perform fault recovery processing on the abnormal transmission queues in each slave process's post-processing queue set, thus restoring the abnormal transmission queues in each slave process's post-processing queue set in turn.

[0113] In this embodiment, by storing the post-processing queue sets of the main process and each slave process in the DPDK big page memory, queue resource sharing between the main and slave processes is achieved. This allows the main process to access the resources of the slave processes in a timely manner, improving fault recovery efficiency.

[0114] As described above, in this embodiment of the application, when a queue on a network card operating in user mode fails, a five-level progressive fault recovery mechanism—queue level, device level, peripheral level, processor level, and board level—can be used to recover the fault at each level in sequence. The fault recovery process can be minimized by progressing from one level to the next, thereby maximizing the guarantee of service path capability and ensuring that data transmission is not interrupted.

[0115] Furthermore, the latest network interface cards (NICs) offer abundant port resources and highly sophisticated NIC virtualization technology, perfectly complementing DPDK's VF device management. Meanwhile, the increasingly refined NIC streaming technology enables MAC address-based queue distribution, saving on switching chip hardware costs and eliminating the need for IP layer addressing. This reduces IP layer transmission overhead, resulting in a thinner and less complex transmission adaptation layer.

[0116] The data transmission apparatus provided in the embodiments of this application is described below. The data transmission apparatus described below can be referred to in correspondence with the data transmission method described above.

[0117] Figure 5 This is a schematic diagram of the data transmission device provided in the embodiments of this application. See also: Figure 5 As shown, the device may include: The acquisition module 510 is used to acquire the data to be transmitted corresponding to the current process. The first transmission module 520 is used to determine the target transmission queue from the transmission queue set corresponding to the current process based on the data to be transmitted, and to transmit the data to be transmitted using the target transmission queue; each process corresponds to its own transmission queue set, which includes multiple transmission queues; The second transmission module 530 is used to determine a new target transmission queue from the transmission queue set corresponding to the current process if there is an abnormality in the target transmission queue, and to continue transmitting the data to be transmitted using the new target transmission queue.

[0118] In various embodiments, the first transmission module 520 described above is specifically used for

[0119] When transmitting data for the first time, the target transmission queue is determined in the transmission queue set corresponding to the current process, and the target transmission queue is removed from the transmission queue set and registered in the transmission resource table corresponding to the current process; each process has its own transmission resource table, which includes the correspondence between the transmitted data and the target transmission queue; When transmitting data to be transmitted in subsequent transmissions, the corresponding target transmission queue is determined from the transmission resource table of the current process based on the data to be transmitted, and the data to be transmitted is transmitted using the target transmission queue.

[0120] In various embodiments, the above-described apparatus further includes: The removal module is used to identify the target transmission queue as an abnormal transmission queue and remove the abnormal transmission queue from the transmission queue set corresponding to the current process if the target transmission queue is abnormal. The fault recovery module is used to perform fault recovery processing on transmission queues that have abnormalities. The add module is used to add any transmission queue that has an anomaly back to the transmission queue set corresponding to the current process if the fault recovery process is successful.

[0121] Optionally, the above-mentioned fault recovery module is specifically used for

[0122] Add the abnormal transmission queue to the post-processing queue set corresponding to the current process, and perform fault recovery processing on the abnormal transmission queue in the post-processing queue set; each process has its own post-processing queue set, which includes at least one abnormal transmission queue. After successfully recovering from the fault in any transmission queue that has an anomaly, the removal module is also used to remove any transmission queue from the post-processing queue set.

[0123] In each embodiment, the above-mentioned fault recovery module is specifically used for

[0124] The main control process sequentially performs fault recovery processing on the transmission queues with anomalies according to the fault recovery hierarchy; the aforementioned main process is the main process associated with the current process; the aforementioned fault recovery hierarchy includes at least two levels of fault recovery, and the recovery range between each level of fault recovery increases progressively.

[0125] In each embodiment, the post-processing queue set corresponding to the current process is stored in the DPDK big page memory; the main process associated with the current process accesses the post-processing queue set corresponding to the current process through the DPDK big page memory to perform fault recovery processing on the transmission queues in the post-processing queue set that have abnormalities.

[0126] In various embodiments, the data structure of the above-mentioned transmission queue set is a circular linked list, which is formed by concatenating multiple transmission queues included in the transmission queue set.

[0127] In each embodiment, each transmission queue in the above-described transmission queue set corresponds to carrying data of a certain data type to be transmitted.

[0128] It should be noted that the apparatus provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0129] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, a communications bus 640, and a network card 650, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other through the communications bus 640.

[0130] The memory 630 is used to store computer programs; the network interface card 650 is used to send and receive data under the control of the processor 610; the processor 610 is used to read the computer program in the memory 630 and perform the following operations: The system retrieves the data to be transmitted for the current process; based on the data to be transmitted, it determines the target transmission queue from the transmission queue set corresponding to the current process and controls the network interface card 650 to use the target transmission queue to transmit the data to be transmitted; each process corresponds to its own transmission queue set, which includes multiple transmission queues; if the target transmission queue is abnormal, it determines a new target transmission queue from the transmission queue set corresponding to the current process and controls the network interface card 650 to use the new target transmission queue to continue transmitting the data to be transmitted.

[0131] In various embodiments, the processor 610 described above is also configured to read a computer program from the memory and perform the following operations: When transmitting data for the first time, the target transmission queue is determined in the transmission queue set corresponding to the current process, and the target transmission queue is removed from the transmission queue set and registered in the transmission resource table corresponding to the current process; each process has its own transmission resource table, which includes the correspondence between the transmitted data and the target transmission queue; In subsequent transmissions of data to be transmitted, the corresponding target transmission queue is determined from the transmission resource table of the current process based on the data to be transmitted, and the network interface card 650 is controlled to use the target transmission queue to transmit the data to be transmitted.

[0132] In various embodiments, the processor 610 described above is also configured to read a computer program from the memory and perform the following operations: If the target transmission queue is abnormal, the target transmission queue is identified as the abnormal transmission queue, and the abnormal transmission queue is removed from the transmission queue set corresponding to the current process, and fault recovery processing is performed on the abnormal transmission queue; if the fault recovery processing of any abnormal transmission queue is successful, any transmission queue is added back to the transmission queue set corresponding to the current process.

[0133] In various embodiments, the processor 610 described above is also configured to read a computer program from the memory and perform the following operations: Add the abnormal transmission queue to the post-processing queue set corresponding to the current process, and perform fault recovery processing on the abnormal transmission queue in the post-processing queue set; each process has its own post-processing queue set, which includes at least one abnormal transmission queue; remove any transmission queue from the post-processing queue set.

[0134] In various embodiments, the processor 610 described above is also configured to read a computer program from the memory and perform the following operations: The main control process sequentially performs fault recovery processing on the transmission queues with anomalies according to the fault recovery hierarchy; the aforementioned main process is the main process associated with the current process; the aforementioned fault recovery hierarchy includes at least two levels of fault recovery, and the recovery range between each level of fault recovery increases progressively.

[0135] In each embodiment, the post-processing queue set corresponding to the current process is stored in the DPDK big page memory; the main process associated with the current process accesses the post-processing queue set corresponding to the current process through the DPDK big page memory to perform fault recovery processing on the transmission queues in the post-processing queue set that have abnormalities.

[0136] In various embodiments, the data structure of the above-mentioned transmission queue set is a circular linked list, which is formed by concatenating multiple transmission queues included in the transmission queue set.

[0137] In each embodiment, each transmission queue in the above-described transmission queue set corresponds to carrying data of a certain data type to be transmitted.

[0138] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] It should be noted that the electronic device provided in this application embodiment can implement all the method steps implemented by the method embodiment with the execution subject being an electronic device, and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0140] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data transmission method provided by the above methods. The method includes: obtaining data to be transmitted corresponding to the current process; determining a target transmission queue in the transmission queue set corresponding to the current process based on the data to be transmitted, and using the target transmission queue to transmit the data to be transmitted; each process corresponds to its own transmission queue set, which includes multiple transmission queues; if the target transmission queue is abnormal, determining a new target transmission queue in the transmission queue set corresponding to the current process, and using the new target transmission queue to continue transmitting the data to be transmitted.

[0141] In another aspect, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the data transmission method provided by the above methods. The method includes: acquiring data to be transmitted corresponding to the current process; determining a target transmission queue in the transmission queue set corresponding to the current process based on the data to be transmitted, and using the target transmission queue to transmit the data to be transmitted; each process corresponds to its own transmission queue set, which includes multiple transmission queues; if the target transmission queue is abnormal, determining a new target transmission queue in the transmission queue set corresponding to the current process, and using the new target transmission queue to continue transmitting the data to be transmitted.

[0142] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0143] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A data transmission method, characterized in that, include: Retrieve the data to be transmitted for the current process; Based on the data to be transmitted, a target transmission queue is determined from the transmission queue set corresponding to the current process, and the data to be transmitted is transmitted using the target transmission queue; each process corresponds to its own transmission queue set, and the transmission queue set includes multiple transmission queues; If the target transmission queue is abnormal, a new target transmission queue is determined from the transmission queue set corresponding to the current process, and the new target transmission queue is used to continue transmitting the data to be transmitted.

2. The data transmission method according to claim 1, characterized in that, The step of determining a target transmission queue from the transmission queue set corresponding to the current process based on the data to be transmitted, and using the target transmission queue to transmit the data to be transmitted, includes: When transmitting the data to be transmitted for the first time, a target transmission queue is determined from the transmission queue set corresponding to the current process, and the target transmission queue is removed from the transmission queue set and registered in the transmission resource table corresponding to the current process; each process corresponds to its own transmission resource table, which includes the correspondence between the data to be transmitted and the target transmission queue; In subsequent transmissions of the data to be transmitted, a corresponding target transmission queue is determined in the transmission resource table corresponding to the current process based on the data to be transmitted, and the data to be transmitted is transmitted using the target transmission queue.

3. The data transmission method according to claim 1, characterized in that, The method further includes: If the target transmission queue is abnormal, the target transmission queue is identified as an abnormal transmission queue, and the abnormal transmission queue is removed from the transmission queue set corresponding to the current process, and fault recovery processing is performed on the abnormal transmission queue. If any abnormal transmission queue is successfully restored after fault recovery processing, then that transmission queue is added back to the transmission queue set corresponding to the current process.

4. The data transmission method according to claim 3, characterized in that, The fault recovery process for the abnormal transmission queue includes: The abnormal transmission queue is added to the post-processing queue set corresponding to the current process, and the abnormal transmission queue in the post-processing queue set is subjected to fault recovery processing; each process corresponds to its own post-processing queue set, and the post-processing queue set includes at least one abnormal transmission queue. After successfully recovering from the fault in any transmission queue exhibiting an anomaly, the method further includes: Remove any of the transmission queues from the set of post-processing queues.

5. The data transmission method according to claim 3, characterized in that, The fault recovery process for the abnormal transmission queue includes: The main control process sequentially performs fault recovery processing on the transmission queues with anomalies according to the fault recovery level; the main process is the main process associated with the current process. The fault recovery hierarchy includes at least two levels of fault recovery, and the recovery range between each level of fault recovery increases progressively.

6. The data transmission method according to claim 4, characterized in that, The set of post-processing queues corresponding to the current process is stored in DPDK big page memory; The main process associated with the current process accesses the post-processing queue set corresponding to the current process through the DPDK large page memory to perform fault recovery processing on the transmission queues in the post-processing queue set that have abnormalities.

7. The data transmission method according to any one of claims 1 to 6, characterized in that, The data structure of the transmission queue set is a circular linked list, which is formed by connecting multiple transmission queues included in the transmission queue set.

8. The data transmission method according to any one of claims 1 to 6, characterized in that, Each transmission queue in the transmission queue set corresponds to a type of data to be transmitted.

9. A data transmission device, characterized in that, include: The acquisition module is used to acquire the data to be transmitted corresponding to the current process; The first transmission module is used to determine a target transmission queue from the transmission queue set corresponding to the current process based on the data to be transmitted, and to transmit the data to be transmitted using the target transmission queue; each process corresponds to its own transmission queue set, and the transmission queue set includes multiple transmission queues; The second transmission module is used to determine a new target transmission queue from the transmission queue set corresponding to the current process if the target transmission queue is abnormal, and to continue transmitting the data to be transmitted using the new target transmission queue.

10. An electronic device, characterized in that, Includes memory, network card, and processor; The memory is used to store computer programs; the network interface card (NIC) is used to send and receive data under the control of the processor. Processor, configured to read the computer program in the memory and perform the following operations: Retrieve the data to be transmitted for the current process; Based on the data to be transmitted, a target transmission queue is determined from the transmission queue set corresponding to the current process, and the network card is controlled to use the target transmission queue to transmit the data to be transmitted; each process corresponds to its own transmission queue set, and the transmission queue set includes multiple transmission queues; If the target transmission queue is abnormal, a new target transmission queue is determined from the transmission queue set corresponding to the current process, and the network card is controlled to continue transmitting the data to be transmitted using the new target transmission queue.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the data transmission method as described in any one of claims 1 to 8.