Wireless data packet aggregation transmission method, electronic device and medium thereof
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2020-12-15
- Publication Date
- 2026-07-14
AI Technical Summary
In existing wireless network packet transmission mechanisms, network latency is affected by channel contention and random packet arrival, leading to increased network latency. This has a significant impact on applications with high network latency requirements, such as screen mirroring applications, and reduces user experience.
By marking network packets from different applications, applications with high and low network latency requirements are distinguished. For applications with high latency requirements, the header/tail of the data segment is marked. Network packets with the same data segment are aggregated and sent. A time threshold for aggregation and sending is set to ensure normal data transmission.
It reduces data transmission latency for applications with high network latency requirements, improves data transmission efficiency, and enhances user experience.
Smart Images

Figure CN114641035B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer network technology, and in particular to a wireless data packet aggregation and transmission method and its electronic device and medium. Background Technology
[0002] Currently, in scenarios where users interact with electronic devices via wireless networks, such as video viewing, game control, and remote control operations, network latency has become a significant factor affecting user experience. In existing wireless network data packet transmission mechanisms, network latency is influenced by various factors, such as channel contention and random arrival of network data packets.
[0003] For example, in the IEEE 802.11 standard for implementing wireless network communication, when an electronic device sends data via a wireless network, it first needs to send a wireless network data packet for channel detection. This wireless network data packet occupies a separate transmission channel for transmission. Subsequently, the receive queue is checked periodically, and the wireless network data packets in the receive queue are sent in batches. Since the arrival time of the network data packets corresponding to the transmitted data in the receive queue is random, different parts of the transmitted data may be sent at different times, resulting in an increase in the overall network latency of the transmitted data. For example, a frame of image data is about 30KB, divided into about 30 network data packets. The order in which these network data packets arrive at the receive queue may be 4 in the first time period, 8 in the second time period, and 17 in the third time period. Therefore, a frame of image data needs to be sent out in three parts, and the network latency of sending it three times is longer than the network latency of sending a frame of image data all at once.
[0004] Furthermore, since each data transmission requires channel contention before it can be used for transmission, and channel contention is uncontrollable, the more transmissions occur, the more channel contention occurs, and the more uncontrollable the network latency becomes. Additionally, each data transmission is performed as a batch of data packets, requiring the addition of a header. When transmitting small amounts of data, the header consumes significant channel resources, reducing the efficiency of wireless data transmission. Summary of the Invention
[0005] This application provides a wireless data packet aggregation and transmission method, as well as an electronic device and medium thereof, which can mark the source application and the data segment header / tail of network data packets from applications with high network latency requirements. Then, by checking the marks, network data packets from applications with high network latency requirements that contain data in the same data segment are sent as a batch of data packets, thereby reducing the network latency of data transmission for applications with high network latency requirements.
[0006] In a first aspect, embodiments of this application provide a method for wireless data packet aggregation and transmission for an electronic device, the method comprising:
[0007] The system acquires the data to be sent to the wireless network from either the first or second application; encapsulates the data into network packets and marks the network packets, wherein the marking of the network packets corresponding to the first application is different from the marking of the network packets corresponding to the second application; aggregates the network packets according to the marking of the network packets corresponding to the first application and sends the aggregated network packets as a batch of data packets to the wireless network; and sends the network packets corresponding to the second application to the wireless network according to the marking of the network packets corresponding to the second application.
[0008] In the embodiments of this application, the first application is an application with high network latency requirements, and the second application is an application with low network latency requirements. The application with high network latency requirements is very sensitive to the network latency of data transmission. Therefore, the data sent by the application with high network latency requirements and the data sent by the application with low network latency requirements are marked differently, and different data transmission processes are performed according to the different marks.
[0009] For example, the first application is a screen mirroring application, and the second application is a file transfer application. The screen mirroring application needs to send many image frames. Sending a single image frame in multiple batches would result in significant network latency, leading to stuttering in image frame reception and display, and degrading the user experience. Therefore, the image frame data of the screen mirroring application is marked, and the image frame data of the screen mirroring application is sent all at once according to the corresponding mark, thereby reducing the network latency of data transmission for the screen mirroring application and improving the user's viewing experience. On the other hand, the file data sent by the file transfer application is not sensitive to network latency, and sending it in multiple batches will not have a significant impact, so there is no need to aggregate the data for sending.
[0010] In one possible implementation of the first aspect above, the method further includes:
[0011] Based on whether the data in the network data packet originates from a first application or a second application, the network data packet is tagged with the source application. This source application tagging allows the wireless data packet transmission module to determine whether the data in the network data packet originates from the first application or the second application by checking the source application tag.
[0012] In one possible implementation of the first aspect described above, the method further includes: marking the network data packets corresponding to the first application, which contain the header or tail data of the data segments, with data segment headers or tails according to the data segments corresponding to the data in the network data packets corresponding to the first application. Multiple network data packets corresponding to the same data segment are aggregated and sent to the wireless network as a single batch of data packets during transmission. That is, the first application is an application with high network latency requirements. The data sent by the application with high network latency requirements is decomposed into multiple data segments, and sending the data in each data segment simultaneously can reduce the corresponding network latency.
[0013] In one possible implementation of the first aspect above, the method further includes:
[0014] If the aggregation and transmission time of aggregated network data packets exceeds a preset threshold, the aggregated network data packets will be sent as a single batch of data packets. However, the aggregated network data packets will not include network packets with data segment header and / or data segment tail markers. This implements a timeout mechanism for the aggregated network data packets, ensuring that even if network packets with data segment header and / or data segment tail markers are lost, the transmission will not be delayed indefinitely, thus guaranteeing normal data delivery.
[0015] In one possible implementation of the first aspect above, the method further includes:
[0016] The header of a network packet includes at least one of the following: source application marker, data segment header marker, and data segment trailer marker. This means that the appropriate markers are added to the header of the network packet, eliminating the need to add extra data to the data portion of the packet, thus simplifying network packet processing.
[0017] In one possible implementation of the first aspect above, the method further includes:
[0018] Reserved bits in the header of a network data packet include at least one of the following: source application flag, data segment header flag, and data segment trailer flag. This means that marking is done in the reserved bits of the network data packet header, making full use of unused resources in the network data packet without adding extra resources and avoiding waste of network transmission resources.
[0019] In one possible implementation of the first aspect above, the method further includes:
[0020] Electronic devices are mobile terminals. That is, electronic devices are not limited to mobile terminals such as mobile phones, but can also be electronic devices such as servers and PCs.
[0021] Secondly, embodiments of this application provide an electronic device, which includes:
[0022] The acquisition module is used to acquire the data that the first application or the second application needs to send to the wireless network.
[0023] A tagging module is used to encapsulate the data sent by the first application or the second application into a network data packet and tag the network data packet, wherein the tag of the network data packet corresponding to the first application is different from the tag of the network data packet corresponding to the second application.
[0024] The aggregation module is used to aggregate the network data packets according to the tag of the network data packets corresponding to the first application, and send the aggregated network data packets as a batch of data packets to the wireless network; it is also used to send the network data packets corresponding to the second application to the wireless network according to the tag of the network data packets corresponding to the second application.
[0025] Thirdly, embodiments of this application provide a machine-readable medium storing instructions that, when executed on a machine, cause the machine to perform any of the possible methods described in the first aspect.
[0026] Fourthly, embodiments of this application provide an electronic device, including: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, one of the processors of the electronic device, for performing any of the possible methods described in the first aspect above. Attached Figure Description
[0027] Figure 1 According to some embodiments of this application, an application scenario diagram of wireless data packet aggregation and transmission is shown.
[0028] Figure 2 According to some embodiments of this application, a schematic diagram of application data transmission in a mobile phone 100 is shown.
[0029] Figure 3 According to some embodiments of this application, an interactive diagram of application data transmission in a mobile phone 100 is shown.
[0030] Figure 4 According to some embodiments of this application, a schematic diagram of the composition of a TCP packet is shown.
[0031] Figure 5 According to some embodiments of this application, a schematic diagram of the TCP packet header structure is shown.
[0032] Figure 6a According to some embodiments of this application, scenarios are shown where marker data is stored using consecutive bits of different numbers in the reserved bits.
[0033] Figure 7According to some embodiments of this application, a scenario is shown where consecutive bits in reserved bits are used to store tag data.
[0034] Figure 8 According to some embodiments of this application, a schematic diagram is shown where a frame of image data is encapsulated into multiple TCP packets.
[0035] Figure 9 According to some embodiments of this application, schematic diagrams are shown of inspecting network packets and aggregating related network packets.
[0036] Figure 10 According to some embodiments of this application, a flowchart of wireless packet aggregation and transmission for applications with high network latency requirements is shown.
[0037] Figure 11 According to some embodiments of this application, a flowchart of wireless data packet transmission for applications with low network latency requirements is shown.
[0038] Figure 12 According to some embodiments of this application, a structural schematic diagram of a mobile phone 100 is shown.
[0039] Figure 13 According to some embodiments of this application, a software structure block diagram of a mobile phone 100 is shown. Detailed Implementation
[0040] The illustrative embodiments of this application include, but are not limited to, a wireless data packet aggregation and transmission method and its electronic device and medium.
[0041] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0042] According to some embodiments of this application, a wireless data packet aggregation and transmission scenario 10 is disclosed. Figure 1 A schematic diagram of the scene is shown.
[0043] like Figure 1 As shown, scenario 10 includes: a first electronic device 100, a wireless access device 200, a second electronic device 300, and a server 400.
[0044] The first electronic device 100 runs various applications, including system applications and third-party applications. System applications control and manage the first electronic device 100, while third-party applications, provided by third-party developers and installed on the first electronic device 100, offer users various functions such as security and anti-virus features, video playback, and instant messaging. Some applications have high network latency requirements, while others have relatively low requirements. For example, a screen mirroring application transmits video data from the first electronic device 100 to the second electronic device 300 for playback. Frame drops and stuttering in the video can significantly impact the user's viewing experience; therefore, screen mirroring applications have high network latency requirements for data transmission. On the other hand, a file transfer application transmits file data from the first electronic device 100 to the second electronic device 300. During file data transmission, the user can perform other tasks without waiting for the data transfer to complete; therefore, the user is less sensitive to the network latency of the file transfer application, and the file transfer application has low network latency requirements for data transmission.
[0045] The wireless access device 200 can forward data generated by various applications on the first electronic device 100 to the second electronic device 300.
[0046] As mentioned above, existing solutions suffer from high network latency when sending data from the first electronic device 100 to the second electronic device 300. To address this issue, in this embodiment, when the first electronic device 100 needs to send data, it can mark network data packets containing the data to be sent, based on the different applications from which the data originates. The data markings for applications with high network latency requirements differ from those for applications with low network latency requirements; for example, the data marking for applications with high network latency requirements is "0x00," while the data marking for applications with low network latency requirements is "0x01." Then, before sending the network data packets to the wireless access device 200, the first electronic device 100 determines whether the data marking of the network data packets indicates that the data packets originate from an application with high network latency requirements. If it determines that the data packets originate from an application with high network latency requirements, the first electronic device 100 further identifies the data segment to which the network data packets belong, aggregates the network data packets with other network data packets belonging to the same data segment, and then sends the aggregated network data packets as a batch of data packets to the wireless access device 200, which then forwards them to the second electronic device 200. If the first electronic device 100 determines that the data tag of the network data packet indicates that the network data packet comes from an application with low network latency requirements, then the first electronic device 100 directly sends the network data packet to the wireless access device 200 for forwarding.
[0047] In this way, by marking the data transmitted by applications with different network latency requirements, the first electronic device 100 can aggregate and send the data of applications with higher network latency requirements when sending data, thereby achieving the goal of sending network data packets with the same data segment in as few batches as possible, thereby improving data transmission efficiency, reducing network latency overhead caused by batch contention, and reducing network latency.
[0048] Server 400 is a development server for applications running on the first electronic device 100. This is understandable, although... Figure 1 Only one server 400 is shown in the diagram; however, multiple applications running on the first electronic device 100 can be developed by multiple servers. This is merely illustrative and not restrictive.
[0049] It is understood that in some embodiments, when developing applications, the server 400 can set up different types of communication application programming interfaces (APIs) for applications with different network latency requirements, thereby generating network data packets containing different data markers for the data transmitted by applications with different network latency requirements. For example, for the aforementioned screen mirroring application with high network latency requirements, the communication API set up by the server 400 for the screen mirroring application can call and control the network application programming interface when transmitting data from the screen mirroring application, including data markers indicating high network latency requirements in the generated network data packets, and marking the beginning and end of data segments that need to be aggregated for transmission (such as data segment header markers and data segment tail markers). As another example, for file transfer applications with low network latency requirements, the communication API set up by the server 400 for the file transfer application can call and control the network application programming interface when transmitting data, including data markers indicating low network latency requirements in the generated network data packets.
[0050] It is understood that, in this application, the first electronic device 100 and the second electronic device 300 may include, but are not limited to, laptop computers, desktop computers, tablet computers, smartphones, servers, wearable devices, head-mounted displays, mobile email devices, portable game consoles, portable music players, e-reader devices, televisions in which one or more processors are embedded or coupled, or other electronic devices with computing capabilities. The wireless access device 200 may include, but is not limited to, wireless routers, servers providing wireless routing functionality, etc.
[0051] Server 400 may be a hardware server or embedded in a virtualization environment. For example, according to some embodiments of this application, server 400 may be a virtual machine running on a hardware server that includes one or more other virtual machines. According to some embodiments of this application, server 400 may interact with first electronic device 100 via a network, for example, by sending data to and / or receiving data from first electronic device 100.
[0052] Figure 2 According to some embodiments of this application, a technical solution for sending application data from a mobile phone 100 to a wireless router 200 is shown. The following is based on... Figure 2 The structure shown is combined with Figure 3 The illustrated process uses a mobile phone as the first electronic device 100, a wireless router as the wireless access device 200, and a large-screen TV as the second electronic device 300 to explain the technical solution of this application. Furthermore, the following explanation uses screen mirroring applications, smart home applications, and file transfer applications on the mobile phone 100 as examples.
[0053] In some embodiments of this application, various applications capable of running on the mobile phone 100 are pre-developed on the server 400, such as screen mirroring applications, smart home applications, and file transfer applications, and then the developed applications are ported to the mobile phone 100 for operation. The applications send application data to the target device by calling corresponding communication application interfaces, thereby achieving interaction with the target device. For example, a screen mirroring application can mirror a video playing on the mobile phone 100 to a large-screen TV 300, that is, send the video stream data currently playing on the mobile phone 100 to the large-screen TV 300 for playback via a wireless network.
[0054] Specifically, such as Figure 2 and Figure 3 As shown, it includes:
[0055] S301: The application in the application layer of mobile phone 100 determines to send data.
[0056] The mobile phone 100 can run various applications such as screen mirroring applications, smart home applications, and file transfer applications. These applications can all send data to the wireless network via the mobile phone 100. As mentioned earlier, in some embodiments of this application, when an application on the mobile phone 100 needs to send data, it first needs to determine the data to be sent. Different applications determine the data to be sent in different ways, such as generating the data to be sent based on user operations, obtaining the data to be sent from other applications, or determining the data to be sent based on application parameters. Furthermore, the data types sent by different applications are different. For example, screen mirroring applications send video stream data, smart home applications send command data to control smart devices, and file transfer applications send file stream data.
[0057] Taking a screen mirroring application as an example, the application sends video data playing on the phone 100 to the large-screen TV 300 for playback, thus projecting the screen content of the phone 100 onto the large-screen TV 300. Since videos are typically sequences of multiple frames, the data sent by the screen mirroring application also consists of multiple frames. By sending and displaying these frames on the large-screen TV 300, the video can be played on the TV.
[0058] In some embodiments of this application, when the screen mirroring application determines which data to send, it can obtain the currently playing video data from the video playback application on the mobile phone 100 and determine the video data as the data to be sent. When the video playback application plays the video, it first decodes the video file according to the format of the video file, and then encodes the decoded video data into byte stream format video stream data for playback. The screen mirroring application obtains the byte stream format video stream data from the video playback application and uses it as the data to be sent.
[0059] In some embodiments of this application, the screen mirroring application may also decode the corresponding video file according to the received video file parameters, then encode the decoded video data into video stream data in byte stream form, and determine the video stream data as the data to be sent.
[0060] In some embodiments of this application, the smart home application can generate corresponding preset instructions based on the user's operation, such as a click or swipe operation on the touch screen of the mobile phone 100, and preset instructions such as turning on the smart device or amplifying the sound of the smart device, and then determining these instructions as sending data.
[0061] S302: The application in the application layer calls the communication class application interface in the framework layer and passes the call parameters.
[0062] In some embodiments of this application, the framework layer provides multiple types of communication application programming interfaces (APIs), each offering different network latency levels for applications with varying network latency requirements to call. For example, the framework layer provides three types of communication APIs: Send_Streaming API, Send_Message API, and Send_File API. The Send_Streaming API offers lower network latency and can therefore be called by applications with high network latency requirements, such as screen mirroring applications, thus meeting their low network latency needs. The Send_Message API and Send_File API offer normal network latency and can therefore be called by applications with low network latency requirements, such as smart home applications and file transfer applications. Furthermore, the Send_Message API and Send_File API are optimized for different types of applications. Therefore, command-based applications, such as smart home applications, can call the Send_Message API, while file-based applications, such as file transfer applications, can call the Send_File API to more precisely meet their respective network data transmission needs.
[0063] In some embodiments of this application, when an application calls a communication application programming interface (API), the data to be sent and the target device identifier are passed as API call parameters to the corresponding communication API. The communication API then performs subsequent processing on the data to be sent and the target device identifier through its internal functional implementation. For example, when a screen mirroring application calls the Send_Streaming API, it passes the video stream data sent by the screen mirroring application and the network address of the large-screen TV 300 as API parameters to the Send_Streaming API, which then performs corresponding processing based on the received API parameters.
[0064] S303: The communication application interface in the framework layer calls the network application interface in the driver layer and passes the call parameters.
[0065] In some embodiments of this application, communication application programming interfaces (APIs) call network application programming interfaces (APIs) to generate and mark network data packets. The network API is used to implement various network processing-related functions, such as encapsulating application data into data packets of different protocols, sending or reading network data packets, connecting to network devices, or listening for connection requests from external network devices. The network API is typically provided by the operating system of the mobile phone 100 and is called by applications running on the mobile phone 100.
[0066] In some embodiments of this application, when a communication application interface calls a network application interface, it passes data segments in the transmitted data, the network address of the target device, the source application tag, etc., as interface call parameters to the network application interface.
[0067] S304: The network application programming interface in the driver layer generates network data packets.
[0068] In some embodiments of this application, the network application programming interface (API) encapsulates relevant data, such as data segments, into network data packets that can be transmitted over the network based on the received API call parameters. Specific methods will be described in detail below.
[0069] S305: The network application programming interface in the driver layer marks the generated network packets.
[0070] In some embodiments of this application, the network application programming interface (API) marks the generated network data packets, such as source application marking and data segment header / tail marking, before transmitting the marked network data packets to the wireless data packet transmission module in the hardware layer. Specific solutions will be described in detail below.
[0071] S306: The network application interface in the driver layer passes tagged network packets to the wireless packet transmission module in the hardware layer. In some embodiments of this application, the wireless packet transmission module in the hardware layer can be implemented as a Wi-Fi chip or a Wi-Fi module. The wireless packet transmission module uses a packet buffer to temporarily store the transmitted network packets. The packet buffer can be implemented as a packet queue for temporarily storing network packets from the network application interface.
[0072] S307: The wireless packet transmission module in the hardware layer determines whether network packets need to be aggregated based on the tags on the network packets.
[0073] In some embodiments of this application, the wireless packet transmission module in the hardware layer checks the source application flag and data segment header / tail flag of the network packets in the packet buffer, and determines whether the network packets need to be aggregated based on these flags. If aggregation is required, step S309 is executed; if aggregation is not required, step S308 is executed.
[0074] S308: The wireless data packet sending module in the hardware layer directly transmits network data packets.
[0075] In some embodiments of this application, if the wireless data packet sending module in the hardware layer determines that aggregation is not required after checking the markings of the network data packets, it will directly pass the network data packets that do not need to be aggregated to the baseband chip in the device layer.
[0076] S309: The wireless packet sending module in the hardware layer determines whether the aggregation sending time has expired.
[0077] In some embodiments of this application, the wireless data packet sending module in the hardware layer checks the markings of network data packets and determines that aggregation is required. Then, it further determines whether the aggregation sending time has timed out. The aggregation sending time is used to calculate the waiting time for aggregating network data packets. If the aggregation sending time exceeds a preset time threshold, such as 2ms, it is determined that the aggregation sending time has timed out. If it times out, step S310 is executed; otherwise, step S311 is executed.
[0078] S310: The wireless data packet sending module in the hardware layer directly transmits incomplete aggregated network data packets.
[0079] In some embodiments of this application, after determining that the aggregation transmission time has expired, the wireless data packet transmission module in the hardware layer will directly transmit the incomplete aggregation network data packet as a batch of data packets (i.e., Batch) to the baseband chip in the device layer, even if the aggregated network data packet is not complete, i.e., at least one of the network data packet with a data segment header mark or the network data packet with a data segment tail mark is missing.
[0080] S311: The wireless packet sending module in the hardware layer waits for and transmits complete aggregated network packets.
[0081] In some embodiments of this application, the wireless data packet sending module in the hardware layer waits for the arrival of subsequent network data packets of the aggregated network data packet after determining that the aggregation transmission time has not expired, and transmits the aggregated network data packet as a batch of data packets to the baseband chip in the device layer after the aggregated network data packet is complete.
[0082] S312: The baseband chip in the device layer receives and transmits network data packets.
[0083] In some embodiments of this application, the baseband chip converts the received network data packets into corresponding electromagnetic signals and sends them out, where they are received by the wireless router 200. The wireless router 200 then forwards the network data packets to the corresponding target device based on their destination address. For example, if the destination address of the network data packet is the network address of the large-screen TV 300, then the network data packet is forwarded to the large-screen TV 300.
[0084] It is understood that, in some embodiments, the generation and marking of network packets mentioned in S304 and S305 above can be implemented in the following ways:
[0085] In some embodiments of this application, the network application programming interface is a socket. A socket is an abstraction of an endpoint for bidirectional communication between different network devices in a network, and provides a mechanism for exchanging data using network protocols. It is the interface through which applications communicate via network protocols. Sockets also provide a programming mechanism, offering applications various network communication-related functions. By calling the corresponding functions, applications can implement functions such as encapsulating network data packets, setting network data packet information, and sending or receiving network data packets.
[0086] Communication application programming interfaces (APIs) pass data sent from the screen mirroring application as call parameters to the relevant function in the socket interface. The relevant function then encapsulates the sent data into network data packets. All data sent by the screen mirroring application is divided into multiple data segments. Since the size of a data segment typically exceeds the capacity of a single network data packet, each segment needs to be encapsulated into multiple network data packets. The following explanation uses a network data packet format based on the Transmission Control Protocol (TCP) as an example. Figure 4 As shown, a TCP packet is divided into a TCP header and a TCP data portion. The TCP header specifies communication-related information for the TCP packet, such as the source port, destination port, and flags used to manage the TCP connection. The TCP data portion stores the specific data being transmitted, such as a portion of a data segment. To allow the wireless packet sending module to know which application the data in the network packet originates from, some embodiments of this application record the origin of the network packet by marking it in the header, such as from a screen mirroring application, a smart home application, or a file transfer application. Marking the network packet header is done when developing the communication type application interface. Specifically, it involves setting corresponding function parameters when calling the relevant function in the socket interface, for example, assigning different values to the function parameters. When the function generates the network packet, it generates the corresponding mark based on the value of the function parameter. The following explanation still uses a TCP format network packet as an example.
[0087] like Figure 5 As shown, the TCP header consists of two parts: a fixed header and header options. The fixed header is 20 bytes long and includes a 16-bit source port number, a 16-bit destination port number, a 32-bit sequence number, a 32-bit acknowledgment number, a 4-bit header length, 6 reserved bits, 6 flags, a 16-bit window size, a 16-bit checksum, and a 16-bit urgent pointer. The header options are variable-length optional information, containing a maximum of 40 bytes. Header options include a 1-byte option type (kind), a 1-byte option length (length), and multiple bytes of option details (info).
[0088] The source and destination port numbers specify the port numbers used by the processes corresponding to the two applications communicating over the network. The sequence number is a random value (i.e., the initial sequence number) in the first TCP packet sent; subsequent TCP packets use byte numbers from the byte stream. The acknowledgment number is used to acknowledge TCP packets sent by the other party; its value is the sequence number of the received TCP packet incremented by 1. The header length indicates the number of 4-byte data bytes in the TCP header; a 4-bit header length can represent a maximum TCP header size of 60 bytes. Reserved bits are typically unused. Each of the 6 flag bits represents a flag; there are 6 flags in total: URG, ACK, PSH, RST, SYN, and FIN. The URG flag indicates whether the urgent pointer is valid; the ACK flag indicates whether the acknowledgment number is valid; the PSH flag instructs the receiver to immediately read data from the buffer; the RST flag requests the re-establishment of a TCP connection; the SYN flag requests the establishment of a TCP connection; and the FIN flag notifies the other end that the local end will close the TCP connection. The window size is used for TCP flow control, informing the other end how many bytes of data its TCP receive buffer can hold, allowing the other end to control the TCP packet sending rate. The checksum is filled by the sender, and the receiver performs a Cyclic Redundancy Check (CRC) algorithm on the received TCP packets to verify if they have been corrupted during network transmission. The urgent pointer is used by the sender to send urgent data to the receiver; it is a positive offset, and the sum of the urgent pointer and the sequence number indicates the sequence number of the next byte after the last urgent data.
[0089] In some embodiments of this application, reserved bits in the TCP packet header are used to mark the source application of the TCP packet. The reserved bits consist of 6 binary bits, each of which can store either "0" or "1". The source application of a TCP packet is the application from which the specific data in the data portion of the TCP packet originates. For example, if the specific data in TCP packet A comes from a screen mirroring application, then the source application of TCP packet A is the screen mirroring application; if the specific data in TCP packet B comes from a file transfer application, then the source application of TCP packet B is the file transfer application.
[0090] In some embodiments of this application, TCP packets can be marked according to the type of the source application, and the data used for marking is called marking data. For example, applications with high network latency requirements are marked as one type, and applications with low network latency requirements are marked as another type. For example, applications with high network latency requirements, such as screen mirroring applications, are marked as "0x01", where "0x01" is the marking data, while applications with low network latency requirements, such as smart home applications and file transfer applications, are marked as "0x10", where "0x10" is the marking data.
[0091] In some embodiments of this application, the source application can also be directly marked in the TCP data packet, that is, different marking data corresponds to each source application. For example, if there are 3 source applications: a screen casting application, a smart home application, and a file transfer application, different marking data can be specified for each source application, such as the marking data of the screen casting application being "0x00", the marking data of the smart home application being "0x01", and the marking data of the file transfer application being "0x10".
[0092] When tagging a source application, you can use consecutive bits consisting of multiple bits from the reserved bits to store the tag data. For example, you can use two consecutive bits from the reserved bits to store the tag data, or you can use three consecutive bits or four consecutive bits from the reserved bits to store the tag data. Figures 6(a) to 6(c) The following scenarios illustrate the use of consecutive bits in the reserved bits to store the tag data. In Figure 6(a), two consecutive bits in the reserved bits are used for tagging, and the tag data is "0x01". In Figure 6(b), three consecutive bits in the reserved bits are used for tagging, and the tag data is "0x001". In Figure 6(c), four consecutive bits in the reserved bits are used for tagging, and the tag data is "0x0001".
[0093] It is understandable that when the number of consecutive bits used for tagging data is less than the number of reserved bits (i.e., 6 bits), multiple consecutive bits can be used to store the tagging data, and any one of these multiple consecutive bits can be arbitrarily selected to store the tagging data. For example... Figure 7 As shown, the marker data "0x01" uses two consecutive bits. Among the reserved bits, there are consecutive bits consisting of bits 1 and 2, consecutive bits consisting of bits 2 and 3, consecutive bits consisting of bits 3 and 4, consecutive bits consisting of bits 4 and 5, and consecutive bits consisting of bits 5 and 6 that can meet the requirements for storing the marker data. Therefore, one of these consecutive bits can be selected to store the marker data, such as selecting the consecutive bits consisting of bits 3 and 4.
[0094] In some embodiments of this application, data packets containing the header / tail of data segments in data transmitted by applications with high network latency requirements are marked with header / tail.
[0095] A data segment refers to a continuous stream of data sent by an application in byte-stream format, such as a single image frame in a video stream sent by a screen mirroring application. Since data segments typically exceed the size of a single network packet, they need to be distributed across multiple network packets for transmission. This involves dividing the data segment into multiple sub-segments, each transmitted by a separate network packet. The data segment header contains the data that begins the segment, and the data segment tail contains the data that ends the segment. Network packets containing the data segment header are marked with a data segment header tag, and network packets containing the data segment tail are marked with a data segment tail tag.
[0096] For example, the data sent by a screen mirroring application is divided into multiple data segments, each segment is encapsulated in multiple TCP packets, and one data segment is one frame of image data. The TCP packets containing the header / tail of this image data frame are marked with header / tail tags. For example... Figure 8 As shown, a frame of image data is divided into multiple parts and encapsulated into TCP packets 1 to N. The header data of the image data frame is encapsulated in TCP packet 1, and the tail data of the image data frame is encapsulated in TCP packet N. Therefore, a data segment header mark is added to TCP packet 1, and a data segment tail mark is added to TCP packet N.
[0097] It is understandable that by marking the header / tail of the data segment sent by the screen mirroring application in the network data packet, the wireless data packet sending module of the mobile phone 100 can aggregate related network data packets according to the header / tail marking of the data segment of the network data packet and send them as a batch of data packets, thereby reducing the network latency when the data segment of the screen mirroring application sends data.
[0098] In some embodiments of this application, reserved bits in the TCP packet header are used to mark the header / tail of a data segment. When the data in the TCP packet is the header data of a data segment, the data segment header mark is written into the reserved bits; when the data in the TCP packet is the tail data of a data segment, the data segment tail mark is written into the reserved bits.
[0099] In some embodiments of this application, the data segment header mark and the data segment tail mark use the same bits in the reserved bits. For example, two consecutive bits consisting of bits 5 and 6 in the reserved bits are used to store the data segment header mark or the data segment tail mark. The data segment header mark and the data segment tail mark use different mark data. The mark data of the data segment header mark is "0x01" and the mark data of the data segment tail mark is "0x10". Usually, the data segment header mark and the data segment tail mark will not appear in the same TCP packet, thus distinguishing them.
[0100] In other embodiments of this application, the data segment header mark and the data segment trailer mark use different bits from the reserved bits (i.e., they are marked separately). For example, bit 5 of the reserved bits is used to store the data segment header mark, and bit 6 is used to store the data segment trailer mark. When the data in the data portion of the TCP packet is header data, bit 5 is set to "0x1"; when the data in the data portion of the TCP packet is trailer data, bit 6 is set to "0x1".
[0101] It is understandable that when both the source application flag and the data header / data segment tail flag are included in the reserved bits, the sum of the number of bits used for the source application flag and the number of bits used for the data header / data segment tail flag cannot exceed the total number of reserved bits (6 bits). For example, if the source application flag uses 2 reserved bits, the data header / data segment tail flag can use a maximum of 4 reserved bits; conversely, if the source application flag uses 4 reserved bits, the data header / data segment tail flag can use a maximum of 2 reserved bits.
[0102] After the communication application programming interface (API) generates network data packets and marks them accordingly, it transmits the marked network data packets to the wireless data packet sending module for further processing. For screen mirroring applications, the markings in the network data packets include source application markings and data segment header / tail markings.
[0103] It is understood that, in some embodiments, the aggregation of network packets mentioned in S307 above can be implemented in the following ways:
[0104] The following explanation uses TCP packets as an example to illustrate the technical solution for wireless packet aggregation and transmission. Figure 9 As shown, the packet buffer contains 50 TCP packets waiting to be sent. These 50 TCP packets originate from different applications. The leftmost two bits of the reserved bits in the TCP packet header are used to mark the source application, and the following two bits are used to mark the data header or data trailer. An "X" in the reserved bits indicates that the corresponding bit is not used. The wireless packet sending module checks the reserved bits in the header information of each TCP packet, retrieving the leftmost two bits and the following two bits.
[0105] Continue to refer to Figure 9The wireless data packet transmission module, through inspection, determined that the leftmost two bits of the reserved bits in TCP packets 4, 15, 27, 39, and 48 were "0x00," indicating that these packets originated from the screen mirroring application. Additionally, the next two bits of the reserved bits in TCP packet 4 were "0x01," used to mark the header data, thus indicating that the data portion of TCP packet 4 contained the header data of an image frame. Similarly, the next two bits of the reserved bits in TCP packet 48 were "0x10," used to mark the tail data, indicating that the data portion of TCP packet 48 contained the tail data of that image frame. In addition, the last two bits of the reserved bits in TCP packets 15, 27, and 39 are "0x00", which is neither a header marker nor a tail marker. This indicates that the data in the data portion of these three TCP packets is neither the header data nor the tail data of the image frame, but rather the middle data of the image frame.
[0106] Therefore, the wireless data packet sending module learns that TCP packets 4, 15, 27, 39, and 48 in the data packet buffer are all TCP packets from the screen mirroring application. Since the screen mirroring application has high network latency requirements, the wireless data packet sending module aggregates these five TCP packets as data packets in the same batch of data packets. When the scheduled sending time arrives, these five TCP packets are sent as a single batch of data packets.
[0107] In some embodiments of this application, the wireless data packet transmission module sets a timeout marking mechanism for aggregated network data packets. Even if network data packets with data segment header markings and network data packets with data segment tail markings do not appear in pairs within the aggregated network data packets, the aggregated network data packets will still be transmitted as a single batch of data packets after the timeout, without needing to wait indefinitely for the arrival of network data packets with either data segment header or tail markings. For example, a threshold of 2ms can be set; if the waiting time exceeds the threshold, the aggregated network data packets will be transmitted as a single batch of data packets. By setting a timeout mechanism, the problem of data segments (i.e., a frame of image data) in the screen mirroring application's transmitted data being constantly waiting due to possible network data packet loss is avoided, thus keeping the network latency for transmitting a single frame of image data at a low level.
[0108] Figure 10This application illustrates a wireless data packet aggregation and transmission scheme for applications with high network latency requirements using a mobile phone 100, with screen mirroring as an example for detailed explanation:
[0109] Step S1001: The screen mirroring application obtains the data to be sent to the wireless network. The screen mirroring application can obtain the data from the video playback application or directly from the video file; the specific process is described above. Figure 2 The relevant descriptions will not be repeated here.
[0110] Here, the screen mirroring application can be developed on server 400 and then ported to mobile phone 100 for use. The developed screen mirroring application is usually released in the form of an installation package, such as an Android installation package. Mobile phone 100 downloads the screen mirroring application installation package and installs it. After installation, the screen mirroring application can be run.
[0111] In step S1002, the screen mirroring application encapsulates the data to be sent into network data packets. The screen mirroring application calls a communication application programming interface (API) to encapsulate the data into corresponding network data packets, each network data packet containing a portion of the data to be sent. The communication API then calls a network application programming interface (API) to specifically generate the network data packets.
[0112] In some embodiments of this application, the screen mirroring application calls a preset communication application programming interface (API) to send data over the network. The communication API can also be developed on the server 400 and ported to the mobile phone 100 for applications running on the mobile phone 100 to call. The communication APIs are divided into different types to meet the network latency requirements of different applications. Applications call the appropriate communication API that meets their specific network latency requirements. Applications with high network latency requirements, such as screen mirroring applications, can call communication APIs that meet high latency requirements, such as the Send_Streaming API, to send data, thereby reducing network latency and improving user experience. Applications with low network latency requirements, such as file transfer applications, can call communication APIs that meet normal network latency requirements, such as the Send_File API, to send data.
[0113] Step S1003: The communication application interface performs source application marking and data segment header / tail marking on network data packets through the network application interface.
[0114] In step S1004, the wireless data packet sending module checks the tags of network data packets and aggregates the relevant network data packets.
[0115] In step S1005, the wireless data packet sending module sends the aggregated network data packets as a single batch of data packets. The specific implementation process is described above and will not be repeated here.
[0116] Figure 11 The following are some other embodiments of this application illustrating a scheme for mobile phone 100 to wirelessly transmit data packets for applications with low network latency requirements, with file transfer application as an example for specific explanation:
[0117] In step S1101, the file transfer application obtains the data to be sent to the wireless network. The file transfer application can obtain the data directly from the file to be transferred, for example, by opening the file through a file access application interface and reading data from the opened file as the data to be sent.
[0118] In step S1102, the file transfer application encapsulates the data to be sent into network data packets. Specifically, the file transfer application calls the communication application programming interface (API) Send_File to encapsulate the data into corresponding network data packets, each network data packet including a portion of the data to be sent. The Send_File API calls the network application programming interface to specifically generate and mark the network data packets. The specific process is described in step S902 and will not be repeated here.
[0119] In step S1103, the communication application programming interface (API) marks the source application of network data packets through the network API. The specific process is described in step S903 regarding source application marking, and will not be repeated here. Here, no header / tail marking is performed on the network data packets corresponding to the file transfer application.
[0120] In step S1104, the wireless data packet sending module checks the markings of network data packets and does not aggregate related network data packets. The wireless data packet sending module checks the source application markings of network data packets in the data packet buffer. When it detects that a network data packet originates from a file transfer application, it stops checking the header / tail markings of the data segment of the network data packet and does not perform aggregation processing on the network data packet.
[0121] In step S1105, the wireless data packet sending module directly sends the relevant network data packets. After the scheduled sending time arrives, the wireless data packet sending module sends network data packets in the data packet buffer that do not require aggregation as a single batch of data packets. For example, the source marker of network data packet A indicates that A originates from a smart home application, and the source marker of network data packet B indicates that B originates from a file transfer application. A and B are network data packets that do not require aggregation; after the scheduled sending time arrives, A and B are sent as a single batch of data packets.
[0122] Table 1 below shows network latency comparison data for a wireless data packet aggregation and transmission method provided in some preferred embodiments of this application. As shown in Table 1, when the size of a data segment sent by an application (e.g., an image frame sent by a screen mirroring application) is approximately 30KB, the network latency without using the wireless data packet aggregation and transmission method is 3.8ms, while the network latency with the method is 3ms, representing a 22% reduction in network latency. Similarly, when the data segment size is 15KB, the network latency without the method is 2.2ms, while the network latency with the method is 1.7ms, representing a 23% reduction in network latency. Therefore, the wireless data packet aggregation and transmission method provided in some embodiments of this application can effectively reduce the network latency of applications with high network latency requirements, improving latency by more than 20%.
[0123] Data segment size Before use After use Increase ratio 30KB 3.8ms 3ms 22% 15KB 2.2ms 1.7ms 23%
[0124] Table 1
[0125] Figure 12 According to an embodiment of this application, a structural schematic diagram of a mobile phone 100 is shown. For example... Figure 12 As shown, the mobile phone 100 may include a processor 110, a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, buttons 101, and a display screen 102, etc.
[0126] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the mobile phone 100. In other embodiments of this application, the mobile phone 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0127] Mobile phone 100 is used to run applications with high network latency requirements and applications with low network latency requirements. It encapsulates the data sent by different applications into network data packets and marks them accordingly. Then, based on the marking of the network data packets, it aggregates network data packets from applications with high network latency requirements that belong to the same data segment, and sends the aggregated network data packets as a batch of data packets.
[0128] Processor 110 may include one or more processing units, such as processing modules or circuits of a central processing unit (CPU), graphics processing unit (GPU), digital signal processor (DSP), microprocessor (MCU), AI (Artificial Intelligence) processor, or field programmable gate array (FPGA). Different processing units may be independent devices or integrated into one or more processors. Processor 110 may include storage units for storing instructions and data. In some embodiments, the storage unit in processor 110 is a cache memory 180.
[0129] The power module 140 may include a power supply, a power management component, etc. The power supply may be a battery. The power management component is used to manage the charging of the power supply and the power supply to other modules.
[0130] The mobile communication module 130 may include, but is not limited to, an antenna, a power amplifier, a filter, and an LNA (Low Noise Amplifier). The mobile communication module 130 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the mobile phone 100. The mobile communication module 130 can receive electromagnetic waves via the antenna, filter and amplify the received electromagnetic waves, and then transmit them to a modem processor for demodulation. The mobile communication module 130 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via the antenna. In some embodiments, at least some functional modules of the mobile communication module 130 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 130 and at least some modules of the processor 110 may be housed in the same device.
[0131] The wireless communication module 120 may include an antenna, which enables the transmission and reception of electromagnetic waves. The wireless communication module 120 can provide solutions for wireless communication applications on the mobile phone 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The mobile phone 100 can communicate with networks and other devices via wireless communication technologies. Furthermore, the wireless communication module receives and inspects tagged network data packets, aggregates network data packets belonging to the same data segment from applications with high network latency requirements, and then transmits the aggregated network data packets as a single batch of data packets.
[0132] In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the mobile phone 100 may also be located in the same module.
[0133] The display screen 102 is used to display human-computer interaction interfaces, images, videos, etc. The display screen 102 includes a display panel.
[0134] The sensor module 190 may include proximity sensors, pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0135] The audio module 150 is used to convert digital audio information into analog audio signal output, or to convert analog audio input into digital audio signal. The audio module 150 can also be used to encode and decode audio signals. In some embodiments, the audio module 150 may include a speaker, a handset, a microphone, and a headphone jack.
[0136] Camera 170 is used to capture still images or videos. An object passes through the lens to generate an optical image that is projected onto a photosensitive element. The photosensitive element converts the light signal into an electrical signal, which is then passed to the ISP (Image Signal Processing) to be converted into a digital image signal.
[0137] Interface module 160 includes an external memory interface, a universal serial bus (USB) interface, and a subscriber identification module (SIM) card interface. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface to perform data storage. The USB interface is used for communication between the mobile phone 100 and other electronic devices. The SIM card interface is used to communicate with the SIM card installed in the mobile phone 100.
[0138] In some embodiments, the mobile phone 100 further includes buttons 101, a motor, and indicators. The buttons 101 may include volume buttons, a power button, etc. The motor is used to generate a vibration effect in the mobile phone 100, for example, vibrating when the user's mobile phone 100 is called to prompt the user to answer the call. The indicators may include laser indicators, radio frequency indicators, LED indicators, etc.
[0139] For reference Figure 13 This is a software structure block diagram of a mobile phone 100 in an embodiment of this application. The mobile phone can run applications with high network latency requirements and applications with low network latency requirements. It encapsulates the data sent by different applications into network data packets and marks them accordingly. Then, based on the markings of the network data packets, it aggregates network data packets belonging to the same data segment from applications with high network latency requirements, and then sends the aggregated network data packets as a single batch of data packets.
[0140] Figure 13 The software system of the mobile phone 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to illustrate the software structure of the mobile phone 100.
[0141] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0142] The application layer can include a series of application packages.
[0143] like Figure 13As shown, the application package may include applications such as telephone, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS, and may also include screen mirroring applications, smart home applications, file transfer applications, etc. in the embodiments of this application.
[0144] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer, such as the communication application interface and network application interface in this embodiment. The application framework layer includes some predefined functions.
[0145] like Figure 13 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0146] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0147] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0148] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0149] A phone manager is used to provide communication functions for terminal devices. For example, it manages call status (including connection and disconnection).
[0150] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0151] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.
[0152] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0153] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0154] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0155] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0156] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0157] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0158] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0159] A 2D graphics engine is a graphics engine for 2D drawing.
[0160] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, and wireless network drivers.
[0161] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art should understand that various changes in form and detail may be made thereto without departing from the spirit and scope of this application.
Claims
1. A method for wireless data packet aggregation and transmission for electronic devices, characterized in that, include: To obtain the data that the first or second application needs to send to the wireless network; The data sent by the first application or the second application is encapsulated into a network data packet, and the network data packet is marked. The first mark of the network data packet corresponding to the first application is different from the second mark of the network data packet corresponding to the second application. The first mark is used to mark applications with high network latency requirements, and the second mark is used to mark applications with low network latency requirements. The network data packets are aggregated according to the first tag of the network data packets corresponding to the first application, and the aggregated network data packets are sent to the wireless network as a batch of data packets. Based on the second tag of the network data packet corresponding to the second application, the network data packet corresponding to the second application is sent to the wireless network; The step of marking the network data packets further includes: Based on the data segment corresponding to the data in the network data packet corresponding to the first application, the network data packet corresponding to the first application containing the header or tail data of the data segment is marked with a data segment header or tail. Among them, multiple network data packets corresponding to the same data segment are aggregated and sent to the wireless network as a batch of data packets during transmission.
2. The method according to claim 1, characterized in that, Marking the network data packets includes: The network data packets are marked with the source application based on whether the data in the network data packets comes from a first application or a second application.
3. The method according to claim 1, characterized in that, Also includes: If the aggregation and transmission time of the aggregated network data packets exceeds a preset threshold, the aggregated network data packets will be transmitted as a batch of data packets. The aggregated network data packets do not include network data packets with data segment header markers and / or data segment tail markers.
4. The method according to any one of claims 1 to 3, characterized in that, The header of the network data packet includes at least one of the following: source application tag, data segment header tag, and data segment tail tag.
5. The method according to claim 4, characterized in that, The reserved bits in the header of the network data packet include at least one of the following: source application mark, data segment header mark, and data segment tail mark.
6. The method according to claim 1, characterized in that, The electronic device is a mobile terminal.
7. An electronic device, characterized in that, include: The acquisition module is used to acquire the data that the first application or the second application needs to send to the wireless network. The tagging module is used to encapsulate the data sent by the first application or the second application into a network data packet and tag the network data packet. The first tag of the network data packet corresponding to the first application is different from the second tag of the network data packet corresponding to the second application. The first tag is used to tag applications with high network latency requirements, and the second tag is used to tag applications with low network latency requirements. The aggregation module is configured to aggregate the network data packets according to the first tag of the network data packets corresponding to the first application, and send the aggregated network data packets as a batch of data packets to the wireless network; it is also configured to send the network data packets corresponding to the second application to the wireless network according to the second tag of the network data packets corresponding to the second application. The step of marking the network data packets further includes: Based on the data segment corresponding to the data in the network data packet corresponding to the first application, the network data packet corresponding to the first application containing the header or tail data of the data segment is marked with a data segment header or tail. Among them, multiple network data packets corresponding to the same data segment are aggregated and sent to the wireless network as a batch of data packets during transmission.
8. A machine-readable medium, characterized in that, The machine-readable medium stores instructions that, when executed on a machine, cause the machine to perform the method of any one of claims 1 to 6.
9. An electronic device, comprising: A memory for storing instructions to be executed by one or more processors of the system, and a processor, one of the processors of the system, for performing the method of any one of claims 1 to 6.