Network acceleration method, electronic device and readable storage medium

By using flow-level assessment and network interface card (NIC) switching technology, the problem of inconsistent network quality requirements for different data streams in electronic devices was solved, achieving efficient data stream transmission and improved user experience.

CN122227306APending Publication Date: 2026-06-16HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2021-11-18
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In electronic devices, poor network quality can cause lag when application software communicates with servers. Existing technologies that assess network quality based on signal strength cannot effectively address the issue of inconsistent network quality requirements for different data streams in application software.

Method used

By evaluating the quality parameters of different data streams at the stream level, setting different conditions, and switching data streams using wireless LAN cards and data service cards, the system can identify the stream level and switch networks, promptly switching data streams that meet the conditions to the backup network to improve transmission quality.

Benefits of technology

It improves the transmission efficiency of different data streams in electronic devices, reduces application software lag, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122227306A_ABST
    Figure CN122227306A_ABST
Patent Text Reader

Abstract

The application provides a network acceleration method, an electronic device and a readable storage medium, and relates to the technical field of network communication. The method comprises the following steps: different data streams (different data streams of different applications, different data streams of the same application) in the electronic device correspond to different flow quality evaluation conditions; and when flow quality parameters of any data stream meet the flow quality evaluation condition corresponding to the data stream, the electronic device switches the data stream from a current network card to another network card for transmission to perform network acceleration. The flow quality parameters comprise at least one of the following parameters: time delay, rate, packet loss rate, retransmission rate and whether a message response is overdue; because different data streams with different network quality requirements are respectively provided with corresponding flow quality evaluation conditions, different network acceleration opportunities can be obtained according to the flow quality of the data streams, so that the phenomenon of lag is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communications, and more particularly to network acceleration methods, electronic devices, and readable storage media. Background Technology

[0002] As electronic devices become increasingly intelligent, the number of application software programs installed and running on them is also increasing. Many of these applications need to communicate with corresponding servers via a network to perform the various functions they provide.

[0003] When users interact with application software, if the network quality is poor when the application communicates with the corresponding server, lag will occur, affecting the user experience. Currently, network quality can be assessed based on the signal strength of the current network, and a better network can be used if the current network quality is poor. However, this method of improving network quality still results in lag in some application usage scenarios. Summary of the Invention

[0004] This application provides a network acceleration method, an electronic device, and a readable storage medium to reduce lag in electronic devices.

[0005] To achieve the above objectives, this application adopts the following technical solution: In a first aspect, this application provides a network acceleration method, the method comprising: The electronic device runs a first application, and the electronic device transmits the first data stream and the second data stream of the first application through a first network card. The first network card is a wireless local area network card and is used to connect to a wireless router. When the flow quality parameters of the first data stream meet the first condition, and the flow quality parameters of the second data stream meet the first condition but not the second condition, the electronic device transmits the first data stream through the second network card and transmits the second data stream through the first network card. The flow quality parameters include at least one of the following parameters: latency, rate, packet loss rate, retransmission rate, and whether the message response times out. When the flow quality parameters of the first data stream and the second data stream both meet the second condition, the electronic device transmits the first data stream and the second data stream through the second network card. The first condition of the flow quality parameters is superior to the second condition of the flow quality parameters.

[0006] In this application, the network quality requirements for different data streams are not entirely consistent. For example, the network quality requirements for the first data stream of the first application (e.g., a data stream during a video call) are higher than those for the second data stream of the first application (e.g., a data stream during webpage browsing). A first condition can be set for the stream quality parameters of the first data stream, and a second condition can be set for the stream quality parameters of the second data stream. When the stream quality parameters of the first data stream meet the first condition, the first data stream is switched from the original network card to the new network card for transmission; when the stream quality parameters of the second data stream meet the second condition, the second data stream is switched from the original network card to the new network card for transmission. The stream quality parameters adopt a stream-level evaluation method for transmission quality, which can more finely evaluate the transmission quality of data streams compared to a channel-level evaluation method based on network signal strength. In addition, since different evaluation conditions (e.g., the first condition and the second condition) are set for different data streams, opportunities for network acceleration (e.g., switching to other network cards) can be provided for different data streams, thereby reducing application stuttering.

[0007] As another implementation of the first aspect of this application, the first data stream is a data stream composed of data packets with a first feature, and the second data stream is a data stream composed of data packets with a second feature. At least one of the following parameters in the first feature and the second feature is different: the transmission protocol, the transmission port, and the header feature of the data packets.

[0008] In this application, different data streams can be distinguished by the relevant information carried in the data packets (transmission protocol, transmission port and header features), thereby enabling stream-level identification, stream-level quality assessment and stream-level network switching.

[0009] As another implementation of the first aspect of this application, during the process of the electronic device transmitting the first data stream and the second data stream of the first application through the first network card, the method further includes: The electronic device acquires a first condition corresponding to a first feature and a second condition corresponding to a second feature; The electronic device determines whether the stream quality parameters of the first data stream meet the first condition, and determines whether the stream quality parameters of the second data stream meet the second condition.

[0010] In this application, different conditions can be set in advance for different features. Taking a first data stream with a first feature as an example, if it is determined that the features of the data stream of the first application meet the first feature, the first condition can be obtained. Then, it is determined whether the flow quality parameters of the data stream that meets the first feature meet the first condition.

[0011] As another implementation of the first aspect of this application, the method further includes: When the stream quality parameters of the first data stream do not meet the first condition, the electronic device transmits the first data stream through the first network card; When the stream quality parameters of the first data stream meet the first condition, the electronic device transmits the first data stream through the second network card; When the stream quality parameters of the second data stream do not meet the second condition, the electronic device transmits the second data stream through the first network card; When the flow quality parameters of the second data stream meet the second condition, the electronic device transmits the second data stream through the second network card.

[0012] As another implementation of the first aspect of this application, the flow quality parameters of the first data stream satisfy the first condition when the flow quality parameters of the first data stream satisfy the second condition.

[0013] As another implementation of the first aspect of this application, the electronic device transmitting the first data stream via the second network interface card includes: Check if the electronic device has a backup network stored. When an electronic device has a backup network stored in it, the electronic device transmits the first data stream through the backup network, wherein the backup network includes the second network corresponding to the second network card.

[0014] In this application, in order to switch data streams that meet the corresponding flow quality assessment conditions to other networks in a timely manner, a backup network can be obtained in advance and stored so that when the flow quality parameters of the data stream meet the corresponding conditions, the data stream that meets the corresponding assessment conditions can be switched to the backup network in a timely manner.

[0015] As another implementation of the first aspect of this application, the method further includes: In the absence of a backup network stored in the electronic device, the electronic device obtains the network quality parameters of the network corresponding to the third network card of the electronic device. The third network card is any network card in the electronic device other than the first network card. The network quality parameters include at least one of the following: bandwidth, latency and air interface rate. When the second network card is the network card with the best network quality among the third network cards, the electronic device stores the second network corresponding to the second network card as a backup network, and the network quality is determined by the network quality parameters.

[0016] In this application, a backup network can be obtained first if no backup network is stored, and then the data stream can be switched to the backup network for transmission if the stream quality parameters of the data stream meet the corresponding evaluation conditions.

[0017] As another implementation of the first aspect of this application, before the electronic device stores the second network corresponding to the second network card as a backup network, the method further includes: The electronic device wakes up the second network corresponding to the second network card.

[0018] As another implementation of the first aspect of this application, before the electronic device stores the second network corresponding to the second network card as a backup network, the method further includes: The electronic device acquires the network quality parameters of the first network corresponding to the first network card; Accordingly, the electronic device stores the second network corresponding to the second network card as a backup network, including: If the network quality of the second network corresponding to the second network card is better than the network quality of the first network corresponding to the first network card, the electronic device will store the second network corresponding to the second network card as a backup network.

[0019] This application also needs to determine whether the network quality of the best-quality network among the other networks besides the primary network is superior to that of the primary network. Only when the network quality is superior to that of the primary network will it be used as a backup network, thus avoiding switching data streams from the primary network whose network quality does not meet the requirements of the current data stream to a network with worse network quality.

[0020] As another implementation of the first aspect of this application, the electronic device running the first application includes: The electronic device runs the first application in the foreground. Accordingly, the method also includes: After the electronic device detects that the first application is running in the foreground, it executes the primary network determination steps in the order of priority of the network card of the electronic device until the primary network of the electronic device is obtained. The steps for determining the primary network include: The electronic device obtains the network status of the network corresponding to the fourth network card, which is a network card of the electronic device. If the network status of the fourth network card is available, the electronic device acquires the network quality parameters of the fourth network card; if the network status of the fourth network card is unavailable, the primary network determination step ends. If the network quality parameters of the fourth network card are within the preset range, the fourth network card will be used as the primary network storage for the electronic device; if the network quality parameters of the fourth network card are not within the preset range, the primary network determination step will end.

[0021] In this application, when the electronic device has network card priority settings, it will select the available network card with network quality that meets preset requirements (e.g., network quality parameters are within a preset range) as the primary network card to transmit the data stream of the application running in the foreground of the electronic device, according to the network card priority order. Therefore, after the application is switched to the foreground, the primary network card of the electronic device can be obtained according to the same logic. The primary network card is the network card that transmits the data stream of the first application.

[0022] As another implementation of the first aspect of this application, the electronic device obtains the network quality parameters of the first network corresponding to the first network card, including: After obtaining the primary network of the electronic device, the electronic device monitors the network quality parameters of the primary network in the first cycle.

[0023] In this application, in order to facilitate comparison with the network quality of the obtained backup network at any time, it is necessary to periodically monitor the network quality parameters of the primary network.

[0024] As another implementation of the first aspect of this application, the electronic device obtains the network quality parameters of the first network corresponding to the first network card, including: The electronic device acquires the network that transmits the first data stream and the second data stream, and the network that transmits the first data stream and the second data stream is the first network corresponding to the first network card; The electronic device monitors the network quality parameters of the first network in the first cycle.

[0025] This application can also determine the primary network by transmitting the data stream of the current foreground application. This provides diverse methods for obtaining the network quality parameters of the primary network, facilitating the comparison of network quality when determining a backup network.

[0026] As another implementation of the first aspect of this application, the method further includes: The electronic device runs a second application, and the electronic device transmits the data stream of the second application through the first network card; When the data stream of the second application includes a third data stream, the electronic device transmits the first sub-data stream through the first network card and the second sub-data stream through the second network card. The third data stream is a data stream with a third characteristic, and the first and second sub-data streams belong to the third data stream.

[0027] In this application, different network strategies can be adopted for data streams with different characteristics. For example, switching or concurrency can be used. That is, the various sub-data streams in the data stream that meet a specific characteristic (e.g., the third characteristic) are distributed to multiple network interface cards (NICs) of the electronic device for transmission, so as to improve the transmission speed of the data stream with that specific characteristic.

[0028] As another implementation of the first aspect of this application, when the data stream of the second application includes a third data stream, the method further includes: The electronic device acquires the third condition corresponding to the third feature; During the process of the electronic device transmitting the first sub-data stream through the first network interface card, the method further includes: When the first sub-data stream meets the third condition and the second sub-data stream does not meet the third condition, the electronic device transmits the first sub-data stream and the second sub-data stream through the second network card.

[0029] During the process of the electronic device transmitting the second sub-data stream through the second network card, the method further includes: When the first sub-data stream does not meet the third condition, but the second sub-data stream does meet the third condition, the electronic device transmits the first sub-data stream and the second sub-data stream through the first network card.

[0030] In this application, when transmitting multiple sub-data streams through multiple network cards, the flow quality parameters of the sub-data streams on each network card can be viewed, so that when the flow quality parameters of the sub-data stream transmitted by a certain network card meet the corresponding conditions, the transmission can be switched to other network cards with better quality.

[0031] In a second aspect, an electronic device is provided, including a processor for running a computer program stored in a memory to implement the method of any one of the first aspects of this application.

[0032] Thirdly, a chip system is provided, including a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to implement the method of any one of the first aspects of this application.

[0033] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by one or more processors, implements the method of any one of the first aspects of this application.

[0034] Fifthly, this application provides a computer program product that, when run on a device, causes the device to perform the method of any one of the first aspects of this application.

[0035] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0036] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application; Figure 2 This is a schematic diagram of an application scenario provided by an embodiment of this application; Figure 3 This is a schematic diagram of a network acceleration method provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating another application scenario provided by an embodiment of this application; Figure 5 This is a schematic diagram of another network acceleration method provided in an embodiment of this application; Figure 6 A flowchart illustrating a network acceleration method provided in an embodiment of this application; Figure 7 Technical architecture diagrams provided for embodiments of this application; Figure 8 A timing diagram of the network acceleration method provided in the embodiments of this application; Figure 9 A timing diagram of another network acceleration method provided in an embodiment of this application; Figure 10 A timing diagram of another network acceleration method provided in an embodiment of this application; Figure 11 A timing diagram of another network acceleration method provided in an embodiment of this application; Figure 12 A timing diagram of another network acceleration method provided in an embodiment of this application; Figure 13 This is a schematic diagram of the data flow reported by the traffic reporting component to the traffic sensing component in an embodiment of this application. Detailed Implementation

[0037] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details.

[0038] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0039] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0040] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0041] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0042] This application provides a network acceleration method applicable to electronic devices. These electronic devices can be tablets, mobile phones, wearable devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other similar devices. This application does not limit the specific type of electronic device.

[0043] Figure 1 A schematic diagram of an electronic device is shown. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, etc.

[0044] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 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.

[0045] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 is used to execute the network acceleration method described in the embodiments of this application.

[0046] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0047] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0048] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and it can also be used for data transfer between electronic device 100 and peripheral devices.

[0049] The external storage interface 120 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. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0050] Internal memory 121 can be used to store executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.).

[0051] In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0052] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130.

[0053] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.

[0054] In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be located in the same device.

[0055] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0056] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0057] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0058] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (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 wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0059] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0060] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0061] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and also to convert analog audio inputs into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0062] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.

[0063] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0064] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to monitoring voice messages, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, enabling sound signal acquisition, noise reduction, sound source identification, and directional recording functions, etc.

[0065] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0066] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch operation intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A.

[0067] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0068] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0069] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.

[0070] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0071] The display screen 194 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0072] Camera 193 is used to capture still images or videos. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0073] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0074] This application does not specifically limit the structure of the execution entity of a network acceleration method. Any method can be executed by running code containing the network acceleration method of this application. For example, the execution entity of a network acceleration method provided in this application can be a functional module in an electronic device capable of calling and executing programs, or a processing device applied in an electronic device, such as a chip.

[0075] like Figure 1 The electronic device shown can install and run multiple applications, such as social communication applications, game applications, audio and video applications, and news applications. These applications can establish network connections with other electronic devices (e.g., the server corresponding to the application) through the electronic device they are on.

[0076] As an example, application A can establish a network connection with the server corresponding to application A through the wireless network card (also referred to as a Wi-Fi network card) in its electronic device; application A can also establish a network connection with the server corresponding to application A through the data service network card in its electronic device. Here, the wireless network card is a device that supports Wireless Local Area Network (WLAN) internet access; the data service network card is a device that supports mobile communication technologies such as General Packet Radio Service (GPRS), Enhanced Data Rate for GSM Evolution (EDGE), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), High Speed ​​Downlink Packet Access (HSDPA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), and 5th Generation Mobile Communication Technology (5G) for internet access.

[0077] For ease of description, a network channel established between an electronic device and other electronic devices via a wireless network card can be referred to as a Wi-Fi network; a network channel established between an electronic device and other electronic devices via a data service network card can be referred to as a cellular network.

[0078] In practical applications, different applications (or different types of applications) have different requirements for the quality of the network channels they use.

[0079] See Figure 2 A user plays a game using application A (a game application) on their phone. Application A establishes a network connection with server A via the phone's Wi-Fi card. Data stream A generated between application A and server A (e.g., data stream generated during gameplay) is transmitted via the Wi-Fi network between the phone's Wi-Fi card and the wireless router. Similarly, a user chats using application B (a chat application) on their phone. Application B establishes a network connection with server B via the phone's Wi-Fi card. Data stream B generated between application B and server B (e.g., data stream generated during chat) is transmitted via the Wi-Fi network between the phone's Wi-Fi card and the wireless router.

[0080] In this embodiment, the data sequence transmitted between two electronic devices is referred to as a data stream. In practical applications, depending on the application scenario, the data stream can be a video stream, audio stream, download stream, session stream, etc.

[0081] If a user uses app A and app B on their phone in the same location (within the same distance between the Wi-Fi card and router) and for the same period of time (e.g., within half an hour), theoretically, the difference in Wi-Fi network quality should be minimal. However, because data stream A generates a larger amount of data per unit time than data stream B, data stream A demands higher Wi-Fi quality. The user will experience smoother gameplay with app B, but may experience lag or stuttering with app A, resulting in a poorer user experience.

[0082] Therefore, different applications (or different types of applications) have different requirements for network channel quality. Embodiments of this application can set different network quality assessment algorithms for different applications (or different types of applications). If the network channel currently used by an application is deemed insufficient to carry the data stream generated by that application (e.g., a user carrying a mobile phone far from a wireless router), a transmission quality improvement strategy can be set to accelerate data stream transmission.

[0083] See Figure 2 If the network quality assessment algorithm determines that the transmission quality of data stream A for application A is poor, data stream A can be switched from the current Wi-Fi network to another network channel. For example... Figure 2 As shown, the mobile phone can switch data stream A to the cellular network between the mobile phone's data service network card and the base station in order to transmit data stream A with server A through the cellular network.

[0084] Furthermore, even when users use the same application to handle different services, the quality requirements of the network channel used by that application may differ.

[0085] See Figure 3 When a user is making a video call using application B (a chat and communication application) on their mobile phone, they are also browsing other information (e.g., browsing Moments). In this case, application B on the mobile phone establishes a network connection with application B's server B through the mobile phone's wireless network card. The data streams B1 (e.g., the data stream generated during the video call) and B2 (e.g., the data stream generated during browsing Moments) generated between application B and server B are transmitted through the Wi-Fi network between the mobile phone's wireless network card and the wireless router.

[0086] Because data stream B1 generates a larger amount of data per unit time than data stream B2, data stream B1 has higher requirements for the quality of the Wi-Fi network compared to data stream B2.

[0087] When the Wi-Fi network is good, data stream B1 is transmitted smoothly (this can be seen from the stream quality parameters of data stream B1; for example, the stream quality parameters of data stream B1 do not meet the first condition set for data stream B1), and data stream B2 is also transmitted smoothly (this can be seen from the stream quality parameters of data stream B2; for example, the stream quality parameters of data stream B2 do not meet the second condition set for data stream B2). Both data streams B1 and B2 are transmitted through the wireless network card.

[0088] In situations with poor Wi-Fi network conditions, data stream B1 may experience stuttering (this can be reflected in the stream quality parameters of data stream B1; for example, if the stream quality parameters of data stream B1 meet the first condition set for data stream B1), while data stream B2 will still transmit relatively smoothly (this can be reflected in the stream quality parameters of data stream B2; for example, if the stream quality parameters of data stream B2 do not meet the second condition set for data stream B2, it may or may not meet the first condition). Data stream B1 is switched to the data service network card for transmission, while data stream B2 is still transmitted through the wireless network card.

[0089] In situations with poor Wi-Fi network conditions, data stream B1 transmission may experience stuttering (this can be reflected in the flow quality parameters of data stream B1; for example, the flow quality parameters of data stream B1 may or may not meet the first condition set for data stream B1). Data stream B2 transmission may also experience stuttering (this can be reflected in the flow quality parameters of data stream B2; for example, the flow quality parameters of data stream B2 may meet the second condition set for data stream B2). Both data streams B1 and B2 are switched to the data service network card for transmission.

[0090] From the above example, it can be understood that the first condition for the flow quality parameters takes precedence over the second condition. Furthermore, Figure 3 The diagram shows a gradual deterioration of network quality from top to bottom. In practical applications, network quality may also deteriorate from... Figure 3 The topmost scene (with good Wi-Fi network) directly becomes the bottommost scene (with poor Wi-Fi network).

[0091] Figure 3 In the scenario shown, application B can be considered as an example of a first application, data stream B1 can be considered as an example of a first data stream of the first application, and data stream B2 can be considered as an example of a second data stream of the first application. The wireless LAN card can be considered as an example of a first network card, and the data service network card can be considered as an example of a second network card.

[0092] See Figure 4 When a user downloads using application A, a download stream A1 is generated; when a user engages in a session using application A, a session stream A2 is generated. Both download stream A1 and session stream A2 can be transmitted via a Wi-Fi network between the wireless network card and the 2.4GHz wireless router.

[0093] If a user uses application A on their phone to download and have a session simultaneously from the same location (within the same distance between the wireless network card and the wireless router) and within the same timeframe (e.g., within half an hour), theoretically, the difference in network channel quality should be minimal. However, because data stream A1 generates a larger amount of data per unit time compared to data stream A2, data stream A1 has higher requirements for network channel quality than data stream B. While a user might experience a smooth session using application A, downloading using application A may feel too slow, resulting in a poor user experience.

[0094] Therefore, different business scenarios within the same application have different requirements for network channel quality. This application embodiment can set different network quality assessment algorithms for different business scenarios of the same application. If the network channel currently used by the application is deemed insufficient to carry a certain data stream generated by the application, a transmission quality improvement strategy can be set to accelerate data stream transmission.

[0095] See Figure 5 If the transmission quality of data stream A1 from application A is deemed poor by a network quality assessment algorithm, data stream A1 can be distributed across multiple network channels for parallel transmission. For example... Figure 3As shown, the mobile phone is equipped with a wireless network card 1, supporting 2.4GHz transmission and reception; it also has a wireless network card 2, supporting 5.0GHz transmission and reception; and a data service network card. Data stream A1 may include multiple sub-data streams, which can be divided into three groups of data streams: data stream A1-1, data stream A1-2, and data stream A1-3. These three data streams are then distributed to three different network channels for transmission.

[0096] It needs to be explained that, Figure 5 The wireless router in the text can be a single wireless router that simultaneously supports 2.4GHz and 5.0GHz transmission and reception, or it can be two routers that each support 2.4GHz and 5.0GHz transmission and reception respectively.

[0097] Figure 5 In the scenario shown, application A can be referred to as the second application. The second application can generate a third data stream (e.g., a download stream). The third data stream includes at least two sub-data streams. Download stream A1-1 can be referred to as the second sub-data stream, and download stream A1-3 can be referred to as the first sub-data stream. Of course, the second application can be the same application as the first application, or it can be an application other than the first application. The first network card is wireless network card 1. The second network card is a data service network card; wireless network card 2 will not be described in detail.

[0098] The difference from the previous example is that in the previous example, if the network quality of the Wi-Fi network card deteriorated, the download stream was switched to the data service network card. In this example, when the stream is determined to be a special stream (a data stream with a third characteristic, such as a download stream), multiple sub-data streams in the download stream are first distributed to multiple network cards of the electronic device. If the network quality of any network card carrying a sub-data stream (e.g., the first network card) can no longer meet the requirements of the sub-data stream located on that network card (i.e., meet the evaluation conditions set for the third data stream, denoted as the third condition), then the sub-data stream on the network card that does not meet the requirements needs to be switched to another network card with better network quality for transmission. For example, download stream A1-3 on the first network card that meets the third condition is switched to the data service network card (at this time, download stream A1-1 does not meet the third condition), and download streams A1-1 and A1-3 will be transmitted on the data service network card. Alternatively, download A1-1 downloaded on the second network card can be switched to the wireless network card (at which point download stream A1-3 does not meet the third condition), and the wireless network card will transmit both download streams A1-1 and A1-3. Of course, sub-data streams that do not meet the third condition can also be switched to other network cards that do meet the requirements. Furthermore, in the above scenarios, different data streams have different characteristics. For example, the first data stream has the first characteristic, the second data stream has the second characteristic, and the third data stream has the third characteristic. Correspondingly, the network quality requirements for each data stream can be determined by its corresponding evaluation conditions. For example, the transmission quality evaluation condition for the first data stream is the first condition, the transmission quality evaluation condition for the second data stream is the second condition, and the transmission quality evaluation condition for the third data stream is the third condition. In the embodiments of this application, the terms "first," "second," and "third," etc., are only used to represent different targets in different examples. In practical applications, different targets in different examples can be the same target or different targets. For example, the third data stream and the first data stream can be the same type of data stream (with the same characteristics) in the same application; they are simply named differently in different embodiments due to different schemes. It can also be used for different data streams for different applications.

[0099] pass Figures 2 to 5 Understandably, different transmission quality improvement strategies can also be set (e.g., Figure 3 Switching between them Figure 5 (Concurrency) in the process can accelerate the transmission of data streams, thereby improving the user experience.

[0100] In this application embodiment, the network quality (good / bad) of a certain network channel or the transmission quality (good / bad) of a certain data stream on a certain network channel can be evaluated using some parameters (which can be denoted as flow quality parameters). In specific implementation, some conditions can be set. For example, if condition 1 is met, the evaluation result is considered good (good); if condition 1 is not met, the evaluation result is considered bad (bad). Alternatively, if condition 2 is met (e.g., the first, second, and third conditions in the above example), the evaluation result is considered bad (bad); if condition 2 is not met, the evaluation result is considered good (good). The evaluation conditions for network quality and transmission quality in this application embodiment are not limited. Flow quality parameters include at least one of the following: latency, rate, packet loss rate, retransmission rate, and whether the message response times out. Of course, the examples in Tables 2 and 3 below can also be referred to.

[0101] The second network card in the above scenario can also be understood as a backup network other than the primary network currently used by the electronic device.

[0102] In view of the above Figures 2 to 5 As described above, embodiments of this application provide a network acceleration method. In this network acceleration method, developers can pre-set different network quality assessment algorithms and different transmission quality improvement strategies for different applications (or different types of applications).

[0103] Of course, in practical applications, different network quality assessment algorithms and the same transmission quality improvement strategies can be set for different applications (or different types of applications); or the same network quality assessment algorithm and different transmission quality improvement strategies can be set for different applications (or different types of applications).

[0104] Different network quality assessment algorithms and different transmission quality improvement strategies can also be set for different business scenarios of the same application.

[0105] Of course, in practical applications, different network quality assessment algorithms and the same network quality improvement strategies can be set for different business scenarios of the same application; or the same network quality assessment algorithm and different transmission quality improvement strategies can be set for different business scenarios of the same application.

[0106] Based on the above description, the network acceleration method shown in Table 1 can be obtained. This method allows for setting network acceleration strategies for different application categories and / or different business scenarios. When setting network acceleration strategies, different network quality assessment algorithms and / or different transmission quality improvement strategies can be employed.

[0107]

[0108] Taking network acceleration method 9 in Table 1 as an example, different network quality assessment algorithms can be set for different types of applications under different business scenarios (e.g., determined by the characteristics of the application's data flow). When the network quality assessed by the network quality assessment algorithm is poor (or some parameters used to assess network quality meet a certain condition), different network quality improvement strategies are adopted to achieve network acceleration. Other network acceleration methods will not be listed one by one.

[0109] See Figure 6 This is a flowchart illustrating a network acceleration method provided in an embodiment of this application. This flowchart corresponds to network acceleration method 9 in Table 1 above.

[0110] Step A1: The electronic device detects that application A is running in the foreground.

[0111] In this embodiment, application A can be any application in the electronic device that can access the network. The electronic device detecting that application A is running in the foreground can mean that the electronic device detects that application A is running in the foreground after it has been opened, or it can mean that the electronic device detects that application A has switched from the background to the foreground.

[0112] Step A2: The electronic device determines whether application A supports network acceleration.

[0113] In this embodiment, the electronic device stores an application configuration library, which can be pre-set by developers or set or added by users during the use of the electronic device. The application configuration library stores identifiers of applications that support network acceleration.

[0114] After the electronic device detects that application A has been switched to the foreground, it can obtain the application identifier of application A and check whether the application identifier of application A exists in the application configuration library. If the application identifier of application A exists, it means that application A supports network acceleration.

[0115] Of course, the above method for determining whether application A supports network acceleration is only an example. In actual applications, the application configuration library can also store multiple application identifiers, each using a different character to indicate whether the application it represents supports network acceleration. For example, "1" can be used to indicate that network acceleration is supported, and "0" can be used to indicate that network acceleration is not supported. Other methods for determining whether an application supports network acceleration will not be listed here.

[0116] Step A3: When application A supports network acceleration, the electronic device queries the data flow characteristics of application A to obtain the network quality assessment algorithm corresponding to the data flow characteristics of application A.

[0117] In this application, setting different business scenarios facilitates understanding the role of different network quality assessment algorithms and allows for determining which algorithm to use based on those scenarios. However, in practice, the characteristics of data flows generated by different business scenarios may differ. Therefore, it is not necessary to determine the current business scenario of application A; the appropriate network quality assessment algorithm can be determined based on the characteristics of application A's current data flow. Various information about application A's data flow can be stored in application A's flow feature library.

[0118] In practical implementation, the electronic device system contains a Netfilter component, through which the data stream of the application corresponding to a specific application identifier can be obtained.

[0119] As an example, if the network channel carrying the data stream of application A is network channel 1, then the Netfilter component can capture the packets of the data stream of application A on network channel 1. If the network channels carrying the data stream of application A are network channel 1 and network channel 2, then the Netfilter component can capture the packets of the data stream of application A on both network channel 1 and network channel 2.

[0120] Of course, in practical applications, data stream messages can also be obtained through other methods. The collection of obtained data stream messages is called a stream signature database.

[0121] When determining network quality assessment algorithms based on the characteristics of application data flows, the protocol, port, and message characteristics of the application data flows can be used as features to determine the network quality assessment algorithm. Here, the protocol refers to the protocol type used by the application to transmit data flows, the port refers to the port used to transmit data flows, and the message characteristics refer to the header characteristics of the data packets transmitted by the application.

[0122] As an example, when a social communication application makes an audio or video call, the header of the data packets in the data stream starts with 97, i.e., data[0]=97. The data packets are transmitted using the UDP protocol and port 8080. In the obtained data stream, if a certain data stream meets the above characteristics, the network quality assessment algorithm matching the characteristics can be obtained as follows: if the data latency exceeds 300ms in 3 consecutive periods within 5 periods (e.g., each period is 500ms), or the packet loss rate exceeds 20%, then the assessment result is: stuttering.

[0123] The examples above for determining network quality assessment algorithms are for illustrative purposes only. In practical applications, network quality assessment algorithms can also be determined through features other than protocols, ports, and packet characteristics.

[0124] Of course, when an application implements a certain function, it may generate multiple data streams. If a network quality assessment algorithm is determined for the characteristics of the multiple data streams, then the corresponding network quality assessment algorithm is used to evaluate the transmission quality of the corresponding data stream.

[0125] As an example, when an application implements a certain function, it may generate data stream 1, data stream 2, and data stream 3.

[0126] Based on the characteristics of data flow 1, network quality assessment algorithm 1 is determined, and it is determined whether data flow 1 meets the transmission quality improvement conditions set by algorithm 1. Based on the characteristics of data flow 2, network quality assessment algorithm 2 is determined, and it is determined whether data flow 2 meets the transmission quality improvement conditions set by algorithm 2. Since the characteristics of data stream 3 do not meet the conditions of any deterministic network quality assessment algorithm, there is no need to assess the transmission quality of data stream 3, nor is there a need to improve the transmission quality of data stream 3.

[0127] Step A4: The electronic device determines whether the relevant parameters of the data stream of application A meet the transmission quality improvement conditions set by the algorithm.

[0128] It should be noted that in practical applications, the transmission quality assessment result of the data stream of application A can be obtained based on the algorithm model and relevant parameters of the data stream of application A (e.g., a quality score or quality level). Based on the transmission quality assessment result, it can be determined whether the transmission quality of the data stream needs to be improved. Of course, in practical applications, the algorithm can pre-set conditions for determining that the transmission quality of the data stream needs to be improved. If these conditions are met, a transmission quality improvement strategy can be obtained and executed.

[0129] For example, in the network quality assessment algorithm in step A3, it is necessary to obtain the latency, packet loss rate, etc. of each data stream of application A.

[0130] As mentioned before, the flow feature library of application A stores various information about the data flow of application A, such as the protocol features of the protocol used by the application when using the current network, and the header features of the data packets transmitted by the application when using the current network. Of course, it can also include the traffic features of the application when using the current network.

[0131] The application's traffic characteristics may include: uplink rate, downlink rate, stream interval, packet interval, packet size, and traffic distribution. Of course, it may also include some of the above information, or other information not listed above.

[0132] Traffic characteristics provide information such as latency, packet loss, downlink speed, and uplink speed. Therefore, these traffic characteristics can serve as evaluation parameters for network quality assessment algorithms. Of course, in practical applications, different network quality assessment algorithms may obtain different parameters for evaluating network quality; for example, they may include one or more of the parameters mentioned above, or even other parameters. Therefore, the types of parameters included in the applied traffic characteristics can be determined based on the evaluation parameters of the network quality assessment algorithm.

[0133] Step A5: If the relevant parameters of the data stream of application A meet the conditions set by the algorithm, determine the transmission quality improvement strategy based on the characteristics of the data stream of application A.

[0134] As mentioned before, different transmission quality improvement strategies can be pre-set for different business scenarios of different applications (determined by the characteristics of the data stream), and multiple transmission quality improvement strategies are stored in the improvement strategy library. Of course, in practical applications, a correspondence between data stream characteristics and transmission quality improvement strategies can also be established. After determining the characteristics of the data stream, the corresponding transmission quality improvement strategy can be obtained. The transmission quality improvement strategy matching the data stream characteristics can then be queried from the improvement strategy library.

[0135] Step A6: Implement the transmission quality improvement strategy.

[0136] In this embodiment, an application can generate multiple data streams in a certain business scenario. In practical applications, if the characteristics of some data streams among the multiple data streams meet the pre-set conditions for improving transmission quality, the data streams that meet the pre-set conditions for improving transmission quality can be switched to other network channels. Of course, the data streams that meet the pre-set conditions for improving transmission quality, as well as the data streams related to the data streams that meet the pre-set conditions for improving transmission quality, can also be switched to other network channels. The correlation between data streams can be pre-set. For example, multiple download streams with the same source address and destination address in a download application can be set as related data streams, and video streams and audio streams with the same source address and destination address in a chat application can also be set as related data streams. Alternatively, all data streams of the application can be switched to other network channels.

[0137] As another example, in practical applications, if the characteristics of some data streams among multiple data streams meet pre-set conditions for improved transmission quality, the data streams that meet these conditions can be allocated to multiple network channels supported by the electronic device. Alternatively, the data streams that meet the pre-set conditions, along with related data streams, can be allocated to multiple network channels. Of course, all data streams of the application can also be allocated to multiple network channels supported by the electronic device.

[0138] As another example, in practical applications, if some data streams among multiple data streams meet pre-set concurrency conditions, the data streams that meet the concurrency conditions can be first distributed to multiple network channels. Then, among the multiple data streams on multiple network channels, if a data stream's characteristics meet the pre-set conditions for improved transmission quality, that data stream is switched to the network channel with the higher quality.

[0139] As another example, the corresponding network quality assessment algorithm and the corresponding transmission quality improvement strategy can be determined based on the characteristics of the data flow in Table 2.

[0140]

[0141] In Table 2, com.tencent.mm can be the WeChat package name, and com.tencent.tmgp.sgame can be the Honor of Kings package name. The data flow characteristics can all be protocol, port, and packet characteristics. Each entry in Table 2 can represent the data flow characteristic conditions, network quality assessment algorithm, and network quality improvement strategy set for a specific business scenario of an application. Furthermore, Table 2 only lists the protocol, port, and packet characteristics corresponding to some business scenarios of some applications, and is for illustrative purposes only.

[0142] The network quality assessment algorithms and transmission quality improvement strategies in Table 2 are for illustrative purposes only. In practical applications, other methods for determining network quality assessment algorithms and different transmission quality improvement strategies can be used. In the transmission quality improvement strategy, "switching" can refer to any form of switching in the above embodiments; "concurrency" can refer to any form of concurrency in the above embodiments.

[0143] As another example, when browsing product text and images and watching product videos, the Taobao mobile app can switch only the streams with poor network quality to other networks, or switch all streams under the app to other networks if the number (or proportion) of poor quality streams is greater than a preset value (or preset proportion).

[0144] For example, in a certain business scenario, the application may generate 10 streams. If only 1 or 2 streams are of poor quality, the poor quality streams will be switched to other networks. If 3 or more streams are of poor quality, all 10 streams under the application will be switched to the backup network.

[0145] In addition, in specific implementation, different application identifiers can be set for different applications. When the characteristics of the data stream meet the characteristic conditions, the conditions for improving transmission quality set by the network quality assessment algorithm can be obtained. When the relevant parameters of the data stream meet the conditions for improving transmission quality, the transmission quality improvement strategy can be obtained and executed.

[0146] In practical applications, Table 2 only lists the characteristics of some data flows from some applications, along with the corresponding network quality assessment algorithms and transmission quality improvement strategies. Other network quality assessment algorithms and transmission quality improvement strategies can also be used in practice. As an example, the network quality assessment algorithms shown in Table 3 can also be employed.

[0147]

[0148] Of course, in practical applications, the network quality transmission algorithms in Table 3 are only examples. In practical applications, other algorithms besides those shown in Table 3 can also be used. This application embodiment does not limit this.

[0149] After describing the network acceleration method provided in the embodiments of this application, the technical implementation details of the network acceleration method will be described below.

[0150] See Figure 7 This is a technical architecture diagram of a network acceleration method provided in an embodiment of this application.

[0151] The technical architecture includes: application layer, service layer, strategy layer and kernel layer. Figure 7 Only some layers and components related to the embodiments of this application are shown. In actual applications, more may be included. Figure 7 The hierarchy and components are not shown in the diagram. Of course, it may also include only... Figure 7 Some of the components shown.

[0152] The application layer contains various applications, such as video applications and game applications, as mentioned above.

[0153] The service layer includes environmental detection components, network detection components, channel-level path management components, application-level policy management components, channel and application quality assessment components, and network connection management components.

[0154] The environment detection component is used to detect various events of upper-layer applications. For example, it can detect application opening and closing, applications currently switched to the foreground, and application installation and uninstallation. The network detection component is used to detect the status of Wi-Fi networks supported by the electronic device (on or off, etc.), and also the status of data service networks supported by the electronic device. For example, the electronic device has a 2.4GHz wireless network card 1 and a 5.0GHz wireless network card 2. The network detection component can detect whether the 2.4GHz wireless network is on or off; it can also detect whether the 5.0GHz wireless network is on or off. The electronic device has a data service network card 1 from operator A and a data service network card 2 from operator B. The network detection component can detect whether the data service from operator A is on or off; it can also detect whether the data service from operator B is on or off.

[0155] The channel and application quality assessment component is used to evaluate the quality of network channels. For example, this component can evaluate the quality of Wi-Fi networks in the 2.4 GHz band and the 5.0 GHz band. It can also evaluate the quality of cellular networks from operator A and operator B. The network connectivity management component is used to activate network channels, that is, to transition them from a dormant state to a wake-up state. Wake-up network channels can then be used directly.

[0156] The channel-level path management component stores paths for multiple network channels, allowing you to request or close any network channel. It can also detect changes in the status and quality of any network channel. The application-level policy management component is used to enable network acceleration and data flow monitoring.

[0157] The policy layer includes a flow-level policy management component, a flow-level path management component, and a traffic awareness component. The traffic awareness component performs statistical analysis on reported data flows and evaluates the network quality of each flow. The flow-level policy management component stores the transmission quality improvement policies for flows in the application and also instructs the execution of these policies. The flow-level path management component updates the selection of network channels based on changes in upper-layer policies, triggers network channel quality detection, dynamically selects the optimal channel, and can also store the paths of different network channels. For example, it can store the paths of the network channels currently used by the application (e.g., the primary network channel) and backup network channels.

[0158] The kernel layer contains a policy enforcement component and a traffic reporting component. The traffic reporting component collects data stream information and reports the collected data stream information. The policy enforcement component executes network channel switching.

[0159] As another embodiment of this application, in the above embodiments, one component can be split into two or more components, and two or more components at the same level can be merged into the same component.

[0160] As an example, the flow-level policy management component and the flow-level path management component at the policy layer can be merged into the same component; the application-level policy management component and the channel-level path management component can be merged into the same component.

[0161] For a clearer understanding of the above architecture diagram, please refer to [link / reference]. Figure 8 The embodiments provided in this application are based on Figure 7 The diagram shows a timing diagram of a network acceleration method implemented by the various components shown.

[0162] Step B1: The user launches application A or switches application A from the background to the foreground.

[0163] Step B2: The environment detection component detects that application A is running or that application A has switched from the background to the foreground, and obtains the identifier of application A.

[0164] In step B3, the environment detection component sends the identifier of application A to the application-level policy management component.

[0165] The application's identifier is used to uniquely identify the application. It can have a one-to-one correspondence with the application's package name, or it can use the application's package name.

[0166] Step B4: Based on the received identifier of application A, the application-level policy management component queries the application configuration library to determine whether application A corresponding to the received identifier supports network acceleration. The result retrieved from the application configuration library is: Network acceleration is supported.

[0167] Step B5: If the query result indicates that network acceleration is supported, the application-level policy management component sends information to the flow-level path management component to indicate that application A has enabled network acceleration.

[0168] In a practical implementation, the message can carry the identifier of application A.

[0169] In step B6, the flow-level path management component sends a message to the traffic reporting component indicating that application A has enabled network acceleration.

[0170] In practice, the message may also carry the identifier of application A, and the message sent in step B6 and the message sent in step B5 may be the same or different.

[0171] In step B7, after the traffic reporting component receives the information indicating that application A has enabled network acceleration, it registers a packet listening hook.

[0172] This message listening hook can monitor information related to the data stream of application A, which is stored in application A's flow signature database. This data stream carries path information about the network carrying the data stream.

[0173] After step B4, the path of the network currently used by application A can be detected, and the network quality of the network currently used by application A can be periodically checked.

[0174] As before, the path of the network currently used by application A can be determined by listening to the data stream through the message listening hook.

[0175] As another example, the path of the network currently used by application A can also be determined according to the system's logic of selecting the primary network when multiple available networks exist.

[0176] In practical applications, if an electronic device has a 2.4GHz wireless network card 1, a 5.0GHz wireless network card 2, a data service network card 1 from operator A, and a data service network card 2 from operator B, then one of the wireless network cards 1 or 2 can be designated as the primary Wi-Fi network and the other as the secondary Wi-Fi network card. Similarly, one of the data service network cards 1 from operator A and 2 from operator B can be designated as the primary network card and the other as the secondary network card.

[0177] As an example, the network channel in the 2.4GHz band is the primary Wi-Fi network, and the network channel in the 5.0GHz band is the secondary Wi-Fi network. The network channel corresponding to data service network card 1 is the primary cellular network, and the network channel corresponding to data service network card 2 is the secondary cellular network.

[0178] When the primary Wi-Fi network is available, the system defaults to using the primary network on the electronic device or in the foreground application as the primary Wi-Fi network. When the primary Wi-Fi network is unavailable, the system defaults to using the primary SIM card's cellular network as the primary network on the electronic device or in the foreground application. When the primary SIM card's cellular network is unavailable, the system defaults to using the secondary Wi-Fi network as the primary network on the electronic device or in the foreground application. When the secondary Wi-Fi network is unavailable, the system defaults to using the secondary SIM card's cellular network as the primary network on the electronic device or in the foreground application.

[0179] When application A is started and running in the foreground, application A uses the primary network according to the above rules. Even if the system switches some data streams in application A to other networks while application A is in the foreground, the data streams in application A will resume using the system's default primary network after application A is switched to the background. After application A is switched from the background to the foreground, application A continues to use the system's default primary network.

[0180] Therefore, in this embodiment, each network in the electronic device can be requested sequentially according to the above rules: main Wi-Fi, main SIM card network, secondary Wi-Fi, and secondary SIM card network, etc., until an available network with satisfactory quality is requested. This available network with satisfactory quality can be understood as the network currently used by application A. See steps C1 to C8 for details.

[0181] In step C1, after receiving the information from the application-level policy management component indicating that application A has enabled network acceleration, the flow-level path management component sends a request for primary network access to the channel-level path management component.

[0182] After receiving the request information, the channel-level path management component requests the primary Wi-Fi, primary SIM card network, secondary Wi-Fi, and secondary SIM card network in that order until it finds an available network that meets the quality requirements. This network is the primary network for application A.

[0183] In step C2, the channel-level path management component sends a request for the status of the primary Wi-Fi to the network detection component. This request is used to request the status of the primary Wi-Fi.

[0184] Step C3: The network detection component determines that the main Wi-Fi is available.

[0185] Step C4: The network detection component returns the status of the main Wi-Fi to the channel-level path management component: Available.

[0186] Step C5: When the channel-level path management component receives a notification that the main Wi-Fi is available, it sends a probe request for the quality of the main Wi-Fi to the channel and application quality assessment component. This probe request is used to probe the quality of the main Wi-Fi.

[0187] In this application embodiment, the network quality of any network can be determined by network quality parameters, which include at least one of the following: bandwidth, latency, and air interface rate.

[0188] In step C6, after evaluating the quality of the main Wi-Fi, the channel and application quality assessment component returns the quality monitoring results of the main Wi-Fi to the channel-level path management component.

[0189] In a specific implementation, after step C3, that is, after the network detection component determines that the main Wi-Fi is available, step D1 can also be executed.

[0190] In step D1, the network detection component sends a monitoring message about the quality of the main Wi-Fi to the channel and application quality assessment component. This monitoring message is used to request the channel and application quality assessment component to monitor the network quality of the main Wi-Fi.

[0191] In step D2, after receiving the message, the channel and application quality assessment component begins to monitor the network quality of the main Wi-Fi and returns the quality of the main Wi-Fi to the channel-level path management component.

[0192] If the network quality of the main Wi-Fi is good (e.g., the network quality parameters are within the preset range), it can be determined that the main Wi-Fi is the primary network for application A, and the network quality of the main Wi-Fi can be monitored regularly.

[0193] It should be noted that step D2 monitors the quality of the network channel, and the monitoring algorithm used is different from the network quality assessment algorithm determined based on the characteristics of the data flow in the above embodiments. For ease of description, we can refer to the monitoring algorithm used in this step as Algorithm A.

[0194] As an example of Algorithm A, the quality of a network channel can be evaluated based on parameters such as latency, packet loss rate, bandwidth, and speed.

[0195] Following steps D1 and D2, the channel and application quality assessment component can begin monitoring the network quality of the main Wi-Fi before receiving the probe request sent in step C5, thus quickly obtaining the quality of the main Wi-Fi. After obtaining the quality of the main Wi-Fi, it can promptly return the quality monitoring results of the main Wi-Fi to the channel-level path management component.

[0196] In practical applications, after the channel and application quality assessment component receives the monitoring request sent in step D1, it may obtain the monitoring result for the first time before or after receiving the probe request sent in step C5.

[0197] Step C7: If the channel-level path management component determines that the network quality of the primary Wi-Fi meets the requirements, the primary Wi-Fi is sent as the primary network path to the flow-level path management component.

[0198] Step C8: The flow-level path management component stores the path of the primary Wi-Fi and the path of the secondary network.

[0199] As another example of this application, if the network detection component obtains the status of the primary Wi-Fi as unavailable in step C3, the network detection component will no longer execute step D1, and correspondingly, the channel and application quality assessment component will no longer execute step D2. After receiving the message from the network detection component that the primary Wi-Fi is unavailable, the channel-level path management component will also no longer execute step C5, and correspondingly, the channel and application quality assessment component will no longer execute step C6.

[0200] After receiving a message from the network detection component indicating that the primary Wi-Fi network is unavailable, the channel-level path management component continues to request the primary SIM network (i.e., the next priority network after the currently requested network) following steps C2 to C6 (which may or may not include steps D1 and D2). If the result shows that the primary SIM network is available and its network quality meets the requirements, the path of the primary SIM network is sent to the flow-level path management component as the path of the primary network. The flow-level path management component stores the path of the primary SIM network as the path of the primary network. Similarly, even if the network quality of the primary SIM network meets the requirements, the channel and application quality assessment component also needs to periodically assess the quality of the primary SIM network.

[0201] In determining the primary network, steps C2 to C6 need to be executed repeatedly until the primary network of the electronic device is obtained. In this example, during each iteration of steps C2 to C6, the network being probed is the network corresponding to one network card of an electronic device. In this process, the network card corresponding to the network requested each time can be recorded as the fourth network card.

[0202] That is, the electronic device executes the primary network determination steps sequentially according to the priority order of the network card of the electronic device until the primary network of the electronic device is obtained; The steps for determining the primary network include: The electronic device obtains the network status of the network corresponding to the fourth network card, where the fourth network card is a network card of the electronic device. If the network status of the fourth network card is available, the electronic device obtains the network quality parameters of the fourth network card; if the network status of the fourth network card is unavailable, the current primary network determination step ends and the next primary network determination step for the next priority network card begins. If the network quality parameters of the fourth network card are within the preset range, the fourth network card is used as the primary network storage of the electronic device; if the network quality parameters of the fourth network card are not within the preset range, the primary network determination step in this round ends, and the next round of primary network determination step for the next priority network card begins.

[0203] In practical applications, the channel and application quality assessment component can determine whether the network quality meets the requirements, and if so, periodically assess the network quality. Alternatively, the channel-level path management component can receive the network quality monitoring results from the channel and application quality assessment component, determine whether the network quality meets the requirements, and if so, send a request message to the channel and application quality assessment component to request periodic network quality assessments. Through these methods, the notification-level path management component can periodically obtain the network quality of the network currently carrying application A's data flow and send this information to the flow-level path management component.

[0204] The above example illustrates that, by following the system's logic of selecting the primary network when multiple available networks exist, the path of the network currently used by application A can be determined.

[0205] After the application-level policy management component executes step B4, i.e., after determining that the corresponding application A supports acceleration, the first step is to transmit a message indicating that application A has enabled acceleration to the lower-level traffic reporting component via the flow-level path management component, so that the traffic reporting component registers a packet listening hook. Secondly, it can also obtain the network path and network quality of the primary network. Thirdly, the traffic awareness component transmits a message indicating that data flow monitoring has been started to the lower-level traffic reporting component, so that the traffic reporting component can monitor the data flow of application A through the registered packet listening hook (see step B8 for details).

[0206] Step B8: The application-level policy management component sends a request message to the traffic awareness component to start business flow monitoring.

[0207] In practical implementation, the application-level policy management component can execute steps B5 and B8 simultaneously after completing step B4. Alternatively, it can execute step B5 first after completing step B4, and then execute step B8 after a preset time (the specific value can be set according to actual conditions) following the completion of step B5.

[0208] In step B9, after receiving the request message sent in step B8, the traffic awareness component sends a message indicating traffic monitoring to the traffic reporting component.

[0209] In step B10, after receiving the traffic monitoring message sent in step B9, the traffic reporting component reports the monitored data stream to the traffic awareness module.

[0210] After step B7, the packet listening hook in the traffic reporting component begins monitoring the data stream. Upon receiving the traffic monitoring message sent in step B9, it reports the monitored data stream to the traffic awareness module. Furthermore, it can continuously report the monitored data stream to the traffic awareness component subsequently.

[0211] Step B11: The traffic awareness component receives the data stream reported by the traffic reporting component and determines the network quality assessment algorithm based on the characteristics of the data stream.

[0212] It should be noted that the network quality assessment algorithm in step B11 is different from the algorithm for assessing the network channel in step D2. For ease of description, the algorithm in step B11 will be referred to as Algorithm B. Algorithm A is a universal algorithm for all network channels, assessing the network quality of the entire network channel. Algorithm B is an algorithm determined based on the characteristics of the data stream of the application currently enabling network acceleration, assessing the transmission quality of the data stream that meets the pre-set characteristics transmitted through the network channel.

[0213] In step B12, the traffic-aware component begins to evaluate the transmission quality of each data stream of application A based on the network quality assessment algorithm and obtains the evaluation results.

[0214] It should be noted that the evaluation results may include: excellent (e.g., marked 00), possibly lagging (e.g., marked 10), and lagging (e.g., marked 11).

[0215] As an example, Table 2 above shows the conditions for evaluating lag. In practical applications, conditions for evaluating potential lag can also be set.

[0216] Condition 1: If the latency exceeds 300ms or the packet loss exceeds 20% for 3 consecutive periods within 5 cycles, the evaluation result is stuttering.

[0217] Condition 2: If two consecutive latency periods exceed 200ms or the packet loss rate exceeds 10% within 5 cycles, the evaluation result is "potential stuttering".

[0218] If neither of the above two situations occurs, the evaluation result is excellent.

[0219] Based on the above understanding, it can be determined that the network quality assessment algorithm obtained from the characteristics of the data flow not only includes the judgment conditions for stuttering as specified in Table 2, but also, in practical applications, the judgment conditions for possible stuttering.

[0220] As another example, conditions 1 and 2 can be preset, and the evaluation result can also include: condition 1 is satisfied, condition 2 is satisfied, and neither condition 1 nor condition 2 is satisfied.

[0221] In practice, the specific form of the evaluation results is not limited.

[0222] Step B13: The traffic awareness component sends the evaluation results to the flow-level policy management component.

[0223] It should be noted that the evaluation results sent in this step can be identifiers indicating lag, potential lag, and excellent performance, and can also carry characteristics (or feature identifiers) of the data stream.

[0224] Alternatively, the evaluation result can be: an identifier that satisfies condition 1, satisfies condition 2, or does not satisfy either condition 1 or condition 2, and may also carry characteristics (or feature identifiers) of the data stream.

[0225] In step B14, after receiving the evaluation result, the flow-level policy management component determines to request a backup network if the evaluation result indicates potential lag (condition 2 is met).

[0226] As another example, in practical applications, although the transmission quality improvement strategy is handover when both conditions 1 and 2 are met, in condition 2, a request for an alternative path is sent to the flow-level path management component, while in condition 1, a handover message for the alternative path is sent.

[0227] By employing the above configuration, a backup network can be pre-selected and activated if the data stream's transmission quality is anticipated to deteriorate (e.g., condition 2 is met). This allows for a rapid switchover of the low-quality data stream to the backup network should the transmission quality actually deteriorate (e.g., condition 1 is met). This is because data stream transmission quality typically deteriorates gradually. Therefore, by selecting and activating the backup network in advance when deterioration is anticipated, and then switching the low-quality data stream to the activated backup network when the transmission quality does indeed deteriorate, the system can quickly respond to data stream switching, making the user unaware of the data stream switching, while also avoiding the high power consumption issues caused by prematurely activating the backup network.

[0228] In step B15, the flow-level policy management component sends a request for an alternative path to the flow-level path pipeline component if condition 2 is met.

[0229] In step B16, if the flow-level path management component determines that there is no alternative network, it sends a request message for an alternative path to the channel-level path management component.

[0230] After receiving the request message for the alternative path, the channel-level path management component begins searching for other available and highest-quality networks besides the currently used primary network. See steps B17 to B23 for details.

[0231] In step B17, the channel-level path management component sends a query request for the status of network B to the network detection component.

[0232] In this embodiment, network B can be any network other than the currently primary network. The currently primary network can be referred to as network A. Network B can be referred to as the network corresponding to the third network interface card.

[0233] Step B18: The network detection component queries the network status of network B to determine if it is available.

[0234] Step B19: The network detection component sends the status of network B to the channel-level path management component: available.

[0235] In step B20, the channel-level path management component, upon receiving confirmation that the network status of network B is available, sends a quality probe request for network B to the channel and application quality assessment component.

[0236] In practical applications, in order to quickly obtain the network quality of network B, if the network detection component determines in step B18 that network B is available, the network detection component can execute steps B19 and E1.

[0237] In step E1, the network probing component sends a request to the channel and application quality assessment component to monitor the quality of network B.

[0238] In step E2, when the channel and application quality assessment component receives a request from the network detection component to monitor the quality of network B, it begins to monitor the quality of network B using algorithm A.

[0239] Step B21: The channel and application quality assessment component obtains the quality monitoring results of network B.

[0240] In this embodiment, network quality parameters are used when evaluating the quality of the network channel, and flow quality parameters are used when evaluating the transmission quality of the data stream.

[0241] In step B22, the channel-level path management component obtains the status of each network channel other than the primary network and, if the status is available, the network quality of the available network, in accordance with steps B17 to B21.

[0242] Step B23: The channel-level path management component determines the available network with the best network quality as the primary network based on the status and quality of networks other than the primary network. Of course, in practical applications, a range can be set, designating network cards with network quality parameters within that range as backup networks.

[0243] It should be noted that the algorithm used in step E2 to detect the quality of network B is the same as the algorithm used in step D2.

[0244] This application embodiment determines the network with the best quality (e.g., the strongest signal strength, the largest bandwidth, etc.) as the backup network in practical applications. Of course, in practical applications, other conditions can be set for determining the backup network. As an example, the priority condition for the backup network can also be set as follows: an available network other than the primary network that meets the network quality requirements and does not incur additional costs can be used as the backup network. The network that does not incur additional costs can be: a Wi-Fi network, a data service network with unlimited data plans, or a data service network with limited data plans but current data usage is less than the current monthly plan data usage (total data usage / total number of days in the month × current number of days). Of course, the backup network can be the one with the best network quality among the networks other than the primary network that meets the priority condition.

[0245] If none of the other networks besides the primary network meet the priority criteria, then a network that meets the secondary priority criteria is selected as the backup network. The secondary priority criteria are: an available network other than the primary network that meets the network quality requirements is selected as the backup network. Of course, the backup network can be the one with the best network quality among the networks other than the primary network that meet the secondary priority criteria.

[0246] If none of the other available networks besides the primary network meet the secondary priority criteria, then a network other than the primary network will be selected as the backup network. Of course, the backup network can be the one with the best network quality among the available networks besides the primary network.

[0247] The above method of selecting a backup network is only for illustrative purposes. In actual applications, other methods can also be used, which are not limited here.

[0248] In step B24, after determining that the network with the best quality is the primary SIM card network, the channel-level path management component sends a request to the network connectivity management component to enable the primary SIM card network.

[0249] In step B25, after receiving the activation request from the primary card network, the network connection management component switches the primary card network from sleep mode to wake-up mode.

[0250] In step B26, the network connection management component sends a message to the channel-level path management component that the primary card network has been woken up.

[0251] In step B27, the channel-level path management component sends the path and quality of the currently determined best-quality primary card network to the flow-level path management component.

[0252] As before, the channel-level path management component can periodically obtain the network quality of the primary network used by the electronic device. Of course, the channel-level path management component can also periodically send the obtained network quality data of the primary network used by the electronic device to the flow-level path management component.

[0253] Therefore, the flow-level path management component can periodically obtain the network quality of the primary network (primary Wi-Fi).

[0254] In step F1, the flow-level path management component has stored the network path of the primary network. After receiving the path and network quality of the primary card network sent by the channel-level path management component, it can compare the quality parameters corresponding to the latest received stored primary card network path with the quality parameters of the received primary card network to determine the network path with better quality.

[0255] In practical implementation, if the better quality network path is a pre-stored primary network path, it means the backup network is of lower quality, and there is no need to switch even if the primary network is currently of lower quality. Therefore, there is no need to store the backup network path. However, if the better quality network path is not a pre-stored primary network path, it means the backup network is of higher quality, and therefore the backup network path needs to be stored in case the data stream currently using the primary network experiences lower transmission quality, in which case switching to the backup network is necessary.

[0256] If the comparison result of step F1 shows that the primary card has better quality, the network path of the primary card is stored as the backup network.

[0257] As another example, after step B26, the channel-level path management component can request periodic monitoring of the network quality of the primary card network and periodically send this information to the flow-level path management component.

[0258] Of course, in practical applications, the network quality of networks other than the primary network can be monitored periodically. If the network with the best quality is no longer the currently stored backup network, the backup network can be replaced by the current primary network or another network with better quality than the current backup network. If a network is woken up as a backup network and then ceases to be a backup network or a primary network, the network can be switched from the woken-up state to the sleep state to avoid excessive power consumption of electronic devices.

[0259] As before, the traffic reporting component continuously monitors the data flow and continuously reports the monitored data flow.

[0260] Step B29: The traffic reporting component continuously reports the monitored data streams to the traffic awareness component.

[0261] In step B30, the traffic-aware component has determined the network quality assessment algorithm (Algorithm B) for each data flow and continues to use Algorithm B to obtain assessment results.

[0262] In step B31, the traffic-aware component continuously sends the evaluation results to the flow-level policy management component.

[0263] In step B32, the flow-level policy management component determines, based on the evaluation results, that a switch to a backup network is required.

[0264] As an example, if condition 1 in the example above is met, it is determined to switch to the backup network.

[0265] In step B33, after determining to switch to the backup network, the flow-level policy management component sends a command to the flow-level path management component to indicate the switch to the backup network.

[0266] In step B34, after receiving the instruction to switch to the backup network, the flow-level path management component checks the path (path of the primary card network) that stores the backup network, and then sends the instruction to switch to the primary card network to the flow-level policy management component.

[0267] It should be noted that the stream-level policy management component stores transmission quality improvement policies. Therefore, the stream-level policy management component can determine whether to switch a single stream, a portion of streams, or all streams. In practical applications, step B33 can carry the identifier of the data stream to be switched, and the instruction transmitted in B34 can also carry the identifier of the data stream to be switched. Alternatively, the instructions sent in either step can omit the identifier of the data stream to be switched.

[0268] Step B35: The flow-level policy management component sends an instruction to the policy execution component. The instruction carries the data flow identifier and the primary card network path. The data flow identifier is either the data flow identifier that satisfies condition 1 in the evaluation result, or the data flow that satisfies condition 1 in the evaluation result and its related data flow identifier, or all data flow identifiers of application A where the data flow that satisfies condition 1 in the evaluation result is located.

[0269] Step B36: The policy execution component executes the switch from the data stream represented by the data stream identifier carried in the received instruction to the primary card network represented by the network path carried in the instruction.

[0270] In this embodiment of the application, the network path can also be a network identifier that distinguishes different networks.

[0271] In another embodiment of this application, in practical applications, network quality may not deteriorate gradually, but may deteriorate suddenly. For example, if the evaluation result received by the flow-level policy management component in step B14 determines that a backup network should be switched, then in step B15, the flow-level policy management component sends a switch to the backup path to the flow-level path management component. However, at this time, the flow-level path management component has not yet stored the path of the backup network. In this case, it is necessary to first determine the backup network (steps B16 to B27), and then, if the backup network is determined, directly execute step B34 to switch the data flow to the backup network.

[0272] Of course, if the evaluation result received by the flow-level policy management component in step B14 determines that the backup network should be switched, and the flow-level path management component receives the backup path and has already stored the backup network path, then steps B16 to F1 can be skipped, and step B34 can be executed directly to switch the data flow to the backup network.

[0273] As an example, application A currently has data streams C and D. In one cycle, an electronic device requests and stores an alternative path based on the transmission quality assessment result of data stream C (which may experience lag), while the transmission quality assessment result of data stream D is excellent. In the next cycle, the transmission quality assessment result of data stream C is excellent, and the transmission quality assessment result of data stream D determines the switch to the alternative path. At this time, the electronic device has already stored the alternative path, so it can switch the data streams to the alternative network.

[0274] In the examples above, the characteristics of the data flow are used as the conditions for determining and waking up the backup network. In practical applications, other methods can also be used as the conditions for determining and waking up the backup network. That is, a column can be added to Table 2: Conditions for determining and waking up the backup network. When different applications (or different business scenarios of the same application) are running in the foreground, the conditions for determining and waking up the backup network can be the same or different, or partially the same and partially different.

[0275] As an example, for each application's different business scenarios, conditions related to the traffic characteristics of the data flow in that application's business scenario can be set as the conditions for determining and waking up the backup network; for all applications and all business scenarios, the same conditions can be set: signal strength gradually decreasing, etc. This example is for illustration only and does not constitute any limitation.

[0276] As another embodiment of this application, in Figure 8 In the illustrated embodiment, if all or part of the data streams of application A are switched to the primary SIM card, after application A switches from the foreground to the background, all data streams of application A will return to the system's default primary network: for example, the primary Wi-Fi. The method for determining the primary network can be referred to the description in the above embodiments. After application A switches from the background to the foreground again, all data streams of the application are still on the primary network: the primary Wi-Fi, and the network acceleration method provided in the embodiments of this application continues to be implemented.

[0277] As another embodiment of this application, in specific implementation, other methods can also be used to obtain the path of the primary network currently used by application A, and the network quality of the primary network currently used can be monitored when the path of the primary network currently used by application A is determined.

[0278] See Figure 9 This is a timing diagram of another network acceleration method provided in the embodiments of this application.

[0279] When monitoring data streams, the traffic reporting component can determine the network carrying those streams. Since it's pre-configured that when application A switches from the background to the foreground again, all of the application's data streams will still determine the currently used network channel according to the system default method, the network channel of the data stream monitored by the traffic reporting component after application A switches from the background to the foreground or starts up will be application A's primary network. This is because the path of the primary network can be determined through the data stream reported by the traffic reporting component.

[0280] After step B10, that is, after the traffic awareness component receives the reported data stream, steps G1 to G6 can be executed to store the path and quality monitoring results of the primary network.

[0281] In step G1, the traffic awareness component determines the network channel carrying the reported data flow based on the reported data flow.

[0282] In step G2, if the network channel (primary Wi-Fi) is determined, the traffic-aware component sends a message to the channel-level path management component indicating that the primary network is the primary Wi-Fi.

[0283] In step G3, the channel-level path management component sends a quality probe request for the main Wi-Fi to the channel and application quality assessment component.

[0284] Step G4: The channel and application quality assessment component uses Algorithm A to periodically monitor the quality of the main Wi-Fi.

[0285] In step G5, the channel and application quality assessment component returns the quality monitoring results of the main Wi-Fi to the channel-level path management component.

[0286] In step G6, the channel-level path management component sends the path and quality monitoring results of the main Wi-Fi to the flow-level path management component.

[0287] In step G7, the flow-level path management component stores the primary Wi-Fi path as the primary path and stores the quality monitoring results of the primary Wi-Fi.

[0288] Since step G4 involves periodically monitoring the quality of the primary network (primary Wi-Fi), the flow-level path management component periodically receives the quality data of the primary network (primary Wi-Fi). During the execution of steps G1 to G7, the electronic device may also execute steps B11 and B13. That is, the execution order of steps G1 and B11 is not limited.

[0289] If, during the execution of step B14 by the flow-level policy management component, it is determined based on the data flow characteristics and evaluation results that a backup network request is necessary, then proceed to the subsequent steps (steps B15 to B36). The subsequent steps can be referred to... Figure 8 The description of the illustrated embodiments will not be repeated here.

[0290] As mentioned before, when the primary network path is determined, a backup path can be requested from a network other than the primary network. With regular monitoring of the primary network's quality, after identifying a backup network, it can be compared to the primary network. If the backup network offers better quality, the data stream with poor transmission quality can be switched to the backup network. Of course, in practical applications, if the best-quality backup network is identified, the data stream with poor transmission quality can also be directly switched to the backup network.

[0291] See Figure 10 This is another network acceleration method provided in the embodiments of this application.

[0292] After step B4, proceed to steps B8 and B9.

[0293] Among them, the traffic reporting component is triggered to execute step H1 after receiving the traffic monitoring request sent by the traffic perception component in step B9, and registers the message listening hook.

[0294] After registering the message listening hook, it can monitor the data stream of application A. Once the data stream of application A is detected, subsequent steps are executed.

[0295] It should be noted that since the network channel carrying the data flow can be obtained from the data flow, the traffic awareness component can determine the network channel currently used by application A, and can send the identifier of the currently used network channel (primary network) to the flow-level policy management component through step B13.

[0296] In step B14, the flow-level policy management component determines the requested backup network based on the data flow characteristics and evaluation results.

[0297] In step B15, when the flow-level policy management component sends the request information for the alternative path to the flow-level path management component, it may carry the identifier of the primary network (or the path of the primary network).

[0298] In step B16, the flow-level path management component sends a request for an alternative path to the channel-level path management component, which may also include the identifier of the primary network (or the path of the primary network).

[0299] After receiving a request message carrying the identifier of the primary network from the flow-level path management component, the channel-level path management component can sequentially request the status of other network channels supported by the electronic device, excluding the primary network. If the status is available, it requests monitoring of the quality of available network channels. Finally, it wakes up the available and highest-quality network channel and sends it as a backup network to the flow-level path management component. See steps B17 to B27 for details. The descriptions in the above embodiments are as described and will not be repeated here.

[0300] Step 28: If the flow-level path management component determines that the primary network has not been stored, it does not need to compare the quality of the received backup network with the quality of the primary network, but directly stores the received network channel as a backup path.

[0301] For a detailed description of subsequent steps B29 to B36, please refer to the description in the above embodiments.

[0302] As another embodiment of this application, as shown in Table 2, the transmission quality improvement strategy also includes concurrency. In this embodiment, when an upload / download (storage) application downloads a large file, the data stream is first distributed to multiple available network channels on the electronic device. After being distributed to multiple network channels, if any data stream meets the switching conditions specified by the network quality assessment algorithm (e.g., slower transmission rate), the data stream meeting the switching conditions specified by the network quality assessment algorithm is switched to another network channel with better quality. See details for further information. Figure 11 Description of the illustrated embodiment.

[0303] The steps preceding step B11 can be described in the above embodiments, and will not be repeated here.

[0304] In step B11, the traffic-aware component determines, based on the characteristics of the data flow, that the data flow needs to be allocated to multiple network channels.

[0305] For example, in Table 2, when a certain upload / download application downloads a large file, it is necessary to distribute the data stream that meets certain characteristics to multiple network channels.

[0306] In step J1, the traffic-aware component sends a request for all backup networks to the channel-level path management component.

[0307] Step B17: After receiving the request information from all backup paths, the channel-level path management component begins to execute steps B17 to B26 on the network channels supported by the electronic device, excluding the primary network.

[0308] It should be noted that, in this embodiment, it is necessary to wake up all available network channels other than the primary network. Therefore, after step B21, step B24 is executed directly to request the wake-up of currently available network channels. Each available network channel other than the primary network is woken up according to the above process.

[0309] In step B27, the channel-level path management component sends the path and quality monitoring results (which can be represented by quality parameters) of each backup network that is activated to the flow-level path management component.

[0310] In step B28, the flow-level path management component stores the path and quality parameters for each backup network.

[0311] It should be noted that during the execution of steps J1, B17 to B28 by the electronic device, the traffic reporting component continuously reports the data stream, while the traffic awareness component continuously transmits the identifier of the currently monitored data stream to the flow-level path management component.

[0312] Step K3: After the flow-level path management component receives the path of the primary network, the path of the backup network, and the identifiers of multiple data flows, it distributes the multiple data flows to multiple network channels (primary network and backup network).

[0313] As an example, if the flow-level path management component receives a path from one primary network and three paths from three backup networks, and receives five data flow identifiers, then the five data flow identifiers can be distributed across four network channels.

[0314] During allocation, the principle of evenly distributing the number of data streams and network channels can be initially applied. If an even distribution is not possible, the number of data streams allocated to each network channel should differ by less than 2. That is, the allocation in step K3 should, as far as possible, distribute multiple data streams across multiple network channels according to the principle of even distribution.

[0315] Of course, in practical applications, other allocation principles can also be adopted. For example, based on the quality of each network channel, multiple data streams can be allocated to multiple network channels, so that the higher-quality network channels can carry more data streams, and the lower-quality network channels can carry fewer data streams. Other allocation principles will not be listed here.

[0316] Of course, the principle of equal distribution can be used for the first allocation when the application is running in the foreground, and other principles can be used for the next allocation after the first one (for example, the allocation period can be set).

[0317] It should be noted that step K3 can be executed in either the flow-level policy management component or the flow-level path management component.

[0318] If executed within the flow-level path management component, the flow-level policy management component needs to send the data flow identifier to the flow-level path management component.

[0319] If executed in the flow-level policy management component, the flow-level path management component needs to send multiple network paths to the flow-level policy management component and cancel step K2.

[0320] In step K4, the flow-level path management component sends the path of the network channel corresponding to each data flow identifier to the flow-level policy management component.

[0321] In step K5, the flow-level policy management component sends the path of the network channel corresponding to each data flow identifier to the policy management component.

[0322] In step K6, the policy management component switches the data stream corresponding to the data stream identifier to the corresponding network channel after receiving each data stream identifier and the path of the corresponding network channel.

[0323] As before, the message monitoring hook is constantly monitoring the data stream and also constantly reporting the monitored data stream, see step B29.

[0324] After multiple data streams are distributed from the main network channel to multiple network channels, the data streams monitored by the packet monitoring hook are carried on their respective network channels. Therefore, after receiving the data streams reported by the traffic reporting component, the traffic awareness component can determine that multiple data streams have been distributed to multiple network channels based on the monitored data streams.

[0325] In step K7, after the traffic-aware component determines that multiple data streams have been allocated to multiple network channels, it can use the characteristics of each data stream to obtain the evaluation algorithm C corresponding to each data stream.

[0326] In step B30, the traffic awareness component obtains the transmission quality assessment results of each data stream based on the assessment algorithm C used to determine each data stream.

[0327] Steps B31 to B36 can be referred to the description of the above embodiments, and will not be repeated here.

[0328] In this embodiment of the application, if the evaluation result of a certain data stream meets the switching conditions specified by the set evaluation algorithm, the data stream needs to be switched to another network channel with better quality.

[0329] As before, given the concurrency, the network quality of each network channel can be monitored periodically, and the network quality data can be sent to the flow-level path management component.

[0330] In step K8, the flow-level path management component switches the data stream (the data stream that does not meet the conditions set by algorithm C) to the network channel with the best quality (e.g., the fastest transmission rate) based on the quality of each network channel received periodically.

[0331] This example switches data streams that do not meet the conditions set by Algorithm C to a higher-quality network channel. In practical applications, other switching methods can also be configured. For example, switching to the network channel currently carrying the fewest data streams. Alternatively, if a user has an unlimited data plan, data streams currently on a Wi-Fi network that do not meet the conditions set by Algorithm C can be preferentially switched to the data service network of that unlimited data plan. Of course, if all of the user's data services are limited, data streams currently on one Wi-Fi network that do not meet the conditions set by Algorithm C can be preferentially switched to another Wi-Fi network.

[0332] The above switching methods are for illustrative purposes only. In actual applications, the switching methods can be set according to the actual situation. The principle is to transmit the data stream that meets the specific characteristics of the current application as quickly as possible without incurring additional traffic costs.

[0333] As another embodiment of this application, see Figure 12 This is another network acceleration method provided in the embodiments of this application.

[0334] and Figure 11 The differences shown include: (1) The methods for triggering the traffic reporting component to register message listening hooks are different. Figure 11 Triggered by the flow-level path management component Figure 12 Triggered by the traffic-aware component.

[0335] (2) Instead of requesting the path of the primary network separately, when the traffic-aware component determines that the current data flow needs to be allocated to multiple network channels based on the characteristics of the data flow, step J1 is executed to request all network paths.

[0336] Then, steps B17 to B26 are used to wake up the available network channels of the electronic device, and the path and quality monitoring results of each network channel after wake-up are sent to the flow-level path management component. The flow-level path management component distributes the data stream to multiple network channels. Steps B28 to B36 can be referred to... Figure 11 The description of the illustrated embodiments will not be repeated here. Figure 12 In this context, network C represents any network channel supported by the electronic device.

[0337] In the above embodiments, the example of the packet monitoring hook in the traffic reporting component listening to the data stream of application A is used for illustration. The following will describe how the packet monitoring hook listens to the data stream of application A and sends the listened data stream to the traffic awareness component.

[0338] As mentioned earlier, the electronic device system contains a Netfilter component, which can be used to obtain the data stream of an application corresponding to a specific application identifier. The traffic reporting component can obtain the packets of the data stream of application A by calling the Netfilter component. In practice, the information reported by the traffic reporting component to the traffic awareness component includes not only the packets of the data stream of application A, but also some statistical information of the packets of the data stream of application A. See [link / reference] for details. Figure 13 Description of the illustrated embodiment.

[0339] See Figure 13 The traffic reporting component can pre-register packet listening hooks (e.g., the nf_hook hook function).

[0340] After the traffic reporting component calls the Netfilter component, the Netfilter component reports the data stream packets of application A. After receiving the data stream packets reported by the Netfilter component, the traffic reporting component calls the pre-registered nf_hook hook function.

[0341] The nf_hook hook function performs the following operations on the received data stream packets: packet parsing, flow table lookup, and packet analysis.

[0342] During parsing, the presence of an application identifier and a four-tuple (or five-tuple) can be checked to obtain the parsing result. If an application identifier exists, the application corresponding to the message can be determined. A four-tuple includes the source IP, destination IP, source port, and destination port; a five-tuple includes the source IP, destination IP, source port, destination port, and protocol number. That is, the four-tuple or five-tuple of the message carries some characteristics of the data flow described in Table 2 above. In addition, the message (data packet) itself also carries header characteristics.

[0343] After parsing, the flow table is queried based on the parsing results, and the flow table statistics are updated. The flow table stores the identification information of data flows in each application, as well as the statistical information of each data flow. The statistical information of each flow includes: the number of packets received from that data flow, the total number of bytes, the number of error packets, etc.

[0344] In practical applications, the statistical information of each flow can be determined based on the parameters set in the network quality assessment algorithm. Therefore, the statistical information of each flow can also include other information, such as the traffic distribution information of the data flow to which the data packet belongs, generated based on the size of the data packet received at a certain time point, as it changes over time.

[0345] Of course, if the identifier or related statistical information of a certain data stream does not exist in the flow table, the identifier and related statistical information of the data stream can be added to the flow table.

[0346] After looking up and updating the flow table information, the packets can be analyzed. For example, packets can be filtered to obtain all or part of the packets.

[0347] As an example, this filtering process could be filtering heartbeat packets from a data stream. After filtering, the heartbeat packets of that data stream are obtained. This filtering process could involve pre-setting certain characteristics and retaining packets that meet those characteristics. That is, packets that meet certain pre-set characteristics are the filtered packets.

[0348] The heartbeat packet is a message that exists in the data stream at regular time intervals. The heartbeat packet has a fixed characteristic (e.g., 0x64 or 0x65) at a fixed position (e.g., the 6th byte). Because the heartbeat packet exists at regular intervals, the delay can be calculated based on it (e.g., the total time elapsed from when the mobile phone sends a heartbeat request message to the server until the mobile phone receives the heartbeat response message from the server). This delay information is used to determine whether the data stream meets the conditions for improving transmission quality set in Table 2 above.

[0349] The above example uses filtering heartbeat packets as an illustration. In practical applications, filtering can also be used to obtain data packets that meet other characteristics.

[0350] As another example, filtering conditions could also include: selecting to retain data packets of a specific length. In practice, it is determined whether the length of the data packet is a pre-set specific length; if so, the packet is retained; otherwise, it is filtered out.

[0351] After the above processing, the filtered packets are stored in the SKB queue.

[0352] The strategies for reporting data stream messages stored in the SKB queue include: immediate reporting and periodic reporting.

[0353] If the reporting is not immediate, a specific thread in the traffic reporting component will promptly check the queue and report the packets in the queue to the traffic awareness component.

[0354] If the reporting is periodic, a timer is set in the traffic reporting component. Based on the timer setting, the packets in the SKB queue are checked at certain intervals, and some or all of the packets in the queue are reported to the traffic awareness component.

[0355] Of course, in practical applications, some packets in the data stream stored in the SKB queue need to be reported immediately, while others need to be reported periodically. Following the same principle, a specific thread in the traffic reporting component checks the queue regularly and reports the packets that need immediate reporting to the traffic awareness component. The traffic reporting component also has a timer set up to periodically check the packets in the SKB queue and report the packets that need periodic reporting to the traffic awareness component.

[0356] It should be noted that when submitting a report, you may also be required to submit related statistical information.

[0357] Based on the above understanding, the traffic reporting component does not report all packets sent by the Netfilter component to the traffic awareness component. Instead, it reports packets that meet specific characteristics (which may carry statistical information about those packets) to the traffic awareness component. Simultaneously, it also reports statistical information related to those packets.

[0358] As an example, if both message 1 and message 2 belong to the same data stream, when message 1 is received and the flow table is checked, the statistics for that data stream in the flow table are updated based on message 1. However, message 1 does not meet certain characteristics, so it is filtered out and not reported to the traffic awareness component. When message 2 is received and the flow table is checked, the statistics for that data stream in the flow table are updated based on message 2. Message 2 meets certain characteristics, so it is not filtered out and is reported to the traffic awareness component. That is, although some messages are reported, the statistical information is based on all messages under that data stream.

[0359] The reported messages and related statistical information in the above example are used by the traffic awareness component to determine the characteristics of the data stream represented by the message and the transmission quality of the data stream. After describing how the traffic reporting component reports data stream messages to the traffic awareness component, the following describes how to determine the characteristic conditions of the data stream set in Table 2 and the conditions for improving transmission quality set by the network quality assessment algorithm based on the data stream messages reported by the traffic reporting component to the traffic awareness component.

[0360] As an example, packets (data packets) with the same four-tuple (source address, source port, destination address, destination port) belong to the same data stream. If multiple packets with the same four-tuple are transmitted through a network channel, then these multiple packets with the same four-tuple belong to the same data stream; this can also be understood as: multiple packets can exist within a single data stream. Furthermore, packets within a data stream carry the packet's sequence number within the data stream. Because these packets share the same characteristics, an identifier for the data stream to which the packet belongs can be generated based on these shared characteristics. For example, the identifier for the data stream to which the packet belongs can be generated based on the packet's four-tuple.

[0361] After receiving a packet, the traffic reporting component can determine the application to which the packet belongs based on the application identifier carried in the packet. It can also generate an identifier for the data stream to which the packet belongs based on the four-tuple of the packet.

[0362] Of course, after the traffic uploading component uploads the packet to the traffic awareness component, the traffic awareness component can also determine the identifier of the application and the identifier of the data stream based on the received packet. The traffic reporting component can determine the protocol in the data stream characteristics based on the protocol number in the packet's five-tuple, and can determine the port in the data stream characteristics through the destination port in the four-tuple or five-tuple. The packet characteristics in the data stream characteristics can be determined through the packet's header characteristics. That is, the characteristics of the data stream to which the packet belongs can be determined based on the packet reported by the traffic reporting component.

[0363] Of course, the above methods for determining the characteristics of data streams are only examples. In practical applications, other methods can also be used to determine the characteristics of the data stream to which the message belongs.

[0364] Once an electronic device can determine the characteristics of the data stream to which a received message belongs, it can determine the conditions for improving transmission quality based on the characteristics of that data stream and the settings of the corresponding network quality assessment algorithm.

[0365] Of course, in practical applications, in order to ensure the accuracy of the conditions for improving transmission quality set by the network quality assessment algorithm, additional constraints can be added: the application identifier. That is, the conditions for improving transmission quality set by the corresponding network quality assessment algorithm are determined based on the application identifier and the characteristics of the data stream.

[0366] After determining the conditions for improving transmission quality in the network quality assessment algorithm, these conditions are only used to evaluate the transmission quality of data streams with the same data stream characteristics (or the same application identifier and / or the same data stream identifier may be added).

[0367] When evaluating transmission quality, one or more of the following parameters can be used: latency, packet loss rate, presence of response, and rate.

[0368] As before, latency can be determined using heartbeat packets within a data stream. Since the message carries its sequence number within the data stream, packet loss can be determined based on this sequence number. The total number of messages in the statistics above example determines whether there is a downlink no response; for example, if the total number of messages received in two consecutive cycles is the same, then there is a downlink no response. The total number of bytes in the statistics above example determines the transmission rate; for example, the ratio of the difference between the total number of bytes received in the previous cycle and the current cycle to the cycle itself is the downlink rate for the current cycle.

[0369] Of course, the above method of determining parameters is only for illustrative purposes. In practical applications, the above parameters can also be determined in other ways.

[0370] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0371] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.

[0372] This application also provides a computer program product that, when run on a first device, enables the first device to implement the steps described in the various method embodiments above.

[0373] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0374] This application also provides a chip system, which includes a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.

[0375] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0376] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0377] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A network acceleration method, characterized in that, include: In a first time period, the electronic device transmits a first data stream and a second data stream of a first application through a first network interface card (NIC). The transmission quality of the first data stream is a first quality, and the transmission quality of the second data stream is a second quality. The transmission quality of the first data stream is related to at least one of the following parameters: the latency of the first data stream, the rate of the first data stream, the packet loss rate of the first data stream, the retransmission rate of the first data stream, and whether the message response of the first data stream times out. The transmission quality of the second data stream is related to at least one of the following parameters: the latency of the second data stream, the rate of the second data stream, the packet loss rate of the second data stream, the retransmission rate of the second data stream, and whether the message response of the second data stream times out. In the second time period, When the transmission quality of the first data stream becomes the third quality and the transmission quality of the second data stream becomes the fourth quality, the electronic device transmits the first data stream through the second network card and transmits the second data stream through the first network card, wherein the first quality is better than the third quality and the second quality is better than the fourth quality. When the transmission quality of the first data stream becomes the fifth quality and the transmission quality of the second data stream becomes the sixth quality, the electronic device transmits the first data stream and the second data stream through the second network card, wherein the third quality is better than the fifth quality and the fourth quality is better than the sixth quality.

2. The method as described in claim 1, characterized in that, The first data stream is a data stream composed of data packets with a first feature, and the second data stream is a data stream composed of data packets with a second feature. At least one of the following parameters in the first feature and the second feature is different: the transmission protocol, transmission port and header features of the data packets.

3. The method as described in claim 1, characterized in that, The third mass is superior to the fourth mass, and the method further includes: During the second time period, when the transmission quality of the first data stream becomes the seventh quality and the transmission quality of the second data stream becomes the eighth quality, the electronic device transmits the first data stream through the first network card and transmits the second data stream through the second network card, wherein the first quality is better than the seventh quality, the seventh quality is better than the third quality, the fourth quality is better than the eighth quality, and the eighth quality is better than the sixth quality.

4. The method as described in claim 2, characterized in that, During the process of the electronic device transmitting the first data stream and the second data stream of the first application through the first network card, the method includes: The electronic device acquires a first condition corresponding to the first feature and a second condition corresponding to the second feature; The electronic device determines whether the transmission quality of the first data stream meets the first condition, and determines whether the transmission quality of the second data stream meets the second condition. Accordingly, when the transmission quality of the first data stream does not meet the first condition, the electronic device transmits the first data stream through the first network card; When the transmission quality of the first data stream meets the first condition, the electronic device transmits the first data stream through the second network card; wherein, the first condition is met when the transmission quality of the first data stream is the third quality, and the first condition is met when the transmission quality of the first data stream is the fifth quality. When the transmission quality of the second data stream does not meet the second condition, the electronic device transmits the second data stream through the first network card; When the transmission quality of the second data stream meets the second condition, the electronic device transmits the second data stream through the second network card; wherein, the second condition is not met when the transmission quality of the second data stream is the fourth quality, and the second condition is met when the transmission quality of the second data stream is the sixth quality.

5. The method as described in claim 1, characterized in that, The electronic device transmits the first data stream via the second network card, including: The electronic device checks whether it has a backup network stored. When the electronic device stores the backup network, the electronic device transmits the first data stream through the backup network, wherein the backup network includes the second network corresponding to the second network card; Accordingly, if the electronic device does not store the backup network, the electronic device obtains the network quality parameters of the network corresponding to the third network card of the electronic device. The third network card is any network card in the electronic device other than the first network card. The network quality parameters include at least one of the following: bandwidth, latency, and air interface rate. When the second network card is the network card with the best network quality among the third network cards, the electronic device stores the second network corresponding to the second network card as the backup network, and the network quality is determined by the network quality parameters.

6. The method as described in claim 5, characterized in that, Before the electronic device stores the second network corresponding to the second network card as the backup network, the method further includes: The electronic device acquires the network quality parameters of the first network corresponding to the first network card; Accordingly, the electronic device stores the second network corresponding to the second network card as the backup network, including: If the network quality of the second network corresponding to the second network card is better than the network quality of the first network corresponding to the first network card, the electronic device stores the second network corresponding to the second network card as the backup network.

7. The method as described in claim 6, characterized in that, The method further includes: After the electronic device detects that the first application is running in the foreground, the electronic device executes the primary network determination step in the order of priority of the network card of the electronic device until the primary network of the electronic device is obtained. The primary network determination step includes: The electronic device obtains the network status of the network corresponding to the fourth network card, where the fourth network card is a network card of the electronic device. If the network status of the fourth network card is available, the electronic device acquires the network quality parameters of the fourth network card; if the network status of the fourth network card is unavailable, the current primary network determination step ends. If the network quality parameters of the fourth network card are within a preset range, the fourth network card will be used as the primary network storage of the electronic device; if the network quality parameters of the fourth network card are not within the preset range, the primary network determination step will end in this round. Accordingly, the electronic device acquires the network quality parameters of the first network corresponding to the first network card, including: After obtaining the primary network of the electronic device, the electronic device monitors the network quality parameters of the primary network in a first cycle.

8. The method as described in claim 6, characterized in that, The electronic device obtains the network quality parameters of the first network corresponding to the first network card, including: The electronic device acquires the network that transmits the first data stream and the second data stream, wherein the network that transmits the first data stream and the second data stream is the first network corresponding to the first network card; The electronic device monitors the network quality parameters of the first network in a first cycle.

9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: During the third time period, the electronic device transmits a data stream of the second application through the first network card; the data stream of the second application includes a third data stream, which is a data stream with a third characteristic, and the transmission quality of the third data stream is a ninth quality. In the fourth time period, the transmission quality of the third data stream becomes the tenth quality. The electronic device transmits the first sub-data stream through the first network card and the second sub-data stream through the second network card. The first sub-data stream and the second sub-data stream belong to the third data stream, and the ninth quality is better than the tenth quality.

10. The method as described in claim 9, characterized in that, The method further includes: The electronic device acquires the third condition corresponding to the third feature; When the transmission quality of the third data stream meets the third condition, the electronic device transmits the first sub-data stream through the first network card and the second sub-data stream through the second network card; the third condition is met when the transmission quality of the third data stream is the tenth quality; during the process of the electronic device transmitting the first sub-data stream through the first network card, the method further includes: When the transmission quality of the first sub-data stream meets the third condition and the transmission quality of the second sub-data stream does not meet the third condition, the electronic device transmits the first sub-data stream and the second sub-data stream through the second network card; During the process of the electronic device transmitting the second sub-data stream through the second network card, the method further includes: When the transmission quality of the first sub-data stream does not meet the third condition, and the transmission quality of the second sub-data stream meets the third condition, the electronic device transmits the first sub-data stream and the second sub-data stream through the first network card.

11. An electronic device, characterized in that, The electronic device includes a processor for running a computer program stored in a memory to enable the electronic device to perform the method as described in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a processor, implements the method as described in any one of claims 1 to 10.