Data transmission method and device based on DPU, electronic equipment and computer storage medium
By detecting the working status of the media access controller in the control unit of the DPU and managing log data transmission using a timer, the problem of competition in the transaction market data packet transmission is solved, and low-latency and timely data transmission is achieved.
Patent Information
- Application Number
- CN202411358056.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-20
AI Technical Summary
In high-frequency trading in the financial trading field, there is transmission competition between the transaction market data packets and log data during the transmission process, which makes it impossible to ensure that the transaction market data packets are transmitted to the client CPU in a timely manner.
By detecting the working status of the media access controller in the control unit of the DPU, if it is idle, the log data is transmitted to the CPU through the communication main line, and the transmission is ensured through the timer to ensure that the transmission is completed or stopped, so as to avoid the log data occupying the communication main line, resulting in Trading market packet transmission lags.
It realizes low-latency transmission of transaction data packets, avoids the lag problem of transaction data packet transmission caused by log data occupying the main line of communication, and ensures the timely transmission and integrity of data packets.
Smart Images

Figure CN119172377A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a DPU-based data transmission method, device, electronic device, and computer storage medium. Background Art
[0002] High-Frequency Trading (HFT) in the financial trading field is an important application field of ultra-low latency and is also the field that pursues the most extreme performance. Financial institutions and exchanges need to trade at the microsecond or even nanosecond level to gain market advantages. Therefore, it is crucial for trading platforms and network infrastructure to achieve ultra-low latency.
[0003] With the popularization of DPU (Data Processing Unit) ultra-low latency technology, an ultra-low latency high-speed trading system is established based on DPU. The market server transmits the trading market data packet to the client (Host) CPU, and transmits the market trading data packet and DPU log data to the client (Host) CPU through DPU, so that the client CPU can generate trading strategies in time.
[0004] Both the transaction quotation data packet and log data are transmitted to the CPU through the communication main line (PCIe). However, during the transmission process, there will be transmission competition between the transaction quotation data packet and the log data, and thus it is impossible to ensure that the transaction quotation data packet is transmitted to the client's CPU in a timely manner. Summary of the invention
[0005] In view of this, embodiments of the present application provide a data transmission method, device, electronic device and computer storage medium based on DPU.
[0006] According to a first aspect of an embodiment of the present application, a DPU-based data transmission method is provided, which is applied to a control unit of a DPU of a client, wherein the DPU is also connected to a storage device, and the method includes:
[0007] When the media access controller receives the transaction market data packet, the transaction market data packet is transmitted to the CPU through the communication main line, and the log data is written to the storage device, wherein the log data is generated by the DPU during the transmission of the transaction market data packet;
[0008] Detecting the working status of the media access controller;
[0009] If the working state of the media access controller is idle, the log data is transmitted to the CPU through the communication main line.
[0010] In some embodiments, the DPU further includes a first timer, one end of which is connected to the media access controller and the other end is connected to the control unit, and is used to reset and time each time the media access controller receives the transaction quotation data packet;
[0011] When receiving the transaction quotation data packet, detecting the space state of the media access controller includes:
[0012] detecting whether first timing information transmitted by the first timer is received, wherein the first timing information is transmitted to the control unit when the timing time of the first timer reaches a first threshold;
[0013] If the first timing information is received, determining that the working state of the media access controller is idle;
[0014] If the first timing information is not received, it is determined that the working state of the media access controller is non-idle.
[0015] In some embodiments, transmitting the log data to the CPU via the communication main line includes:
[0016] Dividing the log data into a plurality of log sub-data according to a preset number of bytes;
[0017] Encapsulating each of the log sub-data respectively to generate multiple log data packets;
[0018] The log data packet is transmitted to the CPU via a communication main line.
[0019] In some embodiments, the DPU further includes a second timer, one end of which is connected to the first timer, and the other end of which is connected to the control unit, and is used for resetting and timing when the control unit starts to transmit a log data packet of the log data;
[0020] The method further comprises:
[0021] detecting whether second timing information transmitted by the second timer is received, wherein the second timing information is transmitted to the control unit when the timing time of the second timer reaches a second threshold;
[0022] If the second timing information is received, detecting whether the log data is transmitted completely;
[0023] If the transmission of the log data is not completed, the transmission of the log data is stopped, and the received transaction quotation data packet is transmitted.
[0024] In some embodiments, the transaction quotation data package method further includes:
[0025] If the transmission of the log data is stopped during the transmission of the log data packet, it is detected whether the transmission of the first log data packet being transmitted is completed.
[0026] If the transmission of the first log data packet is not completed, the transmission of the first log data packet is stopped, and an error mark is added to the first log data packet, wherein the error mark is used to instruct the CPU to delete the first log data packet trading quotation data packet.
[0027] In some embodiments, the method further comprises:
[0028] When the first timing information is received again, the first log data packet is retransmitted through the communication main line.
[0029] According to a second aspect of an embodiment of the present application, a DPU-based data transmission device is provided, which is applied to a control unit of a DPU of a client, and the DPU is also connected to a storage device, and the device includes:
[0030] A control unit of a DPU applied to a client, wherein the DPU is also connected to a storage device, and the device comprises:
[0031] A first transmission module, configured to transmit the transaction market data packet to the CPU through a communication main line when the media access controller receives the transaction market data packet, and write log data to the storage device, wherein the log data is generated by the DPU during the transmission of the transaction market data packet;
[0032] A detection module, detecting the working status of the media access controller;
[0033] The second transmission module is used to transmit the log data to the CPU through the communication main line if the working state of the media access controller is idle.
[0034] According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the DPU-based data transmission method as described in the first aspect.
[0035] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the DPU-based data transmission method as described in the first aspect is implemented.
[0036] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the DPU-based data transmission method as described in the first aspect.
[0037] According to the DPU-based data transmission method provided in the embodiment of the present application, when the media access controller receives the transaction quotation data packet, the control unit transmits the received transaction quotation data packet to the CPU, and writes the log data generated by the DPU in the process of transmitting the transaction quotation data packet to the storage device, and further, detects the working state of the media access controller, and further, the working state of the media access controller is idle, and the log data is transmitted to the CPU through the communication main line. In the embodiment of the present application, when the media access controller receives the transaction quotation data packet, the control unit transmits the transaction quotation data packet to the CPU through the communication main line, so that the transaction quotation data packet can monopolize the communication main line, and then the transaction quotation data packet can be transmitted to the CPU with low delay, and further, when the media access controller is idle, the log data stored in the storage device is transmitted to the CPU, which can avoid the problem of delay in the transmission of the transaction quotation data packet caused by the log data occupying the communication main line. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0039] Figure 1 An exemplary schematic diagram of a DPU applicable to an embodiment of the present application;
[0040] Figure 2 is a flowchart of a data transmission method based on DPU according to an embodiment of the present application;
[0041] Figure 3 An exemplary schematic diagram of another DPU applicable to the embodiments of the present application;
[0042] Figure 4 is a flowchart of a data transmission method based on DPU according to another embodiment of the present application;
[0043] Figure 5 is a structural block diagram of a DPU-based data transmission method and device according to an embodiment of the present application;
[0044] Figure 6 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0046] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0047] The present application embodiment provides a DPU data transmission method, which is applied to Figure 1 The DPU shown in the figure includes a control unit, a media access controller and a communication main line. One end of the control unit is connected to the media access controller, and the other end is connected to the communication main line. The DPU is connected to the CPU through the communication main line. Furthermore, the DPU is also connected to a storage device, which is a storage device external to the DPU, which can be specifically DDR, and the communication main line can be specifically PCIe.
[0048] Furthermore, the DPU data transmission method provided in the embodiment of the present application has the following specific steps: Figure 2 As shown, the method includes:
[0049] S201, when the media access controller receives a transaction market data packet, the control unit transmits the transaction market data packet to the CPU through the communication main line, and writes the log data to the storage device.
[0050] In the embodiment of the present application, when the market server transmits the transaction market data packet to the DPU, when the media access controller of the DPU receives the transaction market data packet, the control unit immediately transmits the transaction market data packet to the CPU through the communication main line, and completes the transmission of the transaction market data packet with low latency. At the same time, the control unit also collects the log data of the DPU during the transmission of the transaction market data packet through the communication main line, and writes the collected log data into the storage device connected to the DPU.
[0051] Specifically, the log data in the embodiment of the present application may include the parsing time when the DPU parses the transaction quotation data packet, the status of the DPU, etc.
[0052] S202: The control unit detects the working status of the media access controller.
[0053] In the embodiment of the present application, during the process of transmitting the transaction quotation data packet through the communication main line, the control unit detects the working state of the media access controller to determine whether the transaction quotation data packet has been transmitted. Specifically, the working state of the media access controller may include idle and non-idle. If the control unit determines that the working state of the media access controller is idle, the control unit determines that the transmission of the transaction quotation data packet is completed. If the control unit determines that the working state of the media access controller is non-idle, the control unit determines that the transmission of the transaction quotation data packet is not completed.
[0054] S203: If the control unit determines that the working state of the media access controller is idle, the control unit transmits the log data to the CPU through the communication main line.
[0055] In an embodiment of the present application, after detecting the working status of the media access controller, if the control unit determines that the working status of the media access controller is idle, the control unit determines that the transmission of the transaction quotation data packet is completed, and then the control unit determines that the communication main line is idle at this time, and then the control unit transmits the log data stored in the storage device to the CPU through the communication main line to complete the data transmission.
[0056] The DPU-based data transmission method provided in the embodiment of the present application, when the media access controller receives the transaction quotation data packet, the control unit transmits the received transaction quotation data packet to the CPU, and writes the log data generated by the DPU in the process of transmitting the transaction quotation data packet to the storage device, and further, detects the working state of the media access controller, and further, the working state of the media access controller is idle, and the log data is transmitted to the CPU through the communication main line. In the embodiment of the present application, when the media access controller receives the transaction quotation data packet, the control unit transmits the transaction quotation data packet to the CPU through the communication main line, so that the transaction quotation data packet can monopolize the communication main line, and then the transaction quotation data packet can be transmitted to the CPU with low delay, and further, when the media access controller is idle, the log data stored in the storage device is transmitted to the CPU, which can avoid the problem of delay in the transmission of the transaction quotation data packet caused by the log data occupying the communication main line.
[0057] Furthermore, the present application embodiment provides another structural diagram of a DPU, as shown in FIG. Figure 3As shown, the DPU also includes a first timer, one end of the first timer is connected to the media access controller, and the control unit is specifically connected to the media access controller through the other end of the first timer. The first timer is used to reset and count each time the media access controller receives a transaction quotation data packet. Specifically, when the media access controller receives the first quotation transaction data packet, the first timer is reset and starts counting. When the media access controller receives the second quotation transaction data packet, the first timer is reset again and starts counting again.
[0058] Further, the first timer has a first threshold, and when the timing reaches the first threshold, the first timer transmits the first timing information to the control unit. Specifically, the first threshold may be 20ms, and when the timing reaches 20ms, the first timer transmits the first timing information to the control unit.
[0059] Further, the detection of the space status of the media access controller in the embodiment of the present application may include the following steps:
[0060] S201: A control unit detects whether first timing information transmitted by a first timer is received.
[0061] In an embodiment of the present application, when the control unit detects the working status of the media access controller, the control unit detects the working status of the media access controller through a first timer. Specifically, the first timer is reset and counts each time the media access controller receives a transaction quotation data packet, and when the timing reaches a first threshold, the first timing information is transmitted to the control unit. Then, the control unit can detect the working status of the media access controller by detecting whether it has received the first timing information transmitted by the first timer.
[0062] S202: If the control unit receives the first timing information, it determines that the working state of the media access controller is idle.
[0063] In an embodiment of the present application, if the control unit detects that it has received the first timing information, the control unit determines that the media access controller has not received a new transaction quotation data packet for a long time, and then the control unit determines that the media access controller is idle. Further, the control unit determines that the transaction quotation data packet is transmitted, thereby determining that the communication main line is not occupied and is also in an idle state.
[0064] S203: If the control unit does not receive the first timing information, it determines that the working state of the media access controller is non-idle.
[0065] In an embodiment of the present application, if the control unit detects that it has not received the first timing information, the control unit determines that the media access controller is in a state of receiving a transaction quotation data packet, and then the control unit determines that the media access controller is non-idle. Further, the control unit determines that the transmission of the transaction quotation data packet is not completed, thereby determining that the communication main line is occupied and is also non-idle.
[0066] In the embodiment of the present application, the first timer is reset and counted each time the media access controller receives a transaction quotation data packet, so that the control unit can accurately determine the working status of the media access control, so that the control unit can determine whether to transmit log data according to the working status of the media access controller, and thus can avoid transmitting log data when the communication main line is occupied, thereby ensuring that the transaction quotation data packet can monopolize the communication main line during transmission.
[0067] Furthermore, in the embodiment of the present application, the log data is transmitted to the CPU via the communication main line, which may include the following steps:
[0068] S2031: The control unit divides the log data into a plurality of log sub-data according to a preset number of bytes.
[0069] In the embodiment of the present application, when the control unit transmits the log data, the control unit first obtains a preset number of bytes, and divides the log data into a plurality of log sub-data using the preset number of bytes. Specifically, the preset number of bytes may be 1500 bytes, or other numbers.
[0070] S2032: The control unit encapsulates each log sub-data respectively to generate multiple log data packets.
[0071] In the embodiment of the present application, after the control unit divides the log data into a plurality of log sub-data, the control unit encapsulates each log sub-data respectively to generate a plurality of log data packets.
[0072] S2033, transmit the log data packet to the CPU through the communication main line.
[0073] In the embodiment of the present application, after generating multiple log data packets, the control unit transmits each log data packet to the CPU in sequence through the communication main line to complete the transmission of the log data.
[0074] The control unit of the embodiment of the present application can conveniently transmit log data by dividing the log data into log data packets for transmission.
[0075] For further information, please refer to Figure 3As shown, the DPU of the embodiment of the present application also includes a second timer, one end of the second timer is connected to the first timer, and the other end is connected to the control unit, and is used to reset and time when the control unit starts to transmit the log data packet of the log data. Specifically, the second timer is reset and starts timing when the control unit starts to transmit the log data packet of the log data, and when the timing reaches the second threshold, the second timer transmits second timing information to the control unit, and the second timing information is used to instruct the control unit to stop transmitting the log data packet of the log data.
[0076] Further, the second timer has a second threshold, and when the timing reaches the second threshold, the second timer transmits the second timing information to the control unit. Specifically, the second threshold may be 480ms, and when the timing reaches 480ms, the second timer transmits the second timing information to the control unit.
[0077] Furthermore, the DPU-based data transmission method of the embodiment of the present application may further include the following steps:
[0078] S203: The control unit detects whether second timing information transmitted by a second timer is received.
[0079] In an embodiment of the present application, when the control unit transmits a log data packet of log data through the communication main line, the control unit controls the transmission time of the log data through the second timer. Specifically, the second timer is reset and starts timing when the log data packet of log data starts to be transmitted, and when the timing reaches a second threshold, the second timing information is transmitted to the control unit. Then, the control unit can control the transmission time of the log data by detecting whether it has received the second timing information transmitted by the second timer, thereby avoiding the log data occupying the communication main line for a long time, and thereby avoiding the transaction quotation data packet from being unable to be transmitted to the CPU in time.
[0080] S204: If the control unit receives the second timing information, it detects whether the log data transmission is completed.
[0081] In the embodiment of the present application, when the control unit receives the second timing information, the control unit determines that the log data occupies the communication main line for a maximum time and needs to stop transmitting the log data, and then the control unit detects whether the log data has been transmitted. Specifically, the control unit can detect the number of log data packets that have been transmitted to determine whether the log data has been transmitted.
[0082] S205: If the control unit determines that the transmission of the log data is not completed, it stops transmitting the log data and transmits the received transaction quotation data packet.
[0083] In the embodiment of the present application, if the control unit determines that the log data transmission is not completed, it stops transmitting the log data and transmits the received transaction quotation data packet, so that the transaction quotation data packet can be transmitted to the CPU in a timely manner.
[0084] The embodiment of the present application uses a second timer to time the transmission time of the transmission log data. When the transmission time of the transmission log data reaches a second threshold and the transmission of the log data is not completed, the transmission of the log data is stopped and the received transaction quotation data packet is transmitted, so that the transaction quotation data packet can be transmitted to the CPU in a timely manner.
[0085] Furthermore, the DPU-based data transmission method of the embodiment of the present application may also include the following steps:
[0086] S206: If the transmission of the log data packet is stopped during the transmission of the log data packet, the control unit detects whether the transmission of the first log data packet being transmitted is completed.
[0087] In an embodiment of the present application, if the control unit stops transmitting the log data during the process of transmitting the log data packet, the control unit detects whether the first log data packet being transmitted has been transmitted. Specifically, the control unit can determine whether the first log data packet has been transmitted based on the number of bytes transmitted.
[0088] S207: If the transmission of the first log data packet is not completed, the transmission of the first log data packet is stopped, and the control unit adds an error mark in the first log data packet.
[0089] In the embodiment of the present application, if the control unit determines that the transmission of the first log data packet is incomplete, the control unit immediately stops the transmission of the first log data packet and adds an error mark in the first log data packet to instruct the CPU to delete the first log data packet.
[0090] S208: When the control unit re-receives the first timing information, it re-transmits the first log data packet through the communication main line.
[0091] In the embodiment of the present application, after the transmission of the transaction quotation data packet is completed, that is, when the control unit receives the first timing information again, the control unit retransmits the first log data packet to the CPU through the communication main line.
[0092] In the embodiment of the present application, the control unit adds an error identifier in the first log data packet when the transmission of the first log data packet is not completed, so that the CPU can accurately identify the error packet, thereby ensuring the integrity of the log data. Furthermore, the control unit can ensure that the log data packets transmitted to the CPU are all completed data packets by retransmitting the first log data packet through the communication main line when the first timing information is re-received, thereby further ensuring the integrity of the log data.
[0093] Furthermore, the embodiment of the present application provides another data transmission method based on DPU, the specific steps are as follows: Figure 4 As shown, including:
[0094] When the media access controller receives a transaction quotation data packet, the control unit transmits the transaction quotation data packet to the CPU through the communication main line, and writes the log data to the storage device. The first timer is reset and counts each time the media access controller receives a transaction quotation data packet, and when the timing reaches a first threshold, the first timing information is transmitted to the control unit.
[0095] If the control unit detects that it has received the first timing information, determines that the media access controller is idle, obtains a preset number of bytes, and uses the preset number of bytes to divide the log data into multiple log sub-data, the control unit encapsulates each log sub-data respectively to generate multiple log data packets. Furthermore, the control unit transmits each log data packet to the CPU in turn through the communication main line to complete the transmission of the log data.
[0096] The second timer is reset and starts timing when the control unit starts to transmit the log data packet of the log data, and when the timing reaches the second threshold, the second timer sends second timing information to the control unit. If the control unit receives the second timing information, it detects whether the log data transmission is completed. If the control unit determines that the log data transmission is not completed, it stops transmitting the log data and transmits the received trading quotation data packet.
[0097] At the same time, if the transmission of the log data packet is stopped during the transmission of the log data packet, the control unit detects whether the first log data packet being transmitted is completed. If the control unit determines that the transmission of the first log data packet is not completed, the control unit immediately stops the transmission of the first log data packet and adds an error mark in the first log data packet to instruct the CPU to delete the first log data packet.
[0098] When the control unit receives the first timing information again, the control unit retransmits the first log data packet to the CPU through the communication main line.
[0099] Furthermore, the embodiment of the present application provides a data transmission device based on a DPU, which is applied to a control unit of the DPU, and the DPU is also connected to a storage device, specifically Figure 5 As shown, the device comprises:
[0100] The first transmission module 501 is used to transmit the transaction market data packet to the CPU through the communication main line when the media access controller receives the transaction market data packet, and write the log data to the storage device, wherein the log data is generated by the DPU during the transmission of the transaction market data packet;
[0101] A detection module 502 detects the working status of the media access controller;
[0102] The second transmission module 503 is used to transmit the log data to the CPU through the communication main line if the working state of the media access controller is idle.
[0103] Furthermore, the detection module 502 of the embodiment of the present application is also used to detect whether the first timing information transmitted by the first timer is received, wherein the first timing information is transmitted to the control unit when the timing time of the first timer reaches a first threshold; if the first timing information is received, it is determined that the working state of the media access controller is idle; if the first timing information is not received, it is determined that the working state of the media access controller is non-idle.
[0104] Furthermore, the second transmission module 503 of the embodiment of the present application is also used to divide the log data into multiple log sub-data according to a preset number of bytes; encapsulate each log sub-data respectively to generate multiple log data packets; and transmit the log data packets to the CPU through the communication main line.
[0105] Furthermore, the DPU-based data transmission device of the embodiment of the present application may also include a timer detection module, which is specifically used to detect whether second timing information transmitted by a second timer is received, wherein the second timing information is transmitted to the control unit when the timing time of the second timer reaches a second threshold; if the second timing information is received, it is detected whether the log data transmission is completed; if the log data transmission is not completed, the log data transmission is stopped, and the received transaction quotation data packet is transmitted.
[0106] Furthermore, the DPU-based data transmission device of the embodiment of the present application may also include a judgment module, which is specifically used to detect whether the first log data packet being transmitted is completed if the transmission of log data is stopped during the transmission of the log data packet; if the transmission of the first log data packet is not completed, stop transmitting the first log data packet and add an error mark to the first log data packet, wherein the error mark is used to instruct the CPU to delete the first log data packet trading quotation data packet.
[0107] Furthermore, the second transmission module 503 of the embodiment of the present application may also be configured to retransmit the first log data packet through the communication main line when the first timing information is re-received.
[0108] The DPU-based data transmission device of this embodiment is used to implement the corresponding DPU-based data transmission methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here. In addition, the functional implementation of each module in the deadlock processing device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be described in detail here.
[0109] Reference Figure 6 , shows a schematic diagram of the structure of an electronic device according to an embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.
[0110] like Figure 6 As shown, the electronic device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0111] in:
[0112] The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .
[0113] The communication interface 604 is used to communicate with other electronic devices or servers.
[0114] The processor 602 is used to execute the program 610, and specifically can execute the relevant steps in the above-mentioned DPU-based data transmission method embodiment.
[0115] Specifically, the program 610 may include program codes, which include computer operation instructions.
[0116] The processor 602 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0117] Memory 606 is used to store program 610. Memory 606 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Program 510 can be specifically used to enable processor 602 to perform the following operations: In an optional embodiment, program 610 is also used to enable processor 602 to perform the following operations: In an optional embodiment, program 610 is also used to enable processor 602 to perform the following operations in program 610. The specific implementation of each step in program 610 can refer to the corresponding descriptions in the corresponding steps and units in the above-mentioned DPU-based data transmission method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the aforementioned method embodiment, which will not be repeated here.
[0118] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to perform operations corresponding to any DPU-based data transmission method in the above-mentioned multiple method embodiments.
[0119] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0120] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an AS IC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the DPU-based data transmission method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the DPU-based data transmission method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the DPU-based data transmission method shown herein.
[0121] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0122] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.
Claims
1. A data transmission method based on DPU, characterized in that: A control unit applied to a DPU, wherein the DPU is further connected to a storage device, and the method comprises: When the media access controller receives the transaction market data packet, the transaction market data packet is transmitted to the CPU through the communication main line, and the log data is written to the storage device, wherein the log data is generated by the DPU during the transmission of the transaction market data packet; Detecting the working status of the media access controller; If the working state of the media access controller is idle, the log data is transmitted to the CPU through the communication main line.
2. The method according to claim 1, characterized in that: The DPU further includes a first timer, one end of which is connected to the media access controller and the other end is connected to the control unit, and is used for resetting and timing each time the media access controller receives the transaction quotation data packet; Detecting the space state of the media access controller includes: detecting whether first timing information transmitted by the first timer is received, wherein the first timing information is transmitted to the control unit when the timing time of the first timer reaches a first threshold; If the first timing information is received, determining that the working state of the media access controller is idle; If the first timing information is not received, it is determined that the working state of the media access controller is non-idle.
3. The method according to claim 1, characterized in that The step of transmitting the log data to the CPU via the communication main line includes: Dividing the log data into a plurality of log sub-data according to a preset number of bytes; Encapsulating each of the log sub-data respectively to generate multiple log data packets; The log data packet is transmitted to the CPU via a communication main line.
4. The method according to claim 3, characterized in that The DPU further includes a second timer, one end of which is connected to the first timer, and the other end of which is connected to the control unit, and is used for resetting and timing when the control unit starts to transmit a log data packet of the log data; The method further comprises: detecting whether second timing information transmitted by the second timer is received, wherein the second timing information is transmitted to the control unit when the timing time of the second timer reaches a second threshold; If the second timing information is received, detecting whether the log data is transmitted completely; If the transmission of the log data is not completed, the transmission of the log data is stopped, and the received transaction quotation data packet is transmitted.
5. The method according to claim 4, characterized in that The transaction quotation data package method also includes: If the transmission of the log data packet is stopped during the transmission of the log data packet, detecting whether the transmission of the first log data packet being transmitted is completed; If the transmission of the first log data packet is not completed, the transmission of the first log data packet is stopped, and an error mark is added to the first log data packet, wherein the error mark is used to instruct the CPU to delete the first log data packet trading quotation data packet.
6. The method according to claim 5, characterized in that The method further comprises: When the first timing information is received again, the first log data packet is retransmitted through the communication main line.
7. A data transmission device based on DPU, characterized in that: A control unit applied to a DPU, wherein the DPU is also connected to a storage device, and the device comprises: A first transmission module, configured to transmit the transaction market data packet to the CPU through a communication main line when the media access controller receives the transaction market data packet, and write log data to the storage device, wherein the log data is generated by the DPU during the transmission of the transaction market data packet; A detection module, detecting the working status of the media access controller; The second transmission module is used to transmit the log data to the CPU through the communication main line if the working state of the media access controller is idle.
8. An electronic device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the DPU-based data transmission method as described in any one of claims 1-6.
9. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the DPU-based data transmission method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the DPU-based data transmission method as described in any one of claims 1-6.
