UDP (User Datagram Protocol) data packet processing method and device and electronic equipment

By adding the sending sequence number to the UDP data packet and comparing it, the problem of UDP data packet processing errors caused by the time synchronization between the sending end and the receiving end is solved, and the stability and reliability of UDP communication are improved.

CN119342122APending Publication Date: 2025-01-21BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411258742.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

When the prior art checks by adding a time stamp to the UDP data packet, the time out of synchronization between the sending and receiving ends is likely to cause operational errors in the application.

Method used

By adding the sending sequence number to the UDP data packet, the receiving end can compare the current sending sequence number with the maintained target historical sequence number in real time, and identify and process redundant data and invalid data.

Benefits of technology

Improve the stability and reliability of UDP communication, and ensure the stable operation of the application layer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342122A_ABST
    Figure CN119342122A_ABST
Patent Text Reader

Abstract

The invention provides a UDP (User Datagram Protocol) data packet processing method and device and electronic equipment, and relates to the technical field of information data processing. The method comprises the following steps: receiving a user datagram protocol UDP data packet sent by at least one sending end; for each sending end, acquiring a current sending sequence number of a current UDP data packet sent by the sending end in real time, and comparing the current sending sequence number with a target historical sequence number maintained for the sending end; when the current sending sequence number is larger than the target historical sequence number and the current sending sequence number is not the preset character, or when the current sending sequence number is smaller than the target historical sequence number and the difference value between the current sending sequence number and the target historical sequence number is larger than a preset value and the current sending sequence number is not the preset character, sending the current sending sequence number to the target historical sequence number; and maintaining the current sending sequence number as a new target historical sequence number of the sending end, and submitting the current UDP data packet to an upper layer calling end under the condition that the current UDP data packet is non-subpackaged data. According to the invention, the stability and reliability of UDP communication are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information data processing, and in particular to a UDP data packet processing method, device and electronic equipment. Background Art

[0002] UDP (User Datagram Protocol) is a connectionless communication protocol. UDP data includes destination port number information and source port number information. UDP has fast data transmission speed, simple operation, and requires fewer system resources. In addition, since communication does not require a connection, it can be broadcasted. UDP does not have the handshake, confirmation, window, retransmission, and congestion control mechanisms of TCP (Transmission Control Protocol), so it is very fast when transmitting data. However, its transmission is unreliable and unstable because UDP does not have the reliable mechanisms of TCP. When transmitting data, if the network quality is not good, it will easily lose packets, resulting in data loss.

[0003] To solve the above problem, a timestamp is generally used to check the data packets: that is, the sender adds a timestamp to each UDP data packet when sending it, and the receiver can determine whether it is an expired packet by checking the timestamp of the received UDP data packet. However, if the data between the sender and the receiver are not synchronized, all the data will be used or discarded, which will cause the application to run incorrectly. Summary of the invention

[0004] The present invention provides a UDP data packet processing method, device and electronic device, which are used to solve the problem that when the UDP data packet is checked by adding a timestamp in the prior art, the time asynchronism between the sending end and the receiving end easily leads to a running error of the application program, and the receiving end can check the received UDP data packet by adding a sending sequence number, and then can identify and process redundant data and invalid data, thereby improving the stability and reliability of UDP communication and ensuring the stable operation of the application layer.

[0005] The present invention provides a UDP data packet processing method, which is applied to a receiving end and comprises the following steps.

[0006] Receive a User Datagram Protocol (UDP) data packet sent by at least one sender; For each of the sending ends, the current sending sequence number of the current UDP data packet sent by the sending end is obtained in real time and the current sending sequence number is compared with the target historical sequence number maintained for the sending end; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is greater than a preset value, and the current sending sequence number is not a preset character, the current sending sequence number is maintained as the new target historical sequence number of the sending end, and when the current UDP data packet is non-packetized data, the current UDP data packet is submitted to the upper-layer calling end; Among them, the UDP data packet whose sending sequence number is a preset character is a sender restart data packet. For each sender, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0007] According to a UDP data packet processing method provided by the present invention, the method further includes: When the current sending sequence number is equal to the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is below the preset value, and the current sending sequence number is not a preset character, the current UDP data packet is discarded.

[0008] According to a UDP data packet processing method provided by the present invention, the method further includes: In the case that the current sending sequence number is a preset character, the current UDP data packet is discarded, and the current sending sequence number is maintained as the new target historical sequence number of the sending end.

[0009] According to a UDP data packet processing method provided by the present invention, the method further includes: When the current UDP data packet is packetized data, cache the current UDP data packet and assemble the current UDP data packet when the packet sequence number of the current UDP data packet is the same as the number of received packets; and when it is determined that the current UDP data packet is the last packetized data, submit the assembled UDP assembled data packet to the upper-layer calling end.

[0010] According to a UDP data packet processing method provided by the present invention, after receiving a UDP data packet sent by at least one sending end, the method further includes: For each of the UDP data packets, a unique identifier of the sender corresponding to the UDP data packet is identified, and when the UDP data packet is determined to be an illegal data packet based on a preset whitelist and the unique identifier, the UDP data packet is discarded.

[0011] According to a UDP data packet processing method provided by the present invention, after receiving a UDP data packet sent by at least one sending end, the method further includes: In the case where it is determined that the UDP data packet is a compressed data packet, the compressed data packet is decompressed based on a decompression method pre-agreed by a sending end corresponding to the UDP data packet.

[0012] According to a UDP data packet processing method provided by the present invention, the method further includes: The heartbeat packets sent by each of the sending ends are received in real time. For each of the sending ends, when it is determined that the heartbeat packets sent by the sending end have not been received within a preset period of time, an alarm message is submitted to the upper-layer calling end, wherein the alarm message includes a unique identifier of the sending end.

[0013] The present invention also provides a UDP data packet processing method, which is applied to a sending end and includes the following steps.

[0014] A UDP data packet is sent to at least one receiving end, wherein the UDP data packet carries a sending sequence number; wherein the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0015] According to a UDP data packet processing method provided by the present invention, the sending of a UDP data packet to at least one receiving end comprises: Determine a target UDP data packet to be sent, and if the target UDP data packet is larger than a preset byte threshold, perform packet processing on the target UDP data packet to obtain multiple UDP data packets; Based on the packet sub-order of the multiple UDP data packets, the multiple UDP data packets are sent to each of the receiving ends respectively, and each of the UDP data packets carries a packet sequence number determined based on the packet sub-order.

[0016] According to a UDP data packet processing method provided by the present invention, the sending of a UDP data packet to at least one receiving end comprises: Compressing the UDP data packet to obtain a compressed UDP data packet; The compressed UDP data packets are sent to each receiving end respectively.

[0017] According to a UDP data packet processing method provided by the present invention, the method further includes: Based on a preset time interval, a heartbeat packet is periodically sent to each of the receiving ends, and the heartbeat packet is used to indicate the fault status of the sending end.

[0018] The present invention also provides a UDP data packet processing device, which is applied to a receiving end, and the device includes the following modules: A receiving module, used for receiving a UDP data packet sent by at least one sending end; A processing module, for obtaining, in real time, a current sending sequence number of a current UDP data packet sent by each sending end, and comparing the current sending sequence number with a target historical sequence number maintained for the sending end; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is greater than a preset value, and the current sending sequence number is not a preset character, maintaining the current sending sequence number as the new target historical sequence number of the sending end, and when the current UDP data packet is non-packetized data, submitting the current UDP data packet to an upper-layer calling end; Among them, the UDP data packet whose sending sequence number is a preset character is a sender restart data packet. For each sender, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0019] The present invention also provides a UDP data packet processing device, which is applied to a sending end, and the device includes the following modules: A sending module is used to send a UDP data packet to at least one receiving end, wherein the UDP data packet carries a sending sequence number; wherein the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0020] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any of the above-mentioned UDP data packet processing methods is implemented.

[0021] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the UDP data packet processing method described in any one of the above is implemented.

[0022] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned UDP data packet processing methods.

[0023] The UDP data packet processing method, device and electronic device provided by the present invention number the UDP data packets during transmission, so that the receiving end can check the UDP data packet through the sending sequence number of the UDP data packet after receiving the UDP data packet, and determine whether the UDP data packet is a valid data packet that needs to be submitted to the upper-layer calling end by checking the sending sequence number. In the present invention, the sending sequence number of the UDP data packet is re-counted by the same sending end in each restart round, and the sending sequence number of the same UDP data packet sent by the same sending end in the same restart round is exactly the same, so the receiving end can accurately identify and process redundant UDP data packets and invalid UDP data packets by checking the sending sequence number of the UDP data packet, thereby ensuring the stability and reliability of UDP communication, and further providing a stable and reliable communication method for the application layer, ensuring the stable operation of the application layer. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0025] Figure 1 This is one of the flow charts of the UDP data packet processing method provided by the present invention.

[0026] Figure 2 This is the second flow chart of the UDP data packet processing method provided by the present invention.

[0027] Figure 3 This is the third flow chart of the UDP data packet processing method provided by the present invention.

[0028] Figure 4 This is the fourth flow chart of the UDP data packet processing method provided by the present invention.

[0029] Figure 5 This is one of the structural schematic diagrams of the UDP data packet processing device provided by the present invention.

[0030] Figure 6 This is the second structural schematic diagram of the UDP data packet processing device provided by the present invention.

[0031] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] Combine the following Figure 1-Figure 4 A UDP data packet processing method of the present invention is described.

[0034] Figure 1 It is one of the flow charts of the UDP data packet processing method provided by the present invention, such as Figure 1 As shown, the method is applied to a receiving end, and the method includes the following steps 101 to 102: Step 101: Receive a User Datagram Protocol (UDP) data packet sent by at least one sender.

[0035] Step 102: For each of the sending ends, obtain in real time the current sending sequence number of the current UDP data packet sent by the sending end and compare the current sending sequence number with the target historical sequence number maintained for the sending end; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is above a preset value, and the current sending sequence number is not a preset character, maintain the current sending sequence number as the new target historical sequence number of the sending end, and when the current UDP data packet is non-packetized data, submit the current UDP data packet to the upper-layer calling end.

[0036] Among them, the UDP data packet whose sending sequence number is a preset character is a sender restart data packet. For each sender, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0037] Specifically, the sender can send UDP data packets to one or more receivers. When sending UDP data packets to the receivers, the sender can send them through a single network or through multiple networks, for example, through two networks. Sending UDP data packets through multiple networks means sending the same UDP data packet to the receiver multiple times through multiple networks. This method can reduce packet loss caused by network failures and other problems.

[0038] When the sender sends a UDP data packet, it will carry a sending sequence number in the UDP data packet. The sender may restart. In each restart round, the sending sequence number of the UDP data packet is re-counted, that is, the sending sequence number of the UDP data packet is re-added and sent. For example, the sending sequence number of the first UDP data packet sent is "1", and the sending sequence number of the second UDP data packet sent is "2", and so on. In the same restart round, the sending sequence number of the same UDP data packet sent by the sender is the same. For example, if the sender sends the first UDP data packet to the receiver twice through two networks, the sequence numbers of the two first UDP data packets are both "1". Each time the sender restarts, it will send a sender restart data packet to the receiver to inform the receiver that the sender has restarted. The sending sequence number of the sender restart data packet can be a special preset character, such as "0". When the receiver identifies a UDP data packet with a sending sequence number of "0", it can determine that the UDP data packet is a sender restart data packet based on the sending sequence number. Other UDP data packets except the sender restart data packet may be sent by the sender after receiving the data sending instruction, and the data sending instruction may be sent by the upper-layer calling end to the sender. It is understandable that the receiving end may also receive UDP data packets sent by one or more senders, and the receiving end will maintain the sending sequence number of the UDP data packet sent by each sender. For example, for sender A, after receiving the first UDP data packet sent by sender A, the receiving end will use the sending sequence number "1" of the first UDP data packet as the target historical sequence number, and after receiving the second UDP data packet, the target historical sequence number will be updated, and the sending sequence number "2" of the second UDP data packet will be used as the new target historical sequence number. On this basis, after the receiving end receives a UDP data packet sent by at least one sending end, for each sending end, it will obtain the current sending sequence number of the current UDP data packet sent by the sending end in real time, and compare the current sending sequence number with the target historical sequence number maintained for the sending end. When the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is above the preset value, and the current sending sequence number is not a preset character, it indicates that the current UDP data packet received by the receiving end is a valid data packet, and the current UDP data packet needs to be submitted to the upper-level calling end. It can be understood that the current sending sequence number refers to the sequence number of the current latest UDP data packet sent by the sending end received by the receiving end; the target historical sequence number refers to the sequence number maintained for the sending end. For example, for the current UDP data packet received, if the previous UDP data packet received is a valid data packet, then the target historical sequence number is the sequence number of the previous UDP data packet.In some cases, the sender restart data packet sent by the sender may be lost and the receiving end may not receive it, but at this time the sender has been restarted, and the UDP data packets sent thereafter have begun to be recounted, that is, the sending sequence number has begun to be recounted from "1". Based on the above situation, when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is above the preset value, and the current sending sequence number is not a preset character, it means that the receiving end has not successfully received the sender restart data packet sent by the sender, but has successfully received the UDP data packet after the sender restart data packet. At this time, because the receiving end has not updated the target historical sequence number according to the preset character of the sender restart data packet, the sending sequence number of the UDP data packet received by the receiving end will be much smaller than the target historical sequence number, but the UDP data packet is still a valid data packet and needs to be submitted to the upper-level calling end. The above preset value can be pre-set, for example, it can be 100, 101 or 110, etc., and this application does not make specific limitations here.

[0039] In the case that the current UDP data packet is a valid data packet, the receiving end maintains the sending sequence number of the current UDP data packet as the new target historical sequence number corresponding to the sending end, and in the case that the current UDP data packet is not a sub-packet data, the current UDP data packet is directly submitted to the upper-layer calling end. It can be understood that in the case that the current UDP data packet is a sub-packet data packet, the receiving end needs to assemble all UDP data packets after receiving all UDP data packets belonging to the same original data packet as the current UDP data packet before submitting them to the upper-layer calling end.

[0040] The UDP data packet processing method provided by the present invention numbers the UDP data packets during transmission, so that the receiving end can check the UDP data packet through the sending sequence number of the UDP data packet after receiving the UDP data packet, and determine whether the UDP data packet is a valid data packet that needs to be submitted to the upper-layer calling end by checking the sending sequence number. In the present invention, the sending sequence number of the UDP data packet is re-counted by the same sending end in each restart round, and the sending sequence number of the same UDP data packet sent by the same sending end in the same restart round is exactly the same, so the receiving end can accurately identify and process redundant UDP data packets and invalid UDP data packets by checking the sending sequence number of the UDP data packet, thereby ensuring the stability and reliability of UDP communication, and further providing a stable and reliable communication method for the application layer, ensuring the stable operation of the application layer.

[0041] In one embodiment, the method further comprises: When the current sending sequence number is equal to the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is below the preset value, and the current sending sequence number is not a preset character, the current UDP data packet is discarded.

[0042] Specifically, Figure 2 This is a second flow chart of the UDP data packet processing method provided by the present invention, such as Figure 2 As shown in , when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is below the preset value, and the current sending sequence number is not a preset character, it means that the current UDP data packet is not a sender restart data packet and the current data packet is received with a delay. In this case, the current UDP data packet is an invalid data packet. When the current sending sequence number is equal to the target historical sequence number and is not a preset character, it means that the current UDP data packet is not a sender restart data packet and the current data packet is repeated with the data packet previously received by the receiving end. In this case, the current UDP data packet is a redundant data packet.

[0043] When the receiving end determines that the current UDP data packet received is an invalid data packet or a redundant data packet, the receiving end will directly discard the current UDP data packet.

[0044] In the above embodiment, the receiving end checks the sending sequence number of the current UDP data received, and can discard the current UDP data packet if it is an invalid data packet or a redundant data packet, thereby achieving the purpose of deduplication and removal of invalid data packets and ensuring the reliability of communication.

[0045] In one embodiment, the method further comprises: In the case that the current sending sequence number is a preset character, the current UDP data packet is discarded, and the current sending sequence number is maintained as the new target historical sequence number of the sending end.

[0046] Specifically, Figure 2 As shown in , when the receiving end determines that the current sending sequence number is a preset character, such as "0", it can determine that the current UDP data packet corresponding to the current sending sequence number is a sender restart data packet. In this case, the current UDP data packet does not need to be submitted to the upper-layer calling end, and the receiving end can discard the current UDP data packet.

[0047] Furthermore, when the receiving end determines that the current sending sequence number is a preset character, it means that the sending end has been restarted. At this time, the receiving end needs to re-maintain the target historical sequence number for the sending end, that is, it needs to maintain the current sending sequence number as the new target historical sequence number of the sending end.

[0048] In the above embodiment, the receiving end can confirm whether the sending end has been restarted by checking the current sending sequence number of the current UDP data packet, and then can update the target historical sequence number maintained for the sending end when the sending end is restarted.

[0049] In one embodiment, the method further comprises: When the current UDP data packet is packetized data, cache the current UDP data packet and assemble the current UDP data packet when the packet sequence number of the current UDP data packet is the same as the number of received packets; and when it is determined that the current UDP data packet is the last packetized data, submit the assembled UDP assembled data packet to the upper-layer calling end.

[0050] Specifically, in the case that the UDP data packet is subpacket data, the UDP data packet will carry not only the sending sequence number but also the subpacket sequence number. After receiving the current UDP data packet, the receiving end can determine whether the current UDP data packet is subpacket data based on whether it carries the subpacket sequence number. In the case that the current data packet is subpacket data, the receiving end needs to cache the current UDP data packet and judge the subpacket sequence number of the current UDP data packet. In the case that the subpacket sequence number is the same as the number of subpackets currently received by the receiving end, it indicates that the receiving end has successfully received all subpacket data before the current UDP data packet. At this time, the current UDP data packet needs to be assembled with the subpacket data received previously.

[0051] It is understandable that when the receiving end determines that the current UDP data packet is the last sub-packet data, after assembling the current UDP data packet with the previously received sub-packet data, it needs to submit the assembled UDP assembled data packet to the upper-layer calling end. When the receiving end determines that the current UDP data packet is not the last sub-packet data, it needs to continue to wait for receiving the remaining sub-packet data until all the sub-packet data are received and assembled, and then submit the assembled UDP assembled data packet to the upper-layer calling end.

[0052] Optionally, when the current UDP data packet is packetized data, the UDP data packet may also carry a cyclic redundancy check code CRC (Cyclic Redundancy Check). After receiving the current UDP data packet, the receiving end needs to perform a cyclic redundancy check on the current UDP data packet. If the check fails, it means that the data of the current UDP data packet is incorrect, and the current UDP data packet needs to be discarded.

[0053] In the above embodiment, by subpacketizing an oversized data packet, the oversized data packet can be sent separately and reassembled at the receiving end before being submitted to the upper-layer calling end, thereby solving the problem that the oversized data packet is difficult to send.

[0054] In one embodiment, after receiving a UDP data packet sent by at least one sender, the method further includes: For each of the UDP data packets, a unique identifier of the sender corresponding to the UDP data packet is identified, and when the UDP data packet is determined to be an illegal data packet based on a preset whitelist and the unique identifier, the UDP data packet is discarded.

[0055] Specifically, to prevent external attacks, the receiving end may also store a preset whitelist, on which the unique identifiers of the senders that allow the receiving end to receive data may be pre-entered. When each sender sends a UDP data packet, it may carry the unique identifier of the sender in the UDP data packet. After receiving the UDP data packet, the receiving end identifies the unique identifier of the sender corresponding to the UDP data packet to determine whether the unique identifier exists in the preset whitelist. If it does not exist, it means that the sender is not a sender allowed in the preset whitelist, and the UDP data packet is illegal data. At this time, the receiving end may directly discard the illegal UDP data packet.

[0056] In the above embodiment, by presetting the whitelist, the receiving end can accurately identify illegal data and thus prevent external attacks.

[0057] In one embodiment, after receiving a UDP data packet sent by at least one sender, the method further includes: In the case where it is determined that the UDP data packet is a compressed data packet, the compressed data packet is decompressed based on a decompression method pre-agreed by a sending end corresponding to the UDP data packet.

[0058] Specifically, after the receiving end receives a UDP data packet and determines that the UDP data packet is a compressed data packet, the receiving end needs to decompress the UDP data packet first. It can be understood that the decompression method used by the receiving end to decompress the UDP data packet can be a decompression method agreed upon in advance with the sending end.

[0059] In the above embodiment, the transmission bandwidth of the data packet transmission process can be reduced and the transmission efficiency can be improved by compressing the UDP data packet before sending it by the sending end and decompressing it after receiving it by the decompression end.

[0060] In one embodiment, the method further comprises: The heartbeat packets sent by each of the sending ends are received in real time. For each of the sending ends, when it is determined that the heartbeat packets sent by the sending end have not been received within a preset period of time, an alarm message is submitted to the upper-layer calling end, wherein the alarm message includes a unique identifier of the sending end.

[0061] Specifically, the sending end can periodically send heartbeat packets to the receiving end. Based on the heartbeat packets, the receiving end can determine whether the UDP connection with the sending end is normal. If the receiving end does not receive the heartbeat packet sent by the sender within a preset period of time, it means that the UDP connection with the sending end is abnormal. At this time, the receiving end can submit an alarm message to the upper-layer calling end. The alarm message may include the unique identifier of the sender to indicate that the UDP connection between the upper-layer calling end and the sending end is abnormal, and the sending end may be in a faulty state.

[0062] In the above embodiment, the receiving end can monitor the UDP connection with the sending end by the sending end sending heartbeat packets regularly, so as to promptly notify the upper layer calling end when an abnormality occurs in the UDP connection.

[0063] Figure 3 FIG. 3 is a flow chart of the UDP data packet processing method provided by the present invention. Figure 3 As shown, the method is applied to the sending end, and the method includes the following step 301: Step 301: Send a UDP data packet to at least one receiving end, wherein the UDP data packet carries a sending sequence number; wherein the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0064] Specifically, the sender can send UDP data packets to one or more receivers. When sending UDP data packets to the receivers, the sender can send them through a single network or through multiple networks, for example, through two networks. Sending UDP data packets through multiple networks means sending the same UDP data packet to the receiver multiple times through multiple networks. This method can reduce packet loss caused by network failures and other problems. When the sender needs to send the same UDP data packet to multiple receivers that are connected, it can send them sequentially to the multiple receivers.

[0065] When the sender sends a UDP data packet, it will carry a sending sequence number in the UDP data packet. The sender may restart. In each restart round, the sending sequence number of the UDP data packet is re-counted, that is, the sending sequence number of the UDP data packet is re-added and sent. For example, the sending sequence number of the first UDP data packet sent is "1", and the sending sequence number of the second UDP data packet sent is "2", and so on. In the same restart round, the sending sequence number of the same UDP data packet sent by the sender is the same. For example, if the sender sends the first UDP data packet to the receiver twice through two networks, the sequence numbers of the two first UDP data packets are both "1". Each time the sender restarts, it will send a sender restart data packet to the receiver to inform the receiver that the sender has restarted. The sending sequence number of the sender restart data packet can be a special preset character, such as "0". When the receiver identifies a UDP data packet with a sending sequence number of "0", it can determine that the UDP data packet is a sender restart data packet based on the sending sequence number. Other UDP data packets except the sender restart data packet may be sent by the sender after receiving a data sending instruction, and the data sending instruction may be sent by the upper layer calling end to the sender.

[0066] It can be understood that the receiving end can also receive UDP data packets sent by multiple senders. The receiving end will maintain the sending sequence number of the UDP data packet sent by each sender. Then, for each sender, redundant data and invalid data can be identified by checking the sending sequence number of the UDP data packet sent by the sender, thereby ensuring communication reliability and stability.

[0067] In one embodiment, sending a UDP data packet to at least one receiving end includes: Determine a target UDP data packet to be sent, and if the target UDP data packet is larger than a preset byte threshold, perform packet processing on the target UDP data packet to obtain multiple UDP data packets; Based on the packet sub-order of the multiple UDP data packets, the multiple UDP data packets are sent to each of the receiving ends respectively, and each of the UDP data packets carries a packet sequence number determined based on the packet sub-order.

[0068] Specifically, Figure 4 FIG. 4 is a flow chart of the UDP data packet processing method provided by the present invention. Figure 4 As shown, the sender determines the target UDP data packet to be sent. When the target UDP data packet is larger than the preset sub-section threshold, the sender will perform packet processing on the target UDP data packet and divide the target UDP data packet into multiple UDP data packets for separate transmission. When the sender sends multiple UDP data packets to the receiver, the multiple UDP data packets can be sent sequentially based on the packetization order.

[0069] When a UDP data packet is packetized data, the UDP data packet will carry not only the sending sequence number but also the packet sequence number. After receiving the UDP data packet, the receiving end can determine whether the UDP data packet is packetized data based on whether it carries the packet sequence number.

[0070] In the above embodiment, the sending end divides the oversized data packet into packets, so that the oversized data packet can be sent separately, thereby solving the problem that the oversized data packet is difficult to send.

[0071] In one embodiment, sending a UDP data packet to at least one receiving end includes: Compressing the UDP data packet to obtain a compressed UDP data packet; The compressed UDP data packets are sent to each receiving end respectively.

[0072] Specifically, Figure 4 As shown, before sending a UDP data packet, the sender can compress the UDP data packet and send the compressed UDP data packet to the receiver. After receiving the UDP data packet, and if the receiver determines that the UDP data packet is a compressed data packet, the receiver needs to decompress the UDP data packet first. It can be understood that the decompression method used by the receiver to decompress the UDP data packet can be a decompression method agreed in advance with the sender.

[0073] In the above embodiment, the transmission bandwidth of the data packet transmission process can be reduced and the transmission efficiency can be improved by compressing the UDP data packet before sending it by the sending end and decompressing it after receiving it by the decompression end.

[0074] The UDP data packet processing method provided by the present invention numbers the UDP data packets during transmission, so that the receiving end can check the UDP data packet through the sending sequence number of the UDP data packet after receiving the UDP data packet, and determine whether the UDP data packet is a valid data packet that needs to be submitted to the upper-layer calling end by checking the sending sequence number. In the present invention, the sending sequence number of the UDP data packet is re-counted by the same sending end in each restart round, and the sending sequence number of the same UDP data packet sent by the same sending end in the same restart round is exactly the same, so the receiving end can accurately identify and process redundant UDP data packets and invalid UDP data packets by checking the sending sequence number of the UDP data packet, thereby ensuring the stability and reliability of UDP communication, and further providing a stable and reliable communication method for the application layer, ensuring the stable operation of the application layer.

[0075] In one embodiment, the method further comprises: Based on a preset time interval, a heartbeat packet is periodically sent to each of the receiving ends, and the heartbeat packet is used to indicate the fault status of the sending end.

[0076] Specifically, the sending end can periodically send heartbeat packets to the receiving end. Based on the heartbeat packets, the receiving end can determine whether the UDP connection with the sending end is normal. If the receiving end does not receive the heartbeat packet sent by the sender within a preset period of time, it means that the UDP connection with the sending end is abnormal. At this time, the receiving end can submit an alarm message to the upper-layer calling end. The alarm message may include the unique identifier of the sender to indicate that the UDP connection between the upper-layer calling end and the sending end is abnormal, and the sending end may be in a faulty state.

[0077] In the above embodiment, the receiving end can monitor the UDP connection with the sending end by the sending end sending heartbeat packets regularly, so as to promptly notify the upper layer calling end when an abnormality occurs in the UDP connection.

[0078] The UDP data packet processing device provided by the present invention is described below. The UDP data packet processing device described below and the UDP data packet processing method described above can be referenced to each other.

[0079] Figure 5 It is one of the structural schematic diagrams of the UDP data packet processing device provided by the present invention, such as Figure 5 As shown, the device is applied to a receiving end, and the device includes a receiving module 501 and a processing module 502: The receiving module 501 is used to receive a UDP data packet sent by at least one sending end.

[0080] Processing module 502 is used to obtain, in real time, the current sending sequence number of the current UDP data packet sent by each sending end and compare the current sending sequence number with the target historical sequence number maintained for the sending end; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is above a preset value, and the current sending sequence number is not a preset character, maintain the current sending sequence number as the new target historical sequence number of the sending end, and when the current UDP data packet is non-packetized data, submit the current UDP data packet to the upper-layer calling end.

[0081] Among them, the UDP data packet whose sending sequence number is a preset character is a sender restart data packet. For each sender, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0082] The UDP data packet processing device provided by the present invention numbers the UDP data packets during transmission, so that the receiving end can check the UDP data packet through the sending sequence number of the UDP data packet after receiving the UDP data packet, and determine whether the UDP data packet is a valid data packet that needs to be submitted to the upper-layer calling end by checking the sending sequence number. In the present invention, the sending sequence number of the UDP data packet is re-counted by the same sending end in each restart round, and the sending sequence number of the same UDP data packet sent by the same sending end in the same restart round is exactly the same, so the receiving end can accurately identify and process redundant UDP data packets and invalid UDP data packets by checking the sending sequence number of the UDP data packet, thereby ensuring the stability and reliability of UDP communication, and further providing a stable and reliable communication method for the application layer, ensuring the stable operation of the application layer.

[0083] In one embodiment, the processing module 502 is further configured to: When the current sending sequence number is equal to the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is below the preset value, and the current sending sequence number is not a preset character, the current UDP data packet is discarded.

[0084] In one embodiment, the processing module 502 is further configured to: In the case that the current sending sequence number is a preset character, the current UDP data packet is discarded, and the current sending sequence number is maintained as the new target historical sequence number of the sending end.

[0085] In one embodiment, the device further comprises an assembly module, wherein the assembly module is specifically configured to: When the current UDP data packet is packetized data, cache the current UDP data packet and assemble the current UDP data packet when the packet sequence number of the current UDP data packet is the same as the number of received packets; and when it is determined that the current UDP data packet is the last packetized data, submit the assembled UDP assembled data packet to the upper-layer calling end.

[0086] In one embodiment, the device further includes an identification module, and after receiving the UDP data packet sent by at least one sender, the identification module is specifically used to: For each of the UDP data packets, a unique identifier of the sender corresponding to the UDP data packet is identified, and when the UDP data packet is determined to be an illegal data packet based on a preset whitelist and the unique identifier, the UDP data packet is discarded.

[0087] In one embodiment, the device further includes a decompression module, and after receiving the UDP data packet sent by at least one sender, the decompression module is specifically used to: In the case where it is determined that the UDP data packet is a compressed data packet, the compressed data packet is decompressed based on a decompression method pre-agreed by a sending end corresponding to the UDP data packet.

[0088] In one embodiment, the device further includes a heartbeat monitoring module, and the heartbeat monitoring module is specifically used to: The heartbeat packets sent by each of the sending ends are received in real time. For each of the sending ends, when it is determined that the heartbeat packets sent by the sending end have not been received within a preset period of time, an alarm message is submitted to the upper-layer calling end, wherein the alarm message includes a unique identifier of the sending end.

[0089] Figure 6 This is a second structural diagram of the UDP data packet processing device provided by the present invention, such as Figure 6 As shown, the device is applied to a sending end, and the device includes a sending module 601.

[0090] The sending module 601 is used to send a UDP data packet to at least one receiving end, and the UDP data packet carries a sending sequence number; wherein, the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0091] The UDP data packet processing device provided by the present invention numbers the UDP data packets during transmission, so that the receiving end can check the UDP data packet through the sending sequence number of the UDP data packet after receiving the UDP data packet, and determine whether the UDP data packet is a valid data packet that needs to be submitted to the upper-layer calling end by checking the sending sequence number. In the present invention, the sending sequence number of the UDP data packet is re-counted by the same sending end in each restart round, and the sending sequence number of the same UDP data packet sent by the same sending end in the same restart round is exactly the same, so the receiving end can accurately identify and process redundant UDP data packets and invalid UDP data packets by checking the sending sequence number of the UDP data packet, thereby ensuring the stability and reliability of UDP communication, and further providing a stable and reliable communication method for the application layer, ensuring the stable operation of the application layer.

[0092] In one embodiment, the sending module 601 is specifically used for: Determine a target UDP data packet to be sent, and if the target UDP data packet is larger than a preset byte threshold, perform packet processing on the target UDP data packet to obtain multiple UDP data packets; Based on the packet sub-order of the multiple UDP data packets, the multiple UDP data packets are sent to each of the receiving ends respectively, and each of the UDP data packets carries a packet sequence number determined based on the packet sub-order.

[0093] In one embodiment, the sending module 601 is specifically used for: Compressing the UDP data packet to obtain a compressed UDP data packet; The compressed UDP data packets are sent to each receiving end respectively.

[0094] In one embodiment, the sending module 601 is further used for: Based on a preset time interval, a heartbeat packet is periodically sent to each of the receiving ends, and the heartbeat packet is used to indicate the fault status of the sending end.

[0095] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor (processor) 710 , a communication interface (Communications Interface) 720 , a memory (memory) 730 and a communication bus 740 , wherein the processor 710 , the communication interface 720 , and the memory 730 communicate with each other through the communication bus 740 . The processor 710 can call the logic instructions in the memory 730 to execute the UDP data packet processing method, which includes: receiving a User Datagram Protocol UDP data packet sent by at least one sender; for each of the senders, obtaining in real time the current sending sequence number of the current UDP data packet sent by the sender and comparing the current sending sequence number with the target historical sequence number maintained for the sender; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is greater than a preset value, and the current sending sequence number is not a preset character, maintaining the current sending sequence number as the new target historical sequence number of the sender, and when the current UDP data packet is non-packetized data, submitting the current UDP data packet to the upper-layer calling end; wherein, the UDP data packet with a sending sequence number of a preset character is a sender restart data packet, and for each of the senders, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence numbers of the same UDP data packets are the same.

[0096] Alternatively, a UDP data packet is sent to at least one receiving end, wherein the UDP data packet carries a sending sequence number; wherein the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0097] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several 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 method described in 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, etc. Various media that can store program codes.

[0098] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the UDP data packet processing method provided by the above methods, the method comprising: receiving a User Datagram Protocol UDP data packet sent by at least one sending end; for each of the sending ends, obtaining in real time a current sending sequence number of a current UDP data packet sent by the sending end and comparing the current sending sequence number with a target historical sequence number maintained for the sending end; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not In the case of a preset character, or in the case that the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is above the preset value, and the current sending sequence number is not the preset character, the current sending sequence number is maintained as the new target historical sequence number of the sending end, and in the case that the current UDP data packet is non-packetized data, the current UDP data packet is submitted to the upper-layer calling end; wherein, the UDP data packet whose sending sequence number is the preset character is a sending end restart data packet, and for each of the sending ends, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence numbers of the same UDP data packets are the same.

[0099] Alternatively, a UDP data packet is sent to at least one receiving end, wherein the UDP data packet carries a sending sequence number; wherein the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0100] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the UDP data packet processing method provided by the above-mentioned methods, the method comprising: receiving a User Datagram Protocol UDP data packet sent by at least one sender; for each of the senders, obtaining in real time a current sending sequence number of a current UDP data packet sent by the sender and comparing the current sending sequence number with a target historical sequence number maintained for the sender; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or ... When the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is above a preset value, and when the current sending sequence number is not a preset character, the current sending sequence number is maintained as the new target historical sequence number of the sending end, and when the current UDP data packet is non-packetized data, the current UDP data packet is submitted to the upper-layer calling end; wherein, the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence numbers of the same UDP data packets are the same.

[0101] Alternatively, a UDP data packet is sent to at least one receiving end, wherein the UDP data packet carries a sending sequence number; wherein the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

[0102] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A UDP data packet processing method, characterized in that: Applied to the receiving end, the method includes: Receiving a User Datagram Protocol (UDP) data packet sent by at least one sender; For each of the sending ends, the current sending sequence number of the current UDP data packet sent by the sending end is obtained in real time and the current sending sequence number is compared with the target historical sequence number maintained for the sending end; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is greater than a preset value, and the current sending sequence number is not a preset character, the current sending sequence number is maintained as the new target historical sequence number of the sending end, and when the current UDP data packet is non-packetized data, the current UDP data packet is submitted to the upper-layer calling end; Among them, the UDP data packet whose sending sequence number is a preset character is a sender restart data packet. For each sender, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

2. The UDP data packet processing method according to claim 1, characterized in that: The method further comprises: When the current sending sequence number is equal to the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is below the preset value, and the current sending sequence number is not a preset character, the current UDP data packet is discarded.

3. The UDP data packet processing method according to claim 1, characterized in that: The method further comprises: In the case that the current sending sequence number is a preset character, the current UDP data packet is discarded, and the current sending sequence number is maintained as the new target historical sequence number of the sending end.

4. The UDP data packet processing method according to any one of claims 1 to 3, characterized in that: The method further comprises: When the current UDP data packet is packetized data, cache the current UDP data packet and assemble the current UDP data packet when the packet sequence number of the current UDP data packet is the same as the number of received packets; and when it is determined that the current UDP data packet is the last packetized data, submit the assembled UDP assembled data packet to the upper-layer calling end.

5. The UDP data packet processing method according to any one of claims 1 to 3, characterized in that: After receiving the UDP data packet sent by at least one sending end, the method further includes: For each of the UDP data packets, a unique identifier of the sender corresponding to the UDP data packet is identified, and when the UDP data packet is determined to be an illegal data packet based on a preset whitelist and the unique identifier, the UDP data packet is discarded.

6. The UDP data packet processing method according to any one of claims 1 to 3, characterized in that: After receiving the UDP data packet sent by at least one sending end, the method further includes: In the case where it is determined that the UDP data packet is a compressed data packet, the compressed data packet is decompressed based on a decompression method pre-agreed by a sending end corresponding to the UDP data packet.

7. The UDP data packet processing method according to any one of claims 1 to 3, characterized in that: The method further comprises: The heartbeat packets sent by each of the sending ends are received in real time. For each of the sending ends, when it is determined that the heartbeat packets sent by the sending end have not been received within a preset period of time, an alarm message is submitted to the upper-layer calling end, wherein the alarm message includes a unique identifier of the sending end.

8. A UDP data packet processing method, characterized in that: Applied to the sending end, the method includes: A UDP data packet is sent to at least one receiving end, wherein the UDP data packet carries a sending sequence number; wherein the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

9. The UDP data packet processing method according to claim 8, characterized in that: The sending of a UDP data packet to at least one receiving end comprises: Determine a target UDP data packet to be sent, and if the target UDP data packet is larger than a preset byte threshold, perform packet processing on the target UDP data packet to obtain multiple UDP data packets; Based on the packet sub-order of the multiple UDP data packets, the multiple UDP data packets are sent to each of the receiving ends respectively, and each of the UDP data packets carries a packet sequence number determined based on the packet sub-order.

10. The UDP data packet processing method according to claim 8, characterized in that: The sending of a UDP data packet to at least one receiving end comprises: Compressing the UDP data packet to obtain a compressed UDP data packet; The compressed UDP data packets are sent to each receiving end respectively.

11. The UDP data packet processing method according to any one of claims 8 to 10, characterized in that: The method further comprises: Based on a preset time interval, a heartbeat packet is periodically sent to each of the receiving ends, and the heartbeat packet is used to indicate the fault status of the sending end.

12. A UDP data packet processing device, characterized in that: Applied to a receiving end, the device comprises: A receiving module, used for receiving a UDP data packet sent by at least one sending end; A processing module, for obtaining, in real time, a current sending sequence number of a current UDP data packet sent by each sending end, and comparing the current sending sequence number with a target historical sequence number maintained for the sending end; when the current sending sequence number is greater than the target historical sequence number and the current sending sequence number is not a preset character, or when the current sending sequence number is less than the target historical sequence number and the difference between the current sending sequence number and the target historical sequence number is greater than a preset value, and the current sending sequence number is not a preset character, maintaining the current sending sequence number as the new target historical sequence number of the sending end, and when the current UDP data packet is non-packetized data, submitting the current UDP data packet to an upper-layer calling end; Among them, the UDP data packet whose sending sequence number is a preset character is a sender restart data packet. For each sender, the sending sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

13. A UDP data packet processing device, characterized in that: Applied to a transmitting end, the device comprises: A sending module is used to send a UDP data packet to at least one receiving end, wherein the UDP data packet carries a sending sequence number; wherein the UDP data packet whose sending sequence number is a preset character is a sending end restart data packet, and for each of the sending ends, the sequence number of the UDP data packet in each restart round is recounted and the sending sequence number of the same UDP data packet is the same.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the processor implements the UDP data packet processing method as described in any one of claims 1 to 7, or implements the UDP data packet processing method as described in any one of claims 8 to 11.

15. 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 the UDP data packet processing method as described in any one of claims 1 to 7, or implements the UDP data packet processing method as described in any one of claims 8 to 11.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the UDP data packet processing method as described in any one of claims 1 to 7, or implements the UDP data packet processing method as described in any one of claims 8 to 11.