CN116032998A - Data transmission method, data transmission device, computer readable storage medium and electronic equipment - Google Patents

Data transmission method, data transmission device, computer readable storage medium and electronic equipment Download PDF

Info

Publication number
CN116032998A
CN116032998A CN202111249299.0A CN202111249299A CN116032998A CN 116032998 A CN116032998 A CN 116032998A CN 202111249299 A CN202111249299 A CN 202111249299A CN 116032998 A CN116032998 A CN 116032998A
Authority
CN
China
Prior art keywords
virtual
transmitted
information
data
sent
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
CN202111249299.0A
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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN202111249299.0A priority Critical patent/CN116032998A/en
Publication of CN116032998A publication Critical patent/CN116032998A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a data transmission method, a data transmission device, a computer readable storage medium and electronic equipment. Wherein the method comprises the following steps: acquiring information to be transmitted sent by a current transmitting terminal, wherein the information to be transmitted at least comprises a receiving end identification of a target receiving terminal and data to be transmitted; determining 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; and sending the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipeline, and releasing the first virtual pipeline. The invention solves the technical problem of poor transmission performance in the data transmission process in the prior art.

Description

Data transmission method, data transmission device, computer readable storage medium and electronic equipment
Technical Field
The present invention relates to the field of data communications, and in particular, to a data transmission method, apparatus, computer readable storage medium, and electronic device.
Background
Currently, the terminal device may implement forwarding of data by a server, where in the data forwarding system may be implemented by a plurality of servers, for example, in the data transmission system shown in fig. 1, the host 1 and the host 2 are servers for performing data transmission, the user a-user E represents a transmitting end device, and the user F-user L represents a receiving end device. As can be seen from fig. 1, the host 1 needs to send a large amount of data to the host 2, where the data includes data sent from a sending end device corresponding to the host 1 to a receiving end device corresponding to the host 2. In fig. 1, the message channel is a pipeline for data transmission.
In practical applications, when data transmission is performed between multiple servers, it is required to ensure that data received by the same terminal device is reliable and ordered, for example, data sent to the receiving end device F is data 1, 2, and 3, and then the sequence of data received by the receiving end device is 1, 2, and 3, instead of 1, 3, and 2. In addition, the receiving order of the data between different terminal devices is not consistent, so as to improve concurrency, for example, if the data sent to the receiving end device F is 1 and 2, the data sent to the receiving end device K is 3 and 4, and the position of the data 3 may be at any position of the data 1 and 2, but the data 3 must be sent before the data 4.
In order to ensure reliable transmission of data between servers, a TCP (Transmission Control Protocol ) message channel is generally used for data transmission, where the TCP message channel has the characteristic of reliable transmission of messages, and an application layer can monitor whether data is sent or not according to requirements.
Fig. 2 shows a schematic diagram of data transmission between servers through a TCP message channel, and as shown in fig. 2, a TCP message channel is established between the host 1 and the host 2, and data of all sending end devices are transmitted through the TCP message channel. However, the servers can only transmit data of one terminal device at the same time through the TCP message channel, so that the throughput is low and the concurrency is low. Moreover, since there is only one TCP message channel between the servers, message waiting is involved in data transmission, and in the process of message waiting, the TCP message channel is in an idle state, which causes resource waste.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a data transmission method, a data transmission device, a computer readable storage medium and electronic equipment, which at least solve the technical problem of poor transmission performance in the data transmission process in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a data transmission method including: acquiring information to be transmitted sent by a current transmitting terminal, wherein the information to be transmitted at least comprises a receiving end identification of a target receiving terminal and data to be transmitted; determining 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; and sending the data to be sent in the information to be sent to the target receiving terminal through the first virtual pipeline, and releasing the first virtual pipeline.
Further, the data transmission method further comprises: before acquiring information to be transmitted, which is transmitted by a current transmitting terminal, acquiring information transmitted by a plurality of transmitting terminals; and storing information sent by a plurality of sending terminals into a cache queue.
Further, the data transmission method further comprises: and acquiring the information to be transmitted from the cache queue according to the transmission sequence of the information transmitted by the current transmitting terminal.
Further, the data transmission method further comprises: when the current sending terminal is detected to receive a response message within a preset time period, deleting the information to be sent from the cache queue, and releasing the first virtual pipeline to enable the first virtual pipeline to be in an idle state, wherein the response message is fed back by the target receiving terminal through the first virtual pipeline after receiving the data to be sent.
Further, the data transmission method further comprises: and when the fact that the current sending terminal does not receive the response message within the preset duration is detected, the first virtual pipeline is released, a second virtual pipeline in an idle state is redetermined from the multiple virtual pipelines, and data to be sent are sent to the target receiving terminal through the second virtual pipeline.
Further, the data transmission method further comprises: recording the sending times of the data to be sent; and generating prompt information when the transmission times are greater than the preset times, wherein the prompt information is used for prompting that the information to be transmitted fails to be transmitted.
Further, the target receiving terminal obtains data to be sent through a receiving server, wherein the receiving server is used for monitoring at least one user datagram protocol message port, and each user datagram protocol message port corresponds to a plurality of virtual pipes.
According to another aspect of the embodiment of the present invention, there is also provided a data transmission apparatus, including: the acquisition module is used for acquiring information to be transmitted sent by the current transmission terminal, wherein the information to be transmitted at least comprises a receiving end identification of the target receiving terminal and data to be transmitted; a determining module, configured to determine a first virtual pipe in an idle state from a plurality of virtual pipes, where the plurality of virtual pipes are user datagram protocol message channels; and the transmission module is used for transmitting the data to be transmitted in the information to be transmitted to the target receiving terminal through the first virtual pipeline and releasing the first virtual pipeline.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described data transmission method when run.
According to another aspect of an embodiment of the present invention, there is also provided an electronic device including one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method for running the program, wherein the program is arranged to perform the data transmission method as described above when run.
In the embodiment of the invention, a mode that a plurality of terminal devices multiplex the same virtual pipeline is adopted, after the information to be transmitted sent by the current transmitting terminal is obtained, a first virtual pipeline in an idle state is determined from the plurality of virtual pipelines, then the data to be transmitted in the information to be transmitted is sent to a target receiving end through the first virtual pipeline, and the first virtual pipeline is released, wherein the information to be transmitted at least comprises a receiving end identifier of the target receiving terminal and the data to be transmitted, and the plurality of virtual pipelines are user datagram protocol message channels.
In the above process, the first virtual pipe in the idle state is used to realize the data transmission between the current sending terminal and the target receiving terminal, so that the problem of resource waste caused by the idle state of the TCP message channel in the prior art is avoided. In addition, in the application, the virtual pipeline is a user datagram protocol message channel, and the user datagram protocol message channel not only can improve the performance of data transmission, but also can reduce the delay of data transmission. In addition, in the 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 the data between other sending terminals and receiving terminals, and the utilization rate of resources is improved.
Therefore, the scheme provided by the application achieves the aim of improving the data transmission efficiency while guaranteeing the reliable transmission of the data, thereby realizing the technical effect of improving the data transmission performance and further solving the technical problem of poor transmission performance in the data transmission process in the prior art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a schematic diagram of a data transmission system according to the prior art;
FIG. 2 is a schematic diagram of a data transmission according to the prior art;
fig. 3 is a flowchart of a data transmission method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an alternative data transmission system according to an embodiment of the invention;
FIG. 5 is a schematic diagram of a data transmission according to the prior art;
fig. 6 is a schematic diagram of a data transmission device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, there is provided an embodiment of a data transmission method, it should be noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that herein.
In addition, it should be noted that, in this embodiment, the transmitting end server may be used as an execution body of this embodiment, where the transmitting end server obtains a server of data of the transmitting terminal in a data transmission system, and the data transmission system further includes a transmitting terminal, a receiving end server, and a message pipe for performing data transmission among a plurality of servers.
Fig. 3 is a flowchart of a data transmission method according to an embodiment of the present invention, as shown in fig. 3, the method including the steps of:
step S302, information to be transmitted, which is transmitted by the current transmitting terminal, is obtained.
In step S302, the information to be transmitted includes at least a receiving end identifier of the target receiving terminal and data to be transmitted.
Alternatively, fig. 4 shows a schematic diagram of an alternative data transmission system, in fig. 4, the host 1 is a transmitting end server, and the user A, B, C, D, E is a transmitting terminal that transmits data to a receiving terminal through the host 1. When the transmitting terminal performs data transmission with the receiving terminal through the server, the transmitting terminal transmits data (i.e., the data to be transmitted) to be transmitted and other information (e.g., a receiving end identifier of the receiving terminal) to the transmitting server. After the sending end server obtains the information to be sent, the sending end server obtains the data to be sent and the identification information (namely the identification of the receiving end) of the target receiving end transmitted by the data to be sent from the information to be sent.
The receiving end identifier may be, but is not limited to, a name, an ID, a MAC (Media Access Control, media access control bit) address, etc. of the receiving terminal. Through the receiving end identification, the transmitting end server can accurately determine the target receiving terminal corresponding to the information to be transmitted, and accurate transmission of data is ensured.
Step S304, determining a first virtual pipe in an idle state from the plurality of virtual pipes.
In step S304, the plurality of virtual pipes are user datagram protocol message channels, i.e. UDP pipes, where in this embodiment, the virtual pipes are used to implement data transmission between servers, and when data transmission between servers of the virtual pipes is detected, it is determined that the virtual pipes are in an occupied state; and when detecting that the virtual pipeline does not transmit data, determining that the virtual pipeline is in an idle state.
It should be noted that, TCP transmission is a reliable transmission, and reliable transmission necessarily involves a process of waiting for a message response, for example, host 1 sends data a to host 2, host 1 must wait until host 2 sends a message to notify host 1, and host 2 receives message a of host 1, which is a response ACK (Acknowledge character, acknowledgement character) process. Because of the latency involved, the channel is in an idle state for the duration of the latency, wasting resources. In addition, various flow controls are built into TCP, and plug control algorithms are used to ensure reliable transmission of messages, such as slow start. Wherein slow start is a start where a channel is sent at a slower rate at set-up and then the rate at which the message is sent is slowly increased until congestion occurs.
From the above, it can be seen that there is a problem of resource waste in establishing a TCP channel between two servers. In the prior art, a data transmission system as shown in fig. 5 may also be used for data transmission. As can be seen from fig. 5, in this manner, the TCP protocol is also used, but several pipes are established between the host 1 and the host 2, so that different pipes can send messages of different users at the same time, and concurrency is improved, and three TCP message channels A, B, C are established between the host 1 and the host 2 as shown in fig. 5.
While the above approach may achieve concurrency of network transmissions by adding connection pipes, this approach increases the resources consumed to maintain the connection pipes. Moreover, since maintenance of the connection pipes requires consumption of a certain resource, the number of connection pipes cannot be increased infinitely.
The present application further optimizes the above scheme by using UDP instead of TCP (as shown in fig. 4), where UDP is essentially a connectionless transport protocol, so as to essentially solve the problem of transport performance caused by TCP. Meanwhile, in the application, the sender server can set the message reliability option according to the user requirement, so that the selection rights of the performance and delay are given to the user. In fig. 4, the dashed line indicates a virtual pipe, that is, the pipe does not exist actually, and thus the connection resource of the pipe is not occupied.
It should be noted that, before data transmission, message quality is defined first, where the message quality mainly includes three aspects, that is, no message is required to be lost, no message is lost, and order. The message is not required to be lost, the message sent out is not required to be ignored no matter the other party does not receive the message, but the original UDP is directly used for sending data, and no processing is carried out on the data; the message is not lost, namely the sending terminal adopts UDP to send data, and waits for the receiving terminal to receive the reply ACK and retransmits the data overtime; messages are not lost and ordered, meaning that messages are not lost, and the order of reception and transmission is consistent, typically implemented using a response mechanism with a sliding window in combination with an ACK.
It should be noted that, the transmitting end server may send the information to be sent by the current transmitting terminal to the receiving end server through the message, and the receiving end server may feed back the response message to the transmitting end server.
Optionally, in this embodiment, the message type of the message packet is 0 and the message type of the response packet is 1. In addition, the response message may have no messageBody, and the messageBody may be controlled by the messageSumSize. The message format of the message may be as shown in table 1:
TABLE 1
Figure BDA0003321932900000061
It should be noted that the message sumsize represents the total size of the message body, and this field only contains the size of the message body; the message type represents a message type, wherein 0 represents a sending message, and 1 represents a receiving message; the messageId means that each message has a unique messageId of 8 bytes, by which the unique message is identified; the messageBody represents a message body for storing messages.
In addition, it should be noted that the same message may have multiple pieces of partition information, and a certain partition in the message may be identified by the sqmentId. Wherein the message is transmitted in blocks in the network. When a certain block is lost, the terminal equipment retransmits the block message first, and if the retransmission times reach a certain number of times or the retransmission is failed, the terminal equipment retransmits the whole message. Typically, only the blocking message needs to be retransmitted. The receiving terminal does not need to know whether the message is a resent message or an original message, and the receiving terminal only needs to check whether the message is complete or not. In addition, in order to improve throughput, the transmitting terminal may transmit a partial message block, then monitor whether the message is delivered, and transmit next block information after the message is delivered. In addition, the size of the block may be set according to the performance of the network.
In step S302, the idle virtual pipes are used to implement data transmission between different servers, so that the utilization rate of the virtual pipes is improved, and resource waste is avoided.
Step S306, the data to be sent in the information to be sent is sent to the target receiving terminal through the first virtual pipeline, and the first virtual pipeline is released.
In step S306, the target receiving terminal obtains data to be sent through a receiving server, where the receiving server is configured to monitor at least one user datagram protocol message port, and each user datagram protocol message port corresponds to a plurality of virtual pipes.
Alternatively, the receiving end server may monitor a UDP port (i.e., the user datagram protocol message port described above) and may monitor a plurality of UDP ports. If the receiving end server monitors one UDP port, the transmitting end server can establish (65535-1024) virtual pipes at most; if the receiving end server listens to n UDP ports, the sending end server may create up to n (65535-1024) virtual pipes. The receiving end server feeds back a response message to the transmitting end server immediately after detecting that the UDP port receives the message, combines the response messages, and then transmits the response message to an upper layer.
It should be noted that, after determining the first virtual pipe in the idle state from the plurality of virtual pipes, the transmitting end server may transmit data to the receiving end server through the first virtual pipe, where the receiving end server communicates with the plurality of receiving terminals, so as to implement data transmission between the current transmitting terminal and the target receiving terminal.
In addition, after the data transmission between the current sending terminal and the target receiving terminal is completed, the sending terminal server releases the first virtual pipeline, so that the first virtual pipeline is used for realizing the data transmission between other sending terminals and receiving terminals, and the utilization rate of resources is improved.
Based on the scheme defined in the foregoing steps S302 to S306, it may be known that, in the embodiment of the present invention, a manner that a plurality of terminal devices multiplex the same virtual pipe is adopted, after information to be sent by a current sending terminal is obtained, a first virtual pipe in an idle state is determined from the plurality of virtual pipes, then data to be sent in the information to be sent is sent to a target receiving end through the first virtual pipe, and the first virtual pipe is released, where the information to be sent at least includes 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.
It is easy to note that in the above process, the first virtual pipe in the idle state is used to implement data transmission between the current sending terminal and the target receiving terminal, so that the problem of resource waste caused by the idle state of the TCP message channel in the prior art is avoided. In addition, in the application, the virtual pipeline is a user datagram protocol message channel, and the user datagram protocol message channel not only can improve the performance of data transmission, but also can reduce the delay of data transmission. In addition, in the 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 the data between other sending terminals and receiving terminals, and the utilization rate of resources is improved.
Therefore, the scheme provided by the application achieves the aim of improving the data transmission efficiency while guaranteeing the reliable transmission of the data, thereby realizing the technical effect of improving the data transmission performance and further solving the technical problem of poor transmission performance in the data transmission process in the prior art.
In an alternative embodiment, before acquiring information to be transmitted sent by a current transmitting terminal, the transmitting terminal server acquires information sent by a plurality of transmitting terminals, and stores the information sent by the plurality of transmitting terminals in a buffer queue.
Alternatively, each buffer queue may correspond to one virtual pipe, and one buffer queue may store information to be sent of a plurality of sending terminals, for example, buffer queue 1 corresponds to virtual pipe a, that is, all data to be sent in buffer queue 1 is sent through virtual pipe a, and after all data in buffer queue 1 is sent, virtual pipe a is in an idle state, and may be used by other buffer queues at this time.
In an alternative embodiment, after storing the information sent by the plurality of sending terminals in the buffer queue, the sending end server may obtain the information to be sent from the buffer queue according to the sending order of the information sent by the current sending terminal.
Alternatively, the sender server may encapsulate UDP DatagramSocket the socket object and add a queue (i.e., the cache queue described above) to the socket object. When the sender server sends the message, the message is fetched from the buffer queue and sent to the receiver server.
In an alternative 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 the current sending terminal is detected to receive a response message within a preset time period, the sending terminal server deletes the information to be sent from the cache queue, and releases the first virtual pipeline so that the first virtual pipeline is in an idle state, wherein the response message is fed back by the first virtual pipeline after the target receiving terminal receives the data to be sent.
Optionally, in the present application, the sending end server may read information in the message buffer queue by using a send method, set a target port for sending information to be sent, and send the information to be sent to a target receiving terminal for sending. Then, the receiving terminal feedback ACK (i.e., response message) is obtained through the receiver method. After receiving the ACK, the transmitting end server removes the information to be transmitted from the buffer queue, and simultaneously releases the first virtual pipe.
The message format of the response message (ACK) may be as shown in table 2.
TABLE 2
Figure BDA0003321932900000081
It should be noted that, after the receiving end server receives the information to be sent by the sending end server, the receiving end server immediately feeds back the response message to the sending end server through the first virtual pipe, so as to inform the sending end server that the receiving end server has received the information to be sent.
In addition, it should be noted that, in the process of sending the information to be sent, the first virtual pipe can implement communication between the sending end server and the receiving end server, so when the receiving end server feeds back the 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, thereby reducing the time delay in the data transmission process through the TCP in the prior art. The efficiency of data transmission is improved.
In an alternative embodiment, when detecting that the current transmitting terminal does not receive the response message within the preset duration, the transmitting end server releases the first virtual pipeline, and redetermines a second virtual pipeline in an idle state from the multiple virtual pipelines, and transmits data to be transmitted to the target receiving terminal through the second virtual pipeline.
Optionally, if the sending end server does not receive the response message fed back by the receiving end server for more than a certain time, the sending end server sends the information to be sent again through the first virtual pipeline receiving end server.
In another optional embodiment, the sending end server further records the sending times of the data to be sent, and generates prompt information when the sending times are greater than preset times, wherein the prompt information is used for prompting that the sending of the information to be sent fails. For example, if the number of times that the transmitting end server transmits the data to be transmitted to the receiving end server reaches the preset number of times, the transmitting end server may fail to communicate with the receiving end server due to a network failure or the like, and at this time, the transmitting end server generates a prompt message to prompt that the transmitting end server cannot perform data transmission with the receiving end server.
From the above, it is clear that TCP weights reliability, UDP weights performance and latency, and in the prior art, only one is typically chosen. The method and the device can realize a low-delay and high-throughput reliable transmission protocol, namely, the method and the device can realize high performance and low delay of UDP and high reliability of TCP. In addition, in all information transmissions, the message must be guaranteed to be sent and responded to, i.e., after the receiving end server receives the message sent by the sending end server, it must reply with a receipt acknowledgement message to the sending end server.
In addition, the scheme provided by the application has the advantage of high flexibility. Existing transmission protocols, such as TCP, UDP, UDT, can only be chosen from two alternatives in terms of performance and message reliability, and cannot provide a real choice for the user. The scheme provided by the application can enable the user to use the same set of protocol to realize high-performance and high-reliability message transmission protocol, and the same set of protocol can select different transmission quality and realize performance maximization.
The scheme provided by the application also has the advantage of high transmission performance. The method and the device realize concurrency by adopting a mode of a plurality of sending terminals and receiving terminals, realize flow control in a single sending terminal, realize message receiving and sending in a completely asynchronous non-blocking mode, and avoid wasting redundant CPU resources. In actual test, the information to be sent can fill up the bandwidth, and when the information to be sent is 1k, the virtual pipeline can realize the concurrence of 20-30 ten thousand messages per second, and the transmission performance depends on the network bandwidth.
Finally, the solution provided by the present application also enables a separation of the message sender (i.e. the sending terminal) and the message receiver (i.e. the receiving terminal). In the conventional protocol, the transmission of the protocol is in a full duplex mode, and usually the sender of the message and the receiver of the message are the same instance, so that if multiple transmission channels need to be implemented, different ports need to be bound, and the difficulty of capacity expansion is increased. In the application, the sending terminal and the receiving terminal are further decoupled in a separation mode through the protocol, so that a plurality of sending terminals and a plurality of receiving terminals can be respectively increased, and the effects of elastic expansion and high concurrence are achieved.
Example 2
According to an embodiment of the present invention, there is further provided an embodiment of a data transmission device, where fig. 6 is a schematic diagram of the data transmission device according to an embodiment of the present invention, and as shown in fig. 6, the device includes: an acquisition module 601, a determination module 603 and a transmission module 605.
The acquiring module 601 is configured to acquire information to be sent by a current sending terminal, where the information to be sent at least includes a receiving end identifier of a target receiving terminal and data to be sent; a determining module 603, configured to determine a first virtual pipe in an idle state from a plurality of virtual pipes, where the plurality of virtual pipes are user datagram protocol message channels; and the transmission module 605 is configured to send 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.
It should be noted that the above-mentioned obtaining module 601, determining module 603, and transmitting module 605 correspond to steps S302 to S306 in the above-mentioned embodiment, and the three modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in the above-mentioned embodiment 1.
Optionally, the data transmission device further includes: the first acquisition module and the storage module. The first acquisition module is used for acquiring information sent by a plurality of sending terminals before acquiring information to be sent by the current sending terminal; the storage module is used for storing information sent by the plurality of sending terminals into the cache queue.
Optionally, the acquiring module includes: the second acquisition module is used for acquiring the information to be transmitted from the cache queue according to the transmission sequence of the information transmitted by the current transmission terminal.
Optionally, the transmission module includes: the first processing module is used for deleting the information to be sent from the cache queue and releasing the first virtual pipeline when detecting that the current sending terminal receives the response message within the preset time length, so that the first virtual pipeline is in an idle state, wherein the response message is fed back by the target receiving terminal through the first virtual pipeline after receiving the data to be sent.
Optionally, the data transmission device further includes: and the second processing module is used for releasing the first virtual pipeline when the current sending terminal is detected not to receive the response message within the preset duration, re-determining a second virtual pipeline in an idle state from the plurality of virtual pipelines, and sending data to be sent to the target receiving terminal through the second virtual pipeline.
Optionally, the data transmission device further includes: a recording module and a generating module. The recording module is used for recording the sending times of the data to be sent; the generating module is used for generating prompt information when the sending times are larger than the preset times, wherein the prompt information is used for prompting that the sending of the information to be sent fails.
Optionally, the target receiving terminal obtains the data to be sent through a receiving server, where the receiving server is configured to monitor at least one user datagram protocol message port, and each user datagram protocol message port corresponds to a plurality of virtual pipes.
Example 3
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the data transmission method in the above embodiment 1 when running.
Example 4
According to another aspect of an embodiment of the present invention, there is also provided an electronic device including one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method for running the program, wherein the program is configured to perform the data transmission method in embodiment 1 described above when run.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A data transmission method, comprising:
acquiring information to be transmitted sent by a current transmitting terminal, wherein the information to be transmitted at least comprises a receiving end identification of a target receiving terminal and data to be transmitted;
determining 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;
and transmitting the data to be transmitted in the information to be transmitted to the target receiving terminal through the first virtual pipeline, and releasing the first virtual pipeline.
2. The method according to claim 1, wherein before acquiring the information to be transmitted by the current transmitting terminal, the method further comprises:
acquiring information sent by a plurality of sending terminals;
and storing the information sent by the plurality of sending terminals into a cache queue.
3. The method according to claim 2, wherein obtaining information to be transmitted, which is transmitted by a current transmitting terminal, includes:
and acquiring the information to be transmitted from the cache queue according to the transmission sequence of the information transmitted by the current transmitting terminal.
4. The method according to claim 2, wherein transmitting the data to be transmitted in the information to be transmitted to the target receiving terminal through the first virtual pipe, and releasing the first virtual pipe, comprises:
and deleting the information to be transmitted from the cache queue and releasing the first virtual pipeline when the current transmitting terminal is detected to receive a response message within a preset time period, so that the first virtual pipeline is in the idle state, wherein the response message is fed back by the first virtual pipeline after the target receiving terminal receives the data to be transmitted.
5. The method according to claim 4, wherein the method further comprises:
and when the current sending terminal is detected not to receive the response message within the preset time, releasing the first virtual pipeline, and re-determining a second virtual pipeline in the idle state from the plurality of virtual pipelines, and sending the data to be sent to the target receiving terminal through the second virtual pipeline.
6. The method of claim 5, wherein the method further comprises:
recording the sending times of the data to be sent;
and generating prompt information when the sending times are larger than preset times, wherein the prompt information is used for prompting that the sending of the information to be sent fails.
7. The method of claim 1, wherein the target receiving terminal obtains the data to be sent through a receiving server, wherein the receiving server is configured to monitor at least one user datagram protocol message port, and each user datagram protocol message port corresponds to a plurality of virtual pipes.
8. A data transmission apparatus, comprising:
the acquisition module is used for acquiring information to be transmitted sent by the current transmission terminal, wherein the information to be transmitted at least comprises a receiving end identifier of a target receiving terminal and data to be transmitted;
a determining module, configured to determine a first virtual pipe in an idle state from a plurality of virtual pipes, where the plurality of virtual pipes are user datagram protocol message channels;
and the transmission module is used for transmitting the data to be transmitted in the information to be transmitted to the target receiving terminal through the first virtual pipeline and releasing the first virtual pipeline.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program is arranged to execute the data transmission method according to any of the claims 1 to 7 when run.
10. An electronic device, the electronic device comprising one or more processors; storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement a method for running a program, wherein the program is arranged to perform the data transmission method of any of claims 1 to 7 when run.
CN202111249299.0A 2021-10-26 2021-10-26 Data transmission method, data transmission device, computer readable storage medium and electronic equipment Pending CN116032998A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111249299.0A CN116032998A (en) 2021-10-26 2021-10-26 Data transmission method, data transmission device, computer readable storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111249299.0A CN116032998A (en) 2021-10-26 2021-10-26 Data transmission method, data transmission device, computer readable storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116032998A true CN116032998A (en) 2023-04-28

Family

ID=86073173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111249299.0A Pending CN116032998A (en) 2021-10-26 2021-10-26 Data transmission method, data transmission device, computer readable storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116032998A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117061607A (en) * 2023-10-11 2023-11-14 厦门海辰储能科技股份有限公司 Data communication method and device, energy storage system, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1511399A (en) * 2001-03-30 2004-07-07 ض� Method and apparatus to perform network routing
CN102244645A (en) * 2010-05-14 2011-11-16 北京快网科技有限公司 Reliable, transparent and general acceleration gateway system based on UDP protocol
CN103618678A (en) * 2013-11-18 2014-03-05 北京星网锐捷网络技术有限公司 Method, device and system for self-adaptation multiple-link aggregation
CN104539531A (en) * 2014-12-25 2015-04-22 网宿科技股份有限公司 Data transmission method and device
CN105847275A (en) * 2016-04-29 2016-08-10 掌赢信息科技(上海)有限公司 Data transmission channel creating method, system and server
CN106027599A (en) * 2016-04-29 2016-10-12 掌赢信息科技(上海)有限公司 Data transmission channel establishing method and system, and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1511399A (en) * 2001-03-30 2004-07-07 ض� Method and apparatus to perform network routing
CN102244645A (en) * 2010-05-14 2011-11-16 北京快网科技有限公司 Reliable, transparent and general acceleration gateway system based on UDP protocol
CN103618678A (en) * 2013-11-18 2014-03-05 北京星网锐捷网络技术有限公司 Method, device and system for self-adaptation multiple-link aggregation
CN104539531A (en) * 2014-12-25 2015-04-22 网宿科技股份有限公司 Data transmission method and device
CN105847275A (en) * 2016-04-29 2016-08-10 掌赢信息科技(上海)有限公司 Data transmission channel creating method, system and server
CN106027599A (en) * 2016-04-29 2016-10-12 掌赢信息科技(上海)有限公司 Data transmission channel establishing method and system, and server

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117061607A (en) * 2023-10-11 2023-11-14 厦门海辰储能科技股份有限公司 Data communication method and device, energy storage system, storage medium and electronic equipment
CN117061607B (en) * 2023-10-11 2024-02-06 厦门海辰储能科技股份有限公司 Data communication method and device, energy storage system, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US7913293B2 (en) Method and communication unit for communicating between communication apparatuses
US9344287B2 (en) Scalable transport system for multicast replication
CN102685204B (en) Method and equipment for transmitting data resource
CN104967502B (en) Data transmission method for uplink and device, data receiver method and device
TWI259674B (en) Method and apparatus for reducing transmission errors in a third generation cellular system
CN110995697A (en) Big data transmission method and system
CN107135216B (en) Method for enhancing streaming media transmission in weak network environment
CN104038845B (en) Message transmitting method and device
JP2007519371A (en) Method and apparatus for optimizing multicast content delivery using stochastic feedback
EP1806870A1 (en) Method for providing data and data transmission system
AU2004318925B2 (en) Data repair enhancements for multicast/broadcast data distribution
CN111181698B (en) Data processing method, device, equipment and medium
CN116032998A (en) Data transmission method, data transmission device, computer readable storage medium and electronic equipment
CN105227276A (en) A kind of peer-to-peer network data transmission method based on UDT
US20100306311A1 (en) Method of Downloading Large Size Data to a Large Number of Networked Client Machines from a Single Server
CN102025730B (en) Data transmission device based on HTTP protocol and implementation method thereof
JP2009212796A (en) Transmitter, data transfer system, data transfer method, and data transfer program
EP1694007B1 (en) Method and apparatus for transmitting data to a network and method and apparatus for receiving data from a network
CN112511573B (en) Transmission control method of UDP (user Datagram protocol) data packet
CN113612737A (en) Long message reliable transmission method based on grouping and retransmission mechanism
CN113489786A (en) Long connection network weak network reconnection method and retransmission method
JP2004187099A (en) Communication control method, communication system and communication equipment
CN112468513A (en) Terminal management communication protocol architecture of enterprise network
JPH11249978A (en) Method and device for transferring data
CN116896546B (en) Visual intercom method, system and storage medium based on SRT communication protocol

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