Data transmission method, device, computer readable storage medium and electronic device

By using multiple virtual pipes for data transmission between multiple servers and releasing the pipes after the transmission is completed, the problems of poor transmission performance and resource waste in the existing technology are solved, and efficient and low-latency data transmission is achieved.

CN116032998BActive Publication Date: 2024-10-01GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111249299.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2024-10-01
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

The existing technology has poor transmission performance, low throughput, and low concurrency in data transmission between multiple servers, and the TCP message channel is idle while waiting, resulting in a waste of resources.

Method used

Multiple virtual pipes are used for data transmission, and the idle pipe is determined from the multiple virtual pipes for data transmission, and the pipe is released after the data transmission is completed to improve resource utilization.

Benefits of technology

It improves the performance and efficiency of data transmission, reduces latency, and avoids waste of resources while ensuring reliable data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032998B_ABST
    Figure CN116032998B_ABST
Patent Text Reader

Abstract

This invention discloses a data transmission method, apparatus, computer-readable storage medium, and electronic device. The method includes: acquiring information to be transmitted by a current transmitting terminal, wherein the information to be transmitted includes at least a receiver identifier of a target receiving terminal and data to be transmitted; determining a first virtual channel in an idle state from a plurality of virtual channels, wherein the plurality of virtual channels are User Datagram Protocol (UDP) message channels; transmitting the data to be transmitted from the information to be transmitted to the target receiving terminal through the first virtual channel; and releasing the first virtual channel. This invention solves the technical problem of poor transmission performance in the prior art during data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data communication, and in particular to a data transmission method, device, computer-readable storage medium and electronic device. Background Art

[0002] Currently, the terminal device can realize data forwarding through the server. In the data forwarding system, it can be realized through multiple servers. For example, Figure 1 The data transmission system shown in Figure 1 In the figure, host 1 and host 2 are servers for data transmission, user A-user E represent the sending end devices, and user F-user L represent the receiving end devices. Figure 1 It can be seen that host 1 needs to send a large amount of data to host 2, and the data includes data sent from the sending end device corresponding to host 1 to the receiving end device corresponding to host 2. Figure 1 In the , the message channel is the pipeline for sending data.

[0003] In actual applications, when data is transmitted between multiple servers, it is necessary to ensure that the data received by the same terminal device is reliable and orderly. For example, if the data sent to the receiving device F is data 1, 2, and 3, then the order of the data received by the receiving device is 1, 2, and 3, rather than 1, 3, and 2. In addition, the order of receiving data between different terminal devices is inconsistent to improve concurrency. For example, if the data sent to the receiving device F is 1 and 2, then the data sent to the receiving device K is 3 and 4. The position of data 3 can be anywhere between data 1 and 2, but data 3 must be sent before data 4.

[0004] In order to ensure reliable transmission of data between servers, a TCP (Transmission Control Protocol) message channel is usually used for data transmission. The TCP message channel has the characteristic of reliable message transmission, and the application layer can monitor whether the data is delivered according to demand.

[0005] Figure 2 A schematic diagram showing data transmission between servers through a TCP message channel is shown, Figure 2 As shown in the figure, a TCP message channel is established between host 1 and host 2, and the data of all sending devices are transmitted through the TCP message channel. However, when data is transmitted between servers through the TCP message channel, only the data of one terminal device can be transmitted at the same time, resulting in low throughput and low concurrency. Moreover, since there is only one TCP message channel between servers, message waiting is involved during data transmission, and during the message waiting process, the TCP message channel is idle, resulting in a waste of resources.

[0006] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0007] The embodiments of the present invention provide a data transmission method, device, computer-readable storage medium and electronic device to at least solve the technical problem of poor transmission performance in the data transmission process in the prior art.

[0008] According to one aspect of an embodiment of the present invention, a data transmission method is provided, comprising: obtaining information to be sent sent by a current sending terminal, wherein the information to be sent includes at least a receiving terminal identifier of a target receiving terminal and data to be sent; determining a first virtual pipe in an idle state from multiple virtual pipes, wherein the multiple virtual pipes are user datagram protocol message channels; sending the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipe, and releasing the first virtual pipe.

[0009] Furthermore, the data transmission method further includes: before obtaining the to-be-sent information sent by the current sending terminal, obtaining information sent by multiple sending terminals; and storing the information sent by the multiple sending terminals in a cache queue.

[0010] Furthermore, the data transmission method further includes: acquiring the information to be sent from the cache queue according to the sending order of the information currently sent by the sending terminal.

[0011] Furthermore, the data transmission method also includes: when it is detected that the current sending terminal receives a response message within a preset time length, deleting the information to be sent from the cache queue and releasing the first virtual pipe to make the first virtual pipe idle, wherein the response message is a message fed back by the target receiving terminal through the first virtual pipe after receiving the data to be sent.

[0012] Furthermore, the data transmission method also includes: when it is detected that the current sending terminal has not received a response message within a preset time length, releasing the first virtual pipe, and re-determining a second virtual pipe in an idle state from multiple virtual pipes, and sending the data to be sent to the target receiving terminal through the second virtual pipe.

[0013] Furthermore, the data transmission method also includes: recording the number of times the data to be sent is sent; when the number of times the data to be sent is greater than a preset number, generating a prompt message, wherein the prompt message is used to prompt that the sending of the information to be sent has failed.

[0014] Furthermore, the target receiving terminal obtains the data to be sent through the receiving server, wherein the receiving server is used to monitor at least one user datagram protocol message port, and each user datagram protocol message port corresponds to multiple virtual pipes.

[0015] According to another aspect of an embodiment of the present invention, a data transmission device is also provided, including: an acquisition module, used to acquire information to be sent sent by a current sending terminal, wherein the information to be sent includes at least a receiving terminal identifier of a target receiving terminal and data to be sent; a determination module, used to determine a first virtual pipe in an idle state from multiple virtual pipes, wherein the multiple virtual pipes are user datagram protocol message channels; a transmission module, used to send the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipe, and release the first virtual pipe.

[0016] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned data transmission method when running.

[0017] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, which includes one or more processors; a storage device for storing one or more programs, which enables the one or more processors to run the programs when the one or more programs are executed by the one or more processors, wherein the programs are configured to execute the above-mentioned data transmission method when running.

[0018] In an embodiment of the present invention, a plurality of terminal devices reuse the same virtual pipe. After obtaining the information to be sent sent by the current sending terminal, a first virtual pipe in an idle state is determined from the plurality of virtual pipes, and then the data to be sent in the information to be sent is sent to the target receiving end through the first virtual pipe, and the first virtual pipe is released, wherein the information to be sent includes at least a receiving end identifier of the target receiving terminal and the data to be sent, and the plurality of virtual pipes are user datagram protocol message channels.

[0019] In the above process, the first virtual pipe in an idle state is used to realize the data transmission between the current sending terminal and the target receiving terminal, thereby avoiding the problem of resource waste caused by the TCP message channel being in an idle state in the prior art. Moreover, in the present application, the virtual pipe is a user datagram protocol message channel, and the user datagram protocol message channel can not only improve the performance of data transmission, but also reduce the delay of data transmission. Compared with the prior art, the solution provided by the present application not only ensures reliable data transmission, but also provides data transmission performance. In addition, in the present application, after the first virtual pipe realizes the data transmission between the current sending terminal and the target receiving terminal, the first virtual pipe is released and is in an idle state, so that the first virtual pipe transmits data between other sending terminals and receiving terminals, thereby improving the utilization rate of resources.

[0020] It can be seen that the solution provided in the present application achieves the purpose of improving data transmission efficiency while ensuring reliable data transmission, thereby achieving the technical effect of improving data transmission performance, and further solving the technical problem of poor transmission performance existing in the prior art during data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0022] Figure 1 is a schematic diagram of a data transmission system according to the prior art;

[0023] Figure 2 is a schematic diagram of data transmission according to the prior art;

[0024] Figure 3 is a flow chart of a data transmission method according to an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of an optional data transmission system according to an embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of data transmission according to the prior art;

[0027] Figure 6 is a schematic diagram of a data transmission device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Example 1

[0031] According to an embodiment of the present invention, an embodiment of a data transmission method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] In addition, it should be noted that, in this embodiment, the sending server can serve as the executor of this embodiment, wherein the sending server is a server that obtains data from the sending terminal in the data transmission system, and the data transmission system also includes a sending terminal, a receiving terminal, a receiving server, and a message pipeline for data transmission between multiple servers.

[0033] Figure 3 is a flow chart of a data transmission method according to an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:

[0034] Step S302, obtaining the information to be sent by the current sending terminal.

[0035] In step S302, the information to be sent includes at least a receiving terminal identifier of the target receiving terminal and the data to be sent.

[0036] Optional, Figure 4 A schematic diagram of an optional data transmission system is shown. Figure 4In the example, host 1 is a sending server, and users A, B, C, D, and E are sending terminals that send data to a receiving terminal through host 1. When the sending terminals transmit data with the receiving terminals through the server, the sending terminals send the data to be sent (i.e., the data to be sent) and other information (e.g., the receiving terminal identifier of the receiving terminal) to the sending server. After obtaining the information to be sent, the sending server obtains the data to be sent and the identifier information of the target receiving terminal to which the data to be sent is transmitted (i.e., the receiving terminal identifier) ​​from the information to be sent.

[0037] It should be noted that the above receiving terminal identifier may be, but is not limited to, the name, ID, MAC (Media Access Control) address, etc. of the receiving terminal. Through the receiving terminal identifier, the sending server can accurately determine the target receiving terminal corresponding to the information to be sent, thereby ensuring accurate data transmission.

[0038] Step S304: determining a first virtual pipe in an idle state from among the multiple virtual pipes.

[0039] In step S304, multiple virtual pipes are user datagram protocol message channels, namely, UDP pipes. In this embodiment, the virtual pipes are used to realize data transmission between servers. When it is detected that the virtual pipe is performing data transmission between servers, it is determined that the virtual pipe is in an occupied state; when it is detected that the virtual pipe is not performing data transmission, it is determined that the virtual pipe is in an idle state.

[0040] It should be noted that TCP transmission is reliable transmission, and reliable transmission will inevitably involve the process of waiting for message response. For example, when host 1 sends data a to host 2, host 1 must wait until host 2 sends a message to notify host 1 that host 2 has received message a from host 1. This process is the response ACK (Acknowledge character) process. Since it involves waiting, the channel is idle during the waiting time, wasting resources. In addition, various flow controls are built into TCP, and congestion control algorithms are used to ensure reliable transmission of messages, such as slow start. Among them, slow start is a startup method in which the channel sends messages at a slower rate when it is established, and then slowly increases the rate of sending messages until congestion occurs.

[0041] From the above content, it can be seen that establishing a TCP channel between two servers will cause a waste of resources. Figure 5 The data transmission system shown in FIG. Figure 5It can be seen that in this method, the TCP protocol is also used, but several more pipes are established between host 1 and host 2, so that different pipes can send messages of different users at the same time, improving concurrency. As shown in Figure 5, three TCP message channels A, B, and C are established between host 1 and host 2.

[0042] Although the above solution can realize the concurrency of network transmission by increasing the connection pipes, this method increases the resources consumed by maintaining the connection pipes. Moreover, since the maintenance of the connection pipes requires the consumption of certain resources, the number of the connection pipes cannot be increased indefinitely.

[0043] This application further optimizes the above solution by using UDP instead of TCP (such as Figure 4 UDP is essentially a connectionless transmission protocol, which essentially solves the transmission performance problem brought by TCP. At the same time, in this application, the sending server can also set message reliability options according to user needs, thereby giving the user the choice of performance and delay. Figure 4 In the figure, the dotted line represents a virtual pipe, that is, the pipe does not actually exist and will not occupy the pipe connection resources.

[0044] It should be noted that before data transmission, the message quality should be defined first. The message quality mainly includes three aspects, namely, no need for message loss, no message loss, and no message loss and order. No need for message loss means that the message sent is ignored regardless of whether the other party has received it, but the original UDP is used to send data directly without any data processing; no message loss means that the sending terminal uses UDP to send data, and waits for the receiving terminal to receive the reply ACK, and retransmits the data after timeout; no message loss and order means that the message is not lost, and the order of receiving is consistent with the order of sending, which is usually achieved by a response mechanism combining a sliding window and ACK.

[0045] It should be noted that the sending server can send the information to be sent by the current sending terminal to the receiving server through a message message, and the receiving server can feed back a response message to the sending server.

[0046] Optionally, in this embodiment, the messageType of the message message and the response message are different, the messageType of the message message is 0, and the messageType of the response message is 1. In addition, the response message may not have a messageBody, and whether there is a messageBody can be controlled by messageSumSize. Among them, the message format of the message message can be shown in Table 1:

[0047] Table 1

[0048]

[0049] It should be noted that messageSumSIze indicates the total size of the message body, and this field only contains the size of messageBody; messageType indicates the message type, where 0 indicates sending a message and 1 indicates receiving a message; messageId indicates that each message has a unique messageId of 8 bytes, and the messageId is used to identify a unique message; messageBody indicates the message body, which is used to store messages.

[0050] In addition, it should be noted that the same message may have multiple block information, and sqmentId can be used to identify a block in the message. Among them, the message is transmitted in the network in blocks. When a block is lost, the terminal device first resends the block message. If the retransmission reaches a certain number of times and still fails, the terminal device resends the entire message. Usually, only the block message needs to be resent. The receiving terminal does not need to know whether the message is a resent message or an original message. The receiving terminal only needs to verify whether the message is complete. In addition, in order to improve throughput, the sending terminal can send part of the message blocks, then monitor whether the message is delivered, and send the next batch of block information after the message is delivered. In addition, the size of the block can be set according to the performance of the network.

[0051] In step S302, idle virtual pipes are used to implement data transmission between different servers, thereby improving the utilization rate of the virtual pipes and avoiding waste of resources.

[0052] Step S306: Send the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipe, and release the first virtual pipe.

[0053] In step S306, the target receiving terminal obtains the data to be sent through the receiving server, wherein the receiving server is used to monitor at least one user datagram protocol message port, and each user datagram protocol message port corresponds to multiple virtual pipes.

[0054] Optionally, the receiving server can listen to a UDP port (i.e., the above-mentioned User Datagram Protocol message port), and can listen to multiple UDP ports. If the receiving server listens to one UDP port, the sending server can establish up to (65535-1024) virtual pipes; if the receiving server listens to n UDP ports, the sending server can create up to n (65535-1024) virtual pipes. After detecting that the UDP port has received a message, the receiving server immediately feeds back a response message to the sending server, combines the response message, and then sends the response message to the upper layer.

[0055] It should be noted that after determining the first virtual pipe in an idle state from multiple virtual pipes, the sending server can send data to the receiving server through the first virtual pipe, and the receiving server communicates with multiple receiving terminals, thereby realizing data transmission between the current sending terminal and the target receiving terminal.

[0056] In addition, after completing the data transmission between the current sending terminal and the target receiving terminal, the sending end server releases the first virtual pipe, so that the first virtual pipe is used to realize data transmission between other sending terminals and receiving terminals, thereby improving resource utilization.

[0057] Based on the scheme defined by the above steps S302 to S306, it can be known that in an embodiment of the present invention, a plurality of terminal devices reuse the same virtual pipe. After obtaining the information to be sent sent by the current sending terminal, a first virtual pipe in an idle state is determined from multiple virtual pipes, and then the data to be sent in the information to be sent is sent to the target receiving end through the first virtual pipe, and the first virtual pipe is released, wherein the information to be sent includes at least a receiving end identifier of the target receiving terminal and the data to be sent, and the plurality of virtual pipes are user datagram protocol message channels.

[0058] It is easy to notice that in the above process, the first virtual pipe in an idle state is used to realize the data transmission between the current sending terminal and the target receiving terminal, which avoids the problem of resource waste caused by the idle state of the TCP message channel in the prior art. Moreover, in the present application, the virtual pipe is a user datagram protocol message channel, and the user datagram protocol message channel can not only improve the performance of data transmission, but also reduce the delay of data transmission. Compared with the prior art, the solution provided by the present application not only ensures reliable data transmission, but also provides data transmission performance. In addition, in the present application, after the first virtual pipe realizes the data transmission between the current sending terminal and the target receiving terminal, the first virtual pipe is released and is in an idle state, so that the first virtual pipe transmits data between other sending terminals and receiving terminals, thereby improving the utilization rate of resources.

[0059] It can be seen that the solution provided in the present application achieves the purpose of improving data transmission efficiency while ensuring reliable data transmission, thereby achieving the technical effect of improving data transmission performance, and further solving the technical problem of poor transmission performance existing in the prior art during data transmission.

[0060] In an optional embodiment, before obtaining the to-be-sent information sent by the current sending terminal, the sending-end server obtains information sent by multiple sending terminals, and stores the information sent by the multiple sending terminals in a cache queue.

[0061] Optionally, each cache queue can correspond to a virtual pipe, and a cache queue can store the to-be-sent information of multiple sending terminals. For example, cache queue 1 corresponds to virtual pipe A, that is, all the to-be-sent data in cache queue 1 are sent through virtual pipe A. After all the data in cache queue 1 are sent, virtual pipe A is in an idle state and can be used by other cache queues.

[0062] In an optional embodiment, after storing the information sent by multiple sending terminals in the cache queue, the sending end server may obtain the information to be sent from the cache queue according to the sending order of the information sent by the current sending terminal.

[0063] Optionally, the sending server can encapsulate a UDP DatagramSocket socket object and add a queue (ie, the above-mentioned cache queue) to the socket object. When the sending server sends a message, the message is taken out from the cache queue and sent to the receiving server.

[0064] In an optional embodiment, after acquiring the information to be sent, the sending end server sends the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipe, and releases the first virtual pipe. Specifically, when it is detected that the current sending terminal receives a response message within a preset time, the sending end server deletes the information to be sent from the cache queue and releases the first virtual pipe, so that the first virtual pipe is in an idle state, wherein the response message is a message fed back by the target receiving terminal through the first virtual pipe after receiving the data to be sent.

[0065] Optionally, in the present application, the sending server can read the information in the message cache queue through the send method, set the target port for sending the information to be sent, and send the information to be sent to the target receiving terminal. Then, the receiving terminal feedback ACK (i.e., response message) is obtained through the receiver method. After receiving the ACK, the sending server removes the information to be sent from the cache queue and releases the first virtual pipe.

[0066] Among them, the message format of the response message (ACK) can be as shown in Table 2.

[0067] Table 2

[0068]

[0069] It should be noted that after receiving the information to be sent from the sending server, the receiving server immediately feeds back the above response message to the sending server through the first virtual pipe to inform the sending server that the receiving server has received the information to be sent.

[0070] In addition, it should be noted that, in the process of sending the information to be sent, the first virtual pipe can realize the communication between the sending end server and the receiving end server, so when the receiving end server feeds back a response message to the sending end server, the receiving end server can still send the response message to the sending end server through the first virtual pipe, which reduces the time delay existing in the data transmission through TCP in the prior art and improves the efficiency of data transmission.

[0071] In an optional embodiment, when it is detected that the current sending terminal has not received a response message within a preset time length, the sending server releases the first virtual pipe, and redetermines a second virtual pipe in an idle state from multiple virtual pipes, and sends the data to be sent to the target receiving terminal through the second virtual pipe.

[0072] Optionally, if the sending end server has not received a response message fed back by the receiving end server within a certain period of time, the sending end server re-sends the to-be-sent information to the receiving end server through the first virtual pipeline.

[0073] In another optional embodiment, the sending end server also records the number of times the data to be sent is sent, and generates a prompt message when the number of times is greater than a preset number, wherein the prompt message is used to prompt that the sending of the data to be sent fails. For example, if the number of times the sending end server sends the data to be sent to the receiving end server reaches a preset number, the sending end server may be unable to communicate with the receiving end server due to network failure or other reasons. At this time, the sending end server generates a prompt message to prompt that the sending end server cannot perform data transmission with the receiving end server.

[0074] As can be seen from the above content, TCP focuses on reliability, while UDP focuses on performance and latency. In the prior art, usually only one of the two can be chosen. However, this application can implement a reliable transmission protocol with low latency and high throughput, that is, this application can achieve both the high performance and low latency of UDP and the high reliability of TCP. In addition, in all information transmissions, messages must be guaranteed to be sent and responded to, that is, after the receiving server receives the message sent by the sending server, it must reply a receipt confirmation message to the sending server.

[0075] In addition, the solution provided by the present application has the advantage of high flexibility. Existing transmission protocols, such as TCP, UDP, UDT, etc., can only choose between performance and message reliability, and cannot provide users with real choices. The solution provided by the present application allows users to use the same set of protocols to achieve high-performance and high-reliability message transmission protocols. The same set of protocols can choose different message transmission qualities to maximize performance.

[0076] The solution provided by the present application also has the advantage of high transmission performance. Among them, the present application adopts multiple sending terminals and receiving terminals to achieve concurrency, and at the same time, a single sending terminal implements flow control internally, and realizes message sending and receiving in a completely asynchronous and non-blocking manner, without wasting extra CPU resources. In actual tests, the information to be sent can fill up the bandwidth. When the information to be sent is 1k, the virtual pipeline can achieve 200,000 to 300,000 messages per second concurrently. The transmission performance depends on the network bandwidth.

[0077] Finally, the solution provided in this application can also separate the message sender (i.e., the sending terminal) and the message receiver (i.e., the receiving terminal). In traditional protocols, the protocol is transmitted in full-duplex mode, and usually the sender of the message and the receiver of the message are the same instance, which means that if multiple transmission channels need to be implemented, different ports must be bound, which increases the difficulty of capacity expansion. However, in this application, the sending terminal and the receiving terminal are further decoupled by using the above-mentioned protocol separation method, so that both the sending terminal and the receiving terminal can be increased in multiples, thereby achieving the effect of elastic capacity expansion and high concurrency.

[0078] Example 2

[0079] According to an embodiment of the present invention, an embodiment of a data transmission device is also provided, wherein: Figure 6 is a schematic diagram of a data transmission device according to an embodiment of the present invention. Figure 6 As shown, the device includes: an acquisition module 601, a determination module 603 and a transmission module 605.

[0080] Among them, the acquisition module 601 is used to obtain the information to be sent sent by the current sending terminal, wherein the information to be sent at least includes the receiving terminal identifier of the target receiving terminal and the data to be sent; the determination module 603 is used to determine the first virtual pipe in an idle state from multiple virtual pipes, wherein the multiple virtual pipes are user datagram protocol message channels; the transmission module 605 is used to send the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipe, and release the first virtual pipe.

[0081] It should be noted that the above-mentioned acquisition module 601, determination module 603 and transmission module 605 correspond to steps S302 to S306 in the above-mentioned embodiment. The examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

[0082] Optionally, the data transmission device further includes: a first acquisition module and a storage module. The first acquisition module is used to acquire information sent by multiple sending terminals before acquiring the information to be sent by the current sending terminal; the storage module is used to store the information sent by multiple sending terminals in a cache queue.

[0083] Optionally, the acquisition module includes: a second acquisition module, used to acquire the information to be sent from the cache queue according to the sending order of the information currently sent by the sending terminal.

[0084] Optionally, the transmission module includes: a first processing module, which is used to delete the information to be sent from the cache queue and release the first virtual pipe when it detects that the current sending terminal receives a response message within a preset time length, so that the first virtual pipe is in an idle state, wherein the response message is a message fed back by the target receiving terminal through the first virtual pipe after receiving the data to be sent.

[0085] Optionally, the data transmission device also includes: a second processing module, which is used to release the first virtual pipe when it detects that the current sending terminal has not received a response message within a preset time length, and redetermine a second virtual pipe in an idle state from multiple virtual pipes, and send the data to be sent to the target receiving terminal through the second virtual pipe.

[0086] Optionally, the data transmission device further includes: a recording module and a generating module, wherein the recording module is used to record the number of times the data to be sent is sent; and the generating module is used to generate a prompt message when the number of times the data to be sent is greater than a preset number, wherein the prompt message is used to prompt that the sending of the data to be sent fails.

[0087] Optionally, the target receiving terminal obtains the data to be sent through a receiving server, wherein the receiving server is used to monitor at least one user datagram protocol message port, and each user datagram protocol message port corresponds to multiple virtual pipes.

[0088] Example 3

[0089] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the data transmission method in the above-mentioned embodiment 1 when running.

[0090] Example 4

[0091] According to another aspect of an embodiment of the present invention, an electronic device is also provided, which includes one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors are implemented to run the programs, wherein the programs are configured to execute the data transmission method in the above-mentioned embodiment 1 when running.

[0092] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0093] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0094] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0096] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0097] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0098] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A data transmission method, It is characterized in that include: Acquire the information to be sent sent by the current sending terminal, wherein the information to be sent at least includes a receiving terminal identifier of the target receiving terminal and the data to be sent; Determine a first virtual pipe in an idle state from a plurality of virtual pipes, wherein the plurality of virtual pipes are user datagram protocol message channels; The data to be sent in the information to be sent is sent to the target receiving terminal through the first virtual pipe, and the first virtual pipe is released, wherein the target receiving terminal obtains the data to be sent through a receiving server, wherein the receiving server is used to monitor at least one user datagram protocol message port, and each user datagram protocol message port corresponds to multiple virtual pipes.

2. The method according to claim 1, It is characterized in that Before obtaining the information to be sent sent by the current sending terminal, the method further includes: Obtain information sent by multiple sending terminals; The information sent by the multiple sending terminals is stored in a cache queue.

3. The method according to claim 2, It is characterized in that Get the information to be sent by the current sending terminal, including: The to-be-sent information is acquired from the cache queue according to the sending order of the information sent by the current sending terminal.

4. The method according to claim 2, It is characterized in that The method includes sending the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipe and releasing the first virtual pipe, including: When it is detected that the current sending terminal receives a response message within a preset time length, the information to be sent is deleted from the cache queue, and the first virtual pipe is released to put the first virtual pipe in the idle state, wherein the response message is a message fed back by the target receiving terminal through the first virtual pipe after receiving the data to be sent.

5. The method according to claim 4, It is characterized in that The method further comprises: When it is detected that the current sending terminal has not received the response message within the preset time length, the first virtual pipe is released, and a second virtual pipe in the idle state is re-determined from the multiple virtual pipes, and the data to be sent is sent to the target receiving terminal through the second virtual pipe.

6. The method according to claim 5, It is characterized in that The method further comprises: Recording the number of times the data to be sent is sent; When the number of transmissions is greater than a preset number, a prompt message is generated, wherein the prompt message is used to prompt that the transmission of the information to be transmitted fails.

7. A data transmission device, It is characterized in that include: An acquisition module, used for acquiring information to be sent sent by the current sending terminal, wherein the information to be sent at least includes a receiving terminal identifier of a target receiving terminal and data to be sent; A determination module, configured to determine a first virtual pipe in an idle state from a plurality of virtual pipes, wherein the plurality of virtual pipes are user datagram protocol message channels; A transmission module, used to send the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipe, and release the first virtual pipe, wherein the target receiving terminal obtains the data to be sent through a receiving server, wherein the receiving server is used to monitor at least one user datagram protocol message port, and each user datagram protocol message port corresponds to multiple virtual pipes.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the data transmission method described in any one of claims 1 to 6 when running.

9. An electronic device, It is characterized in that The electronic device comprises one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the data transmission method described in any one of claims 1 to 6 when run.