Data packet transmission method and system, electronic equipment and storage medium

By determining and scheduling the target priority of packets in MQTT over QUIC connection, the problem of low-priority packet retransmission blocking high-priority packet transmission is solved, and the data transmission efficiency of IoT systems in unstable network environments is improved, and the user experience is improved.

CN119892745AActive Publication Date: 2025-04-25HANGZHOU YINGYUN TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510370937.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-04-25
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

In the case of network instability, the retransmission of low-priority packets may block the transmission of high-priority packets, resulting in delays and loss of high-priority data, affecting the user experience.

Method used

By establishing an MQTT over QUIC connection, obtain the packet to be sent and its initial priority, determine whether the packet is a retransmission packet, and determine the target priority of the packet based on the initial priority and preset priority rules. Finally, the packet is transmitted through the MQTT over QUIC connection based on the target priority.

Benefits of technology

It effectively reduces the blockage of high-priority packet transmission by low-priority packets, improves the data transmission efficiency of IoT systems in unstable network environments, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892745A_ABST
    Figure CN119892745A_ABST
Patent Text Reader

Abstract

The invention relates to a data packet transmission method, and the method comprises the steps: building MQTT over QUIC connection, obtaining a to-be-transmitted data packet and an initial priority of the data packet, the initial priority comprising at least two priority levels, judging whether the data packet is a retransmission data packet, if yes, transmitting the retransmission data packet, and if not, sending the retransmission data packet to the MQTT over QUIC connection to the MQTT over QUIC connection to the MQTT over QUIC connection. The target priority of the data packets is determined according to the judgment result, the initial priority and a preset priority rule, and the preset priority rule comprises that the target priority corresponding to the data packet with the higher initial priority is higher, and under the condition that the initial priorities are the same, the target priority of the retransmitted data packet is higher than the target priority of the initially transmitted data packet, and the target priority of the retransmitted data packet is higher than the target priority of the initially transmitted data packet. And based on the target priority, the data packet is transmitted through the MQTT over QUIC connection. Through the data transmission method and device, the problem of low data packet transmission efficiency is solved, the priority of the MQTT over QUIC data packets is reasonably adjusted, the blockage of the low-priority data packets to the transmission of the high-priority data packets is reduced, and the data transmission efficiency in an unstable network environment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data transmission, and in particular to a data packet transmission method, system, electronic device and storage medium. Background Art

[0002] MQTT (Message Queuing Telemetry Transport) is a lightweight message transmission protocol that is widely used for communication between IoT devices. MQTT supports multiple data streams with different priorities, which makes it flexible in processing real-time and non-real-time data.

[0003] However, in practical applications, especially when the network is unstable, the retransmission of low-priority data packets may block the transmission of high-priority data packets, resulting in delay and loss of high-priority data, affecting user experience.

[0004] Currently, no effective solution has been proposed for the problem of low data packet transmission efficiency in related technologies. Summary of the invention

[0005] The embodiments of the present application provide a data packet transmission method, system, electronic device and storage medium to at least solve the problem of low data packet transmission efficiency in the related art.

[0006] In a first aspect, an embodiment of the present application provides a method for transmitting a data packet, the method comprising: Establishing an MQTT over QUIC connection, obtaining a data packet to be sent and an initial priority of the data packet, wherein the initial priority includes at least two priority levels; Determine whether the data packet is a retransmission data packet, and determine the target priority of the data packet according to the determination result, the initial priority and a preset priority rule, wherein the preset priority rule includes: a data packet with a higher initial priority has a higher corresponding target priority, and when the initial priorities are the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet; Based on the target priority, the data packet is transmitted via the MQTT over QUIC connection.

[0007] In some embodiments, the initial priority includes QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, and QoS=2 is the highest priority; determining the target priority of the data packet according to the judgment result, the initial priority and the preset priority rule includes: When QoS=0, the target priority of the corresponding initial transmission data packet is set to 0, and the target priority of the corresponding retransmission data packet is set to 1; When QoS=1, the target priority of the corresponding initial transmission data packet is set to 2, and the target priority of the corresponding retransmission data packet is set to 3; When QoS=2, the target priority of the corresponding initial transmission data packet is set to 4, and the target priority of the corresponding retransmission data packet is set to 5, where 0 is the lowest priority and 5 is the highest priority.

[0008] In some embodiments, the initial priority includes QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, QoS=2 is the highest priority, and the data packet of QoS=0 has no retransmission setting; determining the target priority of the data packet according to the judgment result, the initial priority and the preset priority rule includes: When QoS=0, the target priority of the corresponding initial transmission data packet is set to 0; When QoS=1, the target priority of the corresponding initial transmission data packet is set to 1, and the target priority of the corresponding retransmission data packet is set to 2; When QoS=2, the target priority of the corresponding initially transmitted data packet is set to 3, and the target priority of the corresponding retransmitted data packet is set to 4, where 0 is the lowest priority and 4 is the highest priority.

[0009] In some embodiments, transmitting the data packet based on the target priority through the MQTT over QUIC connection includes: During the transmission of the data packets, a priority scheduling mechanism is established to give priority to processing the data packet transmission requests with high target priorities when the network is unstable.

[0010] In some embodiments, transmitting the data packet based on the target priority through the MQTT over QUIC connection includes: Allocating a corresponding transport stream to the data packet; Based on the target priority of the data packets on each transmission stream, corresponding bandwidth resources are allocated to each transmission stream for data transmission.

[0011] In some embodiments, the method further comprises: After the data packet is successfully transmitted, it is determined whether to send a confirmation message to the client according to the initial priority and a preset confirmation mechanism.

[0012] In a second aspect, an embodiment of the present application provides a data packet transmission system, the system comprising: An acquisition module, used to establish an MQTT over QUIC connection, obtain a data packet to be sent and an initial priority of the data packet, wherein the initial priority includes at least two priority levels; An analysis module is used to determine whether the data packet is a retransmission data packet, and determine the target priority of the data packet according to the determination result, the initial priority and a preset priority rule, wherein the preset priority rule includes: a data packet with a higher initial priority has a higher corresponding target priority, and when the initial priorities are the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet; A transmission module is used to transmit the data packet through an MQTT over QUIC connection based on the target priority.

[0013] In some embodiments, the initial priority includes QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, and QoS=2 is the highest priority; the analysis module includes: A first priority setting module, used for setting the target priority of the corresponding initial transmission data packet to 0 and the target priority of the corresponding retransmission data packet to 1 when QoS=0; The second priority setting module is used to set the target priority of the corresponding initial transmission data packet to 2 and the target priority of the corresponding retransmission data packet to 3 when QoS=1; The third priority setting module is used to set the target priority of the corresponding initial transmission data packet to 4 and the target priority of the corresponding retransmission data packet to 5 when QoS=2, wherein 0 is the lowest priority and 5 is the highest priority.

[0014] In a third aspect, an embodiment of the present application provides a computer 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 method for transmitting data packets as described in the first aspect above is implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data packet transmission method as described in the first aspect above.

[0016] Compared with the related art, the data packet transmission method provided in the embodiment of the present application establishes an MQTT over QUIC connection, obtains the data packet to be sent and the initial priority of the data packet, the initial priority includes at least two priority levels, determines whether the data packet is a retransmission data packet, and determines the target priority of the data packet based on the judgment result, the initial priority and the preset priority rule. The preset priority rule includes: the higher the initial priority, the higher the corresponding target priority of the data packet. When the initial priority is the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet. Based on the target priority, the data packet is transmitted through the MQTT over QUIC connection, solving the problem of low data packet transmission efficiency. By reasonably dividing and scheduling the priorities of MQTT over QUIC data packets, the blocking of low-priority data packets on the transmission of high-priority data packets is effectively reduced, the data transmission efficiency of the Internet of Things system in an unstable network environment is improved, and the user experience is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 is a flow chart of a data packet transmission method according to an embodiment of the present application; Figure 2 is a structural block diagram of a data packet transmission system according to an embodiment of the present application; Figure 3 It is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0019] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.

[0020] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0021] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantity limitation, and may indicate the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0022] This embodiment provides a data packet transmission method. Figure 1 is a flow chart of a data packet transmission method according to an embodiment of the present application, such as Figure 1 As shown, the process includes the following steps: Step S201, establish an MQTT over QUIC connection, obtain a data packet to be sent and an initial priority of the data packet, where the initial priority includes at least two priority levels.

[0023] MQTT is a lightweight, publish / subscribe-based messaging protocol that is widely used in the Internet of Things (IoT) environment. In modern network environments, MQTT usually selects different transport layer protocols to ensure efficient and reliable communication. QUIC (Quick UDP Internet Connections) is a new transport layer protocol based on UDP that aims to reduce latency and improve the performance of Internet connections.

[0024] This application uses MQTT over QUIC for data transmission, and optimizes the MQTT protocol through the QUIC transmission protocol to improve performance. The QUIC protocol itself has built-in flow control and congestion control mechanisms, which can reduce the impact of packet loss and congestion, thereby providing a more stable connection. In the case of unstable network, it can better maintain the reliability of connection and message delivery and reduce message loss.

[0025] In addition, compared with the TCP connection establishment of traditional MQTT, QUIC only needs one round trip (1-RTT) to establish a connection, reducing communication delays. At the same time, QUIC combines mechanisms such as stream multiplexing and forward error correction to optimize the utilization of network resources and can more efficiently transmit a large number of data packets with small data volumes.

[0026] Step S202, determine whether the data packet is a retransmission data packet, and determine the target priority of the data packet based on the judgment result, the initial priority and the preset priority rules. The preset priority rules include: the higher the initial priority of the data packet, the higher the corresponding target priority. When the initial priority is the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet.

[0027] The initially transmitted data packet is a data packet that is initially transmitted, and the retransmitted data packet is a data packet that is retransmitted.

[0028] The original QUIC transport layer always considers that the priority of the retransmitted data packet is higher than the priority of the first transmission data, which will cause the high priority data stream to be blocked by the retransmitted packets of the low priority data stream. This embodiment redefines the priority of the first transmission data packet and the retransmitted data packet, that is, regardless of whether it is a retransmitted data packet or an first transmission data packet, the higher the initial priority, the higher the corresponding target priority. Only when the initial priorities are the same, the target priority of the retransmitted data packet is higher than the target priority of the first transmission data packet.

[0029] In some embodiments, the initial priority includes QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, and QoS=2 is the highest priority; step S202 specifically includes: Step S301, when QoS=0, the target priority of the corresponding initially transmitted data packet is set to 0, and the target priority of the corresponding retransmitted data packet is set to 1.

[0030] Step S302, when QoS=1, the target priority of the corresponding initially transmitted data packet is set to 2, and the target priority of the corresponding retransmitted data packet is set to 3.

[0031] Step S303, when QoS=2, the target priority of the corresponding initially transmitted data packet is set to 4, and the target priority of the corresponding retransmitted data packet is set to 5, wherein 0 is the lowest priority and 5 is the highest priority.

[0032] In the original data transmission mode of MQTT, the data packet priority is divided into QoS 0-2, corresponding to the priority of each stream. In the original transmission mode, the MQTT stream of QoS 0-2 is mapped to priority 0-2 at the transport layer, where 2 is the highest priority. In this embodiment, the original mapping of QoS 0-2 to priority 0-2 is expanded to a mapping of 0-5 priorities.

[0033] Each QoS flow is divided into normal transmission data and retransmission data. Table 1 is a correspondence table between target priority and data flow according to an embodiment of the present application.

[0034] Table 1

[0035] Through the above-mentioned priority setting, the target priority of the retransmitted data packet is higher than the target priority of the initial transmission data packet only when the initial priorities are the same, thus avoiding the high-priority data stream being blocked by the retransmitted packets of the low-priority data stream, reducing the packet loss rate of the high-priority data packet, and improving the data transmission efficiency of the IoT system in an unstable network environment.

[0036] In some embodiments, the initial priority includes QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, QoS=2 is the highest priority, and there is no retransmission setting for the data packet of QoS=0; step S202 specifically includes: Step S401, when QoS=0, the target priority of the corresponding initially transmitted data packet is set to 0.

[0037] Step S402, when QoS=1, the target priority of the corresponding initially transmitted data packet is set to 1, and the target priority of the corresponding retransmitted data packet is set to 2.

[0038] Step S403, when QoS=2, the target priority of the corresponding initially transmitted data packet is set to 3, and the target priority of the corresponding retransmitted data packet is set to 4, wherein 0 is the lowest priority and 4 is the highest priority.

[0039] In some cases, some low-priority data is not retransmitted due to its low importance. For example, in the data transmission of social software, the data with QoS=0 includes the prompt information of "the other party is typing". Since this information is of low importance, the retransmission function can be omitted, that is, QoS=0 only has the initial transmission data packet but no retransmission data packet.

[0040] Table 2 is another correspondence table between target priorities and data flows according to an embodiment of the present application.

[0041] Table 2

[0042] Step S203: Based on the target priority, the data packet is transmitted through the MQTT over QUIC connection.

[0043] In some embodiments, step S203 includes: Step S2031, assigning a corresponding transport stream to the data packet.

[0044] Step S2032: Based on the target priority of the data packets on each transmission stream, corresponding bandwidth resources are allocated to each transmission stream for data transmission.

[0045] Bandwidth resources are allocated based on target priority. In the case of unstable network, data packet transmission requests with high target priority are processed first to avoid high-priority data streams being blocked by retransmitted packets of low-priority data streams.

[0046] In some embodiments, step S203 specifically includes: Step S2033, during the data packet transmission process, a priority scheduling mechanism is established to give priority to processing data packet transmission requests with high target priority when the network is unstable.

[0047] For the retransmission of low-priority data packets, the system will make dynamic adjustments based on the network conditions and the transmission status of high-priority data packets to ensure that the transmission of high-priority data packets is not affected.

[0048] Through the above steps, an MQTT over QUIC connection is established, the data packet to be sent and the initial priority of the data packet are obtained, the initial priority includes at least two priority levels, and it is determined whether the data packet is a retransmission data packet. The target priority of the data packet is determined according to the judgment result, the initial priority and the preset priority rule. The preset priority rule includes: the higher the initial priority of the data packet, the higher the corresponding target priority. When the initial priority is the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet. Based on the target priority, the data packet is transmitted through the MQTT over QUIC connection, solving the problem of low data packet transmission efficiency. By reasonably dividing and scheduling the priority of the MQTT over QUIC data packet, the blocking of the transmission of high priority data packets by low priority data packets is effectively reduced, the data transmission efficiency of the Internet of Things system in an unstable network environment is improved, and the user experience is improved.

[0049] Regardless of whether it is a retransmitted data packet or an initial transmission data packet, the higher the initial priority, the higher the corresponding target priority. Only when the initial priorities are the same, the target priority of the retransmitted data packet is higher than the target priority of the initial transmission data packet, avoiding the high-priority data stream being blocked by the retransmitted packets of the low-priority data stream, reducing the packet loss rate of high-priority data packets, and improving the data transmission efficiency of the Internet of Things system in an unstable network environment.

[0050] In some embodiments, the method further comprises: After the data packet is successfully transmitted, it is determined whether to send a confirmation message to the client based on the initial priority and the preset confirmation mechanism.

[0051] By sending a confirmation message to the client, it indicates that the message has been received and confirmed.

[0052] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0053] This embodiment also provides a data packet transmission system, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the terms "module", "unit", "subunit", etc. can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0054] Figure 2 is a structural block diagram of a data packet transmission system according to an embodiment of the present application, such as Figure 2 As shown, the system includes: The acquisition module 21 is used to establish an MQTT over QUIC connection, obtain a data packet to be sent and an initial priority of the data packet, where the initial priority includes at least two priority levels.

[0055] The analysis module 22 is used to determine whether a data packet is a retransmission data packet, and determine the target priority of the data packet based on the judgment result, the initial priority and the preset priority rules. The preset priority rules include: the higher the initial priority of the data packet, the higher the corresponding target priority. When the initial priorities are the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet.

[0056] The transmission module 23 is used to transmit data packets through the MQTT over QUIC connection based on the target priority.

[0057] In some embodiments, the initial priority includes QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, and QoS=2 is the highest priority; the analysis module 22 includes: The first priority setting module is used to set the target priority of the corresponding initial transmission data packet to 0 and the target priority of the corresponding retransmission data packet to 1 when QoS=0.

[0058] The second priority setting module is used to set the target priority of the corresponding initial transmission data packet to 2 and the target priority of the corresponding retransmission data packet to 3 when QoS=1.

[0059] The third priority setting module is used to set the target priority of the corresponding initial transmission data packet to 4 and the target priority of the corresponding retransmission data packet to 5 when QoS=2, wherein 0 is the lowest priority and 5 is the highest priority.

[0060] In some embodiments, the initial priority includes QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, QoS=2 is the highest priority, and there is no retransmission setting for the data packet of QoS=0; the analysis module 22 includes: The fourth priority setting module is used to set the target priority of the corresponding initial transmission data packet to 0 when QoS=0.

[0061] The fifth priority setting module is used to set the target priority of the corresponding initial transmission data packet to 1 and the target priority of the corresponding retransmission data packet to 2 when QoS=1.

[0062] The sixth priority setting module is used to set the target priority of the corresponding initial transmission data packet to 3 and the target priority of the corresponding retransmission data packet to 4 when QoS=2, wherein 0 is the lowest priority and 4 is the highest priority.

[0063] In some of the embodiments, the transmission module 23 includes: a priority scheduling module, which is used to establish a priority scheduling mechanism during the transmission of data packets, so as to give priority to data packet transmission requests with high target priorities when the network is unstable.

[0064] In some embodiments, the transmission module 23 includes: an allocation module for allocating corresponding transmission streams to data packets; and allocating corresponding bandwidth resources to each transmission stream based on the target priority of the data packets on each transmission stream for data transmission.

[0065] In some of the embodiments, the data packet transmission system further includes: a confirmation module, which is used to determine whether to send a confirmation message to the client according to an initial priority and a preset confirmation mechanism after the data packet is successfully transmitted.

[0066] Through the above system, the acquisition module 21 establishes an MQTT over QUIC connection, obtains the data packet to be sent and the initial priority of the data packet, the initial priority includes at least two priority levels, the analysis module 22 determines whether the data packet is a retransmission data packet, and determines the target priority of the data packet based on the judgment result, the initial priority and the preset priority rule. The preset priority rule includes: the higher the initial priority of the data packet, the higher the corresponding target priority. When the initial priority is the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet. The transmission module 23 transmits the data packet through the MQTT over QUIC connection based on the target priority, thereby solving the problem of low data packet transmission efficiency. By reasonably dividing and scheduling the priority of the MQTT over QUIC data packet, the blocking of the transmission of the high priority data packet by the low priority data packet can be effectively reduced, the data transmission efficiency of the Internet of Things system in an unstable network environment can be improved, and the user experience can be improved.

[0067] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0068] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0069] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0070] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: S1, establish an MQTT over QUIC connection, obtain a data packet to be sent and an initial priority of the data packet, where the initial priority includes at least two priority levels.

[0071] S2, judge whether the data packet is a retransmission data packet, and determine the target priority of the data packet according to the judgment result, the initial priority and the preset priority rules. The preset priority rules include: the higher the initial priority of the data packet, the higher the corresponding target priority. When the initial priority is the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet.

[0072] S3 transmits data packets based on target priority via MQTT over QUIC connection.

[0073] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0074] In one embodiment, Figure 3 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 3 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 3 As shown. The electronic device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data packet transmission method is implemented.

[0075] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0076] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0077] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0078] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A data packet transmission method, characterized in that: The method comprises: Establishing an MQTT over QUIC connection, obtaining a data packet to be sent and an initial priority of the data packet, wherein the initial priority includes at least two priority levels; Determine whether the data packet is a retransmission data packet, and determine the target priority of the data packet according to the determination result, the initial priority and a preset priority rule, wherein the preset priority rule includes: a data packet with a higher initial priority has a higher corresponding target priority, and when the initial priorities are the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet; Based on the target priority, the data packet is transmitted via the MQTT over QUIC connection.

2. The method according to claim 1, characterized in that The initial priorities include QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority and QoS=2 is the highest priority; Determining the target priority of the data packet according to the judgment result, the initial priority and the preset priority rule includes: When QoS=0, the target priority of the corresponding initial transmission data packet is set to 0, and the target priority of the corresponding retransmission data packet is set to 1; When QoS=1, the target priority of the corresponding initial transmission data packet is set to 2, and the target priority of the corresponding retransmission data packet is set to 3; When QoS=2, the target priority of the corresponding initial transmission data packet is set to 4, and the target priority of the corresponding retransmission data packet is set to 5, where 0 is the lowest priority and 5 is the highest priority.

3. The method according to claim 1, characterized in that The initial priorities include QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, QoS=2 is the highest priority, and there is no retransmission setting for the data packet of QoS=0; Determining the target priority of the data packet according to the judgment result, the initial priority and the preset priority rule includes: When QoS=0, the target priority of the corresponding initial transmission data packet is set to 0; When QoS=1, the target priority of the corresponding initial transmission data packet is set to 1, and the target priority of the corresponding retransmission data packet is set to 2; When QoS=2, the target priority of the corresponding initially transmitted data packet is set to 3, and the target priority of the corresponding retransmitted data packet is set to 4, where 0 is the lowest priority and 4 is the highest priority.

4. The method according to claim 1, characterized in that The transmitting the data packet based on the target priority through the MQTT over QUIC connection includes: During the transmission of the data packets, a priority scheduling mechanism is established to give priority to processing the data packet transmission requests with high target priorities when the network is unstable.

5. The method according to claim 1, characterized in that The transmitting the data packet based on the target priority through the MQTT over QUIC connection includes: Allocating a corresponding transport stream to the data packet; Based on the target priority of the data packets on each transmission stream, corresponding bandwidth resources are allocated to each transmission stream for data transmission.

6. The method according to claim 1, characterized in that The method further comprises: After the data packet is successfully transmitted, it is determined whether to send a confirmation message to the client according to the initial priority and a preset confirmation mechanism.

7. A data packet transmission system, characterized in that: The system comprises: An acquisition module, used to establish an MQTT over QUIC connection, obtain a data packet to be sent and an initial priority of the data packet, wherein the initial priority includes at least two priority levels; An analysis module is used to determine whether the data packet is a retransmission data packet, and determine the target priority of the data packet according to the determination result, the initial priority and a preset priority rule, wherein the preset priority rule includes: a data packet with a higher initial priority has a higher corresponding target priority, and when the initial priorities are the same, the target priority of the retransmission data packet is higher than the target priority of the initial transmission data packet; A transmission module is used to transmit the data packet through an MQTT over QUIC connection based on the target priority.

8. The system according to claim 7, characterized in that The initial priorities include QoS=0, QoS=1 and QoS=2, QoS=0 is the lowest priority, and QoS=2 is the highest priority; the analysis module includes: A first priority setting module, used for setting the target priority of the corresponding initial transmission data packet to 0 and the target priority of the corresponding retransmission data packet to 1 when QoS=0; The second priority setting module is used to set the target priority of the corresponding initial transmission data packet to 2 and the target priority of the corresponding retransmission data packet to 3 when QoS=1; The third priority setting module is used to set the target priority of the corresponding initial transmission data packet to 4 and the target priority of the corresponding retransmission data packet to 5 when QoS=2, wherein 0 is the lowest priority and 5 is the highest priority.

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 computer program, the data packet transmission method according to any one of claims 1 to 6 is implemented.

10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data packet transmission method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Data transmission method and device

    CN103220091A

  • Flow scheduling method and system based on dynamic priority

    CN116489104A

  • Network state monitoring and optimization processing method and device and readable storage medium

    CN119520332A

  • Communication data scheduling processing method and apparatus, computer device, and storage medium

    WO2022104945A1

  • Communication method and apparatus

    WO2022213705A1