Many-to-one data stream ordered transmission method and device based on UDP (User Datagram Protocol)

By receiving and splicing UDP data packets and sending them in the order of data transmission, the timing error problem caused by the disorder of existing UDP data transmission is solved, and the transmission quality and orderliness are improved.

CN119854385APending Publication Date: 2025-04-18HUNAN KYLIN XINAN TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411918598.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Due to disorder, the existing UDP data transmission is not of high transmission quality and prone to timing errors.

Method used

By receiving the data transmission rules sent by the second device, UDP data packets are received and spliced ​​according to the data transmission sequence, a new UDP data packet is generated, and sent to the next device or the second device in the data transmission sequence, so as to realize the orderly transmission of UDP data.

Benefits of technology

Improve the quality of UDP data transmission, prevent timing errors, ensure the orderliness of data transmission, and facilitate subsequent processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854385A_ABST
    Figure CN119854385A_ABST
Patent Text Reader

Abstract

The invention provides a UDP-based many-to-one data stream ordered transmission method and device, and the method comprises the steps: receiving a data transmission rule sent by a second device, the data transmission rule comprising a data transmission sequence of a plurality of first devices related to a data subscription service; receiving the UDP data packet according to the data transmission sequence, and generating a new UDP data packet in combination with the UDP data packet; wherein if the current first equipment is the first first equipment according to the data transmission sequence, a new UDP data packet is directly generated according to the UDP data of the current first equipment; otherwise, receiving the UDP data packet sent by the previous first equipment, splicing and combining the received UDP data packet and the UDP data of the first equipment, and generating a new UDP data packet; and sending the new UDP data packet to the next first device or the second device according to the data transmission sequence. Ordered transmission of UDP data can be realized, and the UDP data transmission quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of data transmission, and in particular, relates to a UDP-based many-to-one data stream orderly transmission method and device. Background Art

[0002] With the development of modern technology, the Internet brings people information in various forms, and data transmission plays an indispensable key factor. In some areas, such as multimedia news release, online live broadcast, online advertising, e-commerce, video on demand, distance education, telemedicine, online radio, real-time video conferencing and other Internet information services, it is not suitable to use the Transmission Control Protocol (TCP) for transmission. The TCP protocol contains a special data transmission verification mechanism. When the data receiver receives the data, it will automatically send a confirmation message to the sender. The sender will continue to transmit the data after receiving the confirmation message, otherwise it will remain in a waiting state. The User Datagram Protocol (UDP) protocol itself cannot do any verification. The TCP protocol focuses on transmission quality, while the UDP protocol focuses on transmission speed. The existing UDP data is transmitted in an unordered manner, the transmission quality is not high, and timing errors are prone to occur. Summary of the invention

[0003] The main purpose of the embodiments of the present invention is to provide a UDP-based many-to-one data stream orderly transmission method and device, which can realize the orderly transmission of UDP data and improve the UDP data transmission quality.

[0004] In a first aspect, a UDP-based many-to-one data stream ordered transmission method is provided, which is applied to a current first device, and the method includes: receiving a data transmission rule sent by a second device, the data transmission rule including a data transmission order of multiple first devices related to a data subscription service; receiving a UDP data packet according to the data transmission order, and generating a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission order, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, a UDP data packet sent by the previous first device is received, and the received UDP data packet and its own UDP data packet are spliced ​​and combined to generate a new UDP data packet; the new UDP data packet is sent to the next first device or the second device according to the data transmission order; wherein, if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device.

[0005] In a possible implementation, before receiving the data transmission rule sent by the second device, the method includes: self-starting the current first device and configuring a fixed port for receiving the UDP data packet.

[0006] In another possible implementation, the method further includes: modifying the port number of the fixed port; and self-starting the current first device according to the modified port number to update the configuration of the fixed port.

[0007] In another possible implementation, the UDP data packet includes: data type, sender IP, sending time, data buffer size and data buffer data, and the data transmission rules also include multiple IP addresses of the first devices. Before receiving the UDP data packet sent by the last first device, it includes: determining whether the sender IP in the UDP data packet is consistent with the IP address of the first device corresponding to the data transmission rules; if consistent, executing the step of receiving the UDP data packet sent by the last first device; otherwise, the UDP data packet is not received.

[0008] In the second aspect, a UDP-based many-to-one data stream ordered transmission method is provided, which is applied to a second device, and the method includes: generating a data transmission rule according to a data subscription service, the data transmission rule including a data transmission order of multiple first devices related to the data subscription service; sending the data transmission rule to multiple first devices; and receiving a UDP data packet sent by the last first device according to the data transmission order.

[0009] In another possible implementation, before generating the data transmission rule according to the data subscription service, the method includes: self-starting the second device and configuring a fixed port for receiving the UDP data packet.

[0010] In a third aspect, a UDP-based many-to-one data stream ordered transmission device is provided, which is applied to a first device, and the device includes: a rule acquisition unit, which is used to receive a data transmission rule sent by a second device, and the data transmission rule includes a data transmission order of multiple first devices related to a data subscription service; a data packet generation unit, which is used to receive a UDP data packet according to the data transmission order, and generate a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission order, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, a UDP data packet sent by the previous first device is received, and the received UDP data packet and its own UDP data are spliced ​​and combined to generate a new UDP data packet; a first sending unit, which is used to send the new UDP data packet to the next first device or the second device according to the data transmission order; wherein, if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device.

[0011] In a fourth aspect, a UDP-based many-to-one data stream ordered transmission device is provided, which is applied to a second device, and the device includes: a rule generation unit, used to generate a data transmission rule according to a data subscription service, and the data transmission rule includes a data transmission order of multiple first devices related to the data subscription service; a second sending unit, used to send the data transmission rule to multiple first devices; a data receiving unit, used to receive a UDP data packet sent by the last first device according to the data transmission order.

[0012] In a fifth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a many-to-one data stream ordered transmission method based on UDP is implemented as provided in the first aspect.

[0013] In a sixth aspect, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, a UDP-based many-to-one data stream ordered transmission method is implemented as provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0015] Figure 1 A structural diagram of a UDP-based many-to-one data stream ordered transmission system provided by one embodiment of the present invention;

[0016] Figure 2 A flowchart of a UDP-based many-to-one data stream orderly transmission method provided by one embodiment of the present invention;

[0017] Figure 3 A flowchart of another UDP-based many-to-one data stream orderly transmission method provided by one embodiment of the present invention;

[0018] Figure 4 A structural diagram of a UDP-based many-to-one data stream orderly transmission device provided by one embodiment of the present invention;

[0019] Figure 5 A structural diagram of another UDP-based many-to-one data stream orderly transmission device provided by an embodiment of the present invention;

[0020] Figure 6 A schematic diagram of the physical structure of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0021] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar modules or modules with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0022] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, modules and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, modules, components and / or groups thereof. It should be understood that when we refer to a module as being "connected" or "coupled" to another module, it may be directly connected or coupled to the other modules, or there may be intermediate modules. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any modules and all combinations of one or more associated listed items.

[0023] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation method of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0024] The technical solution of the present application and how to solve the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0025] An embodiment of the present invention provides a UDP-based many-to-one data stream orderly transmission system, which is suitable for UDP communication, such as multimedia news release, online live broadcast, online advertising, e-commerce, video on demand, distance education, telemedicine, online radio, real-time video conferencing, etc. Figure 1 The UDP-based many-to-one data stream orderly transmission system includes: n first devices and one second device. The first device is a client device, and the second device is a server device. The first device and the second device can be computers, tablet computers, terminals or handheld devices according to actual needs.

[0026] When using the UDP protocol for many-to-one communication, the UDP server will sort the IPs that need to be subscribed, and send the data transmission rule information in order to the specified client, that is, UDP client IP No. 1 is sent to UDP client IP No. 2, sent to UDP client IP No. 3 - until it is sent to UDP client IP No. n. This purpose is to tell the client that it needs to send data to the server of another client. Before each client receives data, it will determine whether the data type is the IP address in the rule file. If not, it will not be processed. When the data of the first UDP client is sent to the second UDP client, the second UDP client will splice the data packet of the second UDP client after receiving the data of the first UDP client, and send it to the next UDP client together, until the last UDP client sends its spliced ​​data to the UDP server.

[0027] The second device generates a data transmission rule according to the data subscription service and sends it to multiple first devices. The data transmission rule includes the data transmission order of multiple first devices related to the data subscription service. Each first device receives a UDP data packet according to the data transmission order, and generates a new UDP data packet in combination with its own UDP data packet. Among them, if the current first device is the first first device according to the data transmission order, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, the UDP data packet sent by the previous first device is received, and the received UDP data packet and its own UDP data are spliced ​​and combined to generate a new UDP data packet. Then the new UDP data packet is sent to the next first device or the second device according to the data transmission order. Among them, if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device.

[0028] For the aforementioned n first devices and one second device, according to the data transmission order, the first first device directly generates a new UDP data packet based on its own UDP data, and sends it to the second first device. The second first device generates a new UDP data packet based on the received UDP data packet sent by the first first device and its own UDP data. The second first device sends the generated new UDP data packet to the third first device. And so on, until the nth first device receives the UDP data packet sent by the n-1th first device. Then the nth first device splices the received UDP data packet with its own UDP data to generate a new UDP data packet, and sends the new UDP data packet to the second device, completing many-to-one UDP data transmission. In this way, the orderly transmission of UDP data can be achieved, the quality of UDP data transmission can be improved, and timing errors can be prevented during UDP data transmission, which is beneficial to subsequent UDP data processing.

[0029] like Figure 2 FIG. 1 is a flow chart of a UDP-based many-to-one data stream orderly transmission method provided by an embodiment of the present invention, which is applied to a first device. The method includes:

[0030] Step S11: receiving a data transmission rule sent by a second device, where the data transmission rule includes a data transmission sequence of a plurality of first devices related to a data subscription service.

[0031] UDP data packets include: data type (1 byte unsigned char), sender IP (4 bytes unsigned int), send time (8 bytes unsigned long), data buffer size (4 bytes unsinged int) and data buffer data (usually 1316 bytes).

[0032] Before step S11, the current first device is automatically started and a fixed port for receiving UDP data packets is configured. When the fixed port needs to be changed, the port number of the fixed port is modified; the current first device is automatically started according to the modified port number, and the fixed port is updated.

[0033] Step S12, receiving a UDP data packet according to a data transmission sequence, and generating a new UDP data packet by combining the UDP data packet itself.

[0034] If the current first device is the first first device according to the data transmission order, a new UDP data packet is directly generated based on its own UDP data; otherwise, the UDP data packet sent by the previous first device is received, and the received UDP data packet and its own UDP data are spliced ​​and combined to generate a new UDP data packet. It should be noted that each first device receives UDP data packets through a configured fixed port. The sending port used to send UDP data packets is random.

[0035] The data transmission rule also includes the IP addresses of multiple first devices. Before step S12, it is determined whether the sender IP in the UDP data packet is consistent with the IP address of the first device corresponding to the data transmission rule. If they are consistent, the step of receiving the UDP data packet sent by the last first device is performed; otherwise, the UDP data packet is not received.

[0036] Step S13: Send the new UDP data packet to the next first device or second device according to the data transmission sequence.

[0037] If the current first device is the last first device according to the data transmission sequence, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device. In this way, many-to-one UDP data transmission is completed, and disordered UDP data communication is converted into ordered UDP data communication, which can solve the problems of timing disorder caused by disordered transmission of UDP data communication in the prior art, disorder when using data, and network congestion, realize the orderly transmission of UDP data packets, effectively improve the quality of UDP data transmission, and facilitate the use and processing of subsequent UDP data packets.

[0038] The embodiment of the present invention receives a data transmission rule sent by a second device, where the data transmission rule includes a data transmission order of multiple first devices related to a data subscription service; receives a UDP data packet according to the data transmission order, and generates a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission order, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, a UDP data packet sent by the previous first device is received, the received UDP data packet and its own UDP data are spliced ​​and combined to generate a new UDP data packet; the new UDP data packet is sent to the next first device or the second device according to the data transmission order; wherein, if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device, thereby achieving orderly transmission of UDP data and improving the quality of UDP data transmission.

[0039] like Figure 3 FIG. 1 is a flow chart of a UDP-based many-to-one data stream orderly transmission method provided by an embodiment of the present invention, which is applied to a second device. The method includes:

[0040] Step S21: Generate a data transmission rule according to the data subscription service, where the data transmission rule includes a data transmission sequence of a plurality of first devices related to the data subscription service.

[0041] The data transmission rule is generated based on the data subscription service, including the data transmission order of multiple first devices related to the data subscription service. The data transmission rule includes the IP addresses of the multiple first devices, and the data transmission order can be represented by the sorting order of the IP addresses of the multiple first devices. Of course, it can also be represented in other ways, such as IP address combination equivalence, which is not specifically limited here.

[0042] Before step S21, the second device is automatically started and a fixed port for receiving UDP data packets is configured. When the fixed port needs to be changed, the port number of the fixed port is modified; the second device is automatically started according to the modified port number to update the configuration of the fixed port.

[0043] Step S22: sending the data transmission rule to multiple first devices.

[0044] The second device applies a random sending port to send the U data transmission rule to each first device.

[0045] Step S23: receiving the last UDP data packet sent by the first device according to the data transmission sequence.

[0046] The second device receives UDP data packets through the configured fixed port. The second device receives the UDP data packet sent by the last first device in the data transmission sequence. The UDP data packet received in this way includes all the UDP data packets that the multiple first devices need to send to the second device, and because the UDP data packets of each first device are transmitted in order according to the data transmission sequence, the subsequent second device can conveniently and orderly use and process the received UDP data.

[0047] The embodiment of the present invention generates a data transmission rule according to a data subscription service, wherein the data transmission rule includes a data transmission sequence of multiple first devices related to the data subscription service; sends the data transmission rule to multiple first devices; and receives a UDP data packet sent by the last first device according to the data transmission sequence, thereby realizing orderly transmission of UDP data, improving the quality of UDP data transmission, and facilitating the use and processing of received UDP data.

[0048] like Figure 4 The structure diagram of a UDP-based multi-to-one data stream orderly transmission device provided by an embodiment of the present invention is shown, and is applied to a first device. The device includes:

[0049] An initialization unit 401 is used as a rule acquisition unit, which is used to receive a data transmission rule sent by a second device, where the data transmission rule includes a data transmission sequence of multiple first devices related to a data subscription service;

[0050] The data packet generation unit 402 is used to receive a UDP data packet according to a data transmission sequence, and generate a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission sequence, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, a UDP data packet sent by the last first device is received, and the received UDP data packet and its own UDP data packet are spliced ​​and combined to generate a new UDP data packet;

[0051] The first sending unit 403 is used to send a new UDP data packet to the next first device or the second device according to the data transmission order; if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device.

[0052] The device of the above embodiment is applied to the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0053] like Figure 5The structure diagram of a UDP-based multi-to-one data stream orderly transmission device provided by an embodiment of the present invention is shown, and is applied to a second device. The device includes:

[0054] A rule generating unit 501 is configured to generate a data transmission rule according to a data subscription service, wherein the data transmission rule includes a data transmission sequence of a plurality of first devices related to the data subscription service;

[0055] A second sending unit 502, configured to send the data transmission rule to multiple first devices;

[0056] The data receiving unit 503 is used to receive the last UDP data packet sent by the first device according to the data transmission sequence.

[0057] The device of the above embodiment is applied to the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0058] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor (processor) 601, a communication interface (Communications Interface) 602, a memory (memory) 603 and a communication bus 604, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute a UDP-based many-to-one data stream orderly transmission method.

[0059] The method includes: receiving a data transmission rule sent by a second device, the data transmission rule including a data transmission order of multiple first devices related to a data subscription service; receiving a UDP data packet according to the data transmission order, and generating a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission order, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, a UDP data packet sent by a previous first device is received, the received UDP data packet and its own UDP data packet are spliced ​​and combined to generate a new UDP data packet; the new UDP data packet is sent to the next first device or the second device according to the data transmission order; wherein, if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device.

[0060] Alternatively, the method includes: generating a data transmission rule according to a data subscription service, the data transmission rule including a data transmission sequence of multiple first devices related to the data subscription service; sending the data transmission rule to multiple first devices; and receiving a UDP data packet sent by the last first device according to the data transmission sequence.

[0061] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the 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 to enable 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 methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0062] On the other hand, an embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a UDP-based many-to-one data stream ordered transmission method provided by the above-mentioned method embodiments.

[0063] The method includes: receiving a data transmission rule sent by a second device, the data transmission rule including a data transmission order of multiple first devices related to a data subscription service; receiving a UDP data packet according to the data transmission order, and generating a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission order, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, a UDP data packet sent by a previous first device is received, the received UDP data packet and its own UDP data packet are spliced ​​and combined to generate a new UDP data packet; the new UDP data packet is sent to the next first device or the second device according to the data transmission order; wherein, if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device.

[0064] Alternatively, the method includes: generating a data transmission rule according to a data subscription service, the data transmission rule including a data transmission sequence of multiple first devices related to the data subscription service; sending the data transmission rule to multiple first devices; and receiving a UDP data packet sent by the last first device according to the data transmission sequence.

[0065] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute a UDP-based many-to-one data stream ordered transmission method provided in the above embodiments.

[0066] The method includes: receiving a data transmission rule sent by a second device, the data transmission rule including a data transmission order of multiple first devices related to a data subscription service; receiving a UDP data packet according to the data transmission order, and generating a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission order, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, a UDP data packet sent by a previous first device is received, the received UDP data packet and its own UDP data packet are spliced ​​and combined to generate a new UDP data packet; the new UDP data packet is sent to the next first device or the second device according to the data transmission order; wherein, if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device.

[0067] Alternatively, the method includes: generating a data transmission rule according to a data subscription service, the data transmission rule including a data transmission sequence of multiple first devices related to the data subscription service; sending the data transmission rule to multiple first devices; and receiving a UDP data packet sent by the last first device according to the data transmission sequence.

[0068] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0069] The above is only a partial implementation 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 principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A UDP-based many-to-one data stream orderly transmission method, characterized in that: Applied to the current first device, the method includes: receiving a data transmission rule sent by a second device, wherein the data transmission rule includes a data transmission sequence of a plurality of first devices related to a data subscription service; Receive a UDP data packet according to the data transmission sequence, and generate a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission sequence, directly generate a new UDP data packet based on its own UDP data packet; otherwise, receive a UDP data packet sent by the last first device, splice and combine the received UDP data packet and its own UDP data packet to generate a new UDP data packet; Send the new UDP data packet to the next first device or the second device according to the data transmission order; if the current first device is the last first device according to the data transmission order, send the new UDP data packet to the second device; otherwise, send the new UDP data packet to the next first device that is located after and adjacent to the current first device.

2. The method according to claim 1, characterized in that Before receiving the data transmission rule sent by the second device, the method includes: The current first device is self-started and a fixed port for receiving the UDP data packet is configured.

3. The method according to claim 2, characterized in that The method further comprises: Modify the port number of the fixed port; The current first device is automatically started according to the modified port number, and the fixed port is updated and configured.

4. The method according to claim 1, characterized in that The UDP data packet includes: data type, sender IP, sending time, data buffer size and data buffer data, the data transmission rule also includes multiple IP addresses of the first devices, and before receiving the UDP data packet sent by the last first device, it includes: Determine whether the sender IP in the UDP data packet is consistent with the IP address of the first device corresponding to the data transmission rule; If they are consistent, then executing the step of receiving the UDP data packet sent by the last first device; Otherwise, the UDP data packet is not received.

5. A UDP-based many-to-one data stream orderly transmission method, characterized in that: Applied to the second device, the method includes: generating a data transmission rule according to the data subscription service, wherein the data transmission rule includes a data transmission sequence of a plurality of first devices related to the data subscription service; sending the data transmission rule to a plurality of the first devices; Receive the last UDP data packet sent by the first device according to the data transmission sequence.

6. The method according to claim 5, characterized in that Before generating the data transmission rule according to the data subscription service, the method includes: The second device is self-started and configured with a fixed port for receiving the UDP data packet.

7. A UDP-based many-to-one data stream orderly transmission device, characterized in that: Applied to the current first device, the apparatus includes: a rule acquisition unit, configured to receive a data transmission rule sent by a second device, wherein the data transmission rule includes a data transmission sequence of a plurality of first devices related to a data subscription service; A data packet generating unit, configured to receive a UDP data packet according to the data transmission sequence, and generate a new UDP data packet in combination with its own UDP data packet; wherein, if the current first device is the first first device according to the data transmission sequence, a new UDP data packet is directly generated according to its own UDP data packet; otherwise, a UDP data packet sent by the last first device is received, and the received UDP data packet and its own UDP data packet are spliced ​​and combined to generate a new UDP data packet; A first sending unit is used to send the new UDP data packet to the next first device or the second device according to the data transmission order; wherein, if the current first device is the last first device according to the data transmission order, the new UDP data packet is sent to the second device; otherwise, the new UDP data packet is sent to the next first device that is located after and adjacent to the current first device.

8. A UDP-based many-to-one data stream orderly transmission device, characterized in that: Applied to a second device, the apparatus comprises: a rule generating unit, configured to generate a data transmission rule according to a data subscription service, wherein the data transmission rule includes a data transmission sequence of a plurality of first devices related to the data subscription service; A second sending unit, configured to send the data transmission rule to a plurality of the first devices; A data receiving unit is used to receive the last UDP data packet sent by the first device according to the data transmission sequence.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, a many-to-one data stream ordered transmission method based on UDP is implemented as described in any one of claims 1-6.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements a UDP-based many-to-one data stream ordered transmission method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Data transmission method, device, instant messaging method and system

    CN103546368A

  • Data transmission method and device based on UDP GSO

    CN114615348A

  • Data transmission and storage method and device and computer equipment

    CN115361455A

  • Data transmission method and device, equipment and storage medium

    CN115914426A

  • Packet order control method in streaming distribution, streaming distribution system, and packet order control program

    JP2004282666A