CN116156018A - Data transmission method and related equipment - Google Patents

Data transmission method and related equipment Download PDF

Info

Publication number
CN116156018A
CN116156018A CN202310014417.2A CN202310014417A CN116156018A CN 116156018 A CN116156018 A CN 116156018A CN 202310014417 A CN202310014417 A CN 202310014417A CN 116156018 A CN116156018 A CN 116156018A
Authority
CN
China
Prior art keywords
kcp
data
application layer
udp
transmission
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310014417.2A
Other languages
Chinese (zh)
Inventor
葛雅宁
成武文
欧亮
张庆国
董自成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp Ltd
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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202310014417.2A priority Critical patent/CN116156018A/en
Publication of CN116156018A publication Critical patent/CN116156018A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/72Admission control; Resource allocation using reservation actions during connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the disclosure provides a data transmission method, computer equipment, a readable storage medium and a program, and relates to the technical field of computers. The method comprises the following steps: the fast and reliable automatic retransmission request protocol KCP receives data sent by an application layer; the KCP splits the data sent by the application layer into KCP data packets; the KCP sends KCP data packets to a user datagram protocol UDP; and the KCP resends the first data packet to the UDP when no feedback information of the first data packet is received. The method provided by the embodiment of the disclosure can realize the transmission when the data delay requirement is high.

Description

Data transmission method and related equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data transmission method, a computer device, a readable storage medium, and a program.
Background
At present, a transmission scheme based on the TCP protocol has the characteristics of reliable transmission, flow control, congestion control, connection oriented and the like. However, the TCP retransmission mechanism increases sharply in RTO (Recovery Time Objective, i.e., recovery time target) in case of poor network, and is not applicable in a complex scenario for a high real-time network.
Disclosure of Invention
The embodiment of the disclosure provides a data transmission method, an application program protection device, computer equipment, a readable storage medium and a program, relates to the technical field of computers, and aims to establish a fault detection model and improve the detection accuracy of fault detection.
The embodiment of the disclosure provides a data transmission method, which comprises the following steps: the fast and reliable automatic retransmission request protocol KCP receives data sent by an application layer; the KCP splits the data sent by the application layer into KCP data packets; the KCP sends KCP data packets to a user datagram protocol UDP; and the KCP resends the first data packet to the UDP when no feedback information of the first data packet is received.
In one embodiment, the KCP transmitting KCP packets to a user datagram protocol UDP includes: the KCP puts KCP data packets into a transmission buffer or a transmission queue through flow control and congestion control; and the KCP transmits KCP data packets in a transmission buffer or a transmission queue to the UDP.
In one embodiment, the KCP transmitting KCP packets in a transmission buffer or transmission queue to the UDP comprises: the KCP determines a sending rate according to the minimum value of the sending rate of the sending port and the receiving rate of the receiving port; and the KCP transmits KCP data packets in a transmission buffer or a transmission queue to the UDP at the transmission rate.
In one embodiment, the method further comprises: the KCP receives the UDP data packet sent by the UDP; the KCP unpacks the UDP data packet and encapsulates the UDP data packet into application layer data; the KCP transmits the encapsulated application layer data to the application layer.
In one embodiment, the KCP transmitting the encapsulated application layer data to the application layer comprises: the KCP sends the encapsulated application layer data to a sending buffer; the KCP transfers the complete data in the sending buffer memory to a sending queue; and the KCP transmits the encapsulated application layer data in the transmission queue to the application layer.
In one embodiment, the KCP transmitting the encapsulated application layer data to the transmit buffer comprises: and when the KCP does not receive the acknowledgement character, the KCP sends the corresponding encapsulated application layer data which does not receive the acknowledgement character to a sending buffer.
In one embodiment, the KCP transmitting the encapsulated application layer data to the transmit buffer comprises: and deleting the encapsulated application layer data corresponding to the received acknowledgement character when the KCP receives the acknowledgement character.
The embodiment of the disclosure provides a computer device, which comprises a processor, a memory and an input-output interface; the processor is respectively connected with the memory and the input/output interface, wherein the input/output interface is used for receiving data and outputting data, the memory is used for storing a computer program, and the processor is used for calling the computer program so that the computer device executes the method according to any one of the embodiments.
Embodiments of the present disclosure provide a computer readable storage medium storing a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of the above embodiments.
The disclosed embodiments provide a computer program product comprising a computer program which, when executed by a processor, implements the method according to any of the above embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 shows a schematic diagram of an exemplary system architecture to which a data transmission method of embodiments of the present disclosure may be applied;
fig. 2 is a flowchart of a data transmission method provided in an embodiment of the present disclosure;
fig. 3 is a flowchart of a data transmission method provided in an embodiment of the present disclosure;
FIG. 4 illustrates five layered data transfer architecture diagrams according to one embodiment of the present application;
fig. 5 shows a schematic diagram of a data transmission flow of KCP according to an embodiment of the present application;
fig. 6 is a schematic flow chart of a data transmission step of KCP according to an embodiment of the present application;
fig. 7 is a schematic flow chart of a data receiving step of KCP according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
In the embodiment of the disclosure, the data sent by the application layer can be received based on a KCP (A Fast and Reliable ARQ Protocol, fast and reliable automatic repeat request protocol, ARQ, automatic Re Transmission Query, automatic repeat request) technology; the KCP splits the data sent by the application layer into KCP data packets; the KCP sends KCP data packets to a user datagram protocol UDP; and when the KCP does not receive the feedback information of the first data packet, retransmitting the first data packet to the UDP, so that the safe transmission with higher requirement on data delay can be realized.
The following first describes some terms of the present disclosure:
TCP (Transmission Control Protocol ) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. TCP is intended to accommodate a layered protocol hierarchy that supports multiple network applications. Reliable communication services are provided by means of TCP between pairs of processes in host computers connected to different but interconnected computer communication networks. TCP assumes that it can obtain simple, possibly unreliable datagram services from lower level protocols. In principle, TCP should be able to operate over a variety of communication systems from hardwired to packet-switched or circuit-switched networks.
KCP is a network transport protocol, often as a substitute for TCP.
UDP (User Datagram Protocol ) is a connectionless transport layer protocol in the OSI (Open System Interconnection, open systems interconnection) reference model that provides a transaction-oriented simple unreliable information transport service.
The scheme provided by the embodiment of the disclosure relates to TCP, KCP, UDP and other technologies.
Fig. 1 shows a schematic diagram of an exemplary system architecture 100 to which the data transmission method of the embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminals 101, 102, 103, a network 104, and a server 105. The network 104 is a medium used to provide communication links between the terminals 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
It should be understood that the number of terminals, networks and servers in fig. 1 is merely illustrative. There may be any number of terminals, networks, and servers, as desired for implementation. For example, the server 105 may be a server cluster formed by a plurality of servers.
Terminals 101, 102, 103 interact with server 105 via network 104, and may receive or send messages or the like. Terminals 101, 102, 103 may be a variety of electronic devices with display screens including, but not limited to, smartphones, tablets, laptop computers, desktop computers, and the like.
The server 105 may be a server providing various services. For example, the terminal 103 (may also be the terminal 101 or 102) performs data transmission with other terminals (for example, the terminal 101 or 102) through the server 105, and the fast and reliable automatic repeat request protocol KCP receives data sent by the application layer during the data transmission process; the KCP splits the data sent by the application layer into KCP data packets; the KCP sends KCP data packets to a user datagram protocol UDP; and when the KCP does not receive the feedback information of the first data packet, retransmitting the first data packet to the UDP, so that transmission with higher requirements on data delay can be realized.
The terminal may be a mobile phone (such as terminal 101) or a tablet computer (such as terminal 102), or may be a desktop computer (such as terminal 101), which is not limited herein. The terminal may display an application program, which may be an application program for data transmission, or the like. The terminal in fig. 1 is only an exemplary part of the devices, and the terminal in the present disclosure is not limited to only the devices illustrated in fig. 1.
It is understood that the terminal mentioned in the embodiments of the present disclosure may be a user equipment, and the server in the embodiments of the present disclosure includes, but is not limited to, a server or a cluster of servers. The above-mentioned terminal may be an electronic device, including but not limited to a mobile phone, a tablet computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, a desktop computer, a notebook computer, a palm computer, a vehicle-mounted device, an augmented Reality/Virtual Reality (AR/VR) device, a head mounted display, a smart television, a wearable device, a smart speaker, a digital camera, a camera, and other mobile internet devices (mobile internet device, MID) with network access capability, or a terminal device in a scene such as a train, a ship, or a flight.
The servers mentioned above may be cloud servers providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, vehicle-road collaboration, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligent platforms, or may be independent physical servers, or may be server clusters or distributed systems formed by multiple physical servers.
Optionally, the data related to the embodiments of the present disclosure may be stored in a cloud platform, or may be stored based on a cloud storage technology and a blockchain technology, which is not limited herein.
Fig. 2 is a flowchart of a data transmission method provided in an embodiment of the present disclosure. The method provided by the embodiment of the disclosure can be applied to the terminal or the server in the embodiment of fig. 1.
As shown in fig. 2, the method provided by the embodiment of the present disclosure may include the following steps.
In step S210, the fast and reliable automatic repeat request protocol KCP receives data sent by the application layer.
In this step, the fast and reliable automatic repeat request protocol KCP receives the data sent by the application layer.
The application layer is used as a term specification for specifying the application program, and the protocols of the application layer may include, for example, HTTP protocol for Web browsing, FTP protocol for file transfer, SMTP for mail, etc., which constitute the application layer of the internet protocol.
In step S220, the KCP splits the data sent by the application layer into KCP packets.
In this step, the KCP splits the data sent by the application layer into KCP packets.
In step S230, the KCP transmits a KCP packet to the user datagram protocol UDP.
In this step, the KCP sends KCP packets to the user datagram protocol UDP.
In one embodiment, the KCP puts KCP packets into a transmit buffer or transmit queue through flow control and congestion control; and the KCP transmits KCP data packets in a transmission buffer or a transmission queue to the UDP. The KCP packets may be sent to the transmission buffer first, and then sent to the transmission queue through the transmission buffer.
In one embodiment, the KCP determines the transmission rate according to a minimum value of the transmission rate of the transmission port and the reception rate of the reception port; and the KCP transmits KCP data packets in a transmission buffer or a transmission queue to the UDP at the transmission rate. For example, the transmission rate of the KCP transmission port is 10 megabytes per second, the receiving rate of the receiving port is 5 megabytes per second, and then the transmission rate is 5 megabytes per second; and the KCP transmits KCP data packets in a transmission buffer or a transmission queue to the UDP at 5 megabits per second, so that the smoothness of data transmission is ensured.
In step S240, the KCP retransmits the first data packet to the UDP when no feedback information of the first data packet is received.
In this step, the KCP retransmits the first data packet to the UDP when no feedback information of the first data packet is received. In one embodiment, for example, when the feedback information ACK n of the receiving end is not received, but the receiving ends ackn+1 and ackn+2 are received, the n-numbered packet is retransmitted to the UDP, wherein ACK (Acknowledge character) is an acknowledgement character. The first packet may be any KCP packet.
The data transmission method of fig. 2 receives data sent by an application layer through a fast and reliable automatic repeat request protocol KCP; the KCP splits the data sent by the application layer into KCP data packets; the KCP sends KCP data packets to a user datagram protocol UDP; and when the KCP does not receive the feedback information of the first data packet, retransmitting the first data packet to the UDP, so that transmission with higher requirements on data delay can be realized.
Fig. 3 is a flowchart of a data transmission method provided in an embodiment of the present disclosure. The method provided by the embodiment of the disclosure can be applied to the terminal or the server in the embodiment of fig. 1.
As shown in fig. 3, the method provided by the embodiment of the present disclosure may include the following steps.
In step S310, the KCP receives the UDP packet sent by the UDP.
In this step, the KCP receives the UDP packet transmitted by the UDP. In one embodiment, the UDP sends the packet to the KCP after receiving the packet.
In step S320, the KCP unpacks the UDP packet and encapsulates the UDP packet into application layer data.
In this step, the KCP unpacks the UDP packet and encapsulates it into application layer data. In one embodiment, the KCP receives the UDP packet sent by the UDP and then unpacks the UDP packet, and then repackages the UDP packet into application layer data.
In step S330, the KCP transmits the encapsulated application layer data to the application layer.
In this step, the KCP transmits encapsulated application layer data to the application layer. In one embodiment, the KCP transmits the encapsulated application layer data to a transmit buffer; the KCP transfers the complete data in the sending buffer memory to a sending queue; and the KCP transmits the encapsulated application layer data in the transmission queue to the application layer. Wherein, the data in the sending buffer is ordered according to the number, but the data is not necessarily complete and continuous. In one embodiment, the KCP transmits corresponding encapsulated application layer data for which no acknowledgement character is received to a transmission buffer when no acknowledgement character is received. When the acknowledgement character is not received, the KCP sends the corresponding encapsulated application layer data without the acknowledgement character to a sending buffer, so as to resend. In one embodiment, when the KCP receives the acknowledgement character, the encapsulated application layer data corresponding to the acknowledgement character is deleted. When the KCP receives the acknowledgement character, the KCP deletes the corresponding encapsulated application layer data of the acknowledgement character, which indicates that the application layer has received the corresponding encapsulated application layer data of the acknowledgement character, without retransmission.
The data transmission method of fig. 3, which receives the UDP packet sent by the UDP through the KCP; the KCP unpacks the UDP data packet and encapsulates the UDP data packet into application layer data; the KCP sends the encapsulated application layer data to the application layer, so that the data transmission from the KCP to the application layer can be realized when the data delay requirement is high.
The data transmission method of the present application is specifically described below with reference to specific examples.
In internet communications, there are different hierarchies divided according to different models, but regardless of the model, the more up layers are closer to the user, the more down layers are closer to the hardware.
The most used in software development is a model that divides the internet into five layers, specifically a physical layer, a data link layer, a network layer, a transport layer, and an application layer.
The physical layer is basically implemented by twisted pair, optical fiber and radio wave, that is, each network device is connected to transmit 0101 electric signals.
The data link layer is above the physical layer, which is primarily ethernet, and determines the manner and meaning of the packets 0 and 1 transmitted by the physical layer.
The network layer uses a network address protocol, called IP protocol. The address defined by the protocol is called an IP address. IPv4 is widely used at present, and with the development of the internet, IPv6 is gradually used more and more.
The transport layer adopts TCP protocol or UDP protocol.
The application layer specifies the parlance specification used by the application program, and the protocols of the application layer include HTTP protocol for Web browsing, FTP protocol for transferring files, SMTP for mail, and the like.
Fig. 4 shows five layered data transmission architecture diagrams according to one embodiment of the present application. Referring to fig. 4, the device 401 and the device 402 may first establish a connection, specifically as follows:
(1) Device 401 and device 402 successfully establish a TCP connection through a three-way handshake.
(2) Device 402 sends the UDP port number and key information to device 401 over a TCP link.
(3) After receiving the UDP port and the key of the device 402, the device 401 repeatedly sends handshake information (including the key) to the UDP port of the device 402 at regular intervals (e.g., 1 second) through the TCP link.
(4) The UDP port of the device 402 receives the handshake information of the device 401, checks the key, and knows that the TCP connection corresponding to the application layer (for example, SOCKS, protocol for sessions traversal across firewall securely, firewall security session conversion protocol) of the device 401 is successfully bound to the mapping correspondence relationship between the TCP connection and the UDP connection.
(5) The device 401 and the device 402 can implement fast and reliable transmission by invoking KCP on a UDP connection.
(6) The device 401 and the device 402 can switch KCP or TCP to transmit according to scene requirements and network environments, and can realize quick and reliable transmission under the condition that the link is not disconnected. UDP is used when the time delay requirement is high, and TCP is used when the accuracy requirement is high. For example, UDP is used for voice, video, game; TCP is used for mail and information.
Fig. 5 shows a schematic diagram of a data transmission flow of KCP according to an embodiment of the present application. Referring to fig. 5, the output (output) and input (input) of kcp are used to interface with the UDP of the lower layer. And the transmission (ikcp_send) and the reception (ikcp_receive) are provided to the application layer call of the upper layer to realize the transceiving of the data.
Fig. 6 shows a flow chart of a data transmission step of KCP according to an embodiment of the present application. Referring to fig. 6, the application layer first calls to send ikcp_send at the sender, splits the data into KCP packets (data size not exceeding maximum transmission order mtu), and puts the data into a send buffer or send queue through flow control and congestion control; sending out the split data packet through the output kcp_output; when the feedback information ACK n of the receiving end is not received, but the opposite ends ackn+1 and ackn+2 are received, the n-number data packet is retransmitted. In addition, the KCP continuously refreshes a transmission buffer or a transmission queue, determines a transmission rate according to the minimum value of the transmission rate of the transmission port and the receiving rate of the receiving port, and transmits KCP data packets in the transmission buffer or the transmission queue to the UDP at the transmission rate.
Fig. 7 shows a flow chart of a data receiving step of KCP according to an embodiment of the present application. Referring to fig. 7, a udp received packet is continuously transmitted to the KCP through an input kcp_input; the KCP unpacks the part of data and repackages the unpackaged part of data into application layer user data; when receiving data, the KCP can put the data into the buffer rcv_buf for buffering (which is ordered but not necessarily completely continuous); copying continuous complete data fragments from the buffer rcv_buf by the queue rv_queue; the KCP calls receive ikcp_recv to read data from the queue rcv_ que once. In addition, when no acknowledgement character is received by the KCP, corresponding encapsulated application layer data without acknowledgement character is sent to a cache; and deleting the encapsulated application layer data corresponding to the received acknowledgement character when the KCP receives the acknowledgement character.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a computer device 800 according to an embodiment of the present disclosure. As shown in fig. 8, a computer device in an embodiment of the present disclosure may include: one or more processors 801, memory 802, and input-output interfaces 803. The processor 801, memory 802, and input-output interface 803 are connected via a bus 804. The memory 802 is used to store a computer program including program instructions, the input output interface 803 is used to receive data and output data, such as for data interaction between a host and a computer device, or for data interaction between various virtual machines in a host; the processor 801 is configured to execute program instructions stored in the memory 802.
The processor 801 may perform the following operations, among others:
the fast and reliable automatic retransmission request protocol KCP receives data sent by an application layer; the KCP splits the data sent by the application layer into KCP data packets; the KCP sends KCP data packets to a user datagram protocol UDP; and the KCP resends the first data packet to the UDP when no feedback information of the first data packet is received.
Alternatively, the processor 801 may perform the following operations:
the KCP receives the UDP data packet sent by the UDP; the KCP unpacks the UDP data packet and encapsulates the UDP data packet into application layer data; the KCP transmits the encapsulated application layer data to the application layer.
In some possible implementations, the processor 801 may be a central processing unit (central processing unit, CPU), which may also be other general purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), off-the-shelf programmable gate arrays (field-programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 802 may include read only memory and random access memory, and provides instructions and data to the processor 801 and the input output interface 803. A portion of memory 802 may also include non-volatile random access memory. For example, the memory 802 may also store information of device type.
In a specific implementation, the computer device may execute, through each functional module built in the computer device, an implementation manner provided by each step in the foregoing embodiment, and specifically may refer to an implementation manner provided by each step in the foregoing embodiment, which is not described herein again.
Embodiments of the present disclosure provide a computer device comprising: the processor, the input/output interface and the memory acquire the computer program in the memory through the processor, execute the steps of the method shown in the above embodiment, and perform the transmission operation.
The embodiments of the present disclosure further provide a computer readable storage medium, where the computer readable storage medium stores a computer program, where the computer program is adapted to be loaded by the processor and execute the method provided by each step in the foregoing embodiments, and specifically refer to an implementation manner provided by each step in the foregoing embodiments, which is not described herein in detail. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present disclosure, please refer to the description of the embodiments of the method according to the present disclosure. As an example, a computer program may be deployed to be executed on one computer device or on multiple computer devices at one site or distributed across multiple sites and interconnected by a communication network.
The computer readable storage medium may be an apparatus provided in any of the foregoing embodiments or an internal storage unit of the computer device, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (flash card) or the like, which are provided on the computer device. Further, the computer-readable storage medium may also include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
The disclosed embodiments also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the methods provided in the various alternatives in the above embodiments.
The terms first, second and the like in the description and in the claims and drawings of the embodiments of the disclosure are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or device that comprises a list of steps or elements is not limited to the list of steps or modules but may, in the alternative, include other steps or modules not listed or inherent to such process, method, apparatus, article, or device.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in this description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The methods and related devices provided by the embodiments of the present disclosure are described with reference to the method flowcharts and/or structure diagrams provided by the embodiments of the present disclosure, and each flowchart and/or block of the method flowcharts and/or structure diagrams may be implemented by computer program instructions, and combinations of flowcharts and/or block diagrams. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable transmission device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable transmission device, create means for implementing the functions specified in the flowchart flow or flows and/or block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable transmission apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or structural diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable transmission device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or structures.
The foregoing disclosure is merely illustrative of the presently preferred embodiments of the present disclosure, and it is not intended to limit the scope of the claims hereof, as defined by the appended claims.

Claims (10)

1. A method of transmitting data, comprising:
the fast and reliable automatic retransmission request protocol KCP receives data sent by an application layer;
the KCP splits the data sent by the application layer into KCP data packets;
the KCP sends KCP data packets to a user datagram protocol UDP;
and the KCP resends the first data packet to the UDP when no feedback information of the first data packet is received.
2. The method of claim 1, wherein the KCP transmitting KCP packets to a user datagram protocol UDP comprises:
the KCP puts KCP data packets into a transmission buffer or a transmission queue through flow control and congestion control;
and the KCP transmits KCP data packets in a transmission buffer or a transmission queue to the UDP.
3. The method of claim 2, wherein the KCP transmitting KCP packets in a transmit buffer or transmit queue to the UDP comprises:
the KCP determines a sending rate according to the minimum value of the sending rate of the sending port and the receiving rate of the receiving port;
and the KCP transmits KCP data packets in a transmission buffer or a transmission queue to the UDP at the transmission rate.
4. The method as recited in claim 1, further comprising:
the KCP receives the UDP data packet sent by the UDP;
the KCP unpacks the UDP data packet and encapsulates the UDP data packet into application layer data;
the KCP transmits the encapsulated application layer data to the application layer.
5. The method of claim 4, wherein the KCP transmitting encapsulated application layer data to the application layer comprises:
the KCP sends the encapsulated application layer data to a sending buffer;
the KCP transfers the complete data in the sending buffer memory to a sending queue;
and the KCP transmits the encapsulated application layer data in the transmission queue to the application layer.
6. The method of claim 5, wherein the KCP transmitting the encapsulated application layer data to the transmit buffer comprises:
and when the KCP does not receive the acknowledgement character, the KCP sends the corresponding encapsulated application layer data which does not receive the acknowledgement character to a sending buffer.
7. The method of claim 5, wherein the KCP transmitting the encapsulated application layer data to the transmit buffer comprises:
and deleting the encapsulated application layer data corresponding to the received acknowledgement character when the KCP receives the acknowledgement character.
8. The computer equipment is characterized by comprising a processor, a memory and an input-output interface;
the processor is connected to the memory and the input/output interface, respectively, wherein the input/output interface is used for receiving data and outputting data, the memory is used for storing a computer program, and the processor is used for calling the computer program to enable the computer device to execute the method of any one of claims 1-7.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any of claims 1-7.
10. Computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 1-7.
CN202310014417.2A 2023-01-05 2023-01-05 Data transmission method and related equipment Pending CN116156018A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310014417.2A CN116156018A (en) 2023-01-05 2023-01-05 Data transmission method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310014417.2A CN116156018A (en) 2023-01-05 2023-01-05 Data transmission method and related equipment

Publications (1)

Publication Number Publication Date
CN116156018A true CN116156018A (en) 2023-05-23

Family

ID=86352072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310014417.2A Pending CN116156018A (en) 2023-01-05 2023-01-05 Data transmission method and related equipment

Country Status (1)

Country Link
CN (1) CN116156018A (en)

Similar Documents

Publication Publication Date Title
US10715282B2 (en) Method and related device for improving TCP transmission efficiency using delayed ACK
CN105075216B (en) Identify original ip address and client port connection
US6912588B1 (en) System and method for managing client requests in client-server networks
US8458280B2 (en) Apparatus and method for packet transmission over a high speed network supporting remote direct memory access operations
US20120005369A1 (en) System and method of tcp tunneling
CN107360177B (en) A kind of message transmitting method and device based on UDP
CN108494817A (en) Data transmission method, relevant apparatus and system
CN103795632A (en) Data message transmission method, related equipment and system
CN110120854B (en) Method and device for transmitting data
CN111885093B (en) Event request transmission method and device, storage medium and electronic equipment
CN115002023B (en) Link aggregation method, link aggregation device, electronic equipment and storage medium
CN102315918B (en) Method and device for intercommunicating TCP (Transmission Control Protocol) connection with SCTP (Stream Control Transmission Protocol) connection
CN111385068B (en) Data transmission method, device, electronic equipment and communication system
CN114500528A (en) Data transmission method and device based on cloud platform
CN108809549B (en) Data transmission method and equipment
Farber et al. Thinwire protocol for connecting personal computers to the Internet
US8578040B2 (en) Method, system and article for client application control of network transmission loss tolerance
WO2019243890A2 (en) Multi-port data transmission via udp
CN102055774A (en) Packet processing-based HTTP server and data processing method thereof
CN116074401B (en) Method for realizing transmission layer protocol on programmable exchanger
CN116156018A (en) Data transmission method and related equipment
US7529812B2 (en) Socket connections over a serial link
JP2004187099A (en) Communication control method, communication system and communication equipment
CN116566914B (en) Bypass TCP acceleration method, device, equipment and medium
CN114760266B (en) Virtual address generation method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination