WO2024109174A1 - Method for controlling data retransmission in application layer, and related product - Google Patents

Method for controlling data retransmission in application layer, and related product Download PDF

Info

Publication number
WO2024109174A1
WO2024109174A1 PCT/CN2023/112582 CN2023112582W WO2024109174A1 WO 2024109174 A1 WO2024109174 A1 WO 2024109174A1 CN 2023112582 W CN2023112582 W CN 2023112582W WO 2024109174 A1 WO2024109174 A1 WO 2024109174A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
receiving end
sending
end information
receiving
Prior art date
Application number
PCT/CN2023/112582
Other languages
French (fr)
Chinese (zh)
Inventor
孙咏哲
Original Assignee
上海寒武纪信息科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海寒武纪信息科技有限公司 filed Critical 上海寒武纪信息科技有限公司
Publication of WO2024109174A1 publication Critical patent/WO2024109174A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1809Selective-repeat protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal

Definitions

  • the present disclosure relates to the field of chips, and more specifically, to the field of inter-chip communication.
  • the current mainstream practice is to implement reliable communication protocols at the communication transport layer to achieve reliable transmission.
  • a typical example is the TCP (Transmission Control Protocol) protocol, which ensures transmission reliability through four main mechanisms: confirmation of response and sequence number, timeout retransmission, flow control, and congestion control.
  • TCP Transmission Control Protocol
  • NVIDIA uses Nvlink to ensure reliable transmission at the link layer and protocol layer.
  • the patent application with publication number CN 110278094 discloses a timeout retransmission device based on link delay to reduce the probability of packet loss during retransmission of aggregated links.
  • the patent application with publication number CN 112312513 B improves the performance of retransmission recovery in a device for link failure recovery.
  • Retransmission occurs at the transport layer, and more redundant information needs to be maintained at the transport layer to mark the location of the retransmission;
  • the transport layer requires additional buffers to store sent information for retransmission, which increases the consumption of storage resources;
  • the purpose of the present disclosure is to solve the defects caused by transport layer retransmission in the prior art and to provide a solution that can perform retransmission at the application layer.
  • a method for controlling data retransmission at an application layer comprising: pre-sending data, the data comprising a payload and a count value for the payload; in response to the data being in a pre-sending state, recording first sending end information, the first sending end information indicating a first amount of the data being pre-sent; receiving and recording first receiving end information, the first receiving end information indicating a second amount of data received and fed back by a receiving end, wherein the second amount is not greater than the first amount; and determining whether to retransmit the data based on the first sending end information and the first receiving end information.
  • a device for controlling data retransmission at an application layer comprising: a sending unit, configured to pre-send data, wherein the data comprises a payload and a count value for the payload; a sending end information updating unit, configured to record first sending end information in response to the data being in a pre-sending state, wherein the first sending end information Indicates a first quantity of the data pre-sent; a receiving unit, used to receive and record first receiving end information, wherein the first receiving end information indicates a second quantity of data received and fed back by the receiving end, wherein the second quantity is not greater than the first quantity; a retransmission judgment unit, used to determine whether to retransmit the data based on the first sending end information and the first receiving end information.
  • a method for controlling data retransmission at an application layer in a communication system comprising: a transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, the method comprising: at the transmitting end, pre-sending data to the receiving end, the data comprising a payload and a count value for the payload; in response to the data being in a pre-sending state, recording first transmitting end information, the first transmitting end information indicating a first quantity of the data being pre-sent; transmitting the data through the communication link; at the receiving end, if the data is received, recording the count value; generating a second quantity based on the count value, the second quantity indicating the quantity of the data received and fed back by the receiving end; feeding back first receiving end information to the transmitting end, the first receiving end information including a second quantity, and the second quantity is not greater than the first quantity; at the transmitting end, receiving and recording the first receiving end information; determining
  • a communication system for controlling data retransmission at an application layer comprising: a transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, wherein the transmitting end pre-transmits data to the receiving end, the data comprising a payload and a count value for the payload; the transmitting end records first transmitting end information in response to the data being in a pre-transmitting state, the first transmitting end information indicating a first quantity of the data being pre-transmitted; the communication link is used to transmit the data; if the receiving end receives the data, the receiving end records the count value; the receiving end generates a second quantity according to the count value, the second quantity indicating a second quantity of the data received and fed back by the receiving end; the receiving end feeds back first receiving end information to the transmitting end, the first receiving end information including the second quantity, and the second quantity is not greater than the first quantity; the transmitting end receives and records the first receiving end information in response to the data being in a pre-transmitting
  • an electronic device comprising: one or more processors; and a memory, wherein the memory stores computer executable instructions, and when the computer executable instructions are executed by the one or more processors, the electronic device executes the method described above.
  • a computer-readable storage medium comprising computer-executable instructions, and when the computer-executable instructions are executed by one or more processors, the method described above is executed.
  • the beneficial effects brought about include at least: performing software-level retransmission design at the application layer can reduce the hardware design of the transmission layer, thereby speeding up development and reducing hardware customization costs.
  • FIG1 is a schematic diagram showing the structure of a board according to an embodiment of the present disclosure.
  • FIG2 is a schematic diagram showing a combined processing device of this embodiment
  • FIG3 is a schematic diagram showing the internal structure of a computing device
  • FIG. 4 shows the internal architecture of the processing core
  • FIG5 shows a schematic diagram of a communication system including a transmitting end and a receiving end according to an embodiment of the present disclosure
  • FIG6 shows a method for controlling data retransmission at an application layer in a communication system according to an embodiment of the present disclosure
  • FIG7 is a schematic diagram showing a normal communication process according to an embodiment of the present disclosure.
  • FIG8 is a schematic diagram showing a packet loss/error retransmission process
  • FIG9 shows a situation where the ACK fed back by the receiving end is lost
  • FIG10 shows a flow chart of a method for controlling data retransmission at the application layer according to another aspect of the present disclosure. as well as
  • FIG. 11 shows a device for controlling data retransmission at an application layer according to one aspect of the present disclosure.
  • the term “if” may be interpreted as “when” or “upon” or “in response to determining” or “in response to detecting,” depending on the context.
  • the phrase “if it is determined” or “if [described condition or event] is detected” may be interpreted as meaning “upon determination” or “in response to determining” or “upon detection of [described condition or event]” or “in response to detecting [described condition or event],” depending on the context.
  • Wafers are circular sheets made of pure silicon, generally divided into 6-inch, 8-inch, 12-inch and other specifications. Wafers are cut into small pieces, which are called dies. Each die is mounted with a chip and wired to achieve specific electrical functions. Then the die is packaged into a particle. The purpose of packaging is to place, fix, seal, protect the chip and enhance the electrical and thermal performance. At the same time, the contacts of the chip are connected to the pins of the package shell with wires, and a chip package structure is completed.
  • the memory is used to temporarily store the computing data required by the system on chip and the data exchanged with the external memory.
  • the memory can be a high-bandwidth memory (HBM), which is a high-performance DRAM (Dynamic Random Access Memory) made based on a 3D stacking process and is suitable for applications with high memory bandwidth requirements, such as graphics processors, online switching and forwarding equipment (such as routers, switches), etc.
  • HBM high-bandwidth memory
  • DRAM Dynamic Random Access Memory
  • System on Chip refers to a technology that integrates a complete system on a single chip and packages all or part of the necessary electronic circuits.
  • the system on chip is assembled on a board.
  • Figure 1 shows a schematic diagram of the structure of a board 10 of the embodiment of the present disclosure.
  • the board 10 includes a combined processing device 101, which is an artificial intelligence computing unit to support various deep learning and machine learning algorithms to meet the intelligent processing needs in complex scenarios in the fields of computer vision, speech, natural language processing, data mining, etc.
  • deep learning technology is widely used in the field of cloud intelligence.
  • a notable feature of cloud intelligence applications is the large amount of input data, which has high requirements on the storage capacity and computing power of the platform.
  • the board 10 of this embodiment is suitable for cloud intelligence applications and has huge off-chip storage, on-chip storage and a large amount of computing power.
  • the combined processing device 101 is connected to an external device 103 via an external interface device 102.
  • the external device 103 is, for example, It is a server, a computer, a camera, a display, a mouse, a keyboard, a network card or a Wifi interface, etc.
  • the data to be processed can be transmitted from the external device 103 to the combined processing device 101 through the external interface device 102.
  • the calculation result of the combined processing device 101 can be transmitted back to the external device 103 via the external interface device 102.
  • the external interface device 102 can have different interface forms, such as a PCIe interface, etc.
  • the board 10 also includes an external memory 104 for storing data, which includes one or more storage units 105.
  • the external memory 104 is connected to the control device 106 and the combined processing device 101 through a bus and transmits data.
  • the control device 106 in the board 10 is configured to control the state of the combined processing device 101.
  • the control device 106 may include a single chip microcomputer, also known as a micro control unit (MCU).
  • MCU micro control unit
  • FIG2 is a schematic diagram showing the combined processing device 101 of this embodiment.
  • the combined processing device 101 includes a computing device 201, an interface device 202, a processing device 203, and a DRAM 204.
  • the computing device 201, the interface device 202, and the processing device 203 are integrated into the aforementioned system on chip.
  • the computing device 201 itself is the aforementioned system on chip.
  • the computing device 201 is configured to execute user-specified operations, and is mainly implemented as a single-core intelligent processor or a multi-core intelligent processor to perform deep learning or machine learning calculations. It can interact with the processing device 203 through the interface device 202 to jointly complete the user-specified operations.
  • the interface device 202 is used to transmit data and control instructions between the computing device 201 and the processing device 203.
  • the computing device 201 can obtain input data from the processing device 203 via the interface device 202 and write it into the storage device on the computing device 201 chip.
  • the computing device 201 can obtain control instructions from the processing device 203 via the interface device 202 and write them into the control cache on the computing device 201 chip.
  • the interface device 202 can also read data in the storage device of the computing device 201 and transmit it to the processing device 203.
  • the processing device 203 performs basic controls including but not limited to data handling, starting and/or stopping the computing device 201, etc.
  • the processing device 203 can be a central processing unit, a graphics processing unit, or one or more types of processors in other general and/or special processors, which include but are not limited to digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., and their number can be determined according to actual needs.
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the computing device 201 can be regarded as having a single-core structure or a homogeneous multi-core structure.
  • the computing device 201 and the processing device 203 are integrated and considered together, the two are regarded as forming a heterogeneous multi-core structure.
  • DRAM 204 is the aforementioned high-bandwidth memory, which is used to store data to be processed. Its size is usually 16G or larger and is used to save data of the computing device 201 and/or the processing device 203.
  • FIG. 3 shows a schematic diagram of the internal structure of a computing device 201.
  • the computing device 201 is used to process input data such as computer vision, speech, natural language, and data mining.
  • the computing device 201 in the figure adopts a multi-core hierarchical structure design, which includes an external storage controller 301, a peripheral communication module 302, an on-chip interconnect module 303, a synchronization module 304, and multiple clusters 305.
  • the peripheral communication module 302 is used to receive control signals from the processing device 203 through the interface device 202 to start the computing device 201 to perform tasks.
  • the on-chip interconnect module 303 connects the external storage controller 301, the peripheral communication module 302 and multiple clusters 305 to transmit data and control signals between each module.
  • the synchronization module 304 is a global synchronization barrier controller (Global Barrier Controller, GBC), which is used to coordinate the work progress of each cluster and ensure the synchronization of information.
  • GBC Global Barrier Controller
  • Multiple clusters 305 are the computing cores of the computing device 201. Four are shown in the figure as an example. With the development of hardware, the computing device 201 disclosed in the present invention can also include 8, 16, 64, or even more clusters 305. The cluster 305 is used to efficiently execute the deep learning algorithm.
  • Each cluster 305 includes a plurality of processor cores (IPU Cores) 306 and a memory core (MEM Core) 307 .
  • processor cores IPU Cores
  • MEM Core memory core
  • Each processor core 306 includes three modules: a control module 41, a computing module 42, and a storage module 43.
  • the control module 41 is used to coordinate and control the operation of the operation module 42 and the storage module 43 to complete the deep learning task, and includes an instruction fetch unit (IFU) 411 and an instruction decode unit (IDU) 412.
  • the instruction fetch unit 411 is used to obtain instructions from the processing device 203, and the instruction decode unit 412 decodes the obtained instructions and sends the decoding results to the operation module 42 and the storage module 43 as control information.
  • the operation module 42 includes a vector operation unit 421 and a matrix operation unit 422.
  • the vector operation unit 421 is used to perform vector operations and can support complex operations such as vector multiplication, addition, and nonlinear transformation;
  • the matrix operation unit 422 is responsible for the core calculation of the deep learning algorithm, namely matrix multiplication and convolution.
  • the storage module 43 is used to store or transfer related data, including a neuron RAM (NRAM) 431, a weight RAM (WRAM) 432, an input/output direct memory access module (IODMA) 433, and a transfer direct memory access module (MVDMA) 434.
  • NRAM 431 is used to store input and output data and intermediate results for calculation by the processor core 306;
  • WRAM 432 is used to store the weights of the deep learning network;
  • IODMA 433 controls the memory access between NRAM 431/WRAM 432 and DRAM 204 through the broadcast bus 309;
  • MVDMA 434 is used to control the memory access between NRAM 431/WRAM 432 and SRAM 308.
  • the storage core 307 is mainly used for storage and communication, that is, to store shared data or intermediate results between the processor cores 306, and to perform communication between the cluster 305 and the DRAM 204, between the clusters 305, and between the processor cores 306.
  • the storage core 307 has the ability of scalar operations and is used to perform scalar operations.
  • the storage core 307 includes a shared memory unit (SRAM) 308, a broadcast bus 309, a cluster direct memory access module (cluster Direct Memory Access, CDMA) 310 and a global direct memory access module (Global Direct Memory Access, GDMA) 311.
  • SRAM shared memory unit
  • CDMA cluster Direct Memory Access
  • GDMA Global Direct Memory Access
  • the SRAM 308 plays the role of a high-performance data transfer station.
  • the data reused between different processor cores 306 in the same cluster 305 does not need to be obtained from the DRAM 204 by each processor core 306, but is transferred between the processor cores 306 through the SRAM 308.
  • the storage core 307 only needs to quickly distribute the reused data from the SRAM 308 to multiple processor cores 306, so as to improve the efficiency of inter-core communication and greatly reduce on-chip and off-chip input/output access.
  • Broadcast bus 309, CDMA 310 and GDMA 311 are used to perform communication between processor cores 306, communication between clusters 305 and data transmission between clusters 305 and DRAM 204, respectively. They will be described below.
  • the broadcast bus 309 is used to complete high-speed communication between the processor cores 306 in the cluster 305.
  • the broadcast bus 309 of this embodiment supports inter-core communication modes including unicast, multicast and broadcast.
  • Unicast refers to point-to-point (i.e., single processor core to single processor core) data transmission
  • multicast is a communication mode of transmitting a copy of data from SRAM 308 to specific processor cores 306, and broadcast is a communication mode of transmitting a copy of data from SRAM 308 to all processor cores 306, which is a special case of multicast.
  • CDMA 310 is used to control memory access from SRAM 308 between different clusters 305 in the same computing device 201.
  • GDMA 311 cooperates with the external memory controller 301 to control memory access from SRAM 308 of cluster 305 to DRAM 204, or to read data from DRAM 204 to SRAM 308.
  • FIG5 shows a schematic diagram of a communication system including a transmitting end and a receiving end according to an embodiment of the present disclosure.
  • the communication system can be divided into components according to functions, and is divided into a transmitting end 1 and a receiving end 2.
  • the transmitting end 1 may include a first storage module 11, a first instruction execution module 12, a first sending module 13, a first receiving module 14 and a first control module 15, and the receiving end 2 includes a second storage module 21, a second instruction execution module 22, a second sending module 23, a second receiving module 24 and a second control module 25.
  • each module For the transmitter 1, the function of each module is:
  • the first storage module 11 is used to store data and instructions.
  • the data source can be local original data or It can be data sent from an upstream device (in case of multi-stage transmission), or it can be the result data of calculation between data sent from an upstream device and local data.
  • the first instruction execution module 12 is used to execute the instructions in the first storage module 11 and is responsible for completing the execution processing of the application layer logic.
  • the sending request is initiated by the instruction, that is, the communication behavior is initiated by the application layer.
  • the first instruction execution module 12 can also complete local operations according to the instructions.
  • First sending module 13 The sending end 1 is directly connected to the physical link through the first sending module 13.
  • the first sending module 13 is used to send data and control information.
  • the first sending module 13 can count the communication packets sent and receive the response to each packet. If NACK (Negative acknowledgment, meaning abnormal response) is received or ACK (Acknowledgement, meaning positive feedback, indicating that the receiving end has correctly received the corresponding packet) is not received for a long time, the abnormal state is recorded and the interrupt is reported to the first control module 15. If ACK is received within the specified time, ACK can be replied to the ACK.
  • NACK Negative acknowledgment, meaning abnormal response
  • ACK Acknowledgement, meaning positive feedback, indicating that the receiving end has correctly received the corresponding packet
  • First receiving module 14 The transmitting end can be directly connected to the physical link through the first receiving module 14.
  • the first receiving module 14 on the transmitting end 1 is only used to receive control information.
  • the first control module 15 is used to issue tasks, receive the interruption of the first sending module 13, suspend the operation of the first instruction execution module 12, and reissue tasks to let the first instruction execution module 12 retransmit.
  • each module is:
  • the second storage module 21 is used to store data and instructions.
  • the data source may be local original data, data sent from an upstream sending end, or result data calculated from data sent from an upstream sending end and local data.
  • the second instruction execution module 22 is used to execute the instructions in the second storage module 21 and is responsible for completing the execution processing of the application layer logic.
  • the sending request is initiated by the instruction, that is, the communication behavior is initiated by the application layer.
  • the second instruction execution module 22 can also complete local operations according to the instructions.
  • Second receiving module 24 The receiving end 2 is directly connected to the physical link through the second receiving module 24.
  • the second receiving module 24 receives the received data packet and completes the memory synchronization operation according to the type of the data packet.
  • the received packet is checked and corrected. If the error cannot be corrected, a NACK is replied to the sending module of the sending end. An ACK is replied for each correct reception of the packet. If the ACK sent by the second receiving module 24 does not receive an ACK response, the abnormal state is recorded and an interrupt is reported to the second control module 25.
  • Second sending module 23 The receiving end is directly connected to the physical link through the second receiving module 23.
  • the second sending module 23 is only used to send control information on the receiving end.
  • the second control module 25 is used to issue the task, and according to the interruption sent by the second receiving module 24, the operation of the second instruction execution module 22 is suspended, and the task is reissued to let the second instruction execution module 22 retransmit.
  • control information at the sending end 1 means: the number of data fragments that the current sending end 1 has sent; at the receiving end 2, it means the number of data fragments that the current receiving end 2 has processed.
  • the control information of the sender can be recorded as Tail, and the control information of the receiver 2 can be recorded as Head.
  • the receiver 2 receiving the data and the receiver 2 processing the data are two different concepts. Even if the receiver 2 only receives data, if the sender 1 does not send it directly to the target storage space of the receiver 2 (recorded as Dstspace), but sends it to the receiving buffer of the receiver 2 (recorded as Recvbuffer), then the receiver 2 also needs to copy the data from Recvbuffer to Dstspace. Only after the receiver 2 confirms that the data is in Dstspace will it update the value of Head. Recvbuffer is the functional name for the cache hardware storage space of the receiver.
  • both Head and Tail are monotonically increasing, and each increase is the number of data fragments sent or received this time.
  • the Head is not greater than the Tail.
  • the difference between the head and the tail should not exceed half the size of the Recvbuffer.
  • the overall capacity of the Recvbuffer at the receiving end is represented as m, that is, at most m data slices with the difference between the tail and the head are allowed.
  • two devices A and B will execute the communication algorithm Allreduce algorithm. The two devices A and B first send their own X data to each other, then obtain the upstream X data from the Recvbuffer, and complete the calculation with the local data; then send X data to each other again.
  • Both Head and Tail have memory synchronization semantics.
  • the Data, Head, and Tail transmitted by the same physical link in the previous sequence of the Head/Tail must be written to the device storage space.
  • the device here, in this article, usually refers to the hardware of the sending device and the receiving device.
  • Data packets are lost or errors occur during the transmission process.
  • the lost data packets here can be the loss of payload data, the loss of the sent tail, or the payload data error or tail error.
  • a packet sequence number error (PSN Error) of the link will be triggered.
  • PSN check at the receiving end fails, a NACK will be sent back to the sending end.
  • this case may also trigger a timeout mechanism and actively end the communication.
  • the sending process is normal, but the ACK returned by the receiving end is lost. At this time, the sending end will still trigger the timeout mechanism.
  • retransmission may succeed or fail by retransmitting from the abnormal position. Only when the correct communication cannot be completed after multiple (for example, three consecutive) retransmissions, it is considered that an abnormality that cannot be retransmitted has occurred. In this case, the application usually needs to completely stop data transmission in order to check whether the link is abnormal.
  • the receiver should only process the data packet starting from the error position. This is because the receiver may have performed in-place calculation operations, and the calculation results have already covered the original local data area. If the calculation is repeated again, the result of the application task will be wrong, so it is not allowed.
  • Head/Tail is communicated by overwriting
  • the device (sender and receiver) needs to back up the value of Head/Tail, which can be called checkpoint (checkpoint, backup point) for subsequent retransmission.
  • checkpoint is used as the starting point for recovery. Therefore, each device should also have a local record of the previously sent location information, and the subsequent retransmission recovery needs to use the previously sent location as the end point of the retransmission.
  • FIG6 shows a method for controlling data retransmission at an application layer in a communication system according to an embodiment of the present disclosure, wherein the communication system comprises: a transmitting end 1, a receiving end 2 and a communication link 3 connecting the transmitting end 1 and the receiving end 2, wherein the method comprises: at the transmitting end 1, in operation S6110, pre-sending data to the receiving end 2, wherein the data comprises a payload and a count value for the payload; in operation S6120, in response to the data being in a pre-sending state, recording first transmitting end information, wherein the first transmitting end information indicates a first amount of the data being pre-sent; in operation S6130, transmitting the data through the communication link at the receiving end 2, in operation S6210, if the data is received, the count value is recorded; at operation S6220, a second quantity is generated according to the count value, the second quantity indicating the quantity of the data received and fed back by the receiving end; at operation S6230, first receiving end information is fed back to the transmitting
  • FIG7 shows a schematic diagram of a normal communication process according to an embodiment of the present disclosure.
  • data is sent from a transmitter 1 to a receiver 2.
  • the first sending module 13 in the transmitter 1 is marked as tx
  • the second receiving module 24 of the receiver 2 is marked as rx.
  • the address used by the Head/Tail for communication is marked as ptr
  • the checkpoint of the Head/Tail is marked as ckpt
  • the maximum value currently sent by the Head/Tail is marked as cache.
  • the following key variables can be constructed:
  • the tail information has been introduced above and will not be repeated here.
  • tx_tail_cache tx_tail that has been sent by the transmitter 1 but has not yet been confirmed to be received by the receiver 2.
  • the tx_tail can be stored in the storage space of the transmitter 1 for sending (for example, in the cache of the Recybuffer transmitter 1).
  • tx_tail_cache can indicate that the transmitter 1 "thought it had been sent but may not have actually been sent to the receiver 2".
  • the data that the transmitter 1 "has sent but may not have actually been sent to the receiver 2" can be referred to as pre-sent data.
  • the pre-sent data may include a payload and a count value for the payload. The count value here is the tail information described above.
  • the above-mentioned parameter tx_tail_cache can be updated regardless of whether the data is sent successfully (that is, in response to the data being in a pre-sent state, the first transmitter information is updated).
  • recording the first sending end information may include: in response to the data being placed in the pre-sending state being incremented, the first quantity is incremented accordingly, regardless of whether the data is sent successfully, and/or regardless of whether a response to the data is received.
  • the tail value carried by the data is incremented once.
  • the increment of the tail value does not consider whether the data is actually sent successfully, nor does it consider whether the sender 1 receives a response (i.e., head) value for the data.
  • the first sender information recorded in this article may be recorded whenever the first sender information is updated, or the first sender information with the maximum value may be directly recorded.
  • the sender may poll the maximum value of the current tail at regular intervals. In this case, the maximum tail value or some of the tail values may be directly polled, but the tail value corresponding to the currently sent data may not necessarily be polled.
  • tx_tail_ckpt tx_tail sent by sender 1 and confirmed by receiver 2. Generally, it means that receiver 2 has confirmed by replying head. If receiver 2 confirms by head, it means that receiver has received the data sent by sender 1. The breakpoint of data retransmission can be determined by parameter tx_tail_ckpt.
  • 4.rx_head The head information sent by receiver 2 to transmitter 1.
  • receiver 2 When receiver 2 receives the data containing tail, it will record the tail value (i.e. the count value mentioned above).
  • Receiver 2 can reply to transmitter 1 or The head value is fed back to confirm that the data has been received, that is, the head value can reflect the amount of data (ie, tail) received by the receiving end 2.
  • the head value increases accordingly. However, the head value is less than or equal to the received tail value. For example, if the data containing tail values of 1-3 all arrive at the receiving end 2 smoothly, then the head value is updated accordingly after each tail value is received and processed by the receiving end 2, that is, the head value is equal to the tail value; however, if the data containing the tail value of 4 is blocked, that is, the receiving end 2 does not receive the data with a tail value of 4, the maximum head value generated by the receiving end 2 is 3.
  • rx_head_cache rx_head that has been sent by receiving end 2 but has not yet been confirmed received by sending end 1. Generally speaking, the sending of rx_head does not require additional confirmation from receiving end 1, and it is considered delivered as long as there is no timeout.
  • the parameter rx_head_cache can be used to represent the first receiving end information, that is, it can represent the second amount of data received by receiving end 2 and feedback has been made.
  • 7.rx_tail_cache the tail value received by receiver 2 when it accesses DRAM to check the tail, that is, the tail value actually received by receiver 2.
  • recording the count value includes: overwriting the old count value with the new count value.
  • the receiving end 2 can record each received tail value and overwrite the previous tail value with the latest tail value, so that the receiving end 2 will keep the tail value at the maximum value.
  • recording the count value includes: searching for a maximum count value in the received data; and recording only the maximum count value.
  • the receiving end 2 can poll the maximum value of the received tail at regular intervals.
  • the maximum tail value or some of the tail values are directly polled, and the tail value corresponding to the currently sent data is not necessarily polled.
  • the maximum tail value can be directly recorded without recording other tail values. In this way, only the maximum tail value needs to be paid attention to, and all tail values do not need to be recorded.
  • 8.tx_head_cache the head value received by sender 1 when it accesses DRAM to check the head, that is, the head value actually sent by receiver 2 and actually received by sender 1.
  • a first state table recording the states of various parameters may be stored in the transmitter 1, and the first state table may include at least three parameters, namely tx_tail_cache, tx_tail-ckpt and tx_head_cache. In the initial state, the values of these parameters are all 0, as shown in state 1 in Fig. 7.
  • a second state table recording the states of various parameters may be stored, and the second state table may include at least three parameters, namely rx_head_cache, rx_head_ckpt and rx_tail_cache.
  • the values of these parameters are all 0, as shown in state 1' in Figure 7.
  • sender 1 sends 5 data to receiver 2
  • the value of parameter tx_tail_cache becomes 5, which means that sender 1 has sent 5 data, but whether these 5 data have reached receiver 2 has not yet been confirmed.
  • sender 1 sends data, it also sends the tail of each data to the receiver. Each time a data is sent, the tail value increases. This is shown in state 2 in Figure 7.
  • parameter rx_tail_cache At the receiving end 2, when data is received, it can be recorded as parameter rx_tail_cache, which can increase as the tail value increases. When 5 data are received, the value of parameter rx_tail_cache is updated to 5. The parameter rx_tail_cache can also directly record and reflect the maximum value of the received tail, rather than gradually increasing, as shown in state 2' of Figure 7.
  • receiving end 2 After receiving end 2 processes the data, it will feed back the head value to sending end 1, but it is not known whether sending end 1 has received the head value. In this case, the state of parameter rx_head_cache is updated to 5, which means that receiving end 2 has sent 5 head information (rx_head), but sending end 1 has not yet confirmed receipt of the 5 head information.
  • the transmitter 1 After the transmitter 1 receives the head information, it sends a feedback signal to the receiver 2. After the receiver 2 receives the feedback signal, it updates the parameter rx_head_ckpt. As shown in state 3' in FIG7, the parameter rx_head_ckpt is updated. is 5.
  • the value of the parameter rx_head_cache may be fed back to the transmitter 1 , so that the parameter tx_head_cache is updated to 5.
  • the parameter tx_tail_ckpt is also updated to 5, which indicates the number of tx_tails that have been confirmed by the receiver 2 after the transmitter 1 has sent 5 data, as shown in state 3 in FIG. 7 .
  • Fig. 8 shows a schematic diagram of a packet loss/error retransmission process. It should be understood that, for the sake of simplicity, in Fig. 8, only the sending and receiving directions of data are shown, and the sending module and the receiving module are not shown.
  • a first state table recording the states of various parameters may be stored in the transmitter 1, and the first state table may include at least three parameters, namely tx_tail_cache, tx_tail-ckpt and tx_head_cache. In the initial state, the values of these parameters are all 0, as shown in state 1 in Fig. 8.
  • a second state table recording the states of various parameters may be stored, and the second state table may include at least three parameters, namely rx_head_cache, rx_head_ckpt and rx_tail_cache.
  • the values of these parameters are all 0, as shown in state 1' in Figure 8.
  • sender 1 sends 5 data to receiver 2, namely data [1, 2, 3, 4, 5], then the value of parameter tx_tail_cache becomes 5, which means that sender 1 has sent 5 data, but whether these 5 data have reached receiver 2 has not yet been confirmed.
  • sender 1 sends data, it also sends the tail of each data to the receiver. Each time a data is sent, the tail value increases. This is shown in state 2 in Figure 8.
  • the parameter rx_tail_cache increases as the tail value increases. Different from the implementation shown in FIG7, in this implementation, data loss or error occurs from the 4th data, that is, only data [1, 2, 3] is successfully sent to the receiving end 2. Therefore, the value of the parameter rx_tail_cache is updated to 3. As shown in state 2' of FIG8.
  • the link can send an interrupt request to the transmitter 1.
  • the control module in the transmitter 1 can determine the cause of the reported interruption and then determine whether to retransmit according to the specific cause of the interruption.
  • the receiver 2 After receiving the data [1,2,3], the receiver 2 sends the head information back to the transmitter 1, but it is not known whether the transmitter 1 has received the head value. Since the receiver 2 has only received 3 data, the receiver 2 sends the information with head values of 1-3. In this case, the state of the parameter rx_head_cache is updated to 3, which means that the receiver 2 has sent 3 head information (rx_head), but the transmitter 1 has not yet confirmed that it has received the 3 head information. This is shown in state 3' in Figure 8.
  • the transmitter 1 After the transmitter 1 receives the head information, it sends a feedback signal to the receiver 2. After the receiver 2 receives the feedback signal, it updates the parameter rx_head_ckpt. As shown in state 3' in Figure 8, since the receiver only receives 3 data and the head value fed back by the receiver is 1-3, the parameter rx_head_ckpt is updated to 3.
  • the receiver 2 feeds back the parameter rx_head_cache to the transmitter 1.
  • the transmitter 1 updates the parameter tx_head_cache to 3, which means that after the transmitter 1 has sent 5 data, the receiver 2 confirms the receipt and feeds back 3 data through the head, as shown in state 3 of Figure 8.
  • the parameter tx_tail_ckpt is updated to 3 accordingly, which indicates that the retransmission should start from the 4th data.
  • determining whether to retransmit the data according to the first transmitting end information and the first receiving end information includes: determining the type of interruption according to the first transmitting end information and the first receiving end information; and determining whether to retransmit the data according to the type of interruption.
  • determining the type of interruption based on the first transmitting end information and the first receiving end information may include: if the first number is greater than the second number, determining the type of interruption as data loss or error from the transmitting end to the receiving end.
  • the data loss or error from the transmitting end to the receiving end includes the loss of the payload and/or the loss or error of the count value. It should be understood that the data loss here is not only the loss of the payload data, but also the loss of other information such as the tail value. For example, even if the payload data is correctly transmitted from the transmitting end 1 to the receiving end 2, but the tail value carried is lost, it should also be considered as data loss.
  • the first receiving end information referred to in this article refers to the data that has been received and has been fed back through the head. Therefore, the receiving end information can reflect the amount of data actually received by the receiving end, and reflect the number of head values that the receiving end has fed back for this reception, which is different from the fed back head value.
  • the sender 1 can determine whether to initiate data retransmission. For example, in the example shown in Figure 8, the sender 1 will find that it has sent 5 data (the value of the parameter tx_tail_cache is equal to 5), but the receiver 2 only received 3 data (the value of the parameter tx_head_cache is equal to 3). Therefore, the sender 1 can confirm that the interrupt signal reported by the communication link is due to data loss or error.
  • determining whether to retransmit the data according to the type of the interruption includes: if the type of the interruption is determined to be data loss from the sending end to the receiving end, determining the breakpoint of the interruption according to the second quantity; and retransmitting the data starting from the breakpoint.
  • the value of the parameter tx_head_cache becomes 3
  • the value of the parameter tx_tail_ckpt is also updated to 3 accordingly, so the transmitter 1 can know that three data have been successfully sent, and the retransmission should start from the fourth data.
  • the above-mentioned determination of the interruption breakpoint according to the second quantity is essentially to determine the interruption breakpoint according to the breakpoint position determined by the second quantity, and the parameter tx_tail_ckpt can identify the breakpoint position.
  • receiver 2 After receiving data [4,5], receiver 2 will feed back the head signal to the transmitter. Therefore, the value of the parameter rx_head_cache is updated from 3 to 5, as shown in state 5'.
  • the parameter rx_head_cache indicates the rx_head that has been sent by receiver 2 but has not yet been confirmed by transmitter 1. Generally speaking, the sending of rx_head does not require additional confirmation from receiver 1, and it is considered to have been delivered as long as there is no timeout.
  • the value of the parameter rx_head_ckpt is also updated to 5, which means that after the receiving end 2 sends the head signal to the sending end 1, it receives a confirmation from the sending end 1.
  • the value of tx_head_cache is updated according to the value of rx_head_cache fed back by the receiving end 2, so that the value of tx_head_cache is updated to 5, and thus, the value of the parameter tx_tail_ckpt is also updated to 5 accordingly, as shown in state 5 of FIG8 .
  • the value of the parameter tx_tail_cache is the same as the value of the parameter tx_head_cache, which means that the amount of data sent by the transmitting end 1 is the same as the amount of data received by the receiving end 2, so there is no need to retransmit the data.
  • determining the type of interruption according to the first transmitting end information and the first receiving end information includes: if the first number is equal to the second number, determining the type of interruption as the loss of response to the data fed back from the receiving end to the transmitting end.
  • Figure 9 shows the situation where the ACK fed back by the receiving end 2 is lost. It should be understood that, for the sake of simplicity, in Figure 9, only the sending and receiving directions of data are shown, and the sending module and the receiving module are not shown.
  • a first state table recording the states of various parameters may be stored in the transmitter 1, and the first state table may include at least three parameters, namely tx_tail_cache, tx_tail-ckpt and tx_head_cache. In the initial state, the values of these parameters are all 0, as shown in state 1 in Fig. 9.
  • a second state table recording the states of various parameters may be stored, and the second state table may include at least three parameters, namely rx_head_cache, rx_head_ckpt and rx_tail_cache.
  • the values of these parameters are all 0, as shown in state 1' in Figure 9.
  • sender 1 sends 5 data to receiver 2, namely data [1, 2, 3, 4, 5], then the value of parameter tx_tail_cache becomes 5, which means that sender 1 has sent 5 data, but whether these 5 data have reached receiver 2 has not yet been confirmed.
  • sender 1 sends data, it also sends the tail of each data to the receiver. Each time a data is sent, the tail value increases. This is shown in state 2 in Figure 9.
  • the parameter rx_tail_cache increases as the tail value increases. Different from the implementation shown in FIG8, in this implementation, all data [1, 2, 3, 4, 5] are successfully sent to the receiving end 2. Therefore, the value of the parameter rx_tail_cache is updated to 5. As shown in state 2' of FIG9.
  • the receiver 2 After receiving the data [1,2,3,4,5], the receiver 2 processes the data and sends the head information back to the transmitter 1, but it is not known whether the transmitter 1 has received the head value. Since the receiver 2 receives 5 data, the receiver 2 sends the information with head values of 1-5. In this case, the state of the parameter rx_head_cache is updated to 5, which means that the receiver 2 has sent 5 head information (rx_head), but the transmitter 1 has not yet confirmed that the 5 head information has been received, as shown in state 3' in Figure 9.
  • the (ACK) information of the fourth data packet is lost, that is, the transmitting end 1 only receives three ACK information, but in fact all the data packets have been received and processed at the receiving end 2 .
  • rx_head_cache is updated to 5 and sent to the transmitting end 1.
  • the transmitting end 1 receives the head and sends a feedback signal
  • the receiving end updates the parameter rx_head_ckpt.
  • the parameter rx_head_ckpt is updated to 5, as shown in state 3' in Figure 9.
  • sender 1 does not receive the ACK information of data packets 4 and 5, the timeout mechanism will be triggered and the control module will restart the task. After the new task of sender 1 is started, it checks the head value received from receiver 2 and updates tx_head_cache to 5, which means that after sender 1 has sent 5 data, receiver 2 confirms that it has received 5 data. Therefore, sender 1 confirms that its previous timeout was caused by the loss of ACK. It does not need to resend any data and can end directly, as shown in state 3 of Figure 9.
  • the parameter tx_head_ckpt is updated to 5 accordingly.
  • determining the type of interruption based on the first sending end information and the first receiving end information includes: if the first number is equal to the second number, determining the type of interruption as the loss of response to the data fed back from the receiving end to the sending end.
  • the value of the parameter tx_tail_cache is the same as the value of the parameter tx_head_cache, which means that the amount of data sent by the transmitter 1 is the same as the amount of data received by the receiver 2, so the transmitter 1 can realize that the type of interruption is the loss of the response to the data fed back from the receiver to the transmitter.
  • the transmitter 1 can realize that the type of interruption is the loss of the response to the data fed back from the receiver to the transmitter.
  • it is determined that the type of interruption is the loss of the response to the data fed back from the receiver to the transmitter, it is determined that there is no need to retransmit the data.
  • the data to be retransmitted is stored in the buffer area of the application layer.
  • the transport layer no longer needs additional space for retransmission, and the application layer directly reuses the buffer area (such as Recvbuffer) directly used by the application layer, and no additional space is needed, thereby saving the storage overhead of the transport layer.
  • a retransmission indication is sent through the application layer to retransmit the data.
  • an indication of data retransmission can be provided at the application layer of the sending end, so that the application layer retransmission can correctly handle the link error situation and ensure data reliability through retransmission.
  • Figure 10 shows a flowchart of a method for controlling data retransmission at the application layer according to another aspect of the present disclosure, comprising: in operation S1010, pre-sending data, the data comprising a payload and a count value for the payload; in operation S1020, in response to the data being in a pre-sending state, recording first transmitting end information, the first transmitting end information indicating a first amount of the data being pre-sent; in operation S1030, receiving and recording first receiving end information, the first receiving end information indicating a second amount of data received and fed back by the receiving end, wherein the second amount is not greater than the first amount; and, in operation S1040, determining whether to retransmit the data based on the first transmitting end information and the first receiving end information.
  • FIG. 10 shows the operations performed by the transmitting end, which have been described above in conjunction with FIGS. 6-9 and will not be repeated here.
  • pre-sending data includes: placing the data in a storage space of a sending end for preparation for sending.
  • the storage space here refers to the underlying hardware storage space located at the sending end.
  • recording the first sending end information in response to the data being in a pre-sending state, includes: in response to the data being placed in the pre-sending state being incremented, the first quantity is incremented accordingly, regardless of whether the data is sent successfully, and/or regardless of whether a response to the data is received.
  • receiving and recording the first receiving end information includes: updating the second quantity as the first receiving end information changes.
  • receiving and recording the first receiving end information includes: recording the second receiving end information having the largest second number.
  • determining whether to retransmit the data based on the first sending end information and the first receiving end information includes: determining the type of interruption based on the first sending end information and the first receiving end information; and determining whether to retransmit the data based on the type of interruption.
  • determining the type of interruption according to the first transmitting end information and the first receiving end information includes: if the first number is greater than the second number, determining the type of interruption as data loss or error from the transmitting end to the receiving end.
  • the data loss or error from the transmitting end to the receiving end includes the loss or error of the effective load and/or the loss or error of the counting value.
  • determining whether to retransmit the data according to the type of the interruption includes: if the type of the interruption is determined to be data loss from the sending end to the receiving end, determining the breakpoint of the interruption according to a second quantity; and retransmitting the data starting from the breakpoint.
  • determining the type of interruption based on the first transmitting end information and the first receiving end information includes: if the first number is equal to the second number, determining the type of interruption as the loss of response to the data fed back from the receiving end to the transmitting end.
  • determining whether to retransmit the data according to the type of the interruption includes: if it is determined that the type of the interruption is a loss of a response to the data fed back from the receiving end to the sending end, determining that there is no need to retransmit the data.
  • data to be retransmitted is stored in a buffer area (eg, Recvbuffer) of the application layer.
  • a buffer area eg, Recvbuffer
  • a retransmission indication is sent through an application layer to retransmit the data.
  • FIG. 11 shows a device for controlling data retransmission at the application layer according to one aspect of the present disclosure, comprising: sending Unit 1110 is used to pre-send data, wherein the data includes a payload and a count value for the payload; a transmitting end information updating unit 1120 is used to record first transmitting end information in response to the data being in a pre-sending state, wherein the first transmitting end information indicates a first quantity of the data being pre-sent; a receiving unit 1130 is used to receive and record first receiving end information, wherein the first receiving end information indicates a second quantity of data received and fed back by the receiving end, wherein the second quantity is not greater than the first quantity; and a retransmission judgment unit 1140 is used to determine whether to retransmit the data based on the first transmitting end information and the first receiving end information.
  • a communication system for controlling data retransmission at an application layer, the communication system comprising: a transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, wherein the transmitting end pre-transmits data to the receiving end, the data comprising a payload and a count value for the payload; the transmitting end records first transmitting end information in response to the data being in a pre-transmitting state, the first transmitting end information representing a first quantity of the data being pre-transmitted; the communication link is used to transmit the data; if the receiving end receives the data, the receiving end records the count value; the receiving end generates a second quantity based on the count value, the second quantity representing a second quantity of the data received and fed back by the receiving end; the receiving end feeds back first receiving end information to the transmitting end, the first receiving end information comprising a second quantity, and the second quantity is not greater than the first quantity; the transmitting end receives and records the first transmitting end information in response to the data being in
  • an electronic device including: one or more processors; and a memory, in which computer executable instructions are stored.
  • the computer executable instructions are executed by the one or more processors, the electronic device executes the method described above.
  • a computer-readable storage medium comprising computer-executable instructions.
  • the computer-executable instructions are executed by one or more processors, the method described above is executed.
  • the present disclosure is based on the communication flow of head, tail and data (Data) and the corresponding device, and uses the relative relationship of Head/Tail to perform retransmission of the application layer, thereby ensuring the reliability of communication.
  • the starting point and the ending point of the data can be known through the information of the application layer. Therefore, the communication protocol no longer needs to maintain the starting point and the ending point that need to be retransmitted, and only needs to faithfully execute each transmission request issued by the application layer.
  • the transport layer no longer needs additional space for retransmission, and the application layer directly reuses the buffer area (such as Recvbuffer) directly used by the application layer, and no additional storage space is needed.
  • the buffer area such as Recvbuffer
  • retransmission is performed by the application layer, and the application layer will explicitly perceive the occurrence of retransmission.
  • the application layer when the application layer is retransmitting, it can ensure that the same task will not be sent normally at the same time, avoiding the situation where retransmission traffic and normal task traffic compete on the link at the same time, thereby reducing the probability of link congestion and packet loss.
  • the retransmission design at the software level is performed at the application layer, which can reduce the hardware design of the transmission layer, thereby speeding up the development and reducing the hardware customization cost.
  • the electronic equipment or device disclosed herein may include servers, cloud servers, server clusters, data processing devices, robots, computers, printers, scanners, tablet computers, smart terminals, PC devices, IoT terminals, mobile terminals, mobile phones, driving recorders, navigators, sensors, cameras, cameras, video cameras, projectors, watches, headphones, mobile storage, wearable devices, visual terminals, automatic driving terminals, transportation, household appliances, and/or medical equipment.
  • the transportation includes airplanes, ships and/or vehicles;
  • the household appliances include televisions, air conditioners, microwave ovens, refrigerators, rice cookers, humidifiers, washing machines, electric lights, gas stoves, and range hoods;
  • the medical equipment includes magnetic resonance imaging, ultrasound machines and/or electrocardiographs.
  • the electronic equipment or device disclosed herein may also be applied to the Internet, IoT, data centers, energy, transportation, public administration, manufacturing, education, power grids, telecommunications, finance, retail, construction sites, and medical fields. Further, the electronic equipment or device disclosed herein may also be used in cloud, edge, and terminal applications related to artificial intelligence, big data, and/or cloud computing.
  • the electronic device or apparatus with high computing power according to the disclosed solution can be applied to a cloud device (such as a cloud server).
  • Electronic devices or apparatuses with low power consumption can be applied to terminal devices and/or edge devices (such as smartphones or cameras).
  • the hardware information of the cloud device and the hardware information of the terminal device and/or the edge device are compatible with each other, so that according to the hardware information of the terminal device and/or the edge device, appropriate hardware resources can be matched from the hardware resources of the cloud device to simulate the hardware resources of the terminal device and/or the edge device, so as to complete the unified management, scheduling and collaborative work of the end-cloud integration or the cloud-edge-end integration.
  • a method for controlling data retransmission at an application layer comprising:
  • Pre-sending data the data comprising a payload and a count value for the payload
  • first receiving end information indicates a second amount of data received and fed back by the receiving end, wherein the second amount is not greater than the first amount
  • pre-sending data comprises: placing the data in a storage space of the sending end in preparation for sending.
  • the first number is incremented accordingly, regardless of whether the data is successfully transmitted and/or regardless of whether a response to the data is received.
  • Clause 4 The method according to any one of clauses 1-3, wherein receiving and recording the first receiving end information includes: updating the second quantity as the first receiving end information changes.
  • Clause 5 The method according to any one of clauses 1-3, wherein receiving and recording the first receiving end information comprises: recording the second receiving end information having the largest second number.
  • Clause 6 A method according to any one of clauses 1-5, wherein, in response to an interruption signal reported from a communication link, it is determined whether to retransmit the data based on the first sending end information and the first receiving end information.
  • Whether to retransmit the data is determined according to the type of the interruption.
  • the type of the interruption is determined to be data loss or error from the transmitting end to the receiving end.
  • Clause 9 The method according to clause 8, wherein the data loss or error from the transmitting end to the receiving end includes the loss or error of the payload and/or the loss or error of the count value.
  • the data is retransmitted starting from the breakpoint.
  • Clause 11 The method according to clause 7, wherein the first transmitting end information and the first receiving end information are used to Identify the types of interruptions including:
  • the type of the interruption is a loss of a response to the data fed back from the receiving end to the transmitting end.
  • Clause 13 The method according to any one of clauses 1 to 12, wherein the data to be retransmitted is stored in a buffer area of the application layer.
  • Clause 14 The method according to any one of clauses 1 to 13, wherein a retransmission indication is sent through an application layer to perform retransmission of the data.
  • An apparatus for controlling data retransmission at an application layer comprising:
  • a sending unit configured to pre-send data, wherein the data includes a payload and a count value for the payload
  • a sending end information updating unit configured to record first sending end information in response to the data being in a pre-sending state, wherein the first sending end information indicates a first amount of the data being pre-sent;
  • a receiving unit configured to receive and record first receiving end information, wherein the first receiving end information indicates a second amount of data received and fed back by the receiving end, wherein the second amount is not greater than the first amount;
  • a retransmission determination unit is used to determine whether to retransmit the data according to the first sending end information and the first receiving end information.
  • a method for controlling data retransmission at an application layer in a communication system comprising:
  • Pre-sending data to a receiving end the data including a payload and a count value for the payload
  • first receiving end information includes a second quantity, and the second quantity is not greater than the first quantity
  • pre-sending data to the receiving end comprises: placing the data in a storage space of the sending end in preparation for sending.
  • the first number is incremented accordingly, regardless of whether the data is successfully transmitted and/or regardless of whether a response to the data is received.
  • Clause 21 The method according to any one of clauses 16-20, wherein receiving and recording the first receiving end information includes: updating the second quantity as the first receiving end information changes.
  • Clause 22 The method according to any one of clauses 16-20, wherein receiving and recording the first receiving end information comprises: recording the second receiving end information having the largest second number.
  • Clause 23 A method according to any one of clauses 16-22, wherein, in response to the occurrence of a specific event, the communication link reports an interrupt signal to the transmitting end.
  • Clause 24 The method according to clause 23, wherein, in response to data loss or error from the sending end to the receiving end, the communication link reports an interrupt signal to the sending end.
  • Clause 25 The method according to Clause 24, wherein the data loss or error from the transmitting end to the receiving end includes the loss or error of the payload and/or the loss or error of the count value.
  • Clause 26 The method according to clause 23, wherein, in response to a loss of an acknowledgement for the data fed back from the receiving end to the sending end, the communication link reports an interruption signal to the sending end.
  • Clause 27 A method according to any one of clauses 16-26, wherein, in response to an interruption signal reported from a communication link, it is determined whether to retransmit the data based on the first sending end information and the first receiving end information.
  • Whether to retransmit the data is determined according to the type of the interruption.
  • the type of the interruption is determined to be data loss or error from the transmitting end to the receiving end.
  • the data is retransmitted starting from the breakpoint.
  • the type of the interruption is a loss of a response to the data fed back from the receiving end to the transmitting end.
  • Clause 33 A method according to any one of clauses 16-32, wherein the data to be retransmitted is stored in a buffer area of the application layer.
  • Clause 34 The method according to any one of clauses 16-33, wherein a retransmission indication is sent by an application layer to perform retransmission of the data.
  • a communication system for controlling data retransmission at an application layer comprising: a transmitting end, a receiving end, and a communication link connecting the transmitting end and the receiving end, wherein:
  • the transmitting end pre-sends data to the receiving end, the data including a payload and a count value for the payload; the transmitting end records first transmitting end information in response to the data being in a pre-sending state, the first transmitting end information Indicates a first amount of data to be pre-sent;
  • the communication link is used to transmit the data
  • the receiving end records the count value
  • the receiving end generates a second number according to the count value, where the second number represents a second number of data received and fed back by the receiving end;
  • the receiving end feeds back first receiving end information to the transmitting end, where the first receiving end information includes a second quantity, and the second quantity is not greater than the first quantity;
  • the sending end receives and records the first receiving end information
  • the sending end determines whether to retransmit the data according to the first sending end information and the first receiving end information.
  • An electronic device comprising:
  • a memory storing computer executable instructions, which, when executed by the one or more processors, enable the electronic device to execute a method as described in any one of clauses 1-14 or 16-34.
  • Clause 37 A computer-readable storage medium comprising computer-executable instructions, which, when executed by one or more processors, perform the method as described in any one of clauses 1-14 or 16-34.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

Provided in the present disclosure are a method for controlling data retransmission in an application layer, and a related product, wherein the method can be realized in a combined processing apparatus. The method comprises: pre-sending data at a sending end, the data comprising a payload and a count value for the payload; in response to the data being in a pre-sent state, recording first sending-end information, the first sending-end information representing the first amount of pre-sent data; receiving and recording first receiving-end information, the first receiving-end information representing the second amount of data received and fed back by a receiving end, wherein the second amount is not greater than the first amount; and according to the first sending-end information and the first receiving-end information, determining whether to retransmit the data.

Description

一种用于在应用层控制数据重传的方法和相关产品A method for controlling data retransmission at the application layer and related products
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2022年11月25日申请的,申请号为202211496930.1,名称为“一种用于在应用层控制数据重传的方法和相关产品”的中国专利申请的优先权。This application claims priority to a Chinese patent application filed on November 25, 2022, with application number 202211496930.1 and titled “A method and related products for controlling data retransmission at the application layer”.
技术领域Technical Field
本公开涉及芯片领域,更具体地,涉及片间通信领域。The present disclosure relates to the field of chips, and more specifically, to the field of inter-chip communication.
背景技术Background technique
随着神经网络规模的扩大,单机环境无法更好地独立完成训练任务,例如,单机的内存不足以放下整个神经网络模型、数据量太大无法加载等。在此情况下,通常需要引入分布式训练,即多个训练设备之间协同进行工作,通过互相之间的通信,作为整体系统来完成协同任务。As the scale of neural networks increases, a single machine environment cannot independently complete training tasks better. For example, the memory of a single machine is insufficient to hold the entire neural network model, or the amount of data is too large to load. In this case, it is usually necessary to introduce distributed training, that is, multiple training devices work together and complete collaborative tasks as a whole system through communication with each other.
但是,分布式系统的基础是通信,而通信需要建立在通信介质之上。有些通信介质是可靠传输,如Socket(套接字),PCIe(Peripheral Component Interconnect Express,高速外围组件互连)等,应用层只要下发通信需求即可,在链路上的传输是可靠传输。可靠传输指的是接收方应用收到了完整且正确的数据。但是也存在不可靠传输,例如IP协议本身是不可靠的网络层传输协议,在数据发送之后,可能存在丢包,也可能存在出错,还可能存在丢回应。如何在不可靠的链路上进行可靠的传输,是所有通信都要面对的问题。However, the foundation of distributed systems is communication, and communication needs to be built on communication media. Some communication media are reliable transmissions, such as Sockets, PCIe (Peripheral Component Interconnect Express), etc. The application layer only needs to issue communication requirements, and the transmission on the link is reliable. Reliable transmission means that the receiving application receives complete and correct data. However, there are also unreliable transmissions. For example, the IP protocol itself is an unreliable network layer transmission protocol. After the data is sent, there may be packet loss, errors, and lost responses. How to perform reliable transmission on unreliable links is a problem that all communications must face.
目前的主流做法是,在通信传输层来执行可靠的通信协议,来完成可靠传输。比较典型的是TCP(Transmission Control Protocol,传输控制协议)协议,其通过确认应答和序列号、超时重传、流量控制、拥塞控制这4种主要机制,来保证传输的可靠性。在其他的链路上,NVIDIA(英伟达)采用Nvlink,从链路层和协议层上保证了可靠传输。公开号为CN 110278094的专利申请则公开了一种基于链路延迟的超时重传装置,用来降低聚合链路重传时的丢包概率。公开号为CN 112312513 B的专利申请则在一种用于链路失败恢复的装置中,提高重传恢复的性能。The current mainstream practice is to implement reliable communication protocols at the communication transport layer to achieve reliable transmission. A typical example is the TCP (Transmission Control Protocol) protocol, which ensures transmission reliability through four main mechanisms: confirmation of response and sequence number, timeout retransmission, flow control, and congestion control. On other links, NVIDIA uses Nvlink to ensure reliable transmission at the link layer and protocol layer. The patent application with publication number CN 110278094 discloses a timeout retransmission device based on link delay to reduce the probability of packet loss during retransmission of aggregated links. The patent application with publication number CN 112312513 B improves the performance of retransmission recovery in a device for link failure recovery.
申请人发现,上述现有方案存在如下技术缺陷:The applicant found that the above existing solutions have the following technical defects:
1.重传行为发生在传输层,需要在传输层维护更多的冗余信息,来标记重传的位置;1. Retransmission occurs at the transport layer, and more redundant information needs to be maintained at the transport layer to mark the location of the retransmission;
2.传输层需要额外的缓存区来存储已发送的信息用于重传,这增加了存储资源的消耗;2. The transport layer requires additional buffers to store sent information for retransmission, which increases the consumption of storage resources;
3.在传输层重传时,由于应用层对这一行为并不感知,因此可能依然要进行大流量通信,这需要流控模块来协调处理。3. When the transport layer retransmits, since the application layer is not aware of this behavior, large-volume communication may still be required, which requires the flow control module to coordinate and handle.
发明内容Summary of the invention
本公开的目的在于解决现有技术中传输层重传所带来的缺陷,提供一种能够在应用层进行重传的方案。The purpose of the present disclosure is to solve the defects caused by transport layer retransmission in the prior art and to provide a solution that can perform retransmission at the application layer.
根据本公开第一方面,提供一种用于在应用层控制数据重传的方法,包括:预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;接收并记录第一接收端信息,所述第一接收端信息表示数据被接收端接收到并反馈的第二数量,其中第二数量不大于第一数量;根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。According to a first aspect of the present disclosure, a method for controlling data retransmission at an application layer is provided, comprising: pre-sending data, the data comprising a payload and a count value for the payload; in response to the data being in a pre-sending state, recording first sending end information, the first sending end information indicating a first amount of the data being pre-sent; receiving and recording first receiving end information, the first receiving end information indicating a second amount of data received and fed back by a receiving end, wherein the second amount is not greater than the first amount; and determining whether to retransmit the data based on the first sending end information and the first receiving end information.
根据本公开第二方面,提供一种用于在应用层控制数据重传的设备,包括:发送单元,用于预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;发送端信息更新单元,用于响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息 表示所述数据被预发送的第一数量;接收单元,用于接收并记录第一接收端信息,所述第一接收端信息表示数据被接收端接收到并反馈的第二数量,其中第二数量不大于第一数量;重传判断单元,用于根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。According to a second aspect of the present disclosure, a device for controlling data retransmission at an application layer is provided, comprising: a sending unit, configured to pre-send data, wherein the data comprises a payload and a count value for the payload; a sending end information updating unit, configured to record first sending end information in response to the data being in a pre-sending state, wherein the first sending end information Indicates a first quantity of the data pre-sent; a receiving unit, used to receive and record first receiving end information, wherein the first receiving end information indicates a second quantity of data received and fed back by the receiving end, wherein the second quantity is not greater than the first quantity; a retransmission judgment unit, used to determine whether to retransmit the data based on the first sending end information and the first receiving end information.
根据本公开第三方面,提供一种用于在通信系统中在应用层控制数据重传的方法,所述通信系统包括:发送端,接收端和连接所述发送端与接收端的通信链路,所述方法包括:在发送端,向接收端预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;通过所述通信链路来传输所述数据;在接收端,如果接收到所述数据,则记录所述计数值;根据所述计数值来生成第二数量,所述第二数量表示所述数据被接收端接收到并反馈的数量;向发送端反馈第一接收端信息,所述第一接收端信息包括第二数量,并且第二数量不大于第一数量;在发送端,接收并记录所述第一接收端信息;根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。According to a third aspect of the present disclosure, a method for controlling data retransmission at an application layer in a communication system is provided, the communication system comprising: a transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, the method comprising: at the transmitting end, pre-sending data to the receiving end, the data comprising a payload and a count value for the payload; in response to the data being in a pre-sending state, recording first transmitting end information, the first transmitting end information indicating a first quantity of the data being pre-sent; transmitting the data through the communication link; at the receiving end, if the data is received, recording the count value; generating a second quantity based on the count value, the second quantity indicating the quantity of the data received and fed back by the receiving end; feeding back first receiving end information to the transmitting end, the first receiving end information including a second quantity, and the second quantity is not greater than the first quantity; at the transmitting end, receiving and recording the first receiving end information; determining whether to retransmit the data based on the first transmitting end information and the first receiving end information.
根据本公开第四方面,提供一种在应用层控制数据重传的通信系统,所述通信系统包括:发送端,接收端和连接所述发送端与接收端的通信链路,其中,所述发送端向接收端预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;所述发送端响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;所述通信链路用于传输所述数据;所述接收端如果接收到所述数据,则记录所述计数值;所述接收端根据所述计数值来生成第二数量,所述第二数量表示所述数据被接收端数据被接收端接收到并反馈的第二数量;所述接收端向发送端反馈第一接收端信息,所述第一接收端信息包括第二数量,并且第二数量不大于第一数量;所述发送端接收并记录所述第一接收端信息;所述发送端根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。According to a fourth aspect of the present disclosure, a communication system for controlling data retransmission at an application layer is provided, the communication system comprising: a transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, wherein the transmitting end pre-transmits data to the receiving end, the data comprising a payload and a count value for the payload; the transmitting end records first transmitting end information in response to the data being in a pre-transmitting state, the first transmitting end information indicating a first quantity of the data being pre-transmitted; the communication link is used to transmit the data; if the receiving end receives the data, the receiving end records the count value; the receiving end generates a second quantity according to the count value, the second quantity indicating a second quantity of the data received and fed back by the receiving end; the receiving end feeds back first receiving end information to the transmitting end, the first receiving end information including the second quantity, and the second quantity is not greater than the first quantity; the transmitting end receives and records the first receiving end information; the transmitting end determines whether to retransmit the data according to the first transmitting end information and the first receiving end information.
根据本公开第五方面,提供一种电子设备,包括:一个或多个处理器;以及存储器,所述存储器中存储有计算机可执行指令,当所述计算机可执行指令由所述一个或多个处理器运行时,使得所述电子设备执行如上所述的方法。According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; and a memory, wherein the memory stores computer executable instructions, and when the computer executable instructions are executed by the one or more processors, the electronic device executes the method described above.
根据本公开第六方面,提供一种计算机可读存储介质,包括计算机可执行指令,当所述计算机可执行指令由一个或多个处理器运行时,执行如上所述的方法。According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, comprising computer-executable instructions, and when the computer-executable instructions are executed by one or more processors, the method described above is executed.
根据本公开的技术方案,所带来的有益效果至少包括:在应用层进行软件层面的重传设计,可以降低传输层的硬件设计,因此开发快,硬件定制成本低。According to the technical solution disclosed in the present invention, the beneficial effects brought about include at least: performing software-level retransmission design at the application layer can reduce the hardware design of the transmission layer, thereby speeding up development and reducing hardware customization costs.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
通过参考附图阅读下文的详细描述,本公开示例性实施方式的上述以及其他目的、特征和优点将变得易于理解。在附图中,以示例性而非限制性的方式示出了本公开的若干实施方式,并且相同或对应的标号表示相同或对应的部分,其中:By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
图1示出本披露实施例的一种板卡的结构示意图;FIG1 is a schematic diagram showing the structure of a board according to an embodiment of the present disclosure;
图2是示出此实施例的组合处理装置中的示意图;FIG2 is a schematic diagram showing a combined processing device of this embodiment;
图3示出了计算装置的内部结构示意图;FIG3 is a schematic diagram showing the internal structure of a computing device;
图4示出了处理核的内部架构;Figure 4 shows the internal architecture of the processing core;
图5示出了根据本公开一个实施方式的包括发送端和接收端的通信系统的示意图;FIG5 shows a schematic diagram of a communication system including a transmitting end and a receiving end according to an embodiment of the present disclosure;
图6示出了根据本公开一个实施方式的在通信系统中在应用层控制数据重传的方法;FIG6 shows a method for controlling data retransmission at an application layer in a communication system according to an embodiment of the present disclosure;
图7示出了根据本公开一个实施方式的正常通信过程的示意图;FIG7 is a schematic diagram showing a normal communication process according to an embodiment of the present disclosure;
图8示出了丢包/出错重传过程的示意图;FIG8 is a schematic diagram showing a packet loss/error retransmission process;
图9示出了接收端反馈的ACK被丢失的情况;FIG9 shows a situation where the ACK fed back by the receiving end is lost;
图10示出了根据本公开另一个方面的用于在应用层控制数据重传的方法的流程图; 以及FIG10 shows a flow chart of a method for controlling data retransmission at the application layer according to another aspect of the present disclosure; as well as
图11示出了根据本公开一个方面的用于在应用层控制数据重传的设备。FIG. 11 shows a device for controlling data retransmission at an application layer according to one aspect of the present disclosure.
具体实施方式Detailed ways
下面将结合本披露实施例中的附图,对本披露实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本披露一部分实施例,而不是全部的实施例。基于本披露中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本披露保护的范围。The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
应当理解,本披露的权利要求、说明书及附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。“第一”、“第二”、“第三”和“第四”等也不仅仅表示一个,而是也可以表示多个。第一本披露的说明书和权利要求书中使用的术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that the terms "first", "second", "third", "fourth", etc. in the claims, specifications and drawings of the present disclosure are used to distinguish different objects rather than to describe a specific order. "First", "second", "third", "fourth", etc. do not just mean one, but may also mean multiple. The terms "include" and "comprise" used in the specification and claims of the first disclosure indicate the presence of the described features, wholes, steps, operations, elements and/or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and/or their collections.
还应当理解,在此本披露说明书中所使用的术语仅仅是出于描述特定实施例的目的,而并不意在限定本披露。如在本披露说明书和权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。还应当进一步理解,在本披露说明书和权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms of "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and/or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.
如在本说明书和权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
下面结合附图来详细描述本披露的具体实施方式。The specific implementation of the present disclosure is described in detail below with reference to the accompanying drawings.
现今的半导体制程是从一块完整的晶圆(Wafer)开始的,晶圆由纯硅构成的圆形薄片,一般分为6英寸、8英寸、12英寸等多种规格,晶圆会被切割成一个个的小块,这小块称为晶粒(Die)。每个晶粒上会贴装有芯片(Chip),并布置好接线,以实现特定的电气功能。接着以晶粒为单位封装成为一个颗粒,封装的目的是安放、固定、密封、保护芯片和增强电热性能的作用,同时在芯片的触点上用导线连接到封装外壳的引脚上,一个芯片封装结构便完成了。Today's semiconductor manufacturing process starts with a complete wafer. Wafers are circular sheets made of pure silicon, generally divided into 6-inch, 8-inch, 12-inch and other specifications. Wafers are cut into small pieces, which are called dies. Each die is mounted with a chip and wired to achieve specific electrical functions. Then the die is packaged into a particle. The purpose of packaging is to place, fix, seal, protect the chip and enhance the electrical and thermal performance. At the same time, the contacts of the chip are connected to the pins of the package shell with wires, and a chip package structure is completed.
内存用于暂时存放片上系统所需的运算数据,以及与外部存储器交换的数据。在此实施例中,内存可以是高宽带内存(High bandwidth Memory,HBM),这是一种基于3D堆栈工艺制作的高性能DRAM(Dynamic Random Access Memory,动态随机存取存储器),适用于高存储器带宽需求的应用场合,像是图形处理器、网上交换及转发设备(如路由器、交换器)等。The memory is used to temporarily store the computing data required by the system on chip and the data exchanged with the external memory. In this embodiment, the memory can be a high-bandwidth memory (HBM), which is a high-performance DRAM (Dynamic Random Access Memory) made based on a 3D stacking process and is suitable for applications with high memory bandwidth requirements, such as graphics processors, online switching and forwarding equipment (such as routers, switches), etc.
片上系统(System On Chip,Soc)指的是在单个芯片上集成一个完整的系统,对所有或部分必要的电子电路进行包分组的技术。在此实施例中,片上系统装配在板卡上。图1示出本披露实施例的一种板卡10的结构示意图。如图1所示,板卡10包括组合处理装置101,其是一种人工智能运算单元,用以支持各类深度学习和机器学习算法,满足计算机视觉、语音、自然语言处理、数据挖掘等领域复杂场景下的智能处理需求。特别是深度学习技术大量应用在云端智能领域,云端智能应用的一个显著特点是输入数据量大,对平台的存储能力和计算能力有很高的要求,此实施例的板卡10适用在云端智能应用,具有庞大的片外存储、片上存储和大量的计算能力。System on Chip (Soc) refers to a technology that integrates a complete system on a single chip and packages all or part of the necessary electronic circuits. In this embodiment, the system on chip is assembled on a board. Figure 1 shows a schematic diagram of the structure of a board 10 of the embodiment of the present disclosure. As shown in Figure 1, the board 10 includes a combined processing device 101, which is an artificial intelligence computing unit to support various deep learning and machine learning algorithms to meet the intelligent processing needs in complex scenarios in the fields of computer vision, speech, natural language processing, data mining, etc. In particular, deep learning technology is widely used in the field of cloud intelligence. A notable feature of cloud intelligence applications is the large amount of input data, which has high requirements on the storage capacity and computing power of the platform. The board 10 of this embodiment is suitable for cloud intelligence applications and has huge off-chip storage, on-chip storage and a large amount of computing power.
组合处理装置101通过对外接口装置102与外部设备103相连接。外部设备103例如 是服务器、计算机、摄像头、显示器、鼠标、键盘、网卡或Wifi接口等。待处理的数据可以由外部设备103通过对外接口装置102传递至组合处理装置101。组合处理装置101的计算结果可以经由对外接口装置102传送回外部设备103。根据不同的应用场景,对外接口装置102可以具有不同的接口形式,例如PCIe接口等。The combined processing device 101 is connected to an external device 103 via an external interface device 102. The external device 103 is, for example, It is a server, a computer, a camera, a display, a mouse, a keyboard, a network card or a Wifi interface, etc. The data to be processed can be transmitted from the external device 103 to the combined processing device 101 through the external interface device 102. The calculation result of the combined processing device 101 can be transmitted back to the external device 103 via the external interface device 102. According to different application scenarios, the external interface device 102 can have different interface forms, such as a PCIe interface, etc.
板卡10还包括用于存储数据的外部存储器104,其包括一个或多个存储单元105。外部存储器104通过总线与控制器件106和组合处理装置101进行连接和数据传输。板卡10中的控制器件106配置用于对组合处理装置101的状态进行调控。为此,在一个应用场景中,控制器件106可以包括单片机,又称微控制单元(Micro Controller Unit,MCU)。The board 10 also includes an external memory 104 for storing data, which includes one or more storage units 105. The external memory 104 is connected to the control device 106 and the combined processing device 101 through a bus and transmits data. The control device 106 in the board 10 is configured to control the state of the combined processing device 101. To this end, in an application scenario, the control device 106 may include a single chip microcomputer, also known as a micro control unit (MCU).
图2是示出此实施例的组合处理装置101中的示意图。如图2中所示,组合处理装置101包括计算装置201、接口装置202、处理装置203和DRAM 204。在一种应用场景中,计算装置201、接口装置202、处理装置203整合成前述的片上系统。在另一种应用场景中,计算装置201本身即为前述的片上系统。FIG2 is a schematic diagram showing the combined processing device 101 of this embodiment. As shown in FIG2 , the combined processing device 101 includes a computing device 201, an interface device 202, a processing device 203, and a DRAM 204. In one application scenario, the computing device 201, the interface device 202, and the processing device 203 are integrated into the aforementioned system on chip. In another application scenario, the computing device 201 itself is the aforementioned system on chip.
计算装置201配置成执行用户指定的操作,主要实现为单核智能处理器或者多核智能处理器,用以执行深度学习或机器学习的计算,其可以通过接口装置202与处理装置203进行交互,以共同完成用户指定的操作。The computing device 201 is configured to execute user-specified operations, and is mainly implemented as a single-core intelligent processor or a multi-core intelligent processor to perform deep learning or machine learning calculations. It can interact with the processing device 203 through the interface device 202 to jointly complete the user-specified operations.
接口装置202用于在计算装置201与处理装置203间传输数据和控制指令。例如,计算装置201可以经由接口装置202从处理装置203中获取输入数据,写入计算装置201片上的存储装置。进一步,计算装置201可以经由接口装置202从处理装置203中获取控制指令,写入计算装置201片上的控制缓存中。替代地或可选地,接口装置202也可以读取计算装置201的存储装置中的数据并传输给处理装置203。The interface device 202 is used to transmit data and control instructions between the computing device 201 and the processing device 203. For example, the computing device 201 can obtain input data from the processing device 203 via the interface device 202 and write it into the storage device on the computing device 201 chip. Further, the computing device 201 can obtain control instructions from the processing device 203 via the interface device 202 and write them into the control cache on the computing device 201 chip. Alternatively or optionally, the interface device 202 can also read data in the storage device of the computing device 201 and transmit it to the processing device 203.
处理装置203作为通用的处理装置,执行包括但不限于数据搬运、对计算装置201的开启和/或停止等基本控制。根据实现方式的不同,处理装置203可以是中央处理器、图形处理器或其他通用和/或专用处理器中的一种或多种类型的处理器,这些处理器包括但不限于数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,并且其数目可以根据实际需要来确定。如前所述,仅就本披露的计算装置201而言,其可以视为具有单核结构或者同构多核结构。然而,当将计算装置201和处理装置203整合共同考虑时,二者视为形成异构多核结构。The processing device 203, as a general processing device, performs basic controls including but not limited to data handling, starting and/or stopping the computing device 201, etc. According to different implementations, the processing device 203 can be a central processing unit, a graphics processing unit, or one or more types of processors in other general and/or special processors, which include but are not limited to digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., and their number can be determined according to actual needs. As mentioned above, only with respect to the computing device 201 disclosed in the present invention, it can be regarded as having a single-core structure or a homogeneous multi-core structure. However, when the computing device 201 and the processing device 203 are integrated and considered together, the two are regarded as forming a heterogeneous multi-core structure.
DRAM 204即为前述的高宽带内存,用以存储待处理的数据,大小通常为16G或更大,用于保存计算装置201和/或处理装置203的数据。DRAM 204 is the aforementioned high-bandwidth memory, which is used to store data to be processed. Its size is usually 16G or larger and is used to save data of the computing device 201 and/or the processing device 203.
图3示出了计算装置201的内部结构示意图。计算装置201用以处理计算机视觉、语音、自然语言、数据挖掘等输入数据,图中的计算装置201采用多核分层结构设计,其包括外部存储控制器301、外设通信模块302、片上互联模块303、同步模块304以及多个集群305。3 shows a schematic diagram of the internal structure of a computing device 201. The computing device 201 is used to process input data such as computer vision, speech, natural language, and data mining. The computing device 201 in the figure adopts a multi-core hierarchical structure design, which includes an external storage controller 301, a peripheral communication module 302, an on-chip interconnect module 303, a synchronization module 304, and multiple clusters 305.
外部存储控制器301可以有多个,在图中示例性地展示2个,其用以响应处理器核发出的访问请求,访问外部存储设备,例如图2中的DRAM 204,从而自片外读取数据或是将数据写入。外设通信模块302用以通过接口装置202接收来自处理装置203的控制信号,启动计算装置201执行任务。片上互联模块303将外部存储控制器301、外设通信模块302及多个集群305连接起来,用以在各个模块间传输数据和控制信号。同步模块304是一种全局同步屏障控制器(Global Barrier Controller,GBC),用以协调各集群的工作进度,确保信息的同步。多个集群305是计算装置201的计算核心,在图中示例性地展示4个,随着硬件的发展,本披露的计算装置201还可以包括8个、16个、64个、甚至更多的集群305。集群305用以高效地执行深度学习算法。There may be multiple external storage controllers 301, and two are shown in the figure as an example, which are used to respond to access requests issued by the processor core and access external storage devices, such as DRAM 204 in Figure 2, so as to read data from outside the chip or write data. The peripheral communication module 302 is used to receive control signals from the processing device 203 through the interface device 202 to start the computing device 201 to perform tasks. The on-chip interconnect module 303 connects the external storage controller 301, the peripheral communication module 302 and multiple clusters 305 to transmit data and control signals between each module. The synchronization module 304 is a global synchronization barrier controller (Global Barrier Controller, GBC), which is used to coordinate the work progress of each cluster and ensure the synchronization of information. Multiple clusters 305 are the computing cores of the computing device 201. Four are shown in the figure as an example. With the development of hardware, the computing device 201 disclosed in the present invention can also include 8, 16, 64, or even more clusters 305. The cluster 305 is used to efficiently execute the deep learning algorithm.
每个集群305包括多个处理器核(IPU Core)306及一个存储核(MEM Core)307。 Each cluster 305 includes a plurality of processor cores (IPU Cores) 306 and a memory core (MEM Core) 307 .
处理器核306在图中示例性地展示4个,本披露不限制处理器核306的数量。其内部架构如图4所示。每个处理器核306包括三大模块:控制模块41、运算模块42及存储模块43。The figure shows four processor cores 306 as an example, and the present disclosure does not limit the number of processor cores 306. Its internal architecture is shown in FIG4. Each processor core 306 includes three modules: a control module 41, a computing module 42, and a storage module 43.
控制模块41用以协调并控制运算模块42和存储模块43的工作,以完成深度学习的任务,其包括取指单元(Instruction fetch Unit,IFU)411及指令译码单元(Instruction Decode Unit,IDU)412。取指单元411用以获取来自处理装置203的指令,指令译码单元412则将获取的指令进行译码,并将译码结果作为控制信息发送给运算模块42和存储模块43。The control module 41 is used to coordinate and control the operation of the operation module 42 and the storage module 43 to complete the deep learning task, and includes an instruction fetch unit (IFU) 411 and an instruction decode unit (IDU) 412. The instruction fetch unit 411 is used to obtain instructions from the processing device 203, and the instruction decode unit 412 decodes the obtained instructions and sends the decoding results to the operation module 42 and the storage module 43 as control information.
运算模块42包括向量运算单元421及矩阵运算单元422。向量运算单元421用以执行向量运算,可支持向量乘、加、非线性变换等复杂运算;矩阵运算单元422负责深度学习算法的核心计算,即矩阵乘及卷积。The operation module 42 includes a vector operation unit 421 and a matrix operation unit 422. The vector operation unit 421 is used to perform vector operations and can support complex operations such as vector multiplication, addition, and nonlinear transformation; the matrix operation unit 422 is responsible for the core calculation of the deep learning algorithm, namely matrix multiplication and convolution.
存储模块43用来存储或搬运相关数据,包括神经元存储单元(neuron RAM,NRAM)431、权值存储单元(Weight RAM,WRAM)432、输入/输出直接内存访问模块(Input/Output Direct Memory access,IODMA)433、搬运直接内存访问模块(MoVe Direct Memory Access,MVDMA)434。NRAM 431用以存储供处理器核306计算的输入、输出数据及中间结果;WRAM 432则用以存储深度学习网络的权值;IODMA 433通过广播总线309控制NRAM 431/WRAM 432与DRAM 204的访存;MVDMA 434则用以控制NRAM 431/WRAM 432与SRAM 308的访存。The storage module 43 is used to store or transfer related data, including a neuron RAM (NRAM) 431, a weight RAM (WRAM) 432, an input/output direct memory access module (IODMA) 433, and a transfer direct memory access module (MVDMA) 434. NRAM 431 is used to store input and output data and intermediate results for calculation by the processor core 306; WRAM 432 is used to store the weights of the deep learning network; IODMA 433 controls the memory access between NRAM 431/WRAM 432 and DRAM 204 through the broadcast bus 309; MVDMA 434 is used to control the memory access between NRAM 431/WRAM 432 and SRAM 308.
回到图3,存储核307主要用以存储和通信,即存储处理器核306间的共享数据或中间结果、以及执行集群305与DRAM 204之间的通信、集群305间彼此的通信、处理器核306间彼此的通信等。在其他实施例中,存储核307具有标量运算的能力,用以执行标量运算。Returning to FIG. 3 , the storage core 307 is mainly used for storage and communication, that is, to store shared data or intermediate results between the processor cores 306, and to perform communication between the cluster 305 and the DRAM 204, between the clusters 305, and between the processor cores 306. In other embodiments, the storage core 307 has the ability of scalar operations and is used to perform scalar operations.
存储核307包括共享存储单元(SRAM)308、广播总线309、集群直接内存访问模块(cluster Direct Memory Access,CDMA)310及全局直接内存访问模块(Global Direct Memory Access,GDMA)311。SRAM 308承担高性能数据中转站的角色,在同一个集群305内不同处理器核306之间所复用的数据不需要通过处理器核306各自向DRAM 204获得,而是经SRAM 308在处理器核306间中转,存储核307只需要将复用的数据从SRAM308迅速分发给多个处理器核306即可,以提高核间通讯效率,亦大大减少片上片外的输入/输出访问。The storage core 307 includes a shared memory unit (SRAM) 308, a broadcast bus 309, a cluster direct memory access module (cluster Direct Memory Access, CDMA) 310 and a global direct memory access module (Global Direct Memory Access, GDMA) 311. The SRAM 308 plays the role of a high-performance data transfer station. The data reused between different processor cores 306 in the same cluster 305 does not need to be obtained from the DRAM 204 by each processor core 306, but is transferred between the processor cores 306 through the SRAM 308. The storage core 307 only needs to quickly distribute the reused data from the SRAM 308 to multiple processor cores 306, so as to improve the efficiency of inter-core communication and greatly reduce on-chip and off-chip input/output access.
广播总线309、CDMA 310及GDMA 311则分别用来执行处理器核306间的通信、集群305间的通信和集群305与DRAM 204的数据传输。以下将分别说明。Broadcast bus 309, CDMA 310 and GDMA 311 are used to perform communication between processor cores 306, communication between clusters 305 and data transmission between clusters 305 and DRAM 204, respectively. They will be described below.
广播总线309用以完成集群305内各处理器核306间的高速通信,此实施例的广播总线309支持核间通信方式包括单播、多播与广播。单播是指点对点(即单一处理器核至单一处理器核)的数据传输,多播是将一份数据从SRAM 308传输到特定几个处理器核306的通信方式,而广播则是将一份数据从SRAM 308传输到所有处理器核306的通信方式,属于多播的一种特例。The broadcast bus 309 is used to complete high-speed communication between the processor cores 306 in the cluster 305. The broadcast bus 309 of this embodiment supports inter-core communication modes including unicast, multicast and broadcast. Unicast refers to point-to-point (i.e., single processor core to single processor core) data transmission, multicast is a communication mode of transmitting a copy of data from SRAM 308 to specific processor cores 306, and broadcast is a communication mode of transmitting a copy of data from SRAM 308 to all processor cores 306, which is a special case of multicast.
CDMA 310用以控制在同一个计算装置201内不同集群305间的SRAM 308的访存。GDMA 311与外部存储控制器301协同,用以控制集群305的SRAM 308到DRAM 204的访存,或是将数据自DRAM 204读取至SRAM 308中。CDMA 310 is used to control memory access from SRAM 308 between different clusters 305 in the same computing device 201. GDMA 311 cooperates with the external memory controller 301 to control memory access from SRAM 308 of cluster 305 to DRAM 204, or to read data from DRAM 204 to SRAM 308.
图5示出了根据本公开一个实施方式的包括发送端和接收端的通信系统的示意图。FIG5 shows a schematic diagram of a communication system including a transmitting end and a receiving end according to an embodiment of the present disclosure.
通信系统可以按照功能进行组件划分,分为发送端1和接收端2。发送端1可以包括第一存储模块11,第一指令执行模块12,第一发送模块13,第一接收模块14和第一控制模块15,接收端2包括第二存储模块21,第二指令执行模块22,第二发送模块23,第二接收模块24和第二控制模块25。The communication system can be divided into components according to functions, and is divided into a transmitting end 1 and a receiving end 2. The transmitting end 1 may include a first storage module 11, a first instruction execution module 12, a first sending module 13, a first receiving module 14 and a first control module 15, and the receiving end 2 includes a second storage module 21, a second instruction execution module 22, a second sending module 23, a second receiving module 24 and a second control module 25.
对于发送端1,每个模块的功能为:For the transmitter 1, the function of each module is:
第一存储模块11:用于存储数据和指令。其中,数据来源可以是本地原有数据,也可 以是上游设备发送来的数据(多级发送时),也可以是上游设备发送来的数据与本地数据计算后的结果数据。The first storage module 11 is used to store data and instructions. The data source can be local original data or It can be data sent from an upstream device (in case of multi-stage transmission), or it can be the result data of calculation between data sent from an upstream device and local data.
第一指令执行模块12:用于执行第一存储模块11中的指令,负责完成应用层逻辑的执行处理。在本通信系统中,发送请求由指令发起,即由应用层发起通信行为。此外,第一指令执行模块12还可以根据指令来完成本地运算。The first instruction execution module 12 is used to execute the instructions in the first storage module 11 and is responsible for completing the execution processing of the application layer logic. In this communication system, the sending request is initiated by the instruction, that is, the communication behavior is initiated by the application layer. In addition, the first instruction execution module 12 can also complete local operations according to the instructions.
第一发送模块13:发送端1通过第一发送模块13与物理链路直接相连。第一发送模块13用于发送数据和控制信息。该第一发送模块13可以对发送的通信包进行统计,并对每个包的响应进行接收。如果接收到NACK(Negative acknowledgment,意为异常的响应)或长时间未收到ACK(Acknowledgement,意为正向反馈,表示接收端已正确接收相应的包),则记录该异常状态,并向第一控制模块15上报中断。如果在规定时间内接收到ACK,则可以对该ACK再回复ACK。First sending module 13: The sending end 1 is directly connected to the physical link through the first sending module 13. The first sending module 13 is used to send data and control information. The first sending module 13 can count the communication packets sent and receive the response to each packet. If NACK (Negative acknowledgment, meaning abnormal response) is received or ACK (Acknowledgement, meaning positive feedback, indicating that the receiving end has correctly received the corresponding packet) is not received for a long time, the abnormal state is recorded and the interrupt is reported to the first control module 15. If ACK is received within the specified time, ACK can be replied to the ACK.
第一接收模块14:发送端可以通过第一接收模块14与物理链路直接相连。第一接收模块14在发送端1上仅用于接收控制信息。First receiving module 14: The transmitting end can be directly connected to the physical link through the first receiving module 14. The first receiving module 14 on the transmitting end 1 is only used to receive control information.
第一控制模块15:用于对任务进行下发,接收第一发送模块13的中断,中止第一指令执行模块12的运行,重新下发任务让第一指令执行模块12进行重传。The first control module 15 is used to issue tasks, receive the interruption of the first sending module 13, suspend the operation of the first instruction execution module 12, and reissue tasks to let the first instruction execution module 12 retransmit.
对于接收端2,每个模块的功能为:For the receiving end 2, the function of each module is:
第二存储模块21:用于存储数据和指令。其中,数据来源可以是本地原有数据,也可以是上游发送端发送来的数据,也可以是上游发送端发送来的数据与本地数据计算后的结果数据。The second storage module 21 is used to store data and instructions. The data source may be local original data, data sent from an upstream sending end, or result data calculated from data sent from an upstream sending end and local data.
第二指令执行模块22:用于执行第二存储模块21中的指令,负责完成应用层逻辑的执行处理。在本通信系统中,发送请求由指令发起,即由应用层发起通信行为。此外,第二指令执行模块22还可以根据指令,完成本地运算。The second instruction execution module 22 is used to execute the instructions in the second storage module 21 and is responsible for completing the execution processing of the application layer logic. In this communication system, the sending request is initiated by the instruction, that is, the communication behavior is initiated by the application layer. In addition, the second instruction execution module 22 can also complete local operations according to the instructions.
第二接收模块24:接收端2通过第二接收模块24与物理链路直接相连。该第二接收模块24会接收收到的数据包,并根据数据包的类型,完成内存同步操作。对接收的包进行校验和纠错,若发生无法纠错的情况,则向发送端的发送模块回复NACK。对每一个包的正确的接收,都要回复ACK。如果第二接收模块24发出的ACK没有得到ACK应答,则记录该异常状态,并向第二控制模块25上报中断。Second receiving module 24: The receiving end 2 is directly connected to the physical link through the second receiving module 24. The second receiving module 24 receives the received data packet and completes the memory synchronization operation according to the type of the data packet. The received packet is checked and corrected. If the error cannot be corrected, a NACK is replied to the sending module of the sending end. An ACK is replied for each correct reception of the packet. If the ACK sent by the second receiving module 24 does not receive an ACK response, the abnormal state is recorded and an interrupt is reported to the second control module 25.
第二发送模块23:接收端通过第二接收模块23与物理链路直接连接。第二发送模块23在接收端上仅用于发送控制信息。Second sending module 23: The receiving end is directly connected to the physical link through the second receiving module 23. The second sending module 23 is only used to send control information on the receiving end.
第二控制模块25:用于对任务进行下发,根据第二接收模块24发出的中断,中止第二指令执行模块22的运行,重新下发任务让第二指令执行模块22进行重传。The second control module 25 is used to issue the task, and according to the interruption sent by the second receiving module 24, the operation of the second instruction execution module 22 is suspended, and the task is reissued to let the second instruction execution module 22 retransmit.
下面将详细描述应用层在执行数据的发送任务时的各项规范。The following is a detailed description of the various specifications of the application layer when performing data sending tasks.
在应用层进行发送任务时,需要显式地发送数据和控制信息。其中,控制信息在发送端1表示的含义为:当前发送端1已经发送的数据分片的数量;在接收端2表示的含义为,当前接收端2已经处理的数据分片的数量。When performing a sending task at the application layer, data and control information need to be sent explicitly. The control information at the sending end 1 means: the number of data fragments that the current sending end 1 has sent; at the receiving end 2, it means the number of data fragments that the current receiving end 2 has processed.
参照队列的数据结构,可以将发送端的控制信息记为Tail,将接收端2的控制信息记为Head。需要注意的是,接收端2接收到数据与接收端2处理了数据是两个概念。即使是接收端2仅接收数据,如果发送端1没有直接发送到接收端2的目标存储空间(记为Dstspace),而是发送到了接收端2的接收缓冲区(记为Recvbuffer),那么接收端2同样还需要做一次把数据从Recvbuffer到Dstspace的数据拷贝操作。只有接收端2确认数据在Dstspace后,才会更新Head的值。Recvbuffer是对接收端的缓存硬件存储空间的功能命名。Referring to the data structure of the queue, the control information of the sender can be recorded as Tail, and the control information of the receiver 2 can be recorded as Head. It should be noted that the receiver 2 receiving the data and the receiver 2 processing the data are two different concepts. Even if the receiver 2 only receives data, if the sender 1 does not send it directly to the target storage space of the receiver 2 (recorded as Dstspace), but sends it to the receiving buffer of the receiver 2 (recorded as Recvbuffer), then the receiver 2 also needs to copy the data from Recvbuffer to Dstspace. Only after the receiver 2 confirms that the data is in Dstspace will it update the value of Head. Recvbuffer is the functional name for the cache hardware storage space of the receiver.
由此,Head与Tail需要满足以下约束:Therefore, the Head and Tail need to satisfy the following constraints:
1.在没有进行数据的重传时,Head与Tail均是单调递增的,每次增加值为此次发送或接收的Data分片数量。 1. When there is no data retransmission, both Head and Tail are monotonically increasing, and each increase is the number of data fragments sent or received this time.
2.在任意时刻,Head不大于Tail。2. At any time, the Head is not greater than the Tail.
3.若发送端1发送到接收端2的数据是写入的Recvbuffer,Head与Tail的差值不应超过半个Recvbuffer大小。假设,将接收端的Recvbuffer的整体容量表示为m,即最多容许m个tail与head的差值的数据分片。那么可以设想两个设备A和B将执行通信算法Allreduce算法,这两个设备A和B首先各自发送自己的X个数据给对方,然后从Recvbuffer中获取上游的X个数据,并与本地数据完成计算;然后再次发给对方X个数据给对方。这里,第一个约束条件是X必须小于M,因为如果X大于M的话会产生数据的越界。然后,如果X=M,则每个设备如果再进行第二个步骤“从Recvbuffer中获取上游的X个数据,并与本地数据完成计算,再次发给对方X个数据”,会发现对方的Recvbuffer已经被第一步任务的“各自发送自己的X个数据给对方”给全部占满,因此无法进行第二步,从而两个设备都无法进入第二阶段,就会形成死锁。因此,在X<M的约束上,经过性能测试,X=1/2m是最优值,可以让发送和处理获得均衡。3. If the data sent by the sender 1 to the receiver 2 is written into the Recvbuffer, the difference between the head and the tail should not exceed half the size of the Recvbuffer. Assume that the overall capacity of the Recvbuffer at the receiving end is represented as m, that is, at most m data slices with the difference between the tail and the head are allowed. Then it can be imagined that two devices A and B will execute the communication algorithm Allreduce algorithm. The two devices A and B first send their own X data to each other, then obtain the upstream X data from the Recvbuffer, and complete the calculation with the local data; then send X data to each other again. Here, the first constraint is that X must be less than M, because if X is greater than M, data out of bounds will occur. Then, if X=M, if each device performs the second step of "getting X data from upstream from the Recvbuffer, completing calculations with local data, and sending X data to the other party again", it will find that the other party's Recvbuffer has been completely occupied by the first step of "each sending its own X data to the other party", so it cannot perform the second step, and neither device can enter the second stage, which will form a deadlock. Therefore, under the constraint of X<M, after performance testing, X=1/2m is the optimal value, which can balance sending and processing.
4.Head与Tail的发送目标地址不变,后发送的Head和Tail会覆盖设备存储空间上的原始值。换言之,不允许存在多个Head值或者多个Tail值,而只能是前一个Head值被新Head值覆盖,或者前一个Tail值被新Tail值覆盖。4. The destination address of the Head and Tail remains unchanged, and the Head and Tail sent later will overwrite the original values in the device storage space. In other words, multiple Head values or multiple Tail values are not allowed to exist, but only the previous Head value can be overwritten by the new Head value, or the previous Tail value can be overwritten by the new Tail value.
5.Head与Tail均具有内存同步语义,每个Head/Tail写入设备内存时,该Head/Tail前序由同一个物理链路发射的Data、Head、Tail均一定应写入设备存储空间。这里的设备,在本文中,通常是指发送设备和接收设备的硬件。5. Both Head and Tail have memory synchronization semantics. When each Head/Tail is written to the device memory, the Data, Head, and Tail transmitted by the same physical link in the previous sequence of the Head/Tail must be written to the device storage space. The device here, in this article, usually refers to the hardware of the sending device and the receiving device.
在不可靠链路下,可能会发生如下三种错误:In an unreliable link, the following three errors may occur:
1.发送过程中丢失数据包或者数据包出错,这里丢失的数据包可以是丢失有效载荷数据,也可以是丢失所发送的Tail,或者是有效载荷数据出错或者Tail出错。在此情况下,会引发链路的包序列号错误(Packet Sequence Number Error,PSN Error),当接收端的PSN校验不通过时,会向发送端回NACK。此外,这种情况下也可能是触发超时机制,主动结束通信。1. Data packets are lost or errors occur during the transmission process. The lost data packets here can be the loss of payload data, the loss of the sent tail, or the payload data error or tail error. In this case, a packet sequence number error (PSN Error) of the link will be triggered. When the PSN check at the receiving end fails, a NACK will be sent back to the sending end. In addition, this case may also trigger a timeout mechanism and actively end the communication.
2.发送过程中产生误码,且接收端纠错无法纠正,此时接收端会向发送端反馈NACK。2. Bit errors occur during the transmission process and the error correction at the receiving end cannot correct them. At this time, the receiving end will feedback NACK to the sending end.
3.发送过程均正常,但接收端返回的ACK被丢失,此时发送端依然会触发超时机制。3. The sending process is normal, but the ACK returned by the receiving end is lost. At this time, the sending end will still trigger the timeout mechanism.
以上三种情况发生时,通过从异常位置开始进行重传,有可能会重传成功,也可能会重传失败。只有当连续多次(例如连续三次)进行重传都依然无法完成正确的通信时,才会认为是发生了不可重传的异常。在此情况下,通常需要应用彻底停止数据传输,以便于检查链路是否发生异常。When the above three situations occur, retransmission may succeed or fail by retransmitting from the abnormal position. Only when the correct communication cannot be completed after multiple (for example, three consecutive) retransmissions, it is considered that an abnormality that cannot be retransmitted has occurred. In this case, the application usually needs to completely stop data transmission in order to check whether the link is abnormal.
为了处理上述的三种可以重传的情况,在应用层执行的异常处理方法需要有以下关键点:In order to handle the above three situations where retransmission is possible, the exception handling method implemented at the application layer needs to have the following key points:
1.由于链路上发生异常是小概率事件,因此应用层的异常处理逻辑应该对正常的应用层任务逻辑干涉较小。1. Since anomalies on a link are rare events, the exception handling logic at the application layer should interfere less with the normal application layer task logic.
2.同样基于异常发生是小概率事件,当异常发生进行重传时,重传算法的功能正确性为优先考虑,性能需求相对降低。即,优先要保证重传的正确性,对重传算法执行过程的性能要求并非优先考虑。2. Also based on the fact that the occurrence of anomalies is a low-probability event, when anomalies occur and retransmission is performed, the functional correctness of the retransmission algorithm is given priority, and the performance requirements are relatively reduced. In other words, the correctness of retransmission must be guaranteed first, and the performance requirements of the retransmission algorithm execution process are not given priority.
3.应用层重传时,可以容许进行冗余的重传,即重传发送的内容比实际的丢失/出错的内容更多。3. When the application layer retransmits, redundant retransmissions can be allowed, that is, the content sent in the retransmission is more than the actual lost/erroneous content.
4.应用层重传时,即使在发送端的重传发送可能有更多冗余,接收端应仅处理出错位置起始的数据包。这样是因为,接收端可能执行过原位(in-Place)的运算操作,此时计算结果已经覆盖了原始的本地数据区域。如果再次计算,会导致应用任务的结果出错,因此是不允许的。4. When the application layer retransmits, even if the retransmission at the sender may have more redundancy, the receiver should only process the data packet starting from the error position. This is because the receiver may have performed in-place calculation operations, and the calculation results have already covered the original local data area. If the calculation is repeated again, the result of the application task will be wrong, so it is not allowed.
5.由于Head/Tail是覆盖写入的方式进行通信的,所以设备(发送端和接收端)需要对Head/Tail的值进行备份,这里可以称为checkpoint(检查点,备份点),后续的重传 恢复时要从checkpoint处作为起点。因此,每个设备本地同样应有记录此前已经发送的位置信息,后续的重传恢复需要把此前已发送位置作为重传的终点。5. Since Head/Tail is communicated by overwriting, the device (sender and receiver) needs to back up the value of Head/Tail, which can be called checkpoint (checkpoint, backup point) for subsequent retransmission. The checkpoint is used as the starting point for recovery. Therefore, each device should also have a local record of the previously sent location information, and the subsequent retransmission recovery needs to use the previously sent location as the end point of the retransmission.
在介绍了上述的规范和约束之后,下面详细介绍根据本公开一个实施方式的用于在通信系统中在应用层控制数据重传的方法。After introducing the above specifications and constraints, a method for controlling data retransmission at an application layer in a communication system according to an embodiment of the present disclosure is described in detail below.
图6示出了根据本公开一个实施方式的在通信系统中在应用层控制数据重传的方法,所述通信系统包括:发送端1,接收端2和连接所述发送端1与接收端2的通信链路3,所述方法包括:在发送端1处,在操作S6110,向接收端2预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;在操作S6120,响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;在操作S6130,通过所述通信链路来传输所述数据;在接收端2处,在操作S6210,如果接收到所述数据,则记录所述计数值;在操作S6220,根据所述计数值来生成第二数量,所述第二数量表示所述数据被接收端接收到并反馈的数量;在操作S6230,向发送端反馈第一接收端信息,所述第一接收端信息包括第二数量,并且第二数量不大于第一数量;在发送端1处,在操作S6140,接收并记录所述第一接收端信息;以及,在操作S6150,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。FIG6 shows a method for controlling data retransmission at an application layer in a communication system according to an embodiment of the present disclosure, wherein the communication system comprises: a transmitting end 1, a receiving end 2 and a communication link 3 connecting the transmitting end 1 and the receiving end 2, wherein the method comprises: at the transmitting end 1, in operation S6110, pre-sending data to the receiving end 2, wherein the data comprises a payload and a count value for the payload; in operation S6120, in response to the data being in a pre-sending state, recording first transmitting end information, wherein the first transmitting end information indicates a first amount of the data being pre-sent; in operation S6130, transmitting the data through the communication link at the receiving end 2, in operation S6210, if the data is received, the count value is recorded; at operation S6220, a second quantity is generated according to the count value, the second quantity indicating the quantity of the data received and fed back by the receiving end; at operation S6230, first receiving end information is fed back to the transmitting end, the first receiving end information includes the second quantity, and the second quantity is not greater than the first quantity; at the transmitting end 1, in operation S6140, the first receiving end information is received and recorded; and, at operation S6150, whether to retransmit the data is determined according to the first transmitting end information and the first receiving end information.
下面将结合一系列附图来解释本公开的上述实施方式。The above-mentioned embodiments of the present disclosure will be explained below in conjunction with a series of drawings.
图7示出了根据本公开一个实施方式的正常通信过程的示意图。在图7中,假设从发送端1向接收端2发送数据,为了方便描述,将发送端1中的第一发送模块13标记为tx,将接收端2的第二接收模块24记为rx。将Head/Tail用于通信的地址记为ptr,将Head/Tail的checkpoint记为ckpt,将Head/Tail当前已发送的最大值记为cache。根据本公开的一个实施方式,可以构建以下关键变量:FIG7 shows a schematic diagram of a normal communication process according to an embodiment of the present disclosure. In FIG7, it is assumed that data is sent from a transmitter 1 to a receiver 2. For the convenience of description, the first sending module 13 in the transmitter 1 is marked as tx, and the second receiving module 24 of the receiver 2 is marked as rx. The address used by the Head/Tail for communication is marked as ptr, the checkpoint of the Head/Tail is marked as ckpt, and the maximum value currently sent by the Head/Tail is marked as cache. According to an embodiment of the present disclosure, the following key variables can be constructed:
1.tx_tail,发送端1发送的tail信息。上文中已经介绍过tail信息,这里将不再赘述。1. tx_tail, tail information sent by transmitter 1. The tail information has been introduced above and will not be repeated here.
2.tx_tail_cache:发送端1已经发送,但尚未被接收端2确认接收到的tx_tail,该tx_tail可以存储在发送端1的存储空间内以备发送(例如Recybuffer发送端1的缓存中)。tx_tail_cache可以表示发送端1“以为已发送但实际可能没有发送到接收端2”。在本公开中,可以将发送端1“已经发送但实际上可能没有发送到接收端2”的数据称为预发送数据,预发送数据可以包括有效载荷和用于所述有效载荷的计数值,这里的计数值即为上文所述的tail信息。当发送端1已经预发送了数据之后,无论数据是否发送成功,均可以更新上述参数tx_tail_cache(即响应于所述数据处于预发送状态,更新第一发送端信息)。2. tx_tail_cache: tx_tail that has been sent by the transmitter 1 but has not yet been confirmed to be received by the receiver 2. The tx_tail can be stored in the storage space of the transmitter 1 for sending (for example, in the cache of the Recybuffer transmitter 1). tx_tail_cache can indicate that the transmitter 1 "thought it had been sent but may not have actually been sent to the receiver 2". In the present disclosure, the data that the transmitter 1 "has sent but may not have actually been sent to the receiver 2" can be referred to as pre-sent data. The pre-sent data may include a payload and a count value for the payload. The count value here is the tail information described above. After the transmitter 1 has pre-sent data, the above-mentioned parameter tx_tail_cache can be updated regardless of whether the data is sent successfully (that is, in response to the data being in a pre-sent state, the first transmitter information is updated).
根据本公开的一个实施方式,响应于所述数据处于预发送状态,记录第一发送端信息可以包括:响应于被置于预发送状态的数据递增,相应地对第一数量进行递增,而无论所述数据是否发送成功,和/或无论是否接收到针对所述数据的应答。According to one embodiment of the present disclosure, in response to the data being in a pre-sending state, recording the first sending end information may include: in response to the data being placed in the pre-sending state being incremented, the first quantity is incremented accordingly, regardless of whether the data is sent successfully, and/or regardless of whether a response to the data is received.
在本实施方式中,每当有一个数据进入“预发送”状态,则该数据携带的tail值则递增一次,tail值的递增并不考虑该数据是否确实被发送成功,也不考虑发送端1是否接收到针对该数据的应答(即head)值。In this embodiment, every time a data enters the "pre-send" state, the tail value carried by the data is incremented once. The increment of the tail value does not consider whether the data is actually sent successfully, nor does it consider whether the sender 1 receives a response (i.e., head) value for the data.
需要理解的是,本文中记录第一发送端信息可以是每当第一发送端信息被更新后即进行记录,也可以直接记录具有最大值的第一发送端信息。例如,发送端可以每隔一段时间来轮询当前tail的最大值,在此情况下,可能存在直接轮询到最大的tail值或其中某些tail值的情况,而不必然轮询到当前发送的数据所对应的tail值。It should be understood that the first sender information recorded in this article may be recorded whenever the first sender information is updated, or the first sender information with the maximum value may be directly recorded. For example, the sender may poll the maximum value of the current tail at regular intervals. In this case, the maximum tail value or some of the tail values may be directly polled, but the tail value corresponding to the currently sent data may not necessarily be polled.
3.tx_tail_ckpt:发送端1已发送,并且已经被接收端2确认的tx_tail。一般是指接收端2通过回复head的方式进行了确认。如果接收端2通过head的方式进行了确认,则表明接收端已经接收到发送端1所发送的数据。可以通过参数tx_tail_ckpt来确定数据重传时的断点。3.tx_tail_ckpt: tx_tail sent by sender 1 and confirmed by receiver 2. Generally, it means that receiver 2 has confirmed by replying head. If receiver 2 confirms by head, it means that receiver has received the data sent by sender 1. The breakpoint of data retransmission can be determined by parameter tx_tail_ckpt.
4.rx_head:接收端2向发送端1发送的head信息。当接收端2接收到包含tail的数据之后,将记录该tail值(即上文所述的计数值)。接收端2可以通过向发送端1回复或 反馈head值来确认已经接收到数据,即该head值可以反映接收端2接收到的数据(即tail)的数量。4.rx_head: The head information sent by receiver 2 to transmitter 1. When receiver 2 receives the data containing tail, it will record the tail value (i.e. the count value mentioned above). Receiver 2 can reply to transmitter 1 or The head value is fed back to confirm that the data has been received, that is, the head value can reflect the amount of data (ie, tail) received by the receiving end 2.
随着接收端2接收到数据并对数据处理之后,head值也相应地增加。但head值小于等于接收到的tail值。例如,包含tail值为1-3的数据均顺利到达接收端2处,则接收端2每接收到并处理一个tail值后,则head值也对应地更新,即head值等于tail值;但是,如果包含tail值为4的数据发生阻塞,即接收端2处没有接收到tail值为4的数据,接收端2处生成的head值最大为3。As the receiving end 2 receives and processes the data, the head value increases accordingly. However, the head value is less than or equal to the received tail value. For example, if the data containing tail values of 1-3 all arrive at the receiving end 2 smoothly, then the head value is updated accordingly after each tail value is received and processed by the receiving end 2, that is, the head value is equal to the tail value; however, if the data containing the tail value of 4 is blocked, that is, the receiving end 2 does not receive the data with a tail value of 4, the maximum head value generated by the receiving end 2 is 3.
5.rx_head_cache:接收端2已发送,但尚未被发送端1确认收到的rx_head。一般来说,rx_head的发送不需要接收端1额外的确认,只要不发生超时即认为已送达。在本申请中,可以用参数rx_head_cache来表示第一接收端信息,即可以表示数据被接收端2接收到并已经做出反馈的第二数量。5.rx_head_cache: rx_head that has been sent by receiving end 2 but has not yet been confirmed received by sending end 1. Generally speaking, the sending of rx_head does not require additional confirmation from receiving end 1, and it is considered delivered as long as there is no timeout. In this application, the parameter rx_head_cache can be used to represent the first receiving end information, that is, it can represent the second amount of data received by receiving end 2 and feedback has been made.
6.rx_head_ckpt:接收端2已发送,并且已被接收端1确认收到的rx_head。6.rx_head_ckpt: rx_head sent by receiver 2 and acknowledged by receiver 1.
7.rx_tail_cache:接收端2本次访问dram检查tail时收到的tail值,即接收端2实际上接收到的tail值。7.rx_tail_cache: the tail value received by receiver 2 when it accesses DRAM to check the tail, that is, the tail value actually received by receiver 2.
根据本公开的一个实施方式,如果接收到所述数据,则记录所述计数值包括:以新的计数值来覆盖旧的计数值。According to one embodiment of the present disclosure, if the data is received, recording the count value includes: overwriting the old count value with the new count value.
根据本实施方式,接收端2可以记录每个接收到的tail值,并且用最新的tail值来覆盖之前的tail值,由此,接收端2将保持tail值处于最大值。According to this embodiment, the receiving end 2 can record each received tail value and overwrite the previous tail value with the latest tail value, so that the receiving end 2 will keep the tail value at the maximum value.
根据本公开的一个实施方式,如果接收到所述数据,则记录所述计数值包括:在接收到的数据中搜索最大的计数值;以及仅记录所述最大的计数值。According to an embodiment of the present disclosure, if the data is received, recording the count value includes: searching for a maximum count value in the received data; and recording only the maximum count value.
根据本实施方式,接收端2可以每隔一段时间来轮询接收到的tail的最大值,在此情况下,可能存在直接轮询到最大的tail值或其中某些tail值的情况,而不必然轮询到当前发送的数据所对应的tail值,在这些情况下,可以直接记录最大的tail值,而无需记录其他tail值。通过这种方式,只需要关注最大的tail值即可,无需记录所有的tail值。According to this embodiment, the receiving end 2 can poll the maximum value of the received tail at regular intervals. In this case, there may be a situation where the maximum tail value or some of the tail values are directly polled, and the tail value corresponding to the currently sent data is not necessarily polled. In these cases, the maximum tail value can be directly recorded without recording other tail values. In this way, only the maximum tail value needs to be paid attention to, and all tail values do not need to be recorded.
8.tx_head_cache:发送端1本次访问dram检查head时收到的head值,即接收端2实际上发送并且发送端1实际接收到的head值。8.tx_head_cache: the head value received by sender 1 when it accesses DRAM to check the head, that is, the head value actually sent by receiver 2 and actually received by sender 1.
如图7所示,在发送端1中可以存储有记录各参数状态的第一状态表,第一状态表可以至少包括三个参数,即tx_tail_cache,tx_tail-ckpt和tx_head_cache。在初始状态下,这些参数的值均为0,如图7中的状态1所示。As shown in Fig. 7, a first state table recording the states of various parameters may be stored in the transmitter 1, and the first state table may include at least three parameters, namely tx_tail_cache, tx_tail-ckpt and tx_head_cache. In the initial state, the values of these parameters are all 0, as shown in state 1 in Fig. 7.
类似地,在接收端2处,可以存储有记录各参数状态的第二状态表,第二状态表可以至少包括三个参数,即rx_head_cache,rx_head_ckpt和rx_tail_cache。在初始状态下,这些参数的值均为0,如图7中的状态1’所示。Similarly, at the receiving end 2, a second state table recording the states of various parameters may be stored, and the second state table may include at least three parameters, namely rx_head_cache, rx_head_ckpt and rx_tail_cache. In the initial state, the values of these parameters are all 0, as shown in state 1' in Figure 7.
接下来,假设发送端1向接收端2发送5个数据,那么参数tx_tail_cache的值变为5,即表示发送端1已经发送了5个数据,但这5个数据是否到达接收端2尚未被确认。同时,在发送端1发送数据时,还把每个数据的tail也发送到接收端,每发送一个数据,tail值发生递增。如图7中的状态2所示。Next, assuming that sender 1 sends 5 data to receiver 2, the value of parameter tx_tail_cache becomes 5, which means that sender 1 has sent 5 data, but whether these 5 data have reached receiver 2 has not yet been confirmed. At the same time, when sender 1 sends data, it also sends the tail of each data to the receiver. Each time a data is sent, the tail value increases. This is shown in state 2 in Figure 7.
在接收端2处,当数据被接收到时,可以记录为参数rx_tail_cache,该参数rx_tail_cache可以随着tail值的增加而增加,随着5个数据接收完毕,参数rx_tail_cache的值更新为5;该参数rx_tail_cache也可以直接记录并反映接收到的tail的最大值,而不是逐步递增。如图7的状态2’所示。At the receiving end 2, when data is received, it can be recorded as parameter rx_tail_cache, which can increase as the tail value increases. When 5 data are received, the value of parameter rx_tail_cache is updated to 5. The parameter rx_tail_cache can also directly record and reflect the maximum value of the received tail, rather than gradually increasing, as shown in state 2' of Figure 7.
当接收端2处对数据处理过之后,将反馈head值给发送端1,但发送端1是否接收到该head值尚不知晓。在此情况下,参数rx_head_cache的状态更新为5,这表示接收端2已发送了5个head信息(rx_head),但尚未被发送端1确认收到5个head信息。After receiving end 2 processes the data, it will feed back the head value to sending end 1, but it is not known whether sending end 1 has received the head value. In this case, the state of parameter rx_head_cache is updated to 5, which means that receiving end 2 has sent 5 head information (rx_head), but sending end 1 has not yet confirmed receipt of the 5 head information.
当发送端1接收到head信息之后,将向接收端2发送反馈信号。当接收端2接收到反馈信号之后,更新参数rx_head_ckpt。如图7中状态3’所示,参数rx_head_ckpt被更新 为5。After the transmitter 1 receives the head information, it sends a feedback signal to the receiver 2. After the receiver 2 receives the feedback signal, it updates the parameter rx_head_ckpt. As shown in state 3' in FIG7, the parameter rx_head_ckpt is updated. is 5.
如图7中的状态3所示,可以将参数rx_head_cache的值反馈到发送端1处,从而参数tx_head_cache被更新为5。As shown in state 3 in FIG. 7 , the value of the parameter rx_head_cache may be fed back to the transmitter 1 , so that the parameter tx_head_cache is updated to 5.
进一步如图7中的状态3所示,返回发送端1处,参数tx_tail_ckpt也被更新为5,这表示发送端1已发送了5个数据之后,已经被接收端2确认的tx_tail的数量,如图7的状态3所示。Further, as shown in state 3 in FIG. 7 , returning to the transmitter 1 , the parameter tx_tail_ckpt is also updated to 5, which indicates the number of tx_tails that have been confirmed by the receiver 2 after the transmitter 1 has sent 5 data, as shown in state 3 in FIG. 7 .
通过图7可以看出,通过检查发送端1中的参数tx_tail_cache、tx_tail_ckpt以及tx_head_cache以及接收端2中的参数rx_head_cache、rx_head_ckpt以及rx_tail_cache,能够对数据的发送和接收情况,tail和head值的发送和接收情况以及断点的情况进行了解。As can be seen from Figure 7, by checking the parameters tx_tail_cache, tx_tail_ckpt and tx_head_cache in the transmitter 1 and the parameters rx_head_cache, rx_head_ckpt and rx_tail_cache in the receiver 2, the sending and receiving of data, the sending and receiving of tail and head values and the breakpoint situation can be understood.
上面结合图7介绍了数据正常传输时的情况,下面将结合其他附图来详细描述数据传输发生错误时的情形。The above describes the situation when data is transmitted normally in conjunction with FIG. 7 . The following describes the situation when data transmission errors occur in detail in conjunction with other drawings.
图8示出了丢包/出错重传过程的示意图。需要理解的是,为简化起见,在图8中,仅仅表示了数据的发送和接收方向,并未示出发送模块和接收模块。Fig. 8 shows a schematic diagram of a packet loss/error retransmission process. It should be understood that, for the sake of simplicity, in Fig. 8, only the sending and receiving directions of data are shown, and the sending module and the receiving module are not shown.
如图8所示,在发送端1中可以存储有记录各参数状态的第一状态表,第一状态表可以至少包括三个参数,即tx_tail_cache,tx_tail-ckpt和tx_head_cache。在初始状态下,这些参数的值均为0,如图8中的状态1所示。As shown in Fig. 8, a first state table recording the states of various parameters may be stored in the transmitter 1, and the first state table may include at least three parameters, namely tx_tail_cache, tx_tail-ckpt and tx_head_cache. In the initial state, the values of these parameters are all 0, as shown in state 1 in Fig. 8.
类似地,在接收端2处,可以存储有记录各参数状态的第二状态表,第二状态表可以至少包括三个参数,即rx_head_cache,rx_head_ckpt和rx_tail_cache。在初始状态下,这些参数的值均为0,如图8中的状态1’所示。Similarly, at the receiving end 2, a second state table recording the states of various parameters may be stored, and the second state table may include at least three parameters, namely rx_head_cache, rx_head_ckpt and rx_tail_cache. In the initial state, the values of these parameters are all 0, as shown in state 1' in Figure 8.
接下来,假设发送端1向接收端2发送5个数据,即数据[1,2,3,4,5],那么参数tx_tail_cache的值变为5,即表示发送端1已经发送了5个数据,但这5个数据是否到达接收端2尚未被确认。同时,在发送端1发送数据时,还把每个数据的tail也发送到接收端,每发送一个数据,tail值发生递增。如图8中的状态2所示。Next, suppose that sender 1 sends 5 data to receiver 2, namely data [1, 2, 3, 4, 5], then the value of parameter tx_tail_cache becomes 5, which means that sender 1 has sent 5 data, but whether these 5 data have reached receiver 2 has not yet been confirmed. At the same time, when sender 1 sends data, it also sends the tail of each data to the receiver. Each time a data is sent, the tail value increases. This is shown in state 2 in Figure 8.
在接收端2处,当数据被接收到时,参数rx_tail_cache会随着tail值的增加而增加。与图7所示的实施方式不同的是,在本实施方式中,从第4个数据开始发生了数据丢失或出错,即仅有数据[1,2,3]成功发送到了接收端2处。因此,参数rx_tail_cache的值更新为3。如图8的状态2’所示。At the receiving end 2, when data is received, the parameter rx_tail_cache increases as the tail value increases. Different from the implementation shown in FIG7, in this implementation, data loss or error occurs from the 4th data, that is, only data [1, 2, 3] is successfully sent to the receiving end 2. Therefore, the value of the parameter rx_tail_cache is updated to 3. As shown in state 2' of FIG8.
由于在传输过程中数据被丢失或者出错,因此链路可以向发送端1发送中断请求,发送端1中的控制模块可以判断上报的中断是因为什么引起的,然后再根据具体的中断原因来确定是否要进行重传。Since data is lost or erroneous during transmission, the link can send an interrupt request to the transmitter 1. The control module in the transmitter 1 can determine the cause of the reported interruption and then determine whether to retransmit according to the specific cause of the interruption.
接收端2在接收到数据[1,2,3]之后,将head信息发送回发送端1处,但发送端1是否接收到该head值尚不知晓。由于接收端2处仅接收到3个数据,因此接收端2发送head为1-3的信息。在此情况下,参数rx_head_cache的状态更新为3,这表示接收端2已发送了3个head信息(rx_head),但尚未被发送端1确认收到3个head信息。如图8中的状态3’所示。After receiving the data [1,2,3], the receiver 2 sends the head information back to the transmitter 1, but it is not known whether the transmitter 1 has received the head value. Since the receiver 2 has only received 3 data, the receiver 2 sends the information with head values of 1-3. In this case, the state of the parameter rx_head_cache is updated to 3, which means that the receiver 2 has sent 3 head information (rx_head), but the transmitter 1 has not yet confirmed that it has received the 3 head information. This is shown in state 3' in Figure 8.
当发送端1接收到head信息之后,将向接收端2发送反馈信号。当接收端2接收到反馈信号之后,更新参数rx_head_ckpt。如图8中状态3’所示,由于接收端仅接收到3个数据,并且接收端反馈的head值为1-3,因此参数rx_head_ckpt被更新为3。After the transmitter 1 receives the head information, it sends a feedback signal to the receiver 2. After the receiver 2 receives the feedback signal, it updates the parameter rx_head_ckpt. As shown in state 3' in Figure 8, since the receiver only receives 3 data and the head value fed back by the receiver is 1-3, the parameter rx_head_ckpt is updated to 3.
返回发送端1处,接收端2将参数rx_head_cache反馈给发送端1,发送端1在接收到该反馈之后将参数tx_head_cache更新为3,这表示发送端1已发送了5个数据之后,接收端2确认接收到并通过head反馈了3个数据,如图8的状态3所示。Returning to the transmitter 1, the receiver 2 feeds back the parameter rx_head_cache to the transmitter 1. After receiving the feedback, the transmitter 1 updates the parameter tx_head_cache to 3, which means that after the transmitter 1 has sent 5 data, the receiver 2 confirms the receipt and feeds back 3 data through the head, as shown in state 3 of Figure 8.
进一步如图8中的状态3所示,参数tx_tail_ckpt相应地被更新为3,这表示重传应该从第4个数据开始。Further, as shown in state 3 in FIG. 8 , the parameter tx_tail_ckpt is updated to 3 accordingly, which indicates that the retransmission should start from the 4th data.
根据本公开的一个实施方式,响应于来自于通信链路上报的中断信号,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。 According to one embodiment of the present disclosure, in response to an interruption signal reported from a communication link, it is determined whether to retransmit the data based on the first sending end information and the first receiving end information.
如上文所述,如果通信链路上报了中断信号,则可能有多种中断类型,一些中断类型需要进行数据的重传,而另一些中断类型不需要对数据进行重传。根据本公开的一个实施方式,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传包括:根据第一发送端信息和第一接收端信息来确定中断的类型;根据所述中断的类型来确定是否进行所述数据的重传。As described above, if the communication link reports an interruption signal, there may be multiple interruption types, some of which require retransmission of data, while other interruption types do not require retransmission of data. According to one embodiment of the present disclosure, determining whether to retransmit the data according to the first transmitting end information and the first receiving end information includes: determining the type of interruption according to the first transmitting end information and the first receiving end information; and determining whether to retransmit the data according to the type of interruption.
根据本公开的一个实施方式,根据第一发送端信息和第一接收端信息来确定中断的类型可以包括:如果第一数量大于第二数量,则确定中断的类型为从发送端到接收端的数据丢失或错误。根据本公开的一个实施方式,从发送端到接收端的数据丢失或错误包括有效载荷的丢失和/或计数值的丢失或错误。需要理解的是,这里的数据丢失,不仅仅是有效载荷数据的丢失,还可能是tail值等其他信息的丢失。例如,即使有效载荷数据正确地从发送端1传送到了接收端2,但所携带的tail值被丢失,也应当认为是数据丢失。According to one embodiment of the present disclosure, determining the type of interruption based on the first transmitting end information and the first receiving end information may include: if the first number is greater than the second number, determining the type of interruption as data loss or error from the transmitting end to the receiving end. According to one embodiment of the present disclosure, the data loss or error from the transmitting end to the receiving end includes the loss of the payload and/or the loss or error of the count value. It should be understood that the data loss here is not only the loss of the payload data, but also the loss of other information such as the tail value. For example, even if the payload data is correctly transmitted from the transmitting end 1 to the receiving end 2, but the tail value carried is lost, it should also be considered as data loss.
还需要理解的是,本文中所称的第一接收端信息,是指接收到已经接收到数据,并且已经通过head进行了反馈,因此可以接收端信息可以反映接收端实际接收到的数据的数量,并且反映接收端已经针对此次接收反馈的head值的数量,这与所反馈的head值是有所不同的。It should also be understood that the first receiving end information referred to in this article refers to the data that has been received and has been fed back through the head. Therefore, the receiving end information can reflect the amount of data actually received by the receiving end, and reflect the number of head values that the receiving end has fed back for this reception, which is different from the fed back head value.
具体而言,通过比较参数tx_tail_cache和参数tx_head_cache的值,发送端1可以确定是否要发起数据的重传,例如,在图8所示的示例中,发送端1会发现其发送了5个数据(参数tx_tail_cache的值等于5),但接收端2处仅接收到3个数据(参数tx_head_cache的值等于3),因此发送端1可以确认通信链路上报的中断信号是因为发生了数据的丢失或者出错。Specifically, by comparing the values of the parameter tx_tail_cache and the parameter tx_head_cache, the sender 1 can determine whether to initiate data retransmission. For example, in the example shown in Figure 8, the sender 1 will find that it has sent 5 data (the value of the parameter tx_tail_cache is equal to 5), but the receiver 2 only received 3 data (the value of the parameter tx_head_cache is equal to 3). Therefore, the sender 1 can confirm that the interrupt signal reported by the communication link is due to data loss or error.
根据本公开的一个实施方式,根据所述中断的类型来确定是否进行所述数据的重传包括:如果确定中断的类型为从发送端到接收端的数据丢失,则根据第二数量来确定所述中断的断点;从所述断点开始对数据进行重传。According to one embodiment of the present disclosure, determining whether to retransmit the data according to the type of the interruption includes: if the type of the interruption is determined to be data loss from the sending end to the receiving end, determining the breakpoint of the interruption according to the second quantity; and retransmitting the data starting from the breakpoint.
进一步地,如上文所述,当参数tx_head_cache的值变为3时,参数tx_tail_ckpt的值也相应地被更新为3,因此发送端1可以知晓已有三个数据发送成功,而重传应当从第4个数据开始。需要理解的是,上文所述的根据第二数量来确定中断的断点,本质上是根据由第二数量确定的断点位置来确定中断的断点,参数tx_tail_ckpt即可以标识断点位置。Further, as described above, when the value of the parameter tx_head_cache becomes 3, the value of the parameter tx_tail_ckpt is also updated to 3 accordingly, so the transmitter 1 can know that three data have been successfully sent, and the retransmission should start from the fourth data. It should be understood that the above-mentioned determination of the interruption breakpoint according to the second quantity is essentially to determine the interruption breakpoint according to the breakpoint position determined by the second quantity, and the parameter tx_tail_ckpt can identify the breakpoint position.
接下来,如图8所示,在确定要继续重传数据之后,开始对数据[4,5]进行重传,此时,状态4和状态3保持相同。Next, as shown in FIG8 , after determining to continue retransmitting the data, the data [4,5] is started to be retransmitted, and at this time, state 4 and state 3 remain the same.
接下来,当数据[4,5]重传成功之后,接收端2的参数rx_tail_cache的值从3更新为5,这表示接收端2已成功接收到数据[4,5],如图8中的状态4’所示。Next, when the data [4, 5] is retransmitted successfully, the value of the parameter rx_tail_cache of the receiving end 2 is updated from 3 to 5, which means that the receiving end 2 has successfully received the data [4, 5], as shown in state 4' in Figure 8.
接收端2在接收到数据[4,5]之后,将向发送端反馈head信号。因此,参数rx_head_cache的值从3更新为5,如状态5’所示。如上文所述,参数rx_head_cache表示接收端2已发送,但尚未被发送端1确认收到的rx_head。一般来说,rx_head的发送不需要接收端1额外的确认,只要不发生超时即认为已送达。After receiving data [4,5], receiver 2 will feed back the head signal to the transmitter. Therefore, the value of the parameter rx_head_cache is updated from 3 to 5, as shown in state 5'. As mentioned above, the parameter rx_head_cache indicates the rx_head that has been sent by receiver 2 but has not yet been confirmed by transmitter 1. Generally speaking, the sending of rx_head does not require additional confirmation from receiver 1, and it is considered to have been delivered as long as there is no timeout.
此外,如图8中的状态5’所示,参数rx_head_ckpt的值也更新为5,这表示接收端2在向发送端1发送了head信号之后,又接收到了来自于发送端1的确认。In addition, as shown in state 5' in FIG8 , the value of the parameter rx_head_ckpt is also updated to 5, which means that after the receiving end 2 sends the head signal to the sending end 1, it receives a confirmation from the sending end 1.
进一步地,在发送端1,根据接收端2反馈的rx_head_cache的值来更新tx_head_cache的值,从而tx_head_cache的值更新为5,由此,参数tx_tail_ckpt的值也相应地更新为5,如图8的状态5所示。在此情况下,参数tx_tail_cache的值与参数tx_head_cache的值相同,这表示发送端1发送的数据的数量与接收端2接收到的数据的数量是相同的,因此无需进行数据的重传。Further, at the transmitting end 1, the value of tx_head_cache is updated according to the value of rx_head_cache fed back by the receiving end 2, so that the value of tx_head_cache is updated to 5, and thus, the value of the parameter tx_tail_ckpt is also updated to 5 accordingly, as shown in state 5 of FIG8 . In this case, the value of the parameter tx_tail_cache is the same as the value of the parameter tx_head_cache, which means that the amount of data sent by the transmitting end 1 is the same as the amount of data received by the receiving end 2, so there is no need to retransmit the data.
根据本公开的一个实施方式,根据第一发送端信息和第一接收端信息来确定中断的类型包括:如果第一数量等于第二数量,则确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失。 According to an embodiment of the present disclosure, determining the type of interruption according to the first transmitting end information and the first receiving end information includes: if the first number is equal to the second number, determining the type of interruption as the loss of response to the data fed back from the receiving end to the transmitting end.
下面结合图9来描述以上实施方式的具体情形。图9示出了接收端2反馈的ACK被丢失的情况。需要理解的是,为简化起见,在图9中,仅仅表示了数据的发送和接收方向,并未示出发送模块和接收模块。The specific situation of the above embodiment is described below in conjunction with Figure 9. Figure 9 shows the situation where the ACK fed back by the receiving end 2 is lost. It should be understood that, for the sake of simplicity, in Figure 9, only the sending and receiving directions of data are shown, and the sending module and the receiving module are not shown.
如图9所示,在发送端1中可以存储有记录各参数状态的第一状态表,第一状态表可以至少包括三个参数,即tx_tail_cache,tx_tail-ckpt和tx_head_cache。在初始状态下,这些参数的值均为0,如图9中的状态1所示。As shown in Fig. 9, a first state table recording the states of various parameters may be stored in the transmitter 1, and the first state table may include at least three parameters, namely tx_tail_cache, tx_tail-ckpt and tx_head_cache. In the initial state, the values of these parameters are all 0, as shown in state 1 in Fig. 9.
类似地,在接收端2处,可以存储有记录各参数状态的第二状态表,第二状态表可以至少包括三个参数,即rx_head_cache,rx_head_ckpt和rx_tail_cache。在初始状态下,这些参数的值均为0,如图9中的状态1’所示。Similarly, at the receiving end 2, a second state table recording the states of various parameters may be stored, and the second state table may include at least three parameters, namely rx_head_cache, rx_head_ckpt and rx_tail_cache. In the initial state, the values of these parameters are all 0, as shown in state 1' in Figure 9.
接下来,假设发送端1向接收端2发送5个数据,即数据[1,2,3,4,5],那么参数tx_tail_cache的值变为5,即表示发送端1已经发送了5个数据,但这5个数据是否到达接收端2尚未被确认。同时,在发送端1发送数据时,还把每个数据的tail也发送到接收端,每发送一个数据,tail值发生递增。如图9中的状态2所示。Next, suppose that sender 1 sends 5 data to receiver 2, namely data [1, 2, 3, 4, 5], then the value of parameter tx_tail_cache becomes 5, which means that sender 1 has sent 5 data, but whether these 5 data have reached receiver 2 has not yet been confirmed. At the same time, when sender 1 sends data, it also sends the tail of each data to the receiver. Each time a data is sent, the tail value increases. This is shown in state 2 in Figure 9.
在接收端2处,当数据被接收到时,参数rx_tail_cache会随着tail值的增加而增加。与图8所示的实施方式不同的是,在本实施方式中,所有数据[1,2,3,4,5]均成功发送到了接收端2处。因此,参数rx_tail_cache的值更新为5。如图9的状态2’所示。At the receiving end 2, when data is received, the parameter rx_tail_cache increases as the tail value increases. Different from the implementation shown in FIG8, in this implementation, all data [1, 2, 3, 4, 5] are successfully sent to the receiving end 2. Therefore, the value of the parameter rx_tail_cache is updated to 5. As shown in state 2' of FIG9.
接收端2在接收到数据[1,2,3,4,5]之后,对数据进行处理,并将head信息发送回发送端1处,但发送端1是否接收到该head值尚不知晓。由于接收端2处接收到5个数据,因此接收端2发送head为1-5的信息。在此情况下,参数rx_head_cache的状态更新为5,这表示接收端2已发送了5个head信息(rx_head),但尚未被发送端1确认收到5个head信息,如图9中的状态3’所示。After receiving the data [1,2,3,4,5], the receiver 2 processes the data and sends the head information back to the transmitter 1, but it is not known whether the transmitter 1 has received the head value. Since the receiver 2 receives 5 data, the receiver 2 sends the information with head values of 1-5. In this case, the state of the parameter rx_head_cache is updated to 5, which means that the receiver 2 has sent 5 head information (rx_head), but the transmitter 1 has not yet confirmed that the 5 head information has been received, as shown in state 3' in Figure 9.
但是,在如图9所示的实施方式中,第4个数据包的(ACK)信息被丢失,即发送端1仅接收到3个ACK信息,但是实际上所有的数据包均已经在接收端2完成接收并处理。However, in the implementation shown in FIG. 9 , the (ACK) information of the fourth data packet is lost, that is, the transmitting end 1 only receives three ACK information, but in fact all the data packets have been received and processed at the receiving end 2 .
当接收端2处理完数据后,rx_head_cache会更新为5,并向发送端1发送。发送端1收到head并发送反馈信号之后,接收端更新参数rx_head_ckpt。如图9中状态3’所示,参数rx_head_ckpt被更新为5,如图9中的状态3’所示。When the receiving end 2 processes the data, rx_head_cache is updated to 5 and sent to the transmitting end 1. After the transmitting end 1 receives the head and sends a feedback signal, the receiving end updates the parameter rx_head_ckpt. As shown in state 3' in Figure 9, the parameter rx_head_ckpt is updated to 5, as shown in state 3' in Figure 9.
而发送端1,由于没有收到数据包4和5的ACK信息,将触发超时机制,由控制模块重新启动任务。发送端1的新任务启动后,检查接收到的来自接收端2的head值,并将tx_head_cache更新为5,这表示发送端1已发送了5个数据之后,接收端2确认接收到5个数据,所以发送端1确认自己此前的超时是由丢失ACK导致,无需重新发送任何数据,可以直接结束,如图9的状态3所示。As the sender 1 does not receive the ACK information of data packets 4 and 5, the timeout mechanism will be triggered and the control module will restart the task. After the new task of sender 1 is started, it checks the head value received from receiver 2 and updates tx_head_cache to 5, which means that after sender 1 has sent 5 data, receiver 2 confirms that it has received 5 data. Therefore, sender 1 confirms that its previous timeout was caused by the loss of ACK. It does not need to resend any data and can end directly, as shown in state 3 of Figure 9.
进一步如图9中的状态3所示,参数tx_head_ckpt相应地被更新为5。As further shown in state 3 in FIG. 9 , the parameter tx_head_ckpt is updated to 5 accordingly.
如上,图9状态3'中的rx_head_ckpt的值应为5。As above, the value of rx_head_ckpt in state 3' of Figure 9 should be 5.
由此,根据本公开的一个实施方式,根据第一发送端信息和第一接收端信息来确定中断的类型包括:如果第一数量等于第二数量,则确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失。Therefore, according to one embodiment of the present disclosure, determining the type of interruption based on the first sending end information and the first receiving end information includes: if the first number is equal to the second number, determining the type of interruption as the loss of response to the data fed back from the receiving end to the sending end.
在此情况下,参数tx_tail_cache的值与参数tx_head_cache的值相同,这表示发送端1发送的数据的数量与接收端2接收到的数据的数量是相同的,因此发送端1可以意识到,中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失。根据办本公开的一个实施方式,如果确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失,则确定无需进行数据的重传。In this case, the value of the parameter tx_tail_cache is the same as the value of the parameter tx_head_cache, which means that the amount of data sent by the transmitter 1 is the same as the amount of data received by the receiver 2, so the transmitter 1 can realize that the type of interruption is the loss of the response to the data fed back from the receiver to the transmitter. According to one embodiment of the present disclosure, if it is determined that the type of interruption is the loss of the response to the data fed back from the receiver to the transmitter, it is determined that there is no need to retransmit the data.
根据本公开的一个实施方式,通过应用层的缓存区来存储待重传的数据。根据本实施方式,传输层不再需要额外的空间来用来重传,应用层直接将应用层直接使用的缓存区(例如Recvbuffer)进行复用,不再需要额外的空间,从而节省了传输层的存储开销。 According to an embodiment of the present disclosure, the data to be retransmitted is stored in the buffer area of the application layer. According to this embodiment, the transport layer no longer needs additional space for retransmission, and the application layer directly reuses the buffer area (such as Recvbuffer) directly used by the application layer, and no additional space is needed, thereby saving the storage overhead of the transport layer.
根据本公开的一个实施方式,通过应用层来发送重传指示,以进行所述数据的重传。According to one embodiment of the present disclosure, a retransmission indication is sent through the application layer to retransmit the data.
根据本实施方式,可以在发送端的应用层提供数据重传的指示,由此,应用层重传可以正确地完成链路出错情况,并通过重传完成数据可靠性的保证。According to this embodiment, an indication of data retransmission can be provided at the application layer of the sending end, so that the application layer retransmission can correctly handle the link error situation and ensure data reliability through retransmission.
图10示出了根据本公开另一个方面的用于在应用层控制数据重传的方法的流程图,包括:在操作S1010,预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;在操作S1020,响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;在操作S1030,接收并记录第一接收端信息,所述第一接收端信息表示数据被接收端接收到并反馈的第二数量,其中第二数量不大于第一数量;以及,在操作S1040,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。Figure 10 shows a flowchart of a method for controlling data retransmission at the application layer according to another aspect of the present disclosure, comprising: in operation S1010, pre-sending data, the data comprising a payload and a count value for the payload; in operation S1020, in response to the data being in a pre-sending state, recording first transmitting end information, the first transmitting end information indicating a first amount of the data being pre-sent; in operation S1030, receiving and recording first receiving end information, the first receiving end information indicating a second amount of data received and fed back by the receiving end, wherein the second amount is not greater than the first amount; and, in operation S1040, determining whether to retransmit the data based on the first transmitting end information and the first receiving end information.
图10示出了发送端所进行的操作,这在上文中结合图6-9进行了描述,这里将不再赘述。FIG. 10 shows the operations performed by the transmitting end, which have been described above in conjunction with FIGS. 6-9 and will not be repeated here.
根据本公开的一个实施方式,预发送数据包括:将所述数据放置于发送端的存储空间内以备发送。这里的存储空间,是指位于发送端的底层硬件存储空间。According to an embodiment of the present disclosure, pre-sending data includes: placing the data in a storage space of a sending end for preparation for sending. The storage space here refers to the underlying hardware storage space located at the sending end.
根据本公开的一个实施方式,响应于所述数据处于预发送状态,记录第一发送端信息包括:响应于被置于预发送状态的数据递增,相应地对第一数量进行递增,而无论所述数据是否发送成功,和/或无论是否接收到针对所述数据的应答。According to one embodiment of the present disclosure, in response to the data being in a pre-sending state, recording the first sending end information includes: in response to the data being placed in the pre-sending state being incremented, the first quantity is incremented accordingly, regardless of whether the data is sent successfully, and/or regardless of whether a response to the data is received.
根据本公开的一个实施方式,其中,接收并记录第一接收端信息包括:随着第一接收端信息的变化而更新第二数量。According to an embodiment of the present disclosure, receiving and recording the first receiving end information includes: updating the second quantity as the first receiving end information changes.
根据本公开的一个实施方式,其中,接收并记录第一接收端信息包括:记录具有最大的第二数量的第二接收端信息。According to an embodiment of the present disclosure, receiving and recording the first receiving end information includes: recording the second receiving end information having the largest second number.
根据本公开的一个实施方式,其中,响应于来自于通信链路上报的中断信号,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。According to one embodiment of the present disclosure, in response to an interruption signal reported from a communication link, it is determined whether to retransmit the data based on the first sending end information and the first receiving end information.
根据本公开的一个实施方式,其中,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传包括:根据第一发送端信息和第一接收端信息来确定中断的类型;根据所述中断的类型来确定是否进行所述数据的重传。According to one embodiment of the present disclosure, determining whether to retransmit the data based on the first sending end information and the first receiving end information includes: determining the type of interruption based on the first sending end information and the first receiving end information; and determining whether to retransmit the data based on the type of interruption.
根据本公开的一个实施方式,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:如果第一数量大于第二数量,则确定中断的类型为从发送端到接收端的数据丢失或错误。According to an embodiment of the present disclosure, determining the type of interruption according to the first transmitting end information and the first receiving end information includes: if the first number is greater than the second number, determining the type of interruption as data loss or error from the transmitting end to the receiving end.
根据本公开的一个实施方式,其中,从发送端到接收端的数据丢失或错误包括有效载荷的丢失或错误,和/或计数值的丢失或错误。According to one embodiment of the present disclosure, the data loss or error from the transmitting end to the receiving end includes the loss or error of the effective load and/or the loss or error of the counting value.
根据本公开的一个实施方式,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:如果确定中断的类型为从发送端到接收端的数据丢失,则根据第二数量来确定所述中断的断点;从所述断点开始对数据进行重传。According to one embodiment of the present disclosure, determining whether to retransmit the data according to the type of the interruption includes: if the type of the interruption is determined to be data loss from the sending end to the receiving end, determining the breakpoint of the interruption according to a second quantity; and retransmitting the data starting from the breakpoint.
根据本公开的一个实施方式,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:如果第一数量等于第二数量,则确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失。According to one embodiment of the present disclosure, determining the type of interruption based on the first transmitting end information and the first receiving end information includes: if the first number is equal to the second number, determining the type of interruption as the loss of response to the data fed back from the receiving end to the transmitting end.
根据本公开的一个实施方式,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:如果确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失,则确定无需进行所述数据的重传。According to one embodiment of the present disclosure, determining whether to retransmit the data according to the type of the interruption includes: if it is determined that the type of the interruption is a loss of a response to the data fed back from the receiving end to the sending end, determining that there is no need to retransmit the data.
根据本公开的一个实施方式,其中,通过应用层的缓存区(例如Recvbuffer)来存储待重传的数据。According to an embodiment of the present disclosure, data to be retransmitted is stored in a buffer area (eg, Recvbuffer) of the application layer.
根据本公开的一个实施方式,其中,通过应用层来发送重传指示,以进行所述数据的重传。According to one embodiment of the present disclosure, a retransmission indication is sent through an application layer to retransmit the data.
图11示出了根据本公开一个方面的用于在应用层控制数据重传的设备,包括:发送 单元1110,用于预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;发送端信息更新单元1120,用于响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;接收单元1130,用于接收并记录第一接收端信息,所述第一接收端信息表示数据被接收端接收到并反馈的第二数量,其中第二数量不大于第一数量;以及,重传判断单元1140,用于根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。FIG. 11 shows a device for controlling data retransmission at the application layer according to one aspect of the present disclosure, comprising: sending Unit 1110 is used to pre-send data, wherein the data includes a payload and a count value for the payload; a transmitting end information updating unit 1120 is used to record first transmitting end information in response to the data being in a pre-sending state, wherein the first transmitting end information indicates a first quantity of the data being pre-sent; a receiving unit 1130 is used to receive and record first receiving end information, wherein the first receiving end information indicates a second quantity of data received and fed back by the receiving end, wherein the second quantity is not greater than the first quantity; and a retransmission judgment unit 1140 is used to determine whether to retransmit the data based on the first transmitting end information and the first receiving end information.
根据本公开的一个方面,还提供一种在应用层控制数据重传的通信系统,所述通信系统包括:发送端,接收端和连接所述发送端与接收端的通信链路,其中,所述发送端向接收端预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;所述发送端响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;所述通信链路用于传输所述数据;所述接收端如果接收到所述数据,则记录所述计数值;所述接收端根据所述计数值来生成第二数量,所述第二数量表示所述数据被接收端接收到并反馈的第二数量;所述接收端向发送端反馈第一接收端信息,所述第一接收端信息包括第二数量,并且第二数量不大于第一数量;所述发送端接收并记录所述第一接收端信息;所述发送端根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。According to one aspect of the present disclosure, there is also provided a communication system for controlling data retransmission at an application layer, the communication system comprising: a transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, wherein the transmitting end pre-transmits data to the receiving end, the data comprising a payload and a count value for the payload; the transmitting end records first transmitting end information in response to the data being in a pre-transmitting state, the first transmitting end information representing a first quantity of the data being pre-transmitted; the communication link is used to transmit the data; if the receiving end receives the data, the receiving end records the count value; the receiving end generates a second quantity based on the count value, the second quantity representing a second quantity of the data received and fed back by the receiving end; the receiving end feeds back first receiving end information to the transmitting end, the first receiving end information comprising a second quantity, and the second quantity is not greater than the first quantity; the transmitting end receives and records the first receiving end information; the transmitting end determines whether to retransmit the data based on the first transmitting end information and the first receiving end information.
根据本公开的另一个方面,还提供一种电子设备,包括:一个或多个处理器;以及存储器,所述存储器中存储有计算机可执行指令,当所述计算机可执行指令由所述一个或多个处理器运行时,使得所述电子设备执行如上所述的方法。According to another aspect of the present disclosure, an electronic device is also provided, including: one or more processors; and a memory, in which computer executable instructions are stored. When the computer executable instructions are executed by the one or more processors, the electronic device executes the method described above.
根据本公开的又一个方面,还提供一种计算机可读存储介质,包括计算机可执行指令,当所述计算机可执行指令由一个或多个处理器运行时,执行如上所述的方法。According to yet another aspect of the present disclosure, a computer-readable storage medium is provided, comprising computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the method described above is executed.
本公开基于head、tail和数据(Data)的通信流及相应的装置,用Head/Tail的相对关系来执行应用层的重传,保证了通信的可靠性。The present disclosure is based on the communication flow of head, tail and data (Data) and the corresponding device, and uses the relative relationship of Head/Tail to perform retransmission of the application layer, thereby ensuring the reliability of communication.
同时,相比于现有的传输层来执行重传,在应用层中进行数据重传的有益效果在于:At the same time, compared with the existing transport layer performing retransmission, the beneficial effects of performing data retransmission in the application layer are:
在本公开中,通过应用层的信息,可以知晓数据的起始点和结束点,因此,通信协议不再需要维护需要重传的起始点和结束点,只要忠实的执行应用层下发的每一笔传输请求即可。In the present disclosure, the starting point and the ending point of the data can be known through the information of the application layer. Therefore, the communication protocol no longer needs to maintain the starting point and the ending point that need to be retransmitted, and only needs to faithfully execute each transmission request issued by the application layer.
此外,传输层不再需要额外的空间来用来重传,应用层直接将应用层直接使用的缓存区(例如Recvbuffer)进行复用,不再需要额外的存储空间。In addition, the transport layer no longer needs additional space for retransmission, and the application layer directly reuses the buffer area (such as Recvbuffer) directly used by the application layer, and no additional storage space is needed.
在本公开中,由应用层来进行重传,应用层会显式地感知重传的发生,这样应用层在进行重传时,可以保证同一任务不会同时进行正常的发送,避免出现重传流量与正常任务流量同时在链路竞争的情况,从而降低了链路拥塞和丢包的概率。In the present disclosure, retransmission is performed by the application layer, and the application layer will explicitly perceive the occurrence of retransmission. In this way, when the application layer is retransmitting, it can ensure that the same task will not be sent normally at the same time, avoiding the situation where retransmission traffic and normal task traffic compete on the link at the same time, thereby reducing the probability of link congestion and packet loss.
根据本公开的技术方案,在应用层进行软件层面的重传设计,可以降低传输层的硬件设计,因此开发快,硬件定制成本低。According to the technical solution disclosed in the present invention, the retransmission design at the software level is performed at the application layer, which can reduce the hardware design of the transmission layer, thereby speeding up the development and reducing the hardware customization cost.
根据不同的应用场景,本披露的电子设备或装置可以包括服务器、云端服务器、服务器集群、数据处理装置、机器人、电脑、打印机、扫描仪、平板电脑、智能终端、PC设备、物联网终端、移动终端、手机、行车记录仪、导航仪、传感器、摄像头、相机、摄像机、投影仪、手表、耳机、移动存储、可穿戴设备、视觉终端、自动驾驶终端、交通工具、家用电器、和/或医疗设备。所述交通工具包括飞机、轮船和/或车辆;所述家用电器包括电视、空调、微波炉、冰箱、电饭煲、加湿器、洗衣机、电灯、燃气灶、油烟机;所述医疗设备包括核磁共振仪、B超仪和/或心电图仪。本披露的电子设备或装置还可以被应用于互联网、物联网、数据中心、能源、交通、公共管理、制造、教育、电网、电信、金融、零售、工地、医疗等领域。进一步,本披露的电子设备或装置还可以用于云端、边缘端、终端等与人工智能、大数据和/或云计算相关的应用场景中。在一个或多个实施例中,根据本披露方案的算力高的电子设备或装置可以应用于云端设备(例如云端服务器),而 功耗小的电子设备或装置可以应用于终端设备和/或边缘端设备(例如智能手机或摄像头)。在一个或多个实施例中,云端设备的硬件信息和终端设备和/或边缘端设备的硬件信息相互兼容,从而可以根据终端设备和/或边缘端设备的硬件信息,从云端设备的硬件资源中匹配出合适的硬件资源来模拟终端设备和/或边缘端设备的硬件资源,以便完成端云一体或云边端一体的统一管理、调度和协同工作。According to different application scenarios, the electronic equipment or device disclosed herein may include servers, cloud servers, server clusters, data processing devices, robots, computers, printers, scanners, tablet computers, smart terminals, PC devices, IoT terminals, mobile terminals, mobile phones, driving recorders, navigators, sensors, cameras, cameras, video cameras, projectors, watches, headphones, mobile storage, wearable devices, visual terminals, automatic driving terminals, transportation, household appliances, and/or medical equipment. The transportation includes airplanes, ships and/or vehicles; the household appliances include televisions, air conditioners, microwave ovens, refrigerators, rice cookers, humidifiers, washing machines, electric lights, gas stoves, and range hoods; the medical equipment includes magnetic resonance imaging, ultrasound machines and/or electrocardiographs. The electronic equipment or device disclosed herein may also be applied to the Internet, IoT, data centers, energy, transportation, public administration, manufacturing, education, power grids, telecommunications, finance, retail, construction sites, and medical fields. Further, the electronic equipment or device disclosed herein may also be used in cloud, edge, and terminal applications related to artificial intelligence, big data, and/or cloud computing. In one or more embodiments, the electronic device or apparatus with high computing power according to the disclosed solution can be applied to a cloud device (such as a cloud server). Electronic devices or apparatuses with low power consumption can be applied to terminal devices and/or edge devices (such as smartphones or cameras). In one or more embodiments, the hardware information of the cloud device and the hardware information of the terminal device and/or the edge device are compatible with each other, so that according to the hardware information of the terminal device and/or the edge device, appropriate hardware resources can be matched from the hardware resources of the cloud device to simulate the hardware resources of the terminal device and/or the edge device, so as to complete the unified management, scheduling and collaborative work of the end-cloud integration or the cloud-edge-end integration.
以上对本公开实施例进行了详细介绍,本文中应用了具体个例对本披露的原理及实施方式进行了阐述,以上实施例的说明仅用于帮助理解本披露的方法及其核心思想。同时,本领域技术人员依据本披露的思想,基于本披露的具体实施方式及应用范围上做出的改变或变形之处,都属于本披露保护的范围。综上所述,本说明书内容不应理解为对本披露的限制。The embodiments of the present disclosure are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method and its core idea of the present disclosure. At the same time, changes or deformations made by those skilled in the art based on the ideas of the present disclosure, the specific implementation methods and the scope of application of the present disclosure, all belong to the scope of protection of the present disclosure. In summary, the content of this specification should not be understood as a limitation on the present disclosure.
通过以下条款,能够更好地理解本公开的技术方案。The following clauses can better understand the technical solution of the present disclosure.
条款1.一种用于在应用层控制数据重传的方法,包括:Clause 1. A method for controlling data retransmission at an application layer, comprising:
预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;Pre-sending data, the data comprising a payload and a count value for the payload;
响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;In response to the data being in a pre-sending state, recording first sending end information, wherein the first sending end information indicates a first amount of the data being pre-sent;
接收并记录第一接收端信息,所述第一接收端信息表示数据被接收端接收到并反馈的第二数量,其中第二数量不大于第一数量;Receiving and recording first receiving end information, wherein the first receiving end information indicates a second amount of data received and fed back by the receiving end, wherein the second amount is not greater than the first amount;
根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。Determine whether to retransmit the data according to the first sending end information and the first receiving end information.
条款2.根据条款1所述的方法,其中,预发送数据包括:将所述数据放置于发送端的存储空间内以备发送。Clause 2. The method according to clause 1, wherein pre-sending data comprises: placing the data in a storage space of the sending end in preparation for sending.
条款3.根据条款1或2所述的方法,其中,响应于所述数据处于预发送状态,记录第一发送端信息包括:Clause 3. The method according to clause 1 or 2, wherein, in response to the data being in a pre-sending state, recording the first sending end information comprises:
响应于被置于预发送状态的数据递增,相应地对第一数量进行递增,而无论所述数据是否发送成功,和/或无论是否接收到针对所述数据的应答。In response to the data placed in the pre-transmission state being incremented, the first number is incremented accordingly, regardless of whether the data is successfully transmitted and/or regardless of whether a response to the data is received.
条款4.根据条款1-3中任意一项所述的方法,其中,接收并记录第一接收端信息包括:随着第一接收端信息的变化而更新第二数量。Clause 4. The method according to any one of clauses 1-3, wherein receiving and recording the first receiving end information includes: updating the second quantity as the first receiving end information changes.
条款5.根据条款1-3中任意一项所述的方法,其中,接收并记录第一接收端信息包括:记录具有最大的第二数量的第二接收端信息。Clause 5. The method according to any one of clauses 1-3, wherein receiving and recording the first receiving end information comprises: recording the second receiving end information having the largest second number.
条款6.根据条款1-5中任意一项所述的方法,其中,响应于来自于通信链路上报的中断信号,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。Clause 6. A method according to any one of clauses 1-5, wherein, in response to an interruption signal reported from a communication link, it is determined whether to retransmit the data based on the first sending end information and the first receiving end information.
条款7.根据条款6所述的方法,其中,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传包括:Clause 7. The method according to clause 6, wherein determining whether to retransmit the data according to the first transmitting end information and the first receiving end information comprises:
根据第一发送端信息和第一接收端信息来确定中断的类型;Determine the type of interruption according to the first sending end information and the first receiving end information;
根据所述中断的类型来确定是否进行所述数据的重传。Whether to retransmit the data is determined according to the type of the interruption.
条款8.根据条款7所述的方法,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:Clause 8. The method of clause 7, wherein determining the type of interruption based on the first transmitting end information and the first receiving end information comprises:
如果第一数量大于第二数量,则确定中断的类型为从发送端到接收端的数据丢失或错误。If the first number is greater than the second number, the type of the interruption is determined to be data loss or error from the transmitting end to the receiving end.
条款9.根据条款8所述的方法,其中,从发送端到接收端的数据丢失或错误包括有效载荷的丢失或错误,和/或计数值的丢失或错误。Clause 9. The method according to clause 8, wherein the data loss or error from the transmitting end to the receiving end includes the loss or error of the payload and/or the loss or error of the count value.
条款10.根据条款8或9所述的方法,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:Clause 10. The method according to clause 8 or 9, wherein determining whether to retransmit the data according to the type of the interruption comprises:
如果确定中断的类型为从发送端到接收端的数据丢失,则根据第二数量来确定所述中断的断点;If it is determined that the type of the interruption is data loss from the transmitting end to the receiving end, determining a breakpoint of the interruption according to the second quantity;
从所述断点开始对数据进行重传。The data is retransmitted starting from the breakpoint.
条款11.根据条款7所述的方法,其中,根据第一发送端信息和第一接收端信息来 确定中断的类型包括:Clause 11. The method according to clause 7, wherein the first transmitting end information and the first receiving end information are used to Identify the types of interruptions including:
如果第一数量等于第二数量,则确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失。If the first number is equal to the second number, it is determined that the type of the interruption is a loss of a response to the data fed back from the receiving end to the transmitting end.
条款12.根据条款11所述的方法,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:Clause 12. The method according to clause 11, wherein determining whether to retransmit the data according to the type of the interruption comprises:
如果确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失,则确定无需进行所述数据的重传。If it is determined that the type of interruption is a loss of a response to the data fed back from the receiving end to the sending end, it is determined that there is no need to retransmit the data.
条款13.根据条款1-12中任意一项所述的方法,其中,通过应用层的缓存区来存储待重传的数据。Clause 13. The method according to any one of clauses 1 to 12, wherein the data to be retransmitted is stored in a buffer area of the application layer.
条款14.根据条款1-13中任意一项所述的方法,其中,通过应用层来发送重传指示,以进行所述数据的重传。Clause 14. The method according to any one of clauses 1 to 13, wherein a retransmission indication is sent through an application layer to perform retransmission of the data.
条款15.一种用于在应用层控制数据重传的设备,包括:Clause 15. An apparatus for controlling data retransmission at an application layer, comprising:
发送单元,用于预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;a sending unit, configured to pre-send data, wherein the data includes a payload and a count value for the payload;
发送端信息更新单元,用于响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;a sending end information updating unit, configured to record first sending end information in response to the data being in a pre-sending state, wherein the first sending end information indicates a first amount of the data being pre-sent;
接收单元,用于接收并记录第一接收端信息,所述第一接收端信息表示数据被接收端接收到并反馈的第二数量,其中第二数量不大于第一数量;A receiving unit, configured to receive and record first receiving end information, wherein the first receiving end information indicates a second amount of data received and fed back by the receiving end, wherein the second amount is not greater than the first amount;
重传判断单元,用于根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。A retransmission determination unit is used to determine whether to retransmit the data according to the first sending end information and the first receiving end information.
条款16.一种用于在通信系统中在应用层控制数据重传的方法,所述通信系统包括:Clause 16. A method for controlling data retransmission at an application layer in a communication system, the communication system comprising:
发送端,接收端和连接所述发送端与接收端的通信链路,所述方法包括:A transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, the method comprising:
在发送端,On the sending side,
向接收端预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;Pre-sending data to a receiving end, the data including a payload and a count value for the payload;
响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;In response to the data being in a pre-sending state, recording first sending end information, wherein the first sending end information indicates a first amount of the data being pre-sent;
通过所述通信链路来传输所述数据;transmitting the data via the communication link;
在接收端,On the receiving end,
如果接收到所述数据,则记录所述计数值;If the data is received, recording the count value;
根据所述计数值来生成第二数量,所述第二数量表示所述数据被接收端接收到并反馈的数量;Generate a second number according to the count value, where the second number represents the number of the data received and fed back by the receiving end;
向发送端反馈第一接收端信息,所述第一接收端信息包括第二数量,并且第二数量不大于第一数量;Feedback first receiving end information to the transmitting end, where the first receiving end information includes a second quantity, and the second quantity is not greater than the first quantity;
在发送端,On the sending side,
接收并记录所述第一接收端信息;Receiving and recording the first receiving end information;
根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。Determine whether to retransmit the data according to the first sending end information and the first receiving end information.
条款17.根据条款16所述的方法,其中,向接收端预发送数据包括:将所述数据放置于发送端的存储空间内以备发送。Clause 17. The method according to clause 16, wherein pre-sending data to the receiving end comprises: placing the data in a storage space of the sending end in preparation for sending.
条款18.根据条款16或17所述的方法,其中,响应于所述数据处于预发送状态,记录第一发送端信息包括:Clause 18. The method according to clause 16 or 17, wherein, in response to the data being in a pre-sending state, recording the first sending end information comprises:
响应于被置于预发送状态的数据递增,相应地对第一数量进行递增,而无论所述数据是否发送成功,和/或无论是否接收到针对所述数据的应答。In response to the data placed in the pre-transmission state being incremented, the first number is incremented accordingly, regardless of whether the data is successfully transmitted and/or regardless of whether a response to the data is received.
条款19.根据条款16-18中任意一项所述的方法,其中,如果接收到所述数据,则记录所述计数值包括:以新的计数值来覆盖旧的计数值。Clause 19. The method of any one of clauses 16-18, wherein if the data is received, recording the count value comprises: overwriting the old count value with the new count value.
条款20.根据条款16-18中任意一项所述的方法,其中,如果接收到所述数据,则记录所述计数值包括: Clause 20. The method of any one of clauses 16-18, wherein if the data is received, recording the count value comprises:
在接收到的数据中搜索最大的计数值;以及searching the received data for the maximum count value; and
仅记录所述最大的计数值。Only the largest count value is recorded.
条款21.根据条款16-20中任意一项所述的方法,其中,接收并记录第一接收端信息包括:随着第一接收端信息的变化而更新第二数量。Clause 21. The method according to any one of clauses 16-20, wherein receiving and recording the first receiving end information includes: updating the second quantity as the first receiving end information changes.
条款22.根据条款16-20中任意一项所述的方法,其中,接收并记录第一接收端信息包括:记录具有最大的第二数量的第二接收端信息。Clause 22. The method according to any one of clauses 16-20, wherein receiving and recording the first receiving end information comprises: recording the second receiving end information having the largest second number.
条款23.根据条款16-22中任意一项所述的方法,其中,响应于特定事件的发生,所述通信链路向发送端上报中断信号。Clause 23. A method according to any one of clauses 16-22, wherein, in response to the occurrence of a specific event, the communication link reports an interrupt signal to the transmitting end.
条款24.根据条款23所述的方法,其中,响应于从发送端到接收端的数据丢失或错误,则所述通信链路向发送端上报中断信号。Clause 24. The method according to clause 23, wherein, in response to data loss or error from the sending end to the receiving end, the communication link reports an interrupt signal to the sending end.
条款25.根据条款24所述的方法,其中,从发送端到接收端的数据丢失或错误包括有效载荷的丢失或错误,和/或计数值的丢失或错误。Clause 25. The method according to Clause 24, wherein the data loss or error from the transmitting end to the receiving end includes the loss or error of the payload and/or the loss or error of the count value.
条款26.根据条款23所述的方法,其中,响应于从接收端向发送端反馈的、针对所述数据的应答丢失,则所述通信链路向发送端上报中断信号。Clause 26. The method according to clause 23, wherein, in response to a loss of an acknowledgement for the data fed back from the receiving end to the sending end, the communication link reports an interruption signal to the sending end.
条款27.根据条款16-26中任意一项所述的方法,其中,响应于来自于通信链路上报的中断信号,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。Clause 27. A method according to any one of clauses 16-26, wherein, in response to an interruption signal reported from a communication link, it is determined whether to retransmit the data based on the first sending end information and the first receiving end information.
条款28.根据条款27所述的方法,其中,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传包括:Clause 28. The method according to clause 27, wherein determining whether to retransmit the data according to the first transmitting end information and the first receiving end information comprises:
根据第一发送端信息和第一接收端信息来确定中断的类型;Determine the type of interruption according to the first sending end information and the first receiving end information;
根据所述中断的类型来确定是否进行所述数据的重传。Whether to retransmit the data is determined according to the type of the interruption.
条款29.根据条款28所述的方法,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:Clause 29. The method of clause 28, wherein determining the type of interruption based on the first transmitting end information and the first receiving end information comprises:
如果第一数量大于第二数量,则确定中断的类型为从发送端到接收端的数据丢失或错误。If the first number is greater than the second number, the type of the interruption is determined to be data loss or error from the transmitting end to the receiving end.
条款30.根据条款29所述的方法,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:Clause 30. The method according to clause 29, wherein determining whether to retransmit the data according to the type of the interruption comprises:
如果确定中断的类型为从发送端到接收端的数据丢失,则根据第二数量来确定所述中断的断点;If it is determined that the type of the interruption is data loss from the transmitting end to the receiving end, determining a breakpoint of the interruption according to the second quantity;
从所述断点开始对数据进行重传。The data is retransmitted starting from the breakpoint.
条款31.根据条款28所述的方法,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:Clause 31. The method of clause 28, wherein determining the type of interruption based on the first transmitting end information and the first receiving end information comprises:
如果第一数量等于第二数量,则确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失。If the first number is equal to the second number, it is determined that the type of the interruption is a loss of a response to the data fed back from the receiving end to the transmitting end.
条款32.根据条款31所述的方法,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:Clause 32. The method according to clause 31, wherein determining whether to retransmit the data according to the type of the interruption comprises:
如果确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失,则确定无需进行所述数据的重传。If it is determined that the type of interruption is a loss of a response to the data fed back from the receiving end to the sending end, it is determined that there is no need to retransmit the data.
条款33.根据条款16-32中任意一项所述的方法,其中,通过应用层的缓存区来存储待重传的数据。Clause 33. A method according to any one of clauses 16-32, wherein the data to be retransmitted is stored in a buffer area of the application layer.
条款34.根据条款16-33中任意一项所述的方法,其中,通过应用层来发送重传指示,以进行所述数据的重传。Clause 34. The method according to any one of clauses 16-33, wherein a retransmission indication is sent by an application layer to perform retransmission of the data.
条款35.一种在应用层控制数据重传的通信系统,所述通信系统包括:发送端,接收端和连接所述发送端与接收端的通信链路,其中,Clause 35. A communication system for controlling data retransmission at an application layer, the communication system comprising: a transmitting end, a receiving end, and a communication link connecting the transmitting end and the receiving end, wherein:
所述发送端向接收端预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;所述发送端响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息 表示所述数据被预发送的第一数量;The transmitting end pre-sends data to the receiving end, the data including a payload and a count value for the payload; the transmitting end records first transmitting end information in response to the data being in a pre-sending state, the first transmitting end information Indicates a first amount of data to be pre-sent;
所述通信链路用于传输所述数据;The communication link is used to transmit the data;
所述接收端如果接收到所述数据,则记录所述计数值;If the receiving end receives the data, the receiving end records the count value;
所述接收端根据所述计数值来生成第二数量,所述第二数量表示所述数据被接收端数据被接收端接收到并反馈的第二数量;The receiving end generates a second number according to the count value, where the second number represents a second number of data received and fed back by the receiving end;
所述接收端向发送端反馈第一接收端信息,所述第一接收端信息包括第二数量,并且第二数量不大于第一数量;The receiving end feeds back first receiving end information to the transmitting end, where the first receiving end information includes a second quantity, and the second quantity is not greater than the first quantity;
所述发送端接收并记录所述第一接收端信息;The sending end receives and records the first receiving end information;
所述发送端根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。The sending end determines whether to retransmit the data according to the first sending end information and the first receiving end information.
条款36.一种电子设备,包括:Clause 36. An electronic device comprising:
一个或多个处理器;以及one or more processors; and
存储器,所述存储器中存储有计算机可执行指令,当所述计算机可执行指令由所述一个或多个处理器运行时,使得所述电子设备执行如条款1-14或16-34中任意一项所述的方法。A memory storing computer executable instructions, which, when executed by the one or more processors, enable the electronic device to execute a method as described in any one of clauses 1-14 or 16-34.
条款37.一种计算机可读存储介质,包括计算机可执行指令,当所述计算机可执行指令由一个或多个处理器运行时,执行如条款1-14或16-34中任意一项所述的方法。 Clause 37. A computer-readable storage medium comprising computer-executable instructions, which, when executed by one or more processors, perform the method as described in any one of clauses 1-14 or 16-34.

Claims (37)

  1. 一种用于在应用层控制数据重传的方法,包括:A method for controlling data retransmission at an application layer, comprising:
    预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;Pre-sending data, the data comprising a payload and a count value for the payload;
    响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;In response to the data being in a pre-sending state, recording first sending end information, wherein the first sending end information indicates a first amount of the data being pre-sent;
    接收并记录第一接收端信息,所述第一接收端信息表示数据被接收端接收到并反馈的第二数量,其中第二数量不大于第一数量;Receiving and recording first receiving end information, wherein the first receiving end information indicates a second amount of data received and fed back by the receiving end, wherein the second amount is not greater than the first amount;
    根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。Determine whether to retransmit the data according to the first sending end information and the first receiving end information.
  2. 根据权利要求1所述的方法,其中,预发送数据包括:将所述数据放置于发送端的存储空间内以备发送。The method according to claim 1, wherein pre-sending data comprises: placing the data in a storage space of the sending end for preparation for sending.
  3. 根据权利要求1或2所述的方法,其中,响应于所述数据处于预发送状态,记录第一发送端信息包括:The method according to claim 1 or 2, wherein, in response to the data being in a pre-sending state, recording the first sending end information comprises:
    响应于被置于预发送状态的数据递增,相应地对第一数量进行递增,而无论所述数据是否发送成功,和/或无论是否接收到针对所述数据的应答。In response to the data placed in the pre-transmission state being incremented, the first number is incremented accordingly, regardless of whether the data is successfully transmitted and/or regardless of whether a response to the data is received.
  4. 根据权利要求1-3中任意一项所述的方法,其中,接收并记录第一接收端信息包括:随着第一接收端信息的变化而更新第二数量。The method according to any one of claims 1-3, wherein receiving and recording the first receiving end information comprises: updating the second quantity as the first receiving end information changes.
  5. 根据权利要求1-3中任意一项所述的方法,其中,接收并记录第一接收端信息包括:记录具有最大的第二数量的第二接收端信息。The method according to any one of claims 1 to 3, wherein receiving and recording the first receiving end information comprises: recording the second receiving end information having the largest second number.
  6. 根据权利要求1-5中任意一项所述的方法,其中,响应于来自于通信链路上报的中断信号,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。A method according to any one of claims 1-5, wherein, in response to an interruption signal reported from a communication link, determining whether to retransmit the data is performed based on the first sending end information and the first receiving end information.
  7. 根据权利要求6所述的方法,其中,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传包括:The method according to claim 6, wherein determining whether to retransmit the data according to the first transmitting end information and the first receiving end information comprises:
    根据第一发送端信息和第一接收端信息来确定中断的类型;Determine the type of interruption according to the first sending end information and the first receiving end information;
    根据所述中断的类型来确定是否进行所述数据的重传。Whether to retransmit the data is determined according to the type of the interruption.
  8. 根据权利要求7所述的方法,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:The method according to claim 7, wherein determining the type of interruption according to the first transmitting end information and the first receiving end information comprises:
    如果第一数量大于第二数量,则确定中断的类型为从发送端到接收端的数据丢失或错误。If the first number is greater than the second number, the type of the interruption is determined to be data loss or error from the transmitting end to the receiving end.
  9. 根据权利要求8所述的方法,其中,从发送端到接收端的数据丢失或错误包括有效载荷的丢失或错误,和/或计数值的丢失或错误。The method according to claim 8, wherein the data loss or error from the transmitting end to the receiving end includes the loss or error of the effective load and/or the loss or error of the count value.
  10. 根据权利要求8或9所述的方法,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:The method according to claim 8 or 9, wherein determining whether to retransmit the data according to the type of the interruption comprises:
    如果确定中断的类型为从发送端到接收端的数据丢失,则根据第二数量来确定所述中断的断点;If it is determined that the type of the interruption is data loss from the transmitting end to the receiving end, determining a breakpoint of the interruption according to the second quantity;
    从所述断点开始对数据进行重传。The data is retransmitted starting from the breakpoint.
  11. 根据权利要求7所述的方法,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:The method according to claim 7, wherein determining the type of interruption according to the first transmitting end information and the first receiving end information comprises:
    如果第一数量等于第二数量,则确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失。If the first number is equal to the second number, it is determined that the type of the interruption is a loss of a response to the data fed back from the receiving end to the transmitting end.
  12. 根据权利要求11所述的方法,其中,根据所述中断的类型来确定是否进行所述数据 的重传包括:The method according to claim 11, wherein determining whether to perform the data The retransmission includes:
    如果确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失,则确定无需进行所述数据的重传。If it is determined that the type of interruption is a loss of a response to the data fed back from the receiving end to the sending end, it is determined that there is no need to retransmit the data.
  13. 根据权利要求1-12中任意一项所述的方法,其中,通过应用层的缓存区来存储待重传的数据。The method according to any one of claims 1 to 12, wherein the data to be retransmitted is stored in a cache area of the application layer.
  14. 根据权利要求1-13中任意一项所述的方法,其中,通过应用层来发送重传指示,以进行所述数据的重传。The method according to any one of claims 1 to 13, wherein a retransmission indication is sent through an application layer to retransmit the data.
  15. 一种用于在应用层控制数据重传的设备,包括:A device for controlling data retransmission at an application layer, comprising:
    发送单元,用于预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;a sending unit, configured to pre-send data, wherein the data includes a payload and a count value for the payload;
    发送端信息更新单元,用于响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;a sending end information updating unit, configured to record first sending end information in response to the data being in a pre-sending state, wherein the first sending end information indicates a first amount of the data being pre-sent;
    接收单元,用于接收并记录第一接收端信息,所述第一接收端信息表示数据被接收端接收到并反馈的第二数量,其中第二数量不大于第一数量;A receiving unit, configured to receive and record first receiving end information, wherein the first receiving end information indicates a second amount of data received and fed back by the receiving end, wherein the second amount is not greater than the first amount;
    重传判断单元,用于根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。A retransmission determination unit is used to determine whether to retransmit the data according to the first sending end information and the first receiving end information.
  16. 一种用于在通信系统中在应用层控制数据重传的方法,所述通信系统包括:发送端,接收端和连接所述发送端与接收端的通信链路,所述方法包括:A method for controlling data retransmission at an application layer in a communication system, the communication system comprising: a transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, the method comprising:
    在发送端,On the sending side,
    向接收端预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;Pre-sending data to a receiving end, the data including a payload and a count value for the payload;
    响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;In response to the data being in a pre-sending state, recording first sending end information, wherein the first sending end information indicates a first amount of the data being pre-sent;
    通过所述通信链路来传输所述数据;transmitting the data via the communication link;
    在接收端,On the receiving end,
    如果接收到所述数据,则记录所述计数值;If the data is received, recording the count value;
    根据所述计数值来生成第二数量,所述第二数量表示所述数据被接收端接收到并反馈的数量;Generate a second number according to the count value, where the second number represents the number of the data received and fed back by the receiving end;
    向发送端反馈第一接收端信息,所述第一接收端信息包括第二数量,并且第二数量不大于第一数量;Feedback first receiving end information to the transmitting end, where the first receiving end information includes a second quantity, and the second quantity is not greater than the first quantity;
    在发送端,On the sending side,
    接收并记录所述第一接收端信息;Receiving and recording the first receiving end information;
    根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。Determine whether to retransmit the data according to the first sending end information and the first receiving end information.
  17. 根据权利要求16所述的方法,其中,向接收端预发送数据包括:将所述数据放置于发送端的存储空间内以备发送。The method according to claim 16, wherein pre-sending data to the receiving end comprises: placing the data in a storage space of the sending end for preparation for sending.
  18. 根据权利要求16或17所述的方法,其中,响应于所述数据处于预发送状态,记录第一发送端信息包括:The method according to claim 16 or 17, wherein, in response to the data being in a pre-sending state, recording the first sending end information comprises:
    响应于被置于预发送状态的数据递增,相应地对第一数量进行递增,而无论所述数据是否发送成功,和/或无论是否接收到针对所述数据的应答。In response to the data placed in the pre-transmission state being incremented, the first number is incremented accordingly, regardless of whether the data is successfully transmitted and/or regardless of whether a response to the data is received.
  19. 根据权利要求16-18中任意一项所述的方法,其中,如果接收到所述数据,则记录所述计数值包括:以新的计数值来覆盖旧的计数值。 The method according to any one of claims 16 to 18, wherein if the data is received, recording the count value comprises: overwriting the old count value with the new count value.
  20. 根据权利要求16-18中任意一项所述的方法,其中,如果接收到所述数据,则记录所述计数值包括:The method according to any one of claims 16 to 18, wherein if the data is received, recording the count value comprises:
    在接收到的数据中搜索最大的计数值;以及searching the received data for the maximum count value; and
    仅记录所述最大的计数值。Only the largest count value is recorded.
  21. 根据权利要求16-20中任意一项所述的方法,其中,接收并记录第一接收端信息包括:随着第一接收端信息的变化而更新第二数量。The method according to any one of claims 16-20, wherein receiving and recording the first receiving end information comprises: updating the second quantity as the first receiving end information changes.
  22. 根据权利要求16-20中任意一项所述的方法,其中,接收并记录第一接收端信息包括:记录具有最大的第二数量的第二接收端信息。The method according to any one of claims 16-20, wherein receiving and recording the first receiving end information comprises: recording the second receiving end information having the largest second number.
  23. 根据权利要求16-22中任意一项所述的方法,其中,响应于特定事件的发生,所述通信链路向发送端上报中断信号。The method according to any one of claims 16 to 22, wherein, in response to the occurrence of a specific event, the communication link reports an interrupt signal to the transmitting end.
  24. 根据权利要求23所述的方法,其中,响应于从发送端到接收端的数据丢失或错误,则所述通信链路向发送端上报中断信号。The method of claim 23, wherein, in response to data loss or error from the transmitting end to the receiving end, the communication link reports an interrupt signal to the transmitting end.
  25. 根据权利要求24所述的方法,其中,从发送端到接收端的数据丢失或错误包括有效载荷的丢失或错误,和/或计数值的丢失或错误。The method according to claim 24, wherein the data loss or error from the transmitting end to the receiving end includes the loss or error of the payload and/or the loss or error of the count value.
  26. 根据权利要求23所述的方法,其中,响应于从接收端向发送端反馈的、针对所述数据的应答丢失,则所述通信链路向发送端上报中断信号。The method according to claim 23, wherein, in response to a loss of a response to the data fed back from the receiving end to the sending end, the communication link reports an interrupt signal to the sending end.
  27. 根据权利要求16-26中任意一项所述的方法,其中,响应于来自于通信链路上报的中断信号,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。A method according to any one of claims 16-26, wherein, in response to an interruption signal reported from a communication link, it is determined whether to retransmit the data based on the first sending end information and the first receiving end information.
  28. 根据权利要求27所述的方法,其中,根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传包括:The method according to claim 27, wherein determining whether to retransmit the data according to the first transmitting end information and the first receiving end information comprises:
    根据第一发送端信息和第一接收端信息来确定中断的类型;Determine the type of interruption according to the first sending end information and the first receiving end information;
    根据所述中断的类型来确定是否进行所述数据的重传。Whether to retransmit the data is determined according to the type of the interruption.
  29. 根据权利要求28所述的方法,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:The method according to claim 28, wherein determining the type of interruption according to the first transmitting end information and the first receiving end information comprises:
    如果第一数量大于第二数量,则确定中断的类型为从发送端到接收端的数据丢失或错误。If the first number is greater than the second number, the type of the interruption is determined to be data loss or error from the transmitting end to the receiving end.
  30. 根据权利要求29所述的方法,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:The method according to claim 29, wherein determining whether to retransmit the data according to the type of the interruption comprises:
    如果确定中断的类型为从发送端到接收端的数据丢失,则根据第二数量来确定所述中断的断点;If it is determined that the type of the interruption is data loss from the transmitting end to the receiving end, determining a breakpoint of the interruption according to the second quantity;
    从所述断点开始对数据进行重传。The data is retransmitted starting from the breakpoint.
  31. 根据权利要求28所述的方法,其中,根据第一发送端信息和第一接收端信息来确定中断的类型包括:The method according to claim 28, wherein determining the type of interruption according to the first transmitting end information and the first receiving end information comprises:
    如果第一数量等于第二数量,则确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失。If the first number is equal to the second number, it is determined that the type of the interruption is a loss of a response to the data fed back from the receiving end to the transmitting end.
  32. 根据权利要求31所述的方法,其中,根据所述中断的类型来确定是否进行所述数据的重传包括:The method according to claim 31, wherein determining whether to retransmit the data according to the type of the interruption comprises:
    如果确定中断的类型为从接收端向发送端反馈的、针对所述数据的应答丢失,则确定无需进行所述数据的重传。 If it is determined that the type of interruption is a loss of a response to the data fed back from the receiving end to the sending end, it is determined that there is no need to retransmit the data.
  33. 根据权利要求16-32中任意一项所述的方法,其中,通过应用层的缓存区来存储待重传的数据。A method according to any one of claims 16 to 32, wherein the data to be retransmitted is stored in a cache area of the application layer.
  34. 根据权利要求16-33中任意一项所述的方法,其中,通过应用层来发送重传指示,以进行所述数据的重传。The method according to any one of claims 16 to 33, wherein a retransmission indication is sent through an application layer to retransmit the data.
  35. 一种在应用层控制数据重传的通信系统,所述通信系统包括:发送端,接收端和连接所述发送端与接收端的通信链路,其中,A communication system for controlling data retransmission at an application layer, the communication system comprising: a transmitting end, a receiving end and a communication link connecting the transmitting end and the receiving end, wherein:
    所述发送端向接收端预发送数据,所述数据包括有效载荷和用于所述有效载荷的计数值;The transmitting end pre-sends data to the receiving end, the data including a payload and a count value for the payload;
    所述发送端响应于所述数据处于预发送状态,记录第一发送端信息,所述第一发送端信息表示所述数据被预发送的第一数量;In response to the data being in a pre-sending state, the sending end records first sending end information, where the first sending end information indicates a first amount of the data being pre-sent;
    所述通信链路用于传输所述数据;The communication link is used to transmit the data;
    所述接收端如果接收到所述数据,则记录所述计数值;If the receiving end receives the data, the receiving end records the count value;
    所述接收端根据所述计数值来生成第二数量,所述第二数量表示所述数据被接收端数据被接收端接收到并反馈的第二数量;The receiving end generates a second number according to the count value, where the second number represents a second number of data received and fed back by the receiving end;
    所述接收端向发送端反馈第一接收端信息,所述第一接收端信息包括第二数量,并且第二数量不大于第一数量;The receiving end feeds back first receiving end information to the transmitting end, where the first receiving end information includes a second quantity, and the second quantity is not greater than the first quantity;
    所述发送端接收并记录所述第一接收端信息;The sending end receives and records the first receiving end information;
    所述发送端根据所述第一发送端信息和第一接收端信息来确定是否进行所述数据的重传。The sending end determines whether to retransmit the data according to the first sending end information and the first receiving end information.
  36. 一种电子设备,包括:An electronic device, comprising:
    一个或多个处理器;以及one or more processors; and
    存储器,所述存储器中存储有计算机可执行指令,当所述计算机可执行指令由所述一个或多个处理器运行时,使得所述电子设备执行如权利要求1-14或16-34中任意一项所述的方法。A memory, wherein computer executable instructions are stored in the memory, and when the computer executable instructions are executed by the one or more processors, the electronic device executes the method as described in any one of claims 1-14 or 16-34.
  37. 一种计算机可读存储介质,包括计算机可执行指令,当所述计算机可执行指令由一个或多个处理器运行时,执行如权利要求1-14或16-34中任意一项所述的方法。 A computer-readable storage medium comprises computer-executable instructions, and when the computer-executable instructions are executed by one or more processors, the method as claimed in any one of claims 1 to 14 or 16 to 34 is executed.
PCT/CN2023/112582 2022-11-25 2023-08-11 Method for controlling data retransmission in application layer, and related product WO2024109174A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211496930.1A CN118101138A (en) 2022-11-25 2022-11-25 Method for controlling data retransmission at application layer and related product
CN202211496930.1 2022-11-25

Publications (1)

Publication Number Publication Date
WO2024109174A1 true WO2024109174A1 (en) 2024-05-30

Family

ID=91153676

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/112582 WO2024109174A1 (en) 2022-11-25 2023-08-11 Method for controlling data retransmission in application layer, and related product

Country Status (2)

Country Link
CN (1) CN118101138A (en)
WO (1) WO2024109174A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140112120A1 (en) * 2012-10-19 2014-04-24 Samsung Electronics Co., Ltd. Server, client device, and control methods thereof
CN114499749A (en) * 2020-11-13 2022-05-13 上海华为技术有限公司 Data sending method and related equipment thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140112120A1 (en) * 2012-10-19 2014-04-24 Samsung Electronics Co., Ltd. Server, client device, and control methods thereof
CN114499749A (en) * 2020-11-13 2022-05-13 上海华为技术有限公司 Data sending method and related equipment thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LU QIU-YING, LIN YA-PING, ZHOU SI-WANG, YE SONG-TAO, HU YU-PENG, XIE WEI: "Design and implementation of audio data collection prototype system in TinyOS", JOURNAL OF COMPUTER APPLICATIONS, vol. 29, no. 6, 1 June 2009 (2009-06-01), pages 1738 - 1744, XP093173590 *
ZHANG, WEIYONG; QIAN, JUN; WANG, JIAN-XIN : "Research and Implementation of Image Reliable Transmission Based On UDP", JOURNAL OF HEFEI UNIVERSITY OF TECHNOLOGY (NATURAL SCIENCE EDITION), CN, vol. 31, no. 5, 28 May 2008 (2008-05-28), CN , pages 698 - 700, 786, XP009555541, ISSN: 1003-5060 *

Also Published As

Publication number Publication date
CN118101138A (en) 2024-05-28

Similar Documents

Publication Publication Date Title
US10430374B2 (en) Selective acknowledgement of RDMA packets
JP2503086B2 (en) Data link control method
US5948060A (en) Speeding-up communication rates on links transferring data structures by a method of handing scatter/gather of storage blocks in commanded computer systems
US8576761B1 (en) Power save delivery mechanism for wireless communication traffic
US20170346742A1 (en) End-to-end Enhanced Reliable Datagram Transport
JPH053941B2 (en)
CN111770428B (en) Monitoring method of wireless equipment
WO2021232681A1 (en) Communication method for earphone and charging box, charging box, earphone and readable storage medium
EP2157723B1 (en) Data retransmission method and system
US20230101918A1 (en) Interconnect system
CN104980257A (en) Internet of things communication method and device
CN101026441A (en) Automatic erroneous data packet repeating method and retransmission buffer
WO2024109174A1 (en) Method for controlling data retransmission in application layer, and related product
US20240146806A1 (en) Intermediate apparatus, communication method, and program
CN117560304A (en) Network state monitoring method, system, equipment and medium
WO2024131009A1 (en) Inter-chip communication method and storage medium
CN117149678A (en) RS485 bus arbitration system and method with multiple masters and multiple slaves
CN117278486A (en) FPGA hardware acceleration system and method of reliable UDP multicast
WO2023151484A1 (en) Data processing method, device and system
CN102231141A (en) Method and system for reading and writing data
WO2022134960A1 (en) Communication method and apparatus, and device
CN113806265A (en) SPI master-slave communication method
US20070230347A1 (en) Communication interface device and communication method
WO2024119869A1 (en) Method for executing inter-chip communication task, and related product
US6711179B1 (en) Signal processing apparatus with three layer processing sections, and signal processing system with said two signal processing apparatuses

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23893273

Country of ref document: EP

Kind code of ref document: A1