Data transmission control method and device and electronic equipment

By selectively splitting the message data at the transmission layer of the electronic device, the problem of excessive data transmission delay is solved, ensuring the timely transmission of delay-sensitive service messages, and improving the user experience.

CN119728583APending Publication Date: 2025-03-28HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311283711.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In electronic devices, the problem of excessive data transmission delay, especially when processing delay-sensitive service messages, may cause screen stuttering and affect user experience.

Method used

By selectively splitting the message data to be sent in the transport layer, it is determined whether the message data contains delay-sensitive service messages. If included, non-delay-sensitive service messages will be segmented to avoid blocking the delay-sensitive service messages.

Benefits of technology

It effectively reduces the delay of data transmission, ensures that delay-sensitive service packets can be transmitted in a timely manner, avoids screen lag, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728583A_ABST
    Figure CN119728583A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission control method and device and electronic equipment. The method comprises the following steps: firstly, obtaining message data to be sent in a socket, and then judging whether the message data contains a time delay sensitive service message or not; and if it is determined that the message data contains the time delay sensitive service message, performing segmentation processing on a non-time delay sensitive service message in the message data, and sending the time delay sensitive service message and the segmented non-time delay sensitive service message to a queuing rule queue. In the embodiment of the invention, the socket is located in the transmission layer, the electronic equipment detects the message data located in the transmission layer, and if the time delay sensitive service message exists in the current socket, the non-time delay sensitive service message is segmented, so that the problem that the time delay sensitive service message cannot be segmented when the message data is queued out of a regular queue is avoided. In the embodiment of the invention, the time delay sensitive service message is blocked by the longer non-time delay sensitive service message, and if the time delay sensitive service message does not exist in the current socket, the message data is not segmented in the transmission layer so as to ensure the transmission performance of the electronic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data transmission control method, device and electronic equipment. Background Art

[0002] When electronic devices have more tasks to process, the amount of data that needs to be sent usually increases. If too much data needs to be sent at the same time, the data to be sent will compete and queue in the queuing discipline (Qdisc), resulting in data not being sent in time. Certain types of data have high latency requirements, such as audio and video call data, game battle data, and live broadcast data. If the above types of data cannot be sent in time, it will cause screen freezes, which greatly affects the user experience. Summary of the invention

[0003] In view of this, the present application provides a data transmission control method, device and equipment to help solve the problem of excessive delay when transmitting data in the prior art.

[0004] In a first aspect, an embodiment of the present application provides a data transmission control method, including:

[0005] First, obtain the message data to be sent in the socket, and then determine whether the message data contains delay-sensitive business messages; if it is determined that the message data contains delay-sensitive business messages, split the non-delay-sensitive business messages in the message data; then, send the delay-sensitive business messages and the split non-delay-sensitive business messages to the queuing rule queue. If it is determined that the message data does not contain delay-sensitive business messages, the non-delay-sensitive business messages in the message data are not split, and the message data are directly sent to the queue.

[0006] In an embodiment of the present application, the socket is located at the transport layer, and the electronic device detects the message data located at the transport layer. If there are delay-sensitive service messages in the current socket, the non-delay-sensitive service messages are segmented to avoid blocking the delay-sensitive service messages due to the non-delay-sensitive service messages with excessive length when the message data leaves the queuing rule queue. If there are no delay-sensitive service messages in the current socket, the message data is not segmented at the transport layer to reduce the delay in data transmission.

[0007] In an optional manner, when an electronic device performs segmentation processing on a non-delay-sensitive service message, it may first determine the first length value corresponding to each non-delay-sensitive service message according to the message length of each non-delay-sensitive service message, and then segment the non-delay-sensitive service message based on the first length value. Specifically, the message length of each non-delay-sensitive service message, the message transmission speed, and the transmission delay threshold of the delay-sensitive service message are known, and the electronic device may determine the message transmission time of each non-delay-sensitive service message according to the message length and the message transmission speed, and then determine the number of segments of each non-delay-sensitive service message according to the multiple relationship between the message transmission time of each non-delay-sensitive service message and the transmission delay threshold, and then determine the first length value of each non-delay-sensitive service message according to the message length and the number of segments of each non-delay-sensitive service message. Among them, each delay-sensitive service message in the message data has its own corresponding transmission delay indicator, the transmission delay threshold is the minimum value of the transmission delay indicator, and the electronic device divides the non-delay-sensitive service message based on the first length value as the length reference, and the message length of the non-delay-sensitive service message after segmentation is equal to the corresponding first length value.

[0008] In the embodiment of the present application, the electronic device reasonably divides different non-delay-sensitive service messages according to the message length, which ensures that the non-delay-sensitive service message will not hinder the delay-sensitive service message, and avoids the delay increase caused by too many division times. The first length value corresponding to each non-delay-sensitive service message can be accurately obtained by the transmission speed of the non-delay-sensitive service message, the message length and the transmission delay threshold of the delay-sensitive service message, and it is more reasonable to divide it based on this reference length.

[0009] In an optional manner, when an electronic device receives message data sent by different applications, it will perform service identification on the message data. If the service identification result of the message data is a delay-sensitive service message, a first identifier is set, and then the message data after the service identification is completed is sent to the socket. Afterwards, the electronic device determines whether the message data contains a delay-sensitive service message by only detecting whether there is message data with a first identifier set in the socket. If so, it is determined that the message data contains a delay-sensitive service message, otherwise it is determined that the message data does not contain a delay-sensitive service message. Specifically, the electronic device can set a corresponding global variable for each message data. When the service identification of the message data is a delay-sensitive service message, the corresponding global variable is set to a first value. When the service identification of the message data is a non-delay-sensitive service message, the corresponding global variable is set to a second value.

[0010] In the embodiment of the present application, the electronic device performs service identification on the message data and sets a first identifier for the delay-sensitive service message, so that it can quickly determine whether the socket contains a delay-sensitive service message later.

[0011] In an optional manner, the queue rules include: a delay-sensitive queue, a time-division queue, and a non-delay-sensitive queue; the electronic device can send delay-sensitive service messages to the delay-sensitive queue, and send non-delay-sensitive service messages to the time-division queue or the non-delay-sensitive queue. There are usually multiple time-division queues, and the electronic device can allocate a corresponding time window to each time-division queue, and periodically loop through the time windows of each time-division queue, and each time a time window is traversed, the message data in the time-division queue corresponding to the current time window is sent to the network card NIC. Among them, in the process of sending message data of any time-division queue, if it is detected that there is a delay-sensitive business message in the delay-sensitive queue, the sending of the message data in the current time-division queue is suspended, and the delay-sensitive business message is sent to the NIC. After all the delay-sensitive business messages in the delay-sensitive queue are sent, the electronic device sends the message data in the corresponding time-division queue based on the currently traversed time window; in the process of sending message data of any time-division queue, if it is detected that there is no message data in the current time-division queue and the duration exceeds the first threshold, the sending of the message data in the current time-division queue is suspended, and the message data in the non-delay-sensitive queue is sent to the NIC. After the current time window ends, the electronic device stops sending the message data in the non-delay-sensitive queue.

[0012] In an embodiment of the present application, by setting a time window for each time-division queue, the message data of different time-division queues can be sent evenly, avoiding the waiting time process of a certain time-division queue, which leads to excessive delay in data transmission; when a delay-sensitive business message is detected, the delay-sensitive business message is sent first and then other message data is sent according to the rules to ensure smooth transmission of the delay-sensitive business message; the message data in the non-delay-sensitive queue has a lower requirement for delay. If there is no message data in the time-division queue for a long time, the data of the non-delay-sensitive queue can be sent.

[0013] In a second aspect, an embodiment of the present application provides a data transmission control device, including:

[0014] An acquisition module is used to obtain the message data to be sent in the socket;

[0015] A processing module, configured to segment and process non-delay-sensitive service messages in the message data when the message data includes the delay-sensitive service message;

[0016] The sending module is used to send the delay-sensitive service message and the segmented non-delay-sensitive service message to a queuing rule queue.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute any one of the methods described in the first aspect above.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any method described in the first aspect.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes any method described in the first aspect.

[0020] In an embodiment of the present application, the electronic device first obtains the message data to be sent in the socket, and then determines whether the message data contains a delay-sensitive service message; if it is determined that the message data contains a delay-sensitive service message, the non-delay-sensitive service message in the message data is segmented and processed, and the delay-sensitive service message and the segmented non-delay-sensitive service message are sent to the queuing rule queue. If it is determined that the message data does not contain a delay-sensitive service message, the non-delay-sensitive service message in the message data is not segmented and the message data is directly sent to the queuing rule queue. In an embodiment of the present application, the socket is located in the transport layer, and the electronic device detects the message data located in the transport layer. If there is a delay-sensitive service message in the current socket, the non-delay-sensitive service message is segmented to avoid the non-delay-sensitive service message with too large a message length from blocking the delay-sensitive service message when the message data exits the queuing rule queue. If there is no delay-sensitive service message in the current socket, the message data is not segmented at the transport layer to reduce the delay of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0022] Figure 1 An exemplary schematic diagram of a data transmission control method provided in an embodiment of the present application;

[0023] FIG2 is a schematic diagram of another exemplary data transmission control method provided by an embodiment of the present application;

[0024] Figure 2A An exemplary schematic diagram of another data transmission control method provided in an embodiment of the present application;

[0025] Figure 2B An exemplary schematic diagram of another data transmission control method provided in an embodiment of the present application;

[0026] Figure 3 An exemplary schematic diagram of another data transmission control method provided in an embodiment of the present application;

[0027] Figure 4 A flowchart of a data transmission control method provided in an embodiment of the present application;

[0028] Figure 5 An exemplary schematic diagram of another data transmission control method provided in an embodiment of the present application;

[0029] Fig. 6A An exemplary schematic diagram of another data transmission control method provided in an embodiment of the present application;

[0030] Figure 6B An exemplary schematic diagram of another data transmission control method provided in an embodiment of the present application;

[0031] Figure 6C An exemplary schematic diagram of another data transmission control method provided in an embodiment of the present application;

[0032] Figure 7 A flowchart of another data transmission control method provided in an embodiment of the present application;

[0033] Figure 8 A schematic diagram of the structure of a data transmission control device provided in an embodiment of the present application;

[0034] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0036] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0037] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0038] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0039] When an electronic device sends data to other devices through the network, if there is too much data to be sent at the same time, data generated by different applications and data generated by different services in the same application will compete and queue in the queuing discipline (Qdisc), resulting in slow data transmission and high transmission delay. Figure 1 As shown, application 1 in the electronic device contains two services: service 1 and service 2, and application 2 contains a service 3. The data generated by the above three services will be first transmitted to the network card Qdisc queue, and then transmitted to the serial link and sent to other devices. If there is too much data in the network card Qdisc queue, the data transmission delay will increase during the transmission of data from the network card Qdisc queue to the serial link, which will have a greater impact on some data with high transmission delay requirements. For example, in the industrial (coal) field, electronic equipment in the centralized control center usually requires multi-threaded concurrency, and model files, control commands, and read commands may be sent at the same time, resulting in a deterioration in the delay of control commands (with high latency requirements). In the field of personal users, such as electronic devices such as smart phones, if the front-end is browsing the web, the background application market downloads and updates the application. In this scenario, a large amount of data is sent when multiple services are concurrent, which will cause the front-end browsing of the web to freeze.

[0040] To solve the problem of high transmission delay caused by competition among a large amount of data in the network card Qdisc queue, the common approach in the prior art is to delay segmentation. Figure 2AAs shown, when an electronic device transmits message data based on the TCP / IP protocol or the UDP / IP protocol, the software architecture layer may include: application layer, transport layer, network card universal layer, and data link layer. In the application layer, application 1 and application 2 send their own message data; in the transport layer, the electronic device needs to segment the message data with too long a length, and add an IP header to each segment of the message data after segmentation, and then send the message data to the network card Qdisc queue, which may include multiple queues, such as queue 1, queue 2, and queue 3. In the network card universal layer, the electronic device needs to connect the link for each message data to send each message data to the data link layer.

[0041] When electronic devices transmit message data, the message length cannot exceed the Maximum Transmission Unit (MTU). MTU refers to the maximum data packet size that the network can transmit, in bytes. For message data that is too long, electronic devices need to segment it, dividing a long message into multiple short messages so that the length of each short message after segmentation does not exceed the MTU. Figure 2A In the process, the electronic device divides the long message at the transmission layer, and when the message data is transmitted to the network card common layer, the electronic device does not need to divide the message data again.

[0042] If the electronic device applies delayed segmentation, the process of transmitting message data by the electronic device can be as follows: Figure 2B As shown, the electronic device does not split the message data of the transmission layer, but waits until the message data is transmitted to the network card common layer and then splits the long message into short messages. This approach can effectively improve the transmission performance of the electronic device.

[0043] However, delayed segmentation also brings a problem. When the message data leaves the Qdisc queue of the network card, the current message data needs to be transmitted each time before the next message data can be transmitted. In this way, long messages may block the normal transmission of other short messages, causing other short messages to wait too long. If the blocked short messages contain message data with high transmission delay requirements (such as live broadcast data, game data, or audio and video call data), it will cause the electronic screen to freeze, affecting the user experience.

[0044] In response to the above problems, an embodiment of the present application provides a data transmission control method, which selectively segments long messages at the transmission layer, thereby ensuring the transmission performance of the electronic device and avoiding blocking of short messages when long messages leave the network card Qdisc queue.

[0045] In an embodiment of the present application, message data transmitted by the electronic device can be divided into "delay-sensitive service messages" and "non-delay-sensitive service messages", where delay-sensitive service messages may refer to all message data with high transmission delay requirements, such as the live broadcast data, game data, and audio and video call data listed above, and non-delay-sensitive service messages may refer to message data with low transmission delay requirements, specifically referring to other message data except delay-sensitive service messages.

[0046] The electronic device is configured with corresponding sockets in the transport layer for different applications and different services of different applications. When the message data of each application is sent to the transport layer, it will first enter the corresponding socket and then enter the network card Qdisc queue. Before the electronic device sends the message data in the socket to the network card Qdisc queue, it can first detect whether each current socket contains a delay-sensitive service message. If it is detected that any socket contains a delay-sensitive service message, the non-delay-sensitive service messages in all current sockets are segmented and processed, and the long messages in the non-delay-sensitive service messages are segmented into short messages. If none of the current sockets contain delay-sensitive service messages, the electronic device may not segment the non-delay-sensitive service messages, and directly send the message data in each socket to the network card Qdisc queue.

[0047] It can be understood that under the condition that there are delay-sensitive service messages in the current socket, if the non-delay-sensitive service messages are not segmented, then when the message data leaves the network card Qdisc queue, the long messages in the non-delay-sensitive service messages may block the normal transmission of the delay-sensitive service messages. Therefore, when the electronic device detects that there are delay-sensitive service messages in the current socket, it chooses to segment the non-delay-sensitive service messages at the transport layer; and under the condition that there are no delay-sensitive service messages in the current socket, if the non-delay-sensitive service messages are segmented, the transmission performance of the electronic device will be affected due to too many segments. Therefore, when the electronic device detects that there are no delay-sensitive service messages in the current socket, it chooses to segment all message data at the network card common layer.

[0048] like Figure 3 As shown, Figure 3 On the left is the technical solution of applying delayed segmentation. Figure 3 The right side is the technical solution of the embodiment of the present application. Assume that the message data sent by application 1 is a delay-sensitive service message, and the message data sent by application 2 is a non-delay-sensitive service message. Figure 3Taking the left side as an example, the electronic device that applies delay segmentation is not segmented at the transport layer, and the network card Qdisc queue contains two delay-sensitive service messages and one non-delay-sensitive service message. When the above three message data leave the network card Qdisc queue, the first delay-sensitive service message leaves first, and the non-delay-sensitive service message leaves later. The second delay-sensitive service message needs to wait until the non-delay-sensitive service message leaves the network card Qdisc queue before it can start to leave. In this case, long messages may block short messages. Assuming that the current non-delay-sensitive service message requires 3 units of time to complete the operation of leaving the network card Qdisc queue, and the transmission delay index of the second delay-sensitive service message is (the maximum time that can be waited for leaving the queue under normal transmission) 2 units of time, the non-delay-sensitive service message will affect the normal transmission of the second delay-sensitive service message, and the transmission delay of the second delay-sensitive service message will increase, thereby affecting the picture of the electronic device.

[0049] by Figure 3 Taking the right side as an example, the electronic device of the embodiment of the present application selectively segments at the transport layer. Before the electronic device sends the message data in socket1 and socket2 to the network card Qdisc queue, it first determines whether there are delay-sensitive service messages in the two sockets. After the electronic device determines that there are delay-sensitive service messages in socket1, it will segment and process the non-delay-sensitive service messages in socket2. When leaving the network card Qdisc queue, the order of the message data is: the first delay-sensitive service message, the first non-delay-sensitive service message, the second delay-sensitive service message, the second non-delay-sensitive service message, and the third non-delay-sensitive service message. Assuming that the transmission delay index of the second delay-sensitive service message is still 2 unit times, after the non-delay-sensitive service message is divided into 3 short messages, each short message needs 1 unit time to complete the operation of leaving the network card Qdisc queue. In this way, the second delay-sensitive service message only needs to wait for 1 unit time to leave the network card Qdisc queue, and the blocking effect of the non-delay-sensitive service message on the delay-sensitive service message is reduced.

[0050] In an embodiment of the present application, the electronic device detects the message data located at the transmission layer. If there are delay-sensitive service messages in the current message data, the non-delay-sensitive service messages are segmented to avoid blocking of delay-sensitive service messages by non-delay-sensitive service messages with excessive length when the message data leaves the Qdisc queue. If there are no delay-sensitive service messages in the current message data, the message data is not segmented at the transmission layer to ensure the transmission performance of the electronic device.

[0051] In an optional manner, when an electronic device segments a non-delay-sensitive service message, it may first determine a corresponding first length value based on each non-delay-sensitive service message, and then segment the non-delay-sensitive service message based on the first length value as a segmentation basis. Normally, the message length of a short message obtained after segmentation of any non-delay-sensitive service message is the same as the first length value.

[0052] Specifically, when an electronic device transmits message data, the message length and message transmission speed of the non-delay-sensitive service message are known, and the message transmission time of each non-delay-sensitive service message can be obtained according to the message length and message transmission speed. The message transmission time can be obtained according to the formula T1=S / R, where T1 is the message transmission time (which can also be regarded as the time when the delay-sensitive service message may be blocked), S is the message length, and R is the message transmission speed.

[0053] The transmission delay index of each delay-sensitive service message is also known. The electronic device can use the minimum value as the transmission delay threshold T2. In order to ensure that the non-delay-sensitive service message does not affect the normal transmission of the delay-sensitive service message, the T1 of each non-delay-sensitive service message needs to be no more than T2. ​​According to the formula Fmin=QUOTIENT(T1 / T2)+1, the number of segments (minimum number of segments) of each non-delay-sensitive service message can be obtained, where the QUOTIENT() function is the quotient. Afterwards, the first length value corresponding to each non-delay-sensitive service message can be obtained according to the formula L=S / Fmin. For example, the T2 of the delay-sensitive service message is 5 unit times, and the T1 of a non-delay-sensitive service message is 6 unit times, which affects the normal transmission of the delay-sensitive service message. According to the formula Fmin=QUOTIENT(6 / 5)+1, the electronic device can obtain Fmin=2, that is, the non-delay-sensitive service message needs to be divided into two segments, and the T1 of each segment of the non-delay-sensitive service message after segmentation is 3 unit times, which does not affect the normal transmission of the delay-sensitive service message. If the T1 of a non-delay-sensitive service message is 4 unit times, it will not affect the normal transmission of the delay-sensitive service message. According to the formula Fmin=QUOTIENT(4 / 5)+1, Fmin=1 can be obtained, that is, the non-delay-sensitive service message does not need to be segmented. For non-delay-sensitive service messages that do not require segmentation, the corresponding first length value is the message length of itself. For non-delay-sensitive service messages that need to be segmented, the corresponding first length value will be smaller than the message length of itself.

[0054] In the embodiment of the present application, by calculating the first length value of each non-delay-sensitive service message, the non-delay-sensitive service messages can be segmented and processed more reasonably to ensure the transmission performance of the electronic device.

[0055] In an optional manner, after the electronic device divides the message data, the length of all message data cannot exceed the MTU. Therefore, after the electronic device calculates the first length value of each non-delay-sensitive service message, it is necessary to detect whether the first length value exceeds the MTU. If it is detected that the first length value of a non-delay-sensitive service message exceeds the MTU, the number of segments of the non-delay-sensitive service message needs to be increased by one, and the first length value is recalculated and tested again until the first length value does not exceed the MTU. During actual transmission, an IP header will also be set for each message data. Therefore, the judgment condition can be based on the formula IP+L<=MTU, where IP is the length corresponding to the IP header of each message data, and its value is usually a fixed value, and L is the first length value.

[0056] In an optional manner, when message data sent by different applications enter the socket, the electronic device can perform service identification on the message data to determine whether the current message data is a delay-sensitive service message. The electronic device can set a first identifier for each delay-sensitive service message according to the identification result, and send the identified message data to the socket. When determining whether there is a delay-sensitive service message in the socket, the electronic device can directly detect whether there is message data with the first identifier set in the current socket. If so, it is determined that the message data contains a delay-sensitive service message, otherwise it is determined that the message data does not contain a delay-sensitive service message.

[0057] Specifically, the electronic device can set the first identifier for the delay-sensitive service message by setting all variables. After the electronic device receives the message data sent by the application, it sets the corresponding global variables for the message data. By adjusting the values ​​of the global variables, different types of message data can be represented. For example, when the current message data is identified as a delay-sensitive service message, the electronic device sets the value of the corresponding global variable to 1. When the current message data is identified as a non-delay-sensitive service message, the electronic device sets the value of the corresponding global variable to 0. The electronic device setting the global variable of the delay-sensitive service message to 1 can be regarded as setting the first identifier for the delay-sensitive service message. When the electronic device detects the socket, it only needs to detect whether the global variable with a value of 1 is currently contained. If it is contained, it can be determined that there is a delay-sensitive service message in the socket.

[0058] Figure 4 The present invention provides a flow chart of a data transmission control method. The method can be applied to electronic devices, such as Figure 4 As shown, the method may include:

[0059] Step 401, determining whether the current message data is a delay-sensitive service message;

[0060] Step 402, setting a first identifier for a delay-sensitive service message;

[0061] Step 403, determine whether there is a delay-sensitive service message in the current socket;

[0062] Step 404, determining whether the current message is a delay-sensitive service message;

[0063] Step 405: delay-sensitive service messages do not need to be segmented in advance;

[0064] Step 406, determining a first length value of each non-delay-sensitive service message;

[0065] Step 407, determining whether the message length is greater than a first length value;

[0066] Step 408, segmenting the non-delay-sensitive service messages whose length is greater than the first length value;

[0067] Step 409: Non-delay-sensitive service messages that do not exceed the first length value do not need to be segmented.

[0068] Step 401 to step 402 is the process of business identification by the electronic device. When the message data is sent by the application to the socket of the transport layer, the electronic device can perform business identification on it to determine whether the message data is a delay-sensitive business message. If so, the first flag is set, otherwise no change is made.

[0069] In step 403, the electronic device detects the message data in all current sockets to determine whether there are delay-sensitive service messages. If so, segmentation is required. Otherwise, the message data in the socket can be directly sent to the network card Qdisc queue.

[0070] Steps 405 to 409 are the process of the electronic device segmenting and processing different types of message data, wherein delay-sensitive service messages do not need to be segmented in advance, and non-delay-sensitive service messages need to be segmented according to their message lengths. Specifically, the electronic device can calculate the first length value of each non-delay-sensitive service message, and for any non-delay-sensitive service message, if the message length of the current non-delay-sensitive service message is greater than the first length value, the electronic device segments it, and if the message length of the current non-delay-sensitive service message does not exceed the first length value, no segmentation is required.

[0071] The specific method for calculating the first length value can be referred to the description above. Under normal circumstances, the first length value of any non-delay-sensitive service message will be greater than or equal to its message length. If the non-delay-sensitive service message will not affect the normal transmission of the delay-sensitive service message, the calculated first length value will be equal to the message length and no segmentation is required; if the non-delay-sensitive service message will affect the normal transmission of the delay-sensitive service message, the calculated first length value will be greater than the message length and segmentation is required.

[0072] The network card Qdisc queue may include multiple types, corresponding to different message data. When the electronic device transmits the message data to the network card Qdisc queue, it can transmit it to the corresponding queue according to the type of the message data. Afterwards, the electronic device can assign a time window to each queue, and send the message data in the corresponding queue to the NIC in sequence by looping through different time windows. Figure 5 As shown in the figure, the transmission paths of the message data are: socket, network card Qdisc queue and NIC. The message data sent by the same application may contain multiple services. Therefore, the message data of different services of the same application may be sent to different queues, and the message data of the same service of different applications may be sent to the same queue. Figure 5 In the example, the first queue contains message data of application 1 and application 2, the second queue contains message data of application 1 and application 3, the third queue contains message data of application 2, and the fourth queue contains message data of application 1. Among them, delay-sensitive service messages can be sent to the fourth queue, and non-delay-sensitive service messages can be sent to the first three queues. When traversing to time window 1, the electronic device can send the non-delay-sensitive service messages in the first queue to the NIC; when traversing to time window 2, the electronic device can send the non-delay-sensitive service messages in the second queue to the NIC; when traversing to time window 3, the electronic device can send the non-delay-sensitive service messages in the third queue to the NIC; and as long as the electronic device detects the presence of delay-sensitive service messages in the fourth queue, it can suspend the sending of non-delay-sensitive service messages and switch to sending delay-sensitive service messages. After the delay-sensitive service messages are sent, the non-delay-sensitive service messages are sent based on the time window cycle.

[0073] In the embodiment of the present application, by setting a time window for each queue containing non-delay-sensitive service messages, non-delay-sensitive service messages of different queues can be sent in sequence, avoiding the non-delay-sensitive service messages in a queue waiting too long. Secondly, the delay-sensitive service message queue-jumping function is given. When a delay-sensitive service message is detected, the electronic device will first send the delay-sensitive service message to ensure that the transmission delay of the delay-sensitive service message is at a lower value. This method can make the electronic device more stable when transmitting message data and reduce the probability of screen jitter.

[0074] The steps of sending message data by the electronic device based on the time window can be as follows: Fig. 6A As shown, first, the electronic device allocates time windows for message data (or network card Qdisc queues) of different services. Fig. 6A Each oval in the figure can represent a queue. Afterwards, the electronic device sends message data in sequence based on the currently traversed time window, where the rectangles without filled colors can refer to non-delay-sensitive service messages, and the rectangles with filled colors can refer to delay-sensitive service messages. Delay-sensitive service messages can be queued to ensure normal transmission of delay-sensitive service messages.

[0075] In an optional manner, the network card Qdisc queue may include: a delay-sensitive queue, a time-division queue, and a non-delay-sensitive queue. The delay-sensitive queue contains delay-sensitive service messages, and the time-division queue and the non-delay-sensitive queue contain non-delay-sensitive service messages. In actual scenarios, the delay-sensitive service messages in the delay-sensitive queue may specifically include: control data, warning data, and clock synchronization data, etc. Such data have high requirements for transmission delay and are non-periodic data; the message data in the time-division queue may specifically include: acquisition data, heartbeat data, etc. Such data are usually periodic data and need to be sent continuously and intensively, with certain transmission delay requirements; the message data in the non-delay-sensitive queue may specifically include: file data, diagnostic data, and configuration data, etc. Such data have low requirements for transmission delay. Under normal circumstances, the message data in the delay-sensitive queue has the highest priority and is sent first; the message data in the non-delay-sensitive queue has the lowest priority. When there is no message data to be sent in the delay-sensitive queue and the time-division queue, the message data in the non-delay-sensitive queue can be sent.

[0076] As shown in 6B, the electronic device is configured with a delay-sensitive queue, a non-delay-sensitive queue and three time-division queues. The number of queues is only an exemplary description and does not limit the actual number of queues. When transmitting message data, the electronic device will detect in real time whether there is a delay-sensitive service message in the delay-sensitive queue. If it exists, the delay-sensitive service message will be sent first. If there is no delay-sensitive service message in the delay-sensitive queue, the message data in the time-division queue will be sent based on the time window cycle. Specifically, when traversing to time window 1, the electronic device will send the message data in time-division queue 1. When traversing to time window 2, the electronic device will send the message data in time-division queue 2. When traversing to time window 3, the electronic device will send the message data in time-division queue 3. In the process of the electronic device sending the message data of time-division queue 1, if a delay-sensitive service message is added to the delay-sensitive queue, the electronic device will suspend sending the message data in time-division queue 1 and switch to sending the delay-sensitive service message in the delay-sensitive queue. When the delay-sensitive service message is sent, if the electronic device detects that the background has traversed to time window 3, the electronic device continues to send the message data in time-division queue 3. After the traversal of time window 3 is completed, the electronic device traverses to time window 1 again and sends the message data in time-division queue 1. When the electronic device traverses to any time window, if it is detected that there is no message data in the corresponding time-division queue and the duration exceeds a certain threshold, the electronic device can send the message data in the non-delay-sensitive queue until the current time window traversal is completed. For example, the duration of each time window is 5 units of time, and the time-division queue has no message data for more than 2 units of time, that is, the non-delay-sensitive queue is sent. At the 0th moment, the electronic device traverses to time window 1, and there is no message data in time-division queue 1. If there is still no data in time-division queue 1 at the 3rd moment, the electronic device will send the data in the non-delay-sensitive queue until the end of the 5th moment, and stop sending the non-delay-sensitive queue. When the 6th moment, the electronic device traverses to time window 2, it will send the message data in time-division queue 2.

[0077] The size of each time window can be set based on actual conditions to ensure that the message data in different time-division queues are sent evenly and to avoid the message data in a certain queue waiting for too long.

[0078] The electronic device can determine the time window allocation according to the service type of the message data and the message length, such as Figure 6C As shown, the message data of service 1 and service 4 are allocated to Tw1 (time window 1), the message data of service 2 is allocated to Tw2 (time window 2), and the message data of service 3 is allocated to Tw3 (time window 3). The electronic device traverses all time windows as a cycle, then TW = Tw1 + Tw2 + Tw3. If n time windows are set, then TW = Tw1 + Tw2 + ... + Twn. Among them, Tw1, Tw2, ..., Twn can represent the width of each time window.

[0079] Figure 7 The present invention provides a flow chart of a data transmission control method. The method can be applied to electronic devices, such as Figure 7 As shown, the method may include:

[0080] Step 701, read the delay-sensitive queue;

[0081] Step 702, determining whether there is message data in the delay-sensitive queue;

[0082] Step 703, sending message data from the delay-sensitive queue;

[0083] Step 704, determine whether the time window is about to end;

[0084] Step 705, read the time-division queue corresponding to the current time window;

[0085] Step 706, determining whether there is message data in the current time-division queue;

[0086] Step 707, sending message data from the current time-division queue;

[0087] Step 708, determining whether the time window is about to end;

[0088] Step 709, read the non-delay-sensitive queue;

[0089] Step 710, determining whether there is message data in the non-delay-sensitive queue;

[0090] Step 711, sending message data from the non-delay-sensitive queue;

[0091] Step 712, determine whether the time window is about to end;

[0092] Step 713, determine whether the time window is about to end.

[0093] After the time window begins, the electronic device needs to read the delay-sensitive queue first. If there is message data in the delay-sensitive queue, the message data in the delay-sensitive queue is sent first. As long as there is message data in the delay-sensitive queue, the electronic device will loop through steps 701 to 704 until all message data in the delay-sensitive queue are sent.

[0094] When all the data in the delay-sensitive queue is sent, the electronic device reads the time-division queue corresponding to the current time window. If there is message data in the current time-division queue, the message data in the current time-division queue is sent. Based on the cyclic switching of the time window, the electronic device can evenly send the message data in different time-division queues, so that the message data in each time-division queue can be transmitted normally.

[0095] If there is no message data in the time-division queue corresponding to the current time window for more than a certain time (a corresponding first threshold can be set), the electronic device will read the non-delay-sensitive queue. If there is message data in the non-delay-sensitive queue, the message data in the non-delay-sensitive queue will be sent until the end of the current time window. If the message data in the non-delay-sensitive queue has been sent before the end of the current time window, the process returns to step 701 and re-reads the delay-sensitive queue.

[0096] Through the above process, the message data in the delay-sensitive queue can be sent in time; the message data in the time-division queue can be sent evenly to avoid the message data in a certain time-division queue waiting for a long time; the message data in the non-delay-sensitive queue can be sent when idle, reducing resource waste. Figure 8 Schematic diagram of the structure of a data transmission control device provided in an embodiment of the present application. The device can be deployed in the above electronic device to implement the data transmission control method provided in an embodiment of the present application. Figure 8 As shown, the device may include: an acquisition module 810, a processing module 820 and a sending module 830.

[0097] The acquisition module 810 is used to acquire the message data to be sent in the socket.

[0098] The processing module 820 is used to segment the non-delay-sensitive service messages in the message data if it is determined that the message data contains the delay-sensitive service messages.

[0099] The sending module 830 is used to send the delay-sensitive service message and the segmented non-delay-sensitive service message to the queuing discipline Qdisc queue.

[0100] For specific details, please refer to the description of the above method flow.

[0101] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0102] The electronic device 900 may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, a battery 942, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a speaker 970A, a receiver 970B, a microphone 970C, an earphone interface 970D, a sensor module 980, a button 990, a motor 991, an indicator 992, a camera 993, a display screen 994, and a subscriber identification module (SIM) card interface 995, etc. The sensor module 980 may include a pressure sensor 980A, a gyroscope sensor 980B, an air pressure sensor 980C, a magnetic sensor 980D, an acceleration sensor 980E, a distance sensor 980F, a proximity light sensor 980G, a fingerprint sensor 980H, a temperature sensor 980J, a touch sensor 980K, an ambient light sensor 980L, a bone conduction sensor 980M, and the like.

[0103] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0104] The processor 910 may include one or more processing units, for example, the processor 110 may include a central processing unit (CPU), a graphics processing unit (GPU), and a display controller, etc. Different processing units may be independent devices or integrated into one or more processors.

[0105] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0106] The processor 910 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. In some embodiments, the processor 910 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, etc.

[0107] The charging management module 940 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 940 may receive charging input from a wired charger through the USB interface 930. In some wireless charging embodiments, the charging management module 940 may receive wireless charging input through a wireless charging coil of the electronic device 900. While the charging management module 940 is charging the battery 942, it may also power the electronic device through the power management module 941.

[0108] The power management module 941 is used to connect the battery 942, the charging management module 940 and the processor 910. The power management module 941 receives input from the battery 942 and / or the charging management module 940 to provide power to the processor 910, the internal memory 921, the display screen 994 and the like.

[0109] The wireless communication function of the electronic device 900 can be implemented through antenna 1, antenna 2, mobile communication module 950, wireless communication module 960, modem processor and baseband processor.

[0110] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 950 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to electronic device 900. Mobile communication module 950 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. Mobile communication module 150 can receive electromagnetic waves from antenna 1, and filter, amplify and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. Mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through antenna 1.

[0111] The modulation and demodulation processor may include a modulator and a demodulator, wherein the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal, and the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.

[0112] The wireless communication module 960 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 910. The wireless communication module 960 can also receive signals to be sent from the processor 910, modulate the frequencies of the signals, amplify the signals, and convert them into electromagnetic waves for radiation via the antenna 2.

[0113] In some embodiments, antenna 1 of electronic device 900 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 960, so that electronic device 900 can communicate with the network and other devices through wireless communication technology.

[0114] The electronic device 900 implements the display function through a GPU, a display screen 994, etc. The GPU is a microprocessor for image processing, connected to the display screen 994. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0115] The display screen 994 is used to display images, videos, etc. The display screen 994 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0116] The electronic device 900 can realize the shooting function through ISP, camera 993, video codec, GPU and display screen 994.

[0117] The ISP is used to process the data fed back by the camera 993. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0118] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0119] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 900 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0120] The video codec is used to compress or decompress digital video. The electronic device 900 may support one or more video codecs.

[0121] The external memory interface 920 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.

[0122] The internal memory 921 can be used to store computer executable program codes, which include instructions. The internal memory 921 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 900 (such as audio data, a phone book, etc.), etc. The processor 910 executes various functional applications and data processing of the electronic device 900 by running instructions stored in the internal memory 921 and / or instructions stored in a memory provided in the processor.

[0123] The electronic device 900 can implement audio functions such as music playing and recording through the audio module 970, the speaker 970A, the receiver 970B, the microphone 970C, the headphone jack 970D, and the application processor.

[0124] The audio module 970 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 970 can also be used to encode and decode audio signals.

[0125] The speaker 970A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0126] The receiver 970B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0127] Microphone 970C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0128] The earphone interface 970D is used to connect a wired earphone and can be the USB interface 930 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0129] The pressure sensor 980A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 994 .

[0130] The gyro sensor 980B can be used to determine the motion posture of the electronic device 900. In some embodiments, the angular velocity of the electronic device 900 around three axes (ie, x, y, and z axes) can be determined by the gyro sensor 980B. The gyro sensor 980B can be used for anti-shake shooting.

[0131] The air pressure sensor 980C is used to measure air pressure. In some embodiments, the electronic device 900 calculates the altitude through the air pressure value measured by the air pressure sensor 980C to assist in positioning and navigation.

[0132] The magnetic sensor 980D includes a Hall sensor, and the electronic device 900 can use the magnetic sensor 980D to detect the opening and closing of the flip leather case.

[0133] The acceleration sensor 980E can detect the magnitude of the acceleration of the electronic device 900 in all directions (generally three axes). When the electronic device 900 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0134] The distance sensor 980F is used to measure the distance. The electronic device 900 can measure the distance by infrared or laser.

[0135] The proximity light sensor 980G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The electronic device 100 may use the proximity light sensor 980G to detect when a user holds the electronic device 100 close to their ear to make a call, so as to automatically turn off the screen to save power.

[0136] The ambient light sensor 980L is used to sense the ambient light brightness, the fingerprint sensor 980H is used to collect fingerprints, and the temperature sensor 980J is used to detect temperature.

[0137] The touch sensor 980K is also called a "touch control device". The touch sensor 980K can be set on the display screen 994. The touch sensor 980K and the display screen 994 form a touch screen, also called a "touch control screen". The touch sensor 980K is used to detect a touch operation acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.

[0138] The bone conduction sensor 980M can obtain vibration signals. In some embodiments, the bone conduction sensor 980M can obtain vibration signals of vibrating bones of the human body. The bone conduction sensor 980M can also contact the human body's pulse to receive blood pressure beating signals.

[0139] The key 990 includes a power key, a volume key, etc. The key 990 may be a mechanical key or a touch key. The electronic device 900 may receive key input and generate key signal input related to user settings and function control of the electronic device 900.

[0140] Motor 991 can generate vibration prompts. Motor 991 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. Motor 991 can also correspond to different vibration feedback effects for touch operations on different areas of display screen 994.

[0141] Indicator 992 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0142] The SIM card interface 995 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 900 by inserting the SIM card interface 995 or removing the SIM card from the SIM card interface 995 .

[0143] The software system of the electronic device 900 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 900.

[0144] The embodiment of the present application also provides a non-temporary computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the data transmission control method provided by the embodiment of the present application.

[0145] The above-mentioned non-temporary computer-readable storage medium can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (Read Only Memory; hereinafter referred to as: ROM), an erasable programmable read-only memory (ErasableProgrammable Read Only Memory; hereinafter referred to as: EPROM) or flash memory, optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0146] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0147] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0148] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes 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 of the present invention or some parts of the embodiments.

[0149] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

Claims

1. A data transmission control method, characterized in that: include: Get the message data to be sent in the socket; When the message data includes a delay-sensitive service message, segmenting and processing the non-delay-sensitive service message in the message data; The delay-sensitive service message and the segmented non-delay-sensitive service message are sent to a queuing rule queue.

2. The method according to claim 1, characterized in that The segmenting of the non-delay-sensitive service messages in the message data includes: Slice the non-delay-sensitive service message based on the first length value; The first length value is related to the message length of the non-delay-sensitive service message.

3. The method according to claim 2, characterized in that The segmenting of the non-delay-sensitive service messages in the message data includes: Slice the non-delay-sensitive service message based on the first length value; The first length value is related to the message length and message transmission speed of the non-delay-sensitive service message.

4. The method according to claim 3, characterized in that The segmenting of the non-delay-sensitive service messages in the message data includes: Slice the non-delay-sensitive service message based on the first length value; The first length value is related to the transmission delay threshold of the non-delay-sensitive service message and the message transmission time.

5. The method according to claim 4, characterized in that The number of segments into which the non-delay-sensitive service message is divided is related to a multiple relationship between the message transmission time of the non-delay-sensitive service message and the transmission delay threshold.

6. The method according to claim 4, characterized in that The delay-sensitive service messages in the message data have corresponding transmission delay indicators, and the transmission delay threshold is the minimum value of the transmission delay indicators.

7. The method according to claim 2, characterized in that The segmenting process of the non-delay-sensitive service message based on the first length value includes: The non-delay-sensitive service message is segmented based on the first length value as a length reference, wherein the message length after the non-delay-sensitive service message is segmented is equal to the first length value corresponding to it.

8. The method according to claim 1, characterized in that Before obtaining the message data to be sent in the socket, the method further includes: Receive message data sent by different applications; When the service identification of the message data is a delay-sensitive service message, a first flag is set; The message data after the service identification is completed is sent to the socket.

9. The method according to claim 8, characterized in that The message data has corresponding global variables; When the service identification of the message data is a delay-sensitive service message, setting a first flag includes: When the service identification of the message data is a delay-sensitive service message, the global variable corresponding to the message data is set to a first value; otherwise, the global variable corresponding to the message data is set to a second value.

10. The method according to claim 8, characterized in that The method further comprises: Detecting whether there is message data with the first identifier set in the socket; If so, it is determined that the message data includes the delay-sensitive service message; otherwise, it is determined that the message data does not include the delay-sensitive service message.

11. The method according to claim 1, characterized in that: The queuing rules queues include: delay-sensitive queues, time-division queues and non-delay-sensitive queues; The sending the delay-sensitive service message and the segmented non-delay-sensitive service message to a queuing rule queue includes: The delay-sensitive service message is sent to the delay-sensitive queue, and the non-delay-sensitive service message is sent to the time-division queue or the non-delay-sensitive queue.

12. The method according to claim 11, characterized in that The queuing rule queue includes a plurality of time-division queues, and the method further includes: Allocate corresponding time windows to the time-division queues; The time windows of the time-division queue are traversed periodically and cyclically. Each time a time window is traversed, the message data in the time-division queue corresponding to the current time window is sent to the network card NIC.

13. The method according to claim 12, characterized in that The method further comprises: Sending message data of a time-division queue, when detecting that there is a delay-sensitive service message in the delay-sensitive queue, suspending sending message data in the current time-division queue, and sending the delay-sensitive service message to the NIC; After all the delay-sensitive service messages in the delay-sensitive queue are sent, the message data in the corresponding time-division queue is sent based on the currently traversed time window.

14. The method according to claim 12, characterized in that The method further comprises: Sending message data of the time-division queue, when detecting that there is no message data in the current time-division queue and the duration exceeds a first threshold, suspending the sending of message data in the current time-division queue, and sending the message data in the non-delay-sensitive queue to the NIC; After the current time window ends, the sending of the message data in the non-delay-sensitive queue is stopped.

15. The method according to claim 1, characterized in that The method further comprises: When the message data does not include the delay-sensitive service message, the non-delay-sensitive service message in the message data is not segmented; The message data is directly sent to the queuing rule queue.

16. A data transmission control device, characterized in that: include: An acquisition module is used to obtain the message data to be sent in the socket; A processing module, used for segmenting and processing non-delay-sensitive service messages in the message data when the message data contains delay-sensitive service messages; The sending module is used to send the delay-sensitive service message and the segmented non-delay-sensitive service message to a queuing rule queue.

17. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 15.

19. A computer program product, characterized in that The computer program product comprises executable instructions, and when the executable instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 15.