Network acceleration method, electronic equipment, chip system and storage medium

By using multi-network card technology to dynamically switch data stream transmission networks in electronic devices, the problem of video stuttering after video stream switching is solved, and higher video streaming transmission quality and user experience are achieved.

CN119767371APending Publication Date: 2025-04-04HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411714588.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-11-18
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In video streaming application scenarios, video stuttering often occurs after stream switching, affecting the user experience.

Method used

By implementing the network acceleration method in electronic devices, multi-network card technology is used to dynamically switch the transmission network of data streams when the signal strength of the wireless router changes, ensuring optimized transmission of data streams with high network quality requirements.

Benefits of technology

It effectively reduces the occurrence of video lag and improves the transmission quality and user experience of video streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119767371A_ABST
    Figure CN119767371A_ABST
Patent Text Reader

Abstract

The invention provides a network acceleration method, electronic equipment, a chip system and a storage medium, relates to the technical field of network communication, and can reduce the phenomenon of video playing lagging. The method comprises the following step: when the electronic equipment runs an application which does not comprise P2P (Peer-to-Peer) flow and the quality of a currently used network is poor, switching a data flow with high requirement on the network quality to other networks with better quality. According to the technical scheme of the invention, when the electronic equipment runs the application including the P2P stream and the currently used network is poor, all data streams of the electronic equipment can be switched to other networks due to the fact that the P2P stream is difficult to switch to other networks with better quality, so that the phenomenon of video lagging caused by the fact that the P2P stream is difficult to switch to other networks with better quality is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese patent application submitted to the State Intellectual Property Office on November 18, 2021, with application number 202111383410.5 and application name "A network acceleration method, electronic device, chip system and storage medium". Technical Field

[0002] The present application relates to the field of network communications, and in particular to a network acceleration method, electronic device, chip system and storage medium. Background Art

[0003] As electronic devices become more intelligent, more and more application software is installed and run in the electronic devices. Many application software need to communicate with corresponding servers through the network during operation to realize various functions provided by the application software.

[0004] When a user is using an application software, if the transmission quality of a data stream is poor, the data stream with the specific characteristics can be switched to another network for transmission based on the characteristics of the data stream. However, in the application scenario of video streaming, video freezes often occur after the stream switching is performed. Summary of the invention

[0005] The present application provides a network acceleration method, an electronic device, a chip system and a storage medium to reduce the phenomenon of video freeze.

[0006] In order to achieve the above objectives, this application adopts the following technical solutions:

[0007] In a first aspect, the present application provides a network acceleration method, the method comprising:

[0008] The electronic device runs a first application, and the electronic device transmits a first data stream and a second data stream of the first application through a first network card. The first network card is a wireless local area network card, and the first network card is used to connect to a wireless router. The signal of the wireless router received by the first network card has a first strength, and the first data stream and the second data stream are not P2P streams.

[0009] When the signal of the wireless router received by the first network card has a second strength, the electronic device transmits the first data stream through the second network card, and the electronic device transmits the second data stream through the first network card, the second strength is less than the first strength, and the network quality of the second network card is higher than the network quality of the first network card;

[0010] The electronic device runs a second application, and the electronic device transmits a third data stream and a fourth data stream of the second application through the first network card. The signal of the wireless router received by the first network card has a first strength, the third data stream is not a P2P stream, and the fourth data stream is a P2P stream.

[0011] When the signal from the wireless router received by the first network card has a second strength, the electronic device transmits the third data stream and the fourth data stream through the second network card.

[0012] In the present application, when an electronic device runs an application that does not include a P2P stream, when the quality of the currently used network is poor, the data stream that requires high network quality can be switched to another network, and the other data streams are transmitted through the original network card. When an electronic device runs an application that includes a P2P stream, when the currently used network is poor, since the P2P stream cannot be switched to another network, all the data streams of the electronic device can be switched to another network. This reduces the video freeze phenomenon caused by the inability to switch the P2P stream to another network, resulting in the P2P stream remaining on the original network.

[0013] As an implementation method of the first aspect, the first data stream is a data stream composed of data packets having a first characteristic, and the second data stream is a data stream composed of data packets having a second characteristic, and at least one of the following parameters in the first characteristic and the second characteristic is different: transmission protocol, transmission port and header characteristics of the data packet.

[0014] In the present application, different data streams can be distinguished by the relevant information (transmission protocol, transmission port and header features) carried by the data message, so that stream-level identification, stream-level quality assessment and stream-level network switching can be achieved.

[0015] As an implementation of the first aspect, during a process in which the electronic device transmits a first data stream and a second data stream of a first application through a first network card, the method includes:

[0016] The electronic device acquires a first condition corresponding to the first feature and a second condition corresponding to the second feature, the first condition being a condition for the first data stream to be transmitted to the second network card, and the second condition being a condition for the second data stream to be transmitted to the second network card;

[0017] The electronic device determines whether a flow quality parameter of the first data flow meets a first condition, and determines whether a flow quality parameter of the second data flow meets a second condition, where the flow quality parameter includes at least one of the following parameters: delay, rate, packet loss rate, retransmission rate, and whether a message response times out.

[0018] In the present application, different conditions can be set in advance for different characteristics. Taking the first data stream with a first characteristic as an example, when it is determined that the characteristic of the data stream of the first application satisfies the first characteristic, the first condition can be obtained, and then, it is determined whether the flow quality parameters of the data stream that satisfies the first characteristic satisfy the first condition.

[0019] As an implementation of the first aspect, when the signal of the wireless router received by the first network card has a first strength, the flow quality parameter of the first data stream does not meet the first condition, and the flow quality parameter of the second data stream does not meet the second condition;

[0020] When the signal of the wireless router received by the first network card has a second strength, the flow quality parameter of the first data flow meets the first condition, and the flow quality parameter of the second data flow does not meet the second condition.

[0021] As an implementation method of the first aspect, the third data stream is a data stream having a third characteristic, and the fourth data stream is a data stream having a fourth characteristic; at least one of the following parameters in the third characteristic and the fourth characteristic is different: the transmission protocol, transmission port and header characteristics of the data message.

[0022] As an implementation of the first aspect, during the process in which the electronic device transmits the third data stream and the fourth data stream of the second application through the first network card, the method includes:

[0023] The electronic device obtains a third condition corresponding to the third feature and a fourth condition corresponding to the fourth feature, the third condition being a condition for the third data stream to be transmitted to the second network card, or a condition for the third data stream and the fourth data stream to be transmitted to the second network card, and the fourth condition being a condition for the third data stream and the fourth data stream to be transmitted to the second network card;

[0024] The electronic device determines whether the flow quality parameters of the third data stream meet the third condition, and determines whether the flow quality parameters of the fourth data stream meet the fourth condition, where the flow quality parameters include at least one of the following parameters: delay, rate, packet loss rate, retransmission rate, and whether the message response times out.

[0025] As an implementation of the first aspect, when the signal of the wireless router received by the first network card has a first strength, the flow quality parameter of the third data flow does not meet the third condition, and the flow quality parameter of the fourth data flow does not meet the fourth condition;

[0026] If the third condition is a condition for the third data stream to be transmitted to the second network card, then when the signal of the wireless router received by the first network card has a second strength, the stream quality parameter of the fourth data stream satisfies the fourth condition;

[0027] If the third condition is the condition for the third data stream and the fourth data stream to be transmitted to the second network card, when the signal of the wireless router received by the first network card has the second strength, the flow quality parameter of the third data stream satisfies the third condition or the flow quality parameter of the fourth data stream satisfies the fourth condition.

[0028] As an implementation of the first aspect, the electronic device transmitting the third data stream and the fourth data stream through the second network card includes:

[0029] The electronic device checks whether the electronic device has a backup network stored;

[0030] In the case that the electronic device stores a backup network, the electronic device transmits the third data stream and the fourth data stream through the backup network, wherein the backup network includes the second network corresponding to the second network card.

[0031] In the present application, in order to promptly switch the data stream that meets the corresponding flow quality evaluation conditions to other networks, a backup network can be obtained and stored in advance, so that when the flow quality parameters of the data stream meet the corresponding conditions, the data stream that meets the corresponding evaluation conditions can be promptly switched to the backup network.

[0032] As an implementation of the first aspect, the method further includes:

[0033] In the case where the electronic device does not store a backup network, the electronic device obtains a network quality parameter of a network corresponding to a third network card of the electronic device, where the third network card is a network card other than the first network card in the electronic device, and the network quality parameter includes at least one of the following: bandwidth, latency, and air interface rate;

[0034] In the case where 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 parameter.

[0035] In the present application, when the backup network is not stored, the backup network can be obtained first, and then the data stream can be switched to the backup network for transmission when the flow quality parameter of the data stream meets the corresponding evaluation condition next time.

[0036] As an implementation of the first aspect, before the electronic device stores the second network corresponding to the second network card as a backup network, the method further includes:

[0037] The electronic device wakes up the second network corresponding to the second network card.

[0038] As an implementation of the first aspect, before the electronic device stores the second network corresponding to the second network card as a backup network, the method further includes:

[0039] The electronic device obtains a network quality parameter of a first network corresponding to the first network card;

[0040] Accordingly, the electronic device stores the second network corresponding to the second network card as a backup network, including:

[0041] When 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 a backup network.

[0042] In the present application, it is also necessary to determine whether the network quality of the network with the best quality among other networks other than the primary network is better than the network quality of the primary network. Only when the network quality is better than the network quality of the primary network, it will be used as a backup network to avoid switching the data flow from the primary network whose network quality does not meet the requirements of the current data flow to a network with worse network quality. As an implementation of the first aspect, the electronic device running the second application includes:

[0043] The electronic device runs the second application in the foreground;

[0044] Accordingly, the method further includes:

[0045] After the electronic device detects that the first application is running in the foreground, the electronic device sequentially performs the primary network determination step according to the priority order of the network cards of the electronic device until the primary network of the electronic device is obtained;

[0046] The step of determining the primary network includes:

[0047] The electronic device obtains a network status of a network corresponding to a fourth network card, where the fourth network card is a network card of the electronic device;

[0048] When the network status of the fourth network card is available, the electronic device obtains the network quality parameter of the fourth network card; when the network status of the fourth network card is unavailable, the current round of primary network determination step is ended;

[0049] When the network quality parameter of the fourth network card is within the preset range, the fourth network card is stored as the primary network of the electronic device; when the network quality parameter of the fourth network card is not within the preset range, the current round of primary network determination step is ended.

[0050] In this application, when the electronic device sets the network card priority, the network card that is available and whose network quality meets the preset requirements (for example, the network quality parameter is within the preset range) will be selected as the main network card according to the network card priority order to transmit the data stream of the application running in the foreground of the electronic device. Therefore, after the application is switched to the foreground, the main network card of the electronic device can be obtained according to the same logic, and the main network card is the network card that transmits the data stream of the first application.

[0051] As an implementation of the first aspect, the electronic device obtaining a network quality parameter of a first network corresponding to the first network card includes:

[0052] After obtaining the primary network of the electronic device, the electronic device monitors the network quality parameters of the primary network in a first period.

[0053] In the present application, in order to compare the network quality of the primary network with that of the backup network at any time, it is necessary to regularly monitor the network quality parameters of the primary network.

[0054] As an implementation manner of the first aspect, the electronic device obtains a network for transmitting the third data stream and the fourth data stream, where the network for transmitting the third data stream and the fourth data stream is a first network corresponding to the first network card;

[0055] The electronic device monitors a network quality parameter of the first network at a first period.

[0056] The present application can also determine the primary network through the network that transmits the data stream of the current foreground application, thereby providing a variety of ways to obtain the network quality parameters of the primary network, so as to compare the quality of the network when determining the backup network.

[0057] In a second aspect, an electronic device is provided, comprising a processor, wherein the processor is used to run a computer program stored in a memory to implement any method of the first aspect of the present application.

[0058] In a third aspect, a chip system is provided, including a processor, wherein the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement any method of the first aspect of the present application.

[0059] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by one or more processors, the method of any one of the first aspects of the present application is implemented.

[0060] In a fifth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute any one of the methods in the first aspect of the present application.

[0061] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0063] Figure 2 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0064] Figure 3 A schematic diagram of a network acceleration method provided in an embodiment of the present application;

[0065] Figure 4 A schematic diagram of another application scenario provided for an embodiment of the present application;

[0066] Figure 5 A schematic diagram of another network acceleration method provided in an embodiment of the present application;

[0067] Figure 6 A flowchart of a network acceleration method provided in an embodiment of the present application;

[0068] Figure 7 A technical architecture diagram provided for an embodiment of the present application;

[0069] Figure 8 A timing diagram of the network acceleration method provided in an embodiment of the present application;

[0070] Fig. 9 A timing diagram of another network acceleration method provided in an embodiment of the present application;

[0071] Fig.10 A timing diagram of another network acceleration method provided in an embodiment of the present application;

[0072] Fig.11 A timing diagram of another network acceleration method provided in an embodiment of the present application;

[0073] Fig.12 A timing diagram of another network acceleration method provided in an embodiment of the present application;

[0074] Fig.13 A schematic diagram of a data flow reported by a traffic reporting component to a traffic sensing component according to an embodiment of the present application;

[0075] Fig.14 A CDN network architecture provided for an embodiment of the present application;

[0076] Fig.15 A CDN network architecture including P2P technology provided in an embodiment of the present application;

[0077] Fig.16 A timing diagram of a network acceleration method for a data stream including a P2P stream provided in an embodiment of the present application;

[0078] Fig.17 A timing diagram of another network acceleration method for a data stream including a P2P stream provided in an embodiment of the present application;

[0079] Fig.18 An application scenario diagram of a network acceleration method for a data stream including a P2P stream provided in an embodiment of the present application. DETAILED DESCRIPTION

[0080] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details.

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

[0082] It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more than two; "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0083] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", "fourth", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0084] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0085] A network acceleration method provided in an embodiment of the present application can be applied to an electronic device. The electronic device can be a tablet computer, a mobile phone, a wearable device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and other electronic devices. The embodiment of the present application does not limit the specific type of the electronic device.

[0086] Figure 1The schematic diagram of the structure 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, an antenna 1, an 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, etc.

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

[0088] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, the processor 110 is used to execute the network acceleration method in the embodiment of the present application.

[0089] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0090] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0091] The USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device.

[0092] The external memory 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 memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0093] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.).

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

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

[0096] 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, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.

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

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

[0099] 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 a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

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

[0101] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. 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 the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0102] 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 the network and other devices through wireless communication technology.

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

[0104] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0105] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0106] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0107] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only monitor voice information but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to realize the collection of sound signals, noise reduction, identification of sound sources, and realization of directional recording function, etc.

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

[0109] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.

[0110] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

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

[0112] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0113] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

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

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

[0116] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting or removing the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0117] The embodiments of the present application do not particularly limit the specific structure of the execution subject of a network acceleration method, as long as the code of a network acceleration method of the embodiments of the present application can be run to perform processing according to a network acceleration method provided by the embodiments of the present application. For example, the execution subject of a network acceleration method provided by the embodiments of the present application can be a functional module in an electronic device that can call and execute a program, or a processing device applied to an electronic device, such as a chip.

[0118] like Figure 1 The electronic device shown may be installed and run with multiple applications, such as social communication applications, game applications, audio and video applications, and news applications, etc. These applications may establish network connections with other electronic devices (eg, servers corresponding to the applications) through the electronic device where they are located.

[0119] As an example, application A can establish a network connection with the server corresponding to application A through a wireless network card (also referred to as a Wi-Fi network card) in the electronic device where it is located; application A can also establish a network connection with the server corresponding to application A through a data service network card in the electronic device where it is located. Among them, the wireless network card is a device that supports Internet access via a wireless local area network (WLAN); the data service network card is a device that supports Internet access via 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 fifth generation mobile communication technology (5G).

[0120] For the sake of convenience of description, a network channel established between an electronic device and other electronic devices through a wireless network card can be recorded as a Wi-Fi network; a network channel established between an electronic device and other electronic devices through a data service network card can be recorded as a cellular network.

[0121] In actual applications, different applications (or different types of applications) have different requirements on the quality of the network channels used.

[0122] See also Figure 2 , the user uses application A (game application) in the mobile phone to play games, wherein application A in the mobile phone establishes a network connection with server A of application A through the wireless network card in the mobile phone, and data stream A generated between application A and server A (for example, data stream generated during game battle) is transmitted through the Wi-Fi network between the wireless network card on the mobile phone and the wireless router. The user uses application B (chat application) in the mobile phone to chat, wherein application B in the mobile phone establishes a network connection with server B of application B through the wireless network card in the mobile phone, and data stream B generated between application B and server B (for example, data stream generated during chat) is transmitted through the Wi-Fi network between the wireless network card on the mobile phone and the wireless router.

[0123] In the embodiment of the present application, the data sequence transmitted between two electronic devices is recorded as a data stream. In practical applications, based on the application scenario of the data stream, the data stream can be a video stream, an audio stream, a download stream, a conversation stream, etc.

[0124] If the user uses application A and application B in the same location (same distance between the wireless network card and the wireless router) and within the same time range (for example, within half an hour), theoretically, the Wi-Fi network quality will not be much different. However, because data stream A generates more data per unit time than data stream B, data stream A has higher requirements for Wi-Fi network quality than data stream B. When the user uses application B, it is relatively smooth, but when the user uses application A, there may be a freeze, resulting in a poor user experience.

[0125] Therefore, different applications (or different categories of applications) have different requirements for the quality of network channels. The embodiments of the present application can set different network quality evaluation algorithms for different applications (or different categories of applications). In the case where it is evaluated that the network channel currently used by an application is not sufficient to carry the data stream generated by the application (for example, the user carries the mobile phone far away from the location of the wireless router, etc.), a transmission quality improvement strategy is set to accelerate the transmission of the data stream.

[0126] See also Figure 3 , when the transmission quality of data stream A of application A is poor as assessed by the network quality assessment algorithm, data stream A can be switched from the current Wi-Fi network to other network channels. Figure 3 As shown, the mobile phone can switch data stream A to the cellular network between the data service network card of the mobile phone and the base station to transmit data stream A to server A through the cellular network.

[0127] In addition, even when a user uses the same application to process different services, the requirements for the quality of the network channel used by the application may be different.

[0128] See also Figure 4 When a user uses application A to download, a download stream A1 is generated, and when a user uses application A to have a conversation, a conversation stream A2 is generated. Both the download stream A1 and the conversation stream A2 can be transmitted through the Wi-Fi network between the wireless network card and the 2.4GHz wireless router.

[0129] If the user uses application A in the mobile phone to download and chat respectively in the same location (the distance between the wireless network card and the wireless router is the same) and within the same time range (for example, within half an hour), in theory, the quality of the network channel will not be much different. However, since data stream A1 generates a larger amount of data per unit time than data stream A2, data stream A1 has higher requirements on the quality of the network channel than data stream B. When the user uses application A for chat, it is relatively smooth. However, when the user uses application A for downloading, the user may feel that the download rate is too slow, resulting in a poor user experience.

[0130] Therefore, different business scenarios of the same application have different requirements for the quality of the network channel. The embodiment of the present application can set different network quality evaluation algorithms for different business scenarios of the same application. When it is evaluated that the network channel currently used by the application is not sufficient to carry a certain data stream generated by the application, a transmission quality improvement strategy is set to accelerate the transmission of the data stream.

[0131] See also Figure 5 , when the transmission quality of data stream A1 of application A is poor as assessed by the network quality assessment algorithm, data stream A1 can be allocated to multiple network channels for parallel transmission. Figure 3 As shown, the mobile phone is provided with a wireless network card 1, which supports 2.4GHz transmission and reception; a wireless network card 2, which supports 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. The three data streams are distributed to three network channels for transmission.

[0132] Need to explain, Figure 5 The wireless router in the embodiment may be a wireless router supporting both 2.4 GHz and 5.0 GHz transmission and reception, or may be two routers supporting 2.4 GHz and 5.0 GHz transmission and reception respectively.

[0133] pass Figure 3 and Figure 5 It is understandable that different transmission quality improvement strategies can also be set (for example, Figure 3 Switching in Figure 5 concurrency in) to speed up the transmission of data streams, thereby improving the user experience.

[0134] In the embodiment of the present application, the quality of a network channel or the quality of a data stream on a network channel can be evaluated by some parameters. In the specific implementation, some conditions can be set. For example, when condition 1 is met, the evaluation result is considered to be good (excellent), and when condition 1 is not satisfied, the evaluation result is considered to be bad (bad); or when condition 2 is met, the evaluation result is considered to be bad (bad), and when condition 2 is not satisfied, the evaluation result is considered to be good (excellent). The evaluation conditions of the network quality and transmission quality in the embodiment of the present application are not limited.

[0135] In view of the above Figures 2 to 5 According to the description, the embodiment of the present application provides a network acceleration method. In the network acceleration method, developers can pre-set different network quality evaluation algorithms and different transmission quality improvement strategies for different applications (or different categories of applications).

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

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

[0138] Of course, in actual 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.

[0139] In view of the above description, a network acceleration method as shown in Table 1 can be obtained. In the network acceleration method, network acceleration strategies can be set for different application categories and / or different business scenarios. When setting the network acceleration strategy, different network quality assessment algorithms and / or different transmission quality improvement strategies can be used.

[0140] Table 1 Multiple network acceleration methods

[0141] method Application Category Business Scenario Evaluation Algorithm Improvement strategy 1 consider Not considered different same 2 consider Not considered same different 3 consider Not considered different different 4 Not considered consider different same 5 Not considered consider same different 6 Not considered consider different different 7 consider consider different same 8 consider consider same different 9 consider consider different different

[0142] Taking the network acceleration method 9 in Table 1 as an example, different network quality evaluation algorithms can be set for different types of applications in different business scenarios (for example, determined by the characteristics of the data flow of the application). When the network quality evaluated by the network quality evaluation algorithm is poor (or some parameters used to evaluate the network quality meet a certain condition), different network quality improvement strategies are used to achieve network acceleration. Other network acceleration methods are not given one by one.

[0143] See also Figure 6 , is a flow chart of a network acceleration method provided in an embodiment of the present application. The flow chart corresponds to the network acceleration method 9 in Table 1 above.

[0144] Step A1, the electronic device detects that application A is running in the foreground.

[0145] In the embodiment of the present application, application A can be any application program in the electronic device that can connect to the Internet and use the network. The electronic device detecting that application A is running in the foreground can be that the electronic device detects that application A is running in the foreground after it is turned on, or it can be that application A is switched from the background to the foreground when it is detected.

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

[0147] In the embodiment of the present application, an application configuration library is stored in the electronic device, and the application configuration library can be pre-set by a developer, or can be set or added by a user during the use of the electronic device. The application configuration library stores the identification of applications that support network acceleration.

[0148] After the electronic device detects that application A has switched to the foreground, it can obtain the application identifier of application A and query 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.

[0149] Of course, the above method of determining whether application A supports network acceleration is only used as an example. In actual applications, the application configuration library can also store multiple application identifiers, and each application identifier uses different characters to indicate whether the application represented by the application identifier supports network acceleration. As an 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 of determining whether an application supports network acceleration are not given one by one.

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

[0151] In the implementation of this application, setting different business scenarios makes it easier to understand the role of setting different network quality assessment algorithms; on the other hand, it can also determine which network quality assessment algorithm to use based on different business scenarios. However, in actual applications, the characteristics of data streams generated by different business scenarios may be different. Therefore, it is not necessary to determine the current business scenario of application A. The network quality assessment algorithm that should be used can be determined based on the characteristics of the current data stream of application A. Various information about the data stream of application A can be stored in the stream feature library of application A.

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

[0153] As an example, if the network channel carrying the data flow of application A is network channel 1, the Netfilter component can obtain the data flow message of application A on network channel 1. If the network channels carrying the data flow of application A are network channel 1 and network channel 2, the Netfilter component can obtain the data flow message of application A on network channel 1 and network channel 2.

[0154] Of course, in actual applications, data flow packets can also be obtained in other ways. The collection of obtained data flow packets is the flow feature library.

[0155] When determining the network quality assessment algorithm through the characteristics of the data flow of the application, the protocol, port and message characteristics of the data flow of the application can be used as the characteristics to determine the network quality assessment algorithm. Among them, the protocol is the protocol type when the application transmits the data flow, the port is the port used when the data flow is transmitted, and the message characteristics are the header characteristics of the data packet when the application transmits the data flow.

[0156] As an example, when a social communication application is making an audio or video call, the header feature of the data packet corresponding to the data stream starts with 97, that is, data[0]=97, and the UDP protocol is used to transmit the data packet, and the data packet is transmitted using port 8080. In the obtained data stream, if a data stream meets the above characteristics, the network quality evaluation algorithm matching the characteristic can be obtained: if the data delay exceeds 300ms in 3 consecutive cycles within 5 cycles (for example, each cycle is 500ms), or the packet loss rate exceeds 20%, the evaluation result is: jamming.

[0157] The above example of determining the network quality assessment algorithm is only for illustrative purposes. In actual applications, the network quality assessment algorithm may also be determined by other features besides the protocol, port and message features.

[0158] Of course, when an application implements a certain function, multiple data streams may be generated. If network quality assessment algorithms are determined respectively according to the characteristics of the multiple data streams, the corresponding network quality assessment algorithms are used to assess the transmission quality of the corresponding data streams.

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

[0160] Determine a network quality assessment algorithm 1 according to the characteristics of the data stream 1, and determine whether the data stream 1 satisfies the transmission quality improvement condition set by the algorithm 1;

[0161] Determine network quality assessment algorithm 2 according to the characteristics of data stream 2, and determine whether data stream 2 meets the transmission quality improvement condition set by algorithm 2;

[0162] The characteristics of data stream 3 do not meet any of the conditions for determining the network quality assessment algorithm, so there is no need to assess the transmission quality of data stream 3, nor is there any need to improve the transmission quality of data stream 3.

[0163] 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.

[0164] It should be noted that in actual applications, the transmission quality evaluation result of the data stream of application A (for example, a quality score or quality level) can be obtained according to the algorithm model and the relevant parameters of the data stream of application A, and whether the transmission quality of the data stream needs to be improved is determined according to the transmission quality evaluation result. Of course, in actual applications, the algorithm can pre-set the conditions for determining the need to improve the transmission quality of the data stream, and when the conditions are met, obtain the transmission quality improvement strategy and execute the transmission quality improvement strategy.

[0165] For example, in the example of the network quality assessment algorithm in step A3, the delay, packet loss rate, etc. of each data stream of application A need to be obtained.

[0166] As 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 when the application uses the current network, the header features of the data packets transmitted when the application uses the current network, etc. Of course, the traffic features when the application uses the current network can also be included.

[0167] The traffic characteristics of the application may include information such as uplink rate, downlink rate, flow interval, packet interval, packet size, and traffic distribution, etc. Of course, it may also include part of the above information, or other information in addition to the above information.

[0168] Through the traffic characteristics, we can get the delay, packet loss, downlink rate, uplink rate, etc. Therefore, these traffic characteristics can be used as evaluation parameters of the network quality evaluation algorithm. Of course, in actual applications, different network quality evaluation algorithms may obtain different parameters for evaluating network quality. For example, they may include one or more of the above parameters, and may also include other parameters other than the above parameters. Therefore, the parameter category included in the traffic characteristics of the application can be determined according to the evaluation parameters of the network quality evaluation algorithm.

[0169] Step A5: When the relevant parameters of the data stream of application A meet the conditions set by the algorithm, a transmission quality improvement strategy is determined according to the data stream characteristics of application A.

[0170] As before, different transmission quality improvement strategies can be set in advance 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 actual applications, the correspondence between the characteristics of the data stream and the transmission quality improvement strategy can also be set. After determining the characteristics of the data stream, the transmission quality improvement strategy corresponding to the characteristics of the data stream can be obtained. Through the characteristics of the data stream, the transmission quality improvement strategy that matches the characteristics can be queried from the improvement strategy library.

[0171] Step A6: Execute a transmission quality improvement strategy.

[0172] In an embodiment of the present application, an application can generate multiple data streams in a certain business scenario. In actual applications, if the characteristics of some of 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 and 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, and the correlation between data streams can be pre-set, for example, multiple download streams with the same source address and destination address in download applications can be set as related data streams, and video streams and audio streams with the same source address and destination address in chat applications can also be set as related data streams; all data streams of the application can also be switched to other network channels.

[0173] As another example, in actual applications, if the characteristics of some of 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 also be allocated to multiple network channels supported by the electronic device; the data streams that meet the pre-set conditions for improving transmission quality and data streams related to the data streams that meet the pre-set conditions for improving transmission quality can also 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.

[0174] As another example, in actual applications, if the characteristics of some of the multiple data streams meet the pre-set concurrency conditions, the data streams that meet the concurrency conditions can be first allocated to multiple network channels. If the characteristics of a certain data stream among the multiple data streams on the multiple network channels meet the pre-set conditions for improving transmission quality, the data stream that meets the pre-set conditions for improving transmission quality will be switched to a network channel with better quality.

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

[0176] Table 2 Flow characteristics, network quality assessment algorithms, and transmission quality improvement strategies for multiple applications and multiple business scenarios

[0177]

[0178]

[0179] Among them, com.tencent.mm in Table 2 can be the WeChat package name, and com.tencent.tmgp.sgame can be the Honor of Kings package name. The characteristics of the data flow can all be protocol, port and message characteristics. An entry in Table 2 can be a characteristic condition of the data flow, a network quality assessment algorithm and a network quality improvement strategy set for a business scenario of an application. In addition, Table 2 only lists the protocols, ports and message characteristics corresponding to some business scenarios of some applications, and is only used for examples.

[0180] The network quality evaluation algorithm and transmission quality improvement strategy in Table 2 are only used as examples. In actual applications, other different methods for determining the network quality evaluation algorithm and different transmission quality improvement strategies may be used. In the transmission quality improvement strategy, "switching" may represent any form of switching in the above embodiments; "concurrency" may represent any form of concurrency in the above embodiments.

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

[0182] For example, the application may generate 10 streams in a certain business scenario. If only one or two streams have poor quality, the streams with poor quality will be switched to other networks. If three or more streams have poor quality, all streams (10 streams) under the application will be switched to the backup network.

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

[0184] In practical applications, Table 2 only lists the characteristics of some data flows of some applications, as well as the corresponding network quality assessment algorithms and transmission quality improvement strategies. In practical applications, other network quality assessment algorithms and transmission quality improvement strategies may also be used. As an example, the network quality assessment algorithm illustrated in Table 3 may also be used.

[0185] Table 3 Network quality assessment algorithm

[0186]

[0187]

[0188] Of course, in actual applications, the network quality transmission algorithm in Table 3 is only used as an example. In actual applications, other algorithms besides the network quality transmission algorithm shown in Table 3 may also be used, and the embodiments of the present application do not limit this.

[0189] After describing the network acceleration method provided in the embodiment of the present application, the technical implementation details of implementing the network acceleration method will be described below.

[0190] See also Figure 7 , which is a technical architecture diagram of a network acceleration method provided in an embodiment of the present application.

[0191] The technical architecture includes: application layer, service layer, strategy layer and kernel layer. Figure 7 Only some layers and some components related to the embodiment of the present application are shown in the figure. In practical applications, the following may also be included: Figure 7 Of course, it is also possible to include only Figure 7Some of the components shown.

[0192] There are various applications in the application layer, for example, the aforementioned video applications, game applications, etc.

[0193] The service layer includes environment 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.

[0194] Among them, the environment detection component is used to detect various events of the upper layer application. As an example, it can detect the opening and exiting of the application, the application currently switched to the foreground, the installation and uninstallation of the application, etc. The network detection component is used to detect the status of the Wi-Fi network supported by the electronic device (on or off, etc.), and can also detect the status of the data service network supported by the electronic device. As an example, the electronic device is provided with a wireless network card 1 of the 2.4GHz frequency band and a wireless network card 2 of the 5.0GHz frequency band. The network detection component can detect whether the wireless network of the 2.4GHz frequency band is on or off; it can also detect whether the wireless network of the 5.0GHz frequency band is on or off. The electronic device is provided with a data service network card 1 of operator A and a data service network card 2 of operator B. The network detection component can detect whether the data service of operator A is on or off; it can also detect whether the data service of operator B is on or off.

[0195] The channel and application quality assessment component is used to assess the quality of the network channel. As an example, the channel and application quality assessment component can assess the quality of the Wi-Fi network in the 2.4GHz band, and can also assess the quality of the Wi-Fi network in the 5.0GHz band. It can also assess the quality of the cellular network of operator A, and can also assess the quality of the cellular network of operator B. The network connection management component is used to start the network channel, that is, to convert the network channel from the dormant state to the awake state. Among them, the awakened network channel can be used directly.

[0196] The channel-level path management component stores the paths of multiple network channels and is used to request or close any network channel. It can sense the state change of any network channel and the quality of any network channel. The application-level policy management component is used to enable the network acceleration function and enable the monitoring function of the data flow.

[0197] The policy layer is provided with a flow-level policy management component, a flow-level path management component and a traffic perception component. Among them, the traffic perception component is used to count the reported data flows and evaluate the network quality of each flow. The flow-level policy management component stores the transmission quality improvement strategy of the flow in the application, and is also used to instruct the execution of the transmission quality improvement strategy. The flow-level path management component is used to update the selection of network channels according to the policy changes of the upper layer, trigger the network channel quality detection, and dynamically select the optimal channel. It can also be used to store the paths of different network channels. For example, it can store the paths of the network channels (for example, the main network channels) and the backup network channels currently used by the application.

[0198] The kernel layer has a policy execution component and a traffic reporting component. The traffic reporting component is used to collect data flow information and report the collected data flow information. The policy execution component is used to execute the switching of network channels.

[0199] As another embodiment of the present application, in the above embodiment, 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.

[0200] As an example, the stream-level policy management component and the stream-level path management component of 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.

[0201] For a clearer understanding of the above architecture diagram, see Figure 8 , which is based on the embodiments of the present application Figure 7 A timing diagram of a network acceleration method implemented by various components shown.

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

[0203] Step B2: The environment detection component detects that application A is started or that application A switches from the background to the foreground, and obtains the identifier of application A.

[0204] Step B3: The environment detection component sends the identifier of application A to the application-level policy management component.

[0205] The identifier of the application is used to uniquely identify the application, and may have a one-to-one correspondence with the package name of the application, or may use the package name of the application.

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

[0207] Step B5: When the query result indicates that network acceleration is supported, the application-level policy management component sends information indicating that application A enables network acceleration to the flow-level path management component.

[0208] In a specific implementation, the message may carry the identifier of application A.

[0209] Step B6: The flow-level path management component sends a message to the traffic reporting component indicating that application A has enabled network acceleration.

[0210] In a specific implementation, the message may also carry the identifier of application A, and the message sent in step B6 may be the same as or different from the message sent in step B5.

[0211] Step B7: After receiving the information indicating that application A has enabled network acceleration, the traffic reporting component registers a message monitoring hook.

[0212] The message monitoring hook can monitor the relevant information of the data flow of application A, and the relevant information is the information stored in the flow feature library of application A. The data flow carries the path information of the network carrying the data flow.

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

[0214] As before, the network path currently used by application A can be determined through the data stream monitored by the message monitoring hook.

[0215] As another example, the path of the network currently used by application A may also be determined according to the logic of selecting a primary network when multiple available networks are present, which is set by the system.

[0216] In actual applications, if the electronic device is equipped with a 2.4GHz wireless network card 1, a 5.0GHz wireless network card 2, a data service network card 1 of operator A, and a data service network card 2 of operator B, then one of the wireless network card 1 or the wireless network card 2 can be defaulted as the primary Wi-Fi, and the other wireless network card can be defaulted as the secondary Wi-Fi; one of the data service network card 1 of operator A and the data service network card 2 of operator B can be defaulted as the primary card, and the other data service network card can be defaulted as the secondary card.

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

[0218] When the primary Wi-Fi network is available, the system defaults the current primary network of the electronic device or the foreground application to the primary Wi-Fi network. When the primary Wi-Fi network is unavailable, the system defaults the current primary network of the electronic device or the foreground application to the primary cellular network. When the primary cellular network is unavailable, the system defaults the current primary network of the electronic device or the foreground application to the secondary Wi-Fi network. When the secondary Wi-Fi network is unavailable, the system defaults the current primary network of the electronic device or the foreground application to the secondary cellular network.

[0219] When Application A is opened and runs in the foreground, Application A uses the primary network according to the above rules; even when Application A is in the foreground, the system switches part of the data flow in Application A to other networks. After Application A switches to the background, the data flow in Application A resumes using the system default primary network; after Application A switches from the background to the foreground, Application A continues to use the system default primary network.

[0220] Therefore, in the embodiment of the present application, each network in the electronic device can be requested in sequence according to the above rules: main Wi-Fi, main card network, secondary Wi-Fi and secondary card network, etc. Until an available network with quality that meets the requirements is requested. The available network with quality that meets the requirements can be understood as the network currently used by application A. For details, please refer to steps C1 to C8.

[0221] Step C1, after receiving the information sent by the application-level policy management component indicating that application A starts network acceleration, the flow-level path management component sends information requesting a primary network to the channel-level path management component.

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

[0223] Step C2: The channel-level path management component sends request information about the status of the primary Wi-Fi to the network detection component. The request information is used to request the status of the primary Wi-Fi.

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

[0225] Step C4: the network detection component returns the status of the primary Wi-Fi to the channel-level path management component: available.

[0226] Step C5: When the channel-level path management component receives that the status of the primary Wi-Fi is available, it sends a detection request for the quality of the primary Wi-Fi to the channel and application quality assessment component, where the detection request is used to detect the quality of the primary Wi-Fi.

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

[0228] Step C6: After evaluating the quality of the primary Wi-Fi, the channel and application quality assessment component returns the quality monitoring result of the primary Wi-Fi to the channel-level path management component.

[0229] In a specific implementation, after step C3, that is, after the network detection component determines that the primary Wi-Fi is available, step D1 may also be performed.

[0230] Step D1: The network detection component sends a monitoring message of the quality of the primary Wi-Fi to the channel and application quality assessment component. The monitoring message is used to request the channel and application quality assessment component to monitor the network quality of the primary Wi-Fi.

[0231] Step D2: After receiving the message, the channel and application quality assessment component starts to monitor the network quality of the primary Wi-Fi and returns the quality of the primary Wi-Fi to the channel-level path management component.

[0232] When the network quality of the primary Wi-Fi is good (for example, the network quality parameter is within a preset range), the primary Wi-Fi may be determined to be the primary network for application A, and the network quality of the primary Wi-Fi may be monitored regularly.

[0233] It should be noted that what is monitored in step D2 is the quality of the network channel, and the monitoring algorithm used is different from the network quality assessment algorithm determined according to the characteristics of the data stream in the above embodiment. For the convenience of description, we can record the monitoring algorithm used in this step as algorithm A.

[0234] As an example of algorithm A, the quality of the network channel can be evaluated based on parameters such as the delay, packet loss rate, bandwidth and rate of the channel as a reference.

[0235] According to step D1 and step D2, the channel and application quality assessment component can start monitoring the network quality of the main Wi-Fi before receiving the detection request sent in step C5, so as to quickly obtain the quality of the main Wi-Fi. After obtaining the quality of the main Wi-Fi, the quality monitoring result of the main Wi-Fi can be returned to the channel-level path management component in a timely manner.

[0236] In actual applications, after the channel and application quality assessment component receives the monitoring request sent in step D1, the first monitoring result may be obtained before or after receiving the detection request sent in step C5.

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

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

[0239] As another example of the present application, if in step C3, the status of the main Wi-Fi obtained by the network detection component is unavailable, the network detection component no longer executes step D1, and accordingly, the channel and application quality assessment component no longer executes step D2. After the channel-level path management component receives the message that the main Wi-Fi is unavailable sent by the network detection component, it no longer executes step C5, and accordingly, the channel and application quality assessment component no longer executes step C6.

[0240] After the channel-level path management component receives the message that the main Wi-Fi is unavailable sent by the network detection component, it continues to request the main card network (i.e., the next priority network of the currently requested network) in the manner of steps C2 to C6 (which may include steps D1 and D2, or may not include steps D1 and D2). If the result obtained is that the main card network is available and the network quality meets the requirements, the path of the main card network is sent to the flow-level path management component as the path of the main network, and the flow-level path management component stores the path of the main card network as the path of the main network. Similarly, when the network quality of the main card network meets the requirements, the channel and application quality assessment component also needs to regularly assess the quality of the main card network.

[0241] In the process of determining the primary network, it is necessary to loop through steps C2 to C6 until the primary network of the electronic device is obtained. In this example, each time steps C2 to C6 are looped, the detected network is a network corresponding to a network card of an electronic device. In this process, the network card corresponding to each requested network can be recorded as the fourth network card.

[0242] That is, the electronic device sequentially performs the primary network determination step according to the priority order of the network cards of the electronic device until the primary network of the electronic device is obtained;

[0243] The step of determining the primary network includes:

[0244] The electronic device obtains a network status of a network corresponding to a fourth network card, where the fourth network card is a network card of the electronic device;

[0245] When the network status of the fourth network card is available, the electronic device obtains the network quality parameter of the fourth network card; when the network status of the fourth network card is unavailable, the current round of primary network determination step is ended, and the next round of primary network determination step of the next priority network card is entered;

[0246] When the network quality parameter of the fourth network card is within the preset range, the fourth network card is stored as the primary network of the electronic device; when the network quality parameter of the fourth network card is not within the preset range, the current round of primary network determination step is ended, and the next round of primary network determination step of the next priority network card is entered.

[0247] In actual applications, the channel and application quality assessment component can determine whether the network quality of the network meets the requirements, and if so, regularly assess the network quality of the network; the channel-level path management component can also determine whether the network quality of the network meets the requirements after receiving the quality monitoring results of the network sent by the channel and application quality assessment component, and if so, send a request message to the channel and application quality assessment component to request regular assessment of the network quality of the network. In the above manner, the notification-level path management component can regularly obtain the network quality of the network currently carrying the data flow of application A, and send the obtained network quality of the network currently carrying the data flow of application A to the stream-level path management component.

[0248] It can be understood from the above examples that the path of the network currently used by application A can be obtained according to the logic of selecting the primary network when there are multiple available networks set by the system.

[0249] After the application-level policy management component executes step B4, that is, after determining that the application A corresponding to the identifier supports acceleration, the first aspect transmits a message to the lower-level traffic reporting component through the flow-level path management component to start acceleration of application A, so that the traffic reporting component registers a message monitoring hook. The second aspect can also obtain the network path of the primary network and the network quality of the primary network. The third aspect transmits a message to start data flow monitoring to the lower-level traffic reporting component through the traffic perception component, so that the traffic reporting component monitors the data flow of application A through the registered message monitoring hook (see step B8 for details).

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

[0251] In specific implementation, the application-level policy management component can execute step B5 and step B8 simultaneously after executing step B4. The application-level policy management component can also execute step B5 first after executing step B4, and then execute step B8 at a preset time (the specific value can be set according to actual conditions) after executing step B5.

[0252] Step B9: After receiving the request message sent in step B8, the traffic sensing component sends a message indicating traffic monitoring to the traffic reporting component.

[0253] Step B10, after receiving the traffic monitoring message sent in step B9, the traffic reporting component reports the monitored data flow to the traffic perception module.

[0254] After step B7, the message monitoring hook in the traffic reporting component starts to monitor the data flow. After receiving the traffic monitoring message sent in step B9, the monitored data flow is reported to the traffic perception module. In addition, the monitored data flow can be continuously reported to the traffic perception component in the future.

[0255] Step B11: The traffic sensing component receives the data flow reported by the traffic reporting component and determines a network quality assessment algorithm based on the characteristics of the data flow.

[0256] It should be noted that the network quality evaluation algorithm in step B11 is different from the algorithm for evaluating the network channel in step D2. For ease of description, the algorithm in step B11 is recorded as algorithm B. Algorithm A is a common algorithm for each network channel, and it evaluates the network quality of the entire network channel. Algorithm B is an algorithm determined based on the characteristics of the data flow of the application currently enabling network acceleration, and it evaluates the transmission quality of the data flow that meets the pre-set characteristics transmitted through the network channel.

[0257] Step B12: The traffic perception component starts to evaluate the transmission quality of each data stream of application A based on the network quality evaluation algorithm to obtain an evaluation result.

[0258] It should be noted that the evaluation results may include: excellent (for example, mark 00), possible lag (for example, mark 10) and lag (for example, mark 11).

[0259] As an example, in the above Table 2, the conditions for evaluating the jamming may be set. In actual applications, the conditions for evaluating the possible jamming may also be set.

[0260] Condition 1: If the delay exceeds 300ms or the packet loss exceeds 20% for three consecutive times within five cycles, the evaluation result is jamming.

[0261] Condition 2: If the delay exceeds 200ms or the packet loss rate exceeds 10% for two consecutive periods within 5 cycles, the evaluation result is possible lag.

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

[0263] Based on the above understanding, it can be determined that the network quality assessment algorithm obtained according to the characteristics of the data stream not only includes the judgment conditions of the jamming defined in Table 2, but also includes the judgment conditions of possible jamming in actual applications.

[0264] As another example, condition 1 and condition 2 may be preset, and the evaluation result may also include: condition 1 is satisfied, condition 2 is satisfied, and condition 1 and condition 2 are not satisfied.

[0265] In the specific implementation, the specific form of the evaluation results is not limited.

[0266] Step B13: The traffic sensing component sends the evaluation result to the flow-level policy management component.

[0267] It should be noted that the evaluation result sent in this step may be an identifier indicating stuck, possible stuck, and excellent, and may also carry the characteristics of the data stream (or feature identifier).

[0268] Alternatively, the evaluation result may include: satisfying condition 1, satisfying condition 2, an identification of not satisfying condition 1 and not satisfying condition 2, and may also carry the characteristics (or characteristic identification) of the data flow.

[0269] Step B14: After receiving the evaluation result, the flow-level policy management component determines to request a backup network if the evaluation result indicates possible lag (satisfying condition 2).

[0270] As another example, in actual applications, although the transmission quality improvement strategy is switching when both condition 1 and condition 2 are met, when condition 2 is met, the request information of the backup path is sent to the stream-level path management component, and when condition 1 is met, the switching information of the backup path is sent to the stream-level path management component.

[0271] The above settings can be used to determine a backup network in advance and wake up the backup network when it is predicted that the transmission quality of the data stream may deteriorate (for example, condition 2 is met), so that when the transmission quality of the data stream does deteriorate (for example, condition 1 is met), the data stream with poor transmission quality can be quickly switched to the backup network. This is because the transmission quality of the data stream usually deteriorates gradually. Therefore, in the case of possible deterioration, the backup network is first selected and the backup network is awakened. In the case that the transmission quality of the data stream does deteriorate, the data stream with poor transmission quality is switched to the awakened backup network. In this way, it is possible to respond quickly to the switching of the data stream so that the user is unaware of the switching of the data stream, and it is also possible to avoid the problem of high power consumption caused by waking up the backup network too early.

[0272] Step B15: When the flow-level policy management component determines that condition 2 is met, the flow-level path pipeline component sends a request for a backup path.

[0273] Step B16: When the stream-level path management component determines that no backup network currently exists, the stream-level path management component sends a request message for a backup path to the channel-level path management component.

[0274] After receiving the request message of the backup path, the channel-level path management component starts to search for other available networks with the best quality other than the currently used primary network. For details, please refer to the description of step B17 to step B23.

[0275] Step B17: The channel-level path management component sends a query request for the status of network B to the network detection component.

[0276] In the embodiment of the present application, network B may be any other network other than the current primary network. The current primary network may be recorded as network A. Network B may be recorded as the network corresponding to the third network card.

[0277] Step B18, the network detection component queries the network status of network B and finds that it is available.

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

[0279] Step B20: upon receiving the information indicating that the network status of network B is available, the channel-level path management component sends a quality detection request of network B to the channel and application quality assessment component.

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

[0281] Step E1: The network detection component sends a request for monitoring the quality of network B to the channel and application quality assessment component.

[0282] Step E2: When the channel and application quality assessment component receives the request for monitoring the quality of network B sent by the network detection component, it starts to monitor the quality of network B using algorithm A.

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

[0284] In the embodiment of the present application, a network quality parameter is used when evaluating the quality of a network channel, and a stream quality parameter is used when evaluating the transmission quality of a data stream.

[0285] Step B22, the channel-level path management component obtains the status of each network channel except the primary network according to the method of steps B17 to B21 and obtains the network quality of the available network when the status is available.

[0286] Step B23, the channel-level path management component determines the available network with the best network quality as the primary card network according to the status and network quality of other networks except the primary network. Of course, in actual applications, a range can also be set, and the network cards with network quality parameters in the third network card within the range are all used as backup networks.

[0287] 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.

[0288] In the embodiment of the present application, the network with the best quality (for example, the greatest signal strength, larger bandwidth, etc.) is determined as the backup network in actual applications. Of course, in actual applications, other conditions for determining the backup network can also be set. As an example, the backup network priority condition can also be set as: a network other than the primary network that is available, has network quality that meets the requirements and does not incur additional costs as a backup network, wherein the network that does not incur additional costs can be: a Wi-Fi network, a data service network with unlimited traffic packages, or a data service network with limited traffic packages but the current traffic usage is less than the current monthly planned traffic (total traffic / total number of days in a 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 meet the priority conditions.

[0289] When all networks except the primary network do not meet the priority condition, a network that meets the secondary priority condition is selected as the backup network, where the secondary priority condition is: a network other than the primary network that is available and has a network quality that meets the 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 condition.

[0290] If the other networks except the primary network still do not meet the secondary priority condition, the available network other than the primary network is selected as the backup network. Of course, the backup network can be the one with the best network quality among the available networks other than the primary network.

[0291] The above method of selecting a backup network is only used as an example. In actual applications, other methods may be used and are not limited here.

[0292] Step B24: after determining that the network with the best quality is the primary card network, the channel-level path management component sends a request to the network connection management component to enable the primary card network.

[0293] Step B25: after receiving the activation request of the primary card network, the network connection management component switches the primary card network from the dormant state to the awakened state.

[0294] Step B26: The network connection management component sends a message to the channel-level path management component that the primary card network has been awakened.

[0295] Step B27: the channel-level path management component sends the currently determined path and quality of the primary card network with the best quality to the stream-level path management component.

[0296] As before, the channel-level path management component can periodically obtain the network quality of the primary network of the electronic device. Of course, the channel-level path management component can periodically send the obtained network quality of the primary network of the electronic device to the stream-level path management component.

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

[0298] Step F1, the stream-level path management component has stored the network path of the main network. After receiving the path and network quality of the main card network sent by the channel-level path management component, it can compare the quality parameters corresponding to the latest stored network path of the main card network and the received quality parameters of the main card network to determine a network path with better quality.

[0299] In specific implementation, if the network path with better quality is the pre-stored primary network path, it means that the quality of the backup network is worse, and even if the primary network is currently poor, there is no need to switch. There is no need to store the network path of the backup network. If the network path with better quality is not the pre-stored primary network path, it means that the quality of the backup network is better, and the network path of the backup network needs to be stored in case the transmission quality of the data stream currently using the primary network is worse, and the backup network needs to be switched to the backup network.

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

[0301] As another example, after step B26, the channel-level path management component may request to periodically monitor the network quality of the primary card network and periodically send the request to the stream-level path management component.

[0302] Of course, in actual applications, the network quality of other networks other than the primary network can be monitored regularly. If the network with the best quality is no longer the currently stored backup network, the backup network can be replaced with a network with better quality other than the current primary network and the current backup network. If a network is awakened as a backup network and then is no longer a backup network or a primary network, the network can be switched from the awake state to the sleep state to avoid excessive power consumption of electronic equipment.

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

[0304] Step B29, the traffic reporting component continuously reports the monitored data flow to the traffic sensing component.

[0305] Step B30, the traffic sensing component has determined the network quality assessment algorithm (algorithm B) for each data stream, and continues to use algorithm B to obtain the assessment results.

[0306] Step B31, the traffic perception component continues to send the evaluation result to the flow-level policy management component.

[0307] Step B32: The flow-level policy management component determines that it is necessary to switch to the backup network based on the evaluation result.

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

[0309] Step B33: after determining to switch to the backup network, the flow-level policy management component sends an instruction to the flow-level path management component to indicate switching to the backup network.

[0310] Step B34, after receiving the instruction to switch to the backup network, the flow-level path management component checks the path where the backup network is stored (the path of the primary card network), and then sends an instruction to switch to the primary card network to the flow-level policy management component.

[0311] It should be noted that the stream-level policy management component stores a transmission quality improvement strategy. Therefore, the stream-level policy management component can determine whether to switch a single stream, a portion of the streams, or all of the streams. In practical applications, step B33 may carry the identifier of the data stream to be switched, and at the same time, the instruction transmitted by B34 may also carry the identifier of the data stream to be switched. The instructions sent in the two steps may not carry the identifier of the data stream to be switched.

[0312] Step B35, the flow-level policy management component sends an instruction to the policy execution component, which carries the data flow identifier and the main card network path, wherein the data flow identifier is the data flow identifier whose evaluation result meets condition 1, or the data flow whose evaluation result meets condition 1 and the related data flow identifiers, or all data flow identifiers of application A where the data flow whose evaluation result meets condition 1 is located.

[0313] Step B36, the policy execution component switches the data flow indicated by the data flow identifier carried in the received instruction to the primary card network indicated by the network path carried in the instruction.

[0314] In the embodiment of the present application, the network path may also be a network identifier for distinguishing different networks.

[0315] As another embodiment of the present application, in actual application, the network quality may not deteriorate gradually, but may deteriorate suddenly. For example, in step B14, the evaluation result received by the stream-level policy management component is determined to be switching to a backup network, then in step B15, the stream-level policy management component sends a switch backup path to the stream-level path management component. However, at this time, the stream-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, when the backup network is determined, directly execute step B34 to switch the data stream to the backup network.

[0316] Of course, in step B14, when the evaluation result received by the flow-level policy management component is determined to be switching to the backup network, and the flow-level path management component receives the switching backup path and has stored the path of the backup network, steps B16 to F1 may no longer be executed, but step B34 may be directly executed to switch the data flow to the backup network.

[0317] As an example, application A currently has data streams C and D. In one cycle, the electronic device requests and stores an alternate path based on the transmission quality evaluation result of data stream C (which may be stuck), and the transmission quality evaluation result of data stream D is excellent. In the next cycle, the transmission quality evaluation result of data stream C is excellent, and the transmission quality evaluation result of data stream D determines the switching of the alternate path. At this point, the electronic device has stored the alternate path, so the electronic device can switch the data stream to the alternate network.

[0318] In the above examples, the characteristics of the data flow are used as the conditions for determining and waking up the backup network. In actual 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: the 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 partly the same and partly different.

[0319] As an example, for different business scenarios of each application, a condition related to the traffic characteristics of the data flow of the application and the business scenario can be set as a condition for determining and waking up the standby network; for all business scenarios of all applications, the same condition can be set: the signal strength gradually decreases, etc. This example is only for illustrative purposes and does not constitute any limitation.

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

[0321] As another embodiment of the present application, in a specific implementation, other methods may be used to obtain the path of the primary network currently used by application A, and monitor the network quality of the primary network currently used when the path of the primary network currently used by application A is determined.

[0322] See also Fig. 9 , which is a timing diagram of another network acceleration method provided in an embodiment of the present application.

[0323] When the traffic reporting component monitors the data flow, it can determine the network that carries the data flow. Since it is preset that after application A switches from the background to the foreground again, all data flows of the application still determine the currently used network channel in the system default way. Therefore, after application A switches from the background to the foreground again or application A is turned on, the network channel where the data flow monitored by the traffic reporting component is located is the primary network of application A. Because the path of the primary network can be determined by the data flow reported by the traffic reporting component.

[0324] After step B10, that is, after the traffic sensing component receives the reported data flow, steps G1 to G6 may be executed to store the path and quality monitoring results of the primary network.

[0325] Step G1: The traffic sensing component determines the network channel that carries the data flow based on the reported data flow.

[0326] Step G2: When the network channel (the primary Wi-Fi) is determined, the traffic sensing component sends a message to the channel-level path management component indicating that the primary network is the primary Wi-Fi.

[0327] Step G3: The channel-level path management component sends a quality detection request of the primary Wi-Fi to the channel and application quality assessment component.

[0328] In step G4, the channel and application quality assessment component uses algorithm A to regularly monitor the quality of the primary Wi-Fi.

[0329] Step G5: The channel and application quality assessment component returns the quality monitoring result of the primary Wi-Fi to the channel-level path management component.

[0330] Step G6: The channel-level path management component sends the path and quality monitoring results of the primary Wi-Fi to the flow-level path management component.

[0331] Step G7: The flow-level path management component stores the path of the primary Wi-Fi as the primary path, and stores the quality monitoring result of the primary Wi-Fi.

[0332] Since step G4 is to regularly monitor the quality of the primary network (primary Wi-Fi), the flow-level path management component will regularly receive the quality of the primary network (primary Wi-Fi). During the process of the electronic device executing 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.

[0333] If the flow-level policy management component determines that a backup network needs to be requested based on the data flow characteristics and the evaluation results when executing B14, then the subsequent steps (steps B15 to B36) are continued. The subsequent steps can refer to Figure 8 The description of the illustrated embodiment will not be repeated here.

[0334] As before, when the path of the primary network is determined, when requesting a backup path, a network other than the primary network can be requested. When the quality of the primary network is regularly monitored, after the backup network is determined, the backup network and the primary network can be compared, so that when the backup network has better quality than the primary network, the data stream with poor transmission quality can be switched to the backup network. Of course, in actual applications, when the backup network with the best quality is determined, the data stream with poor transmission quality can be directly switched to the backup network.

[0335] See also Fig.10 , which is another network acceleration method provided in an embodiment of the present application.

[0336] After step B4, steps B8 and B9 are performed.

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

[0338] After registering the message monitoring hook, the message monitoring hook can monitor the data flow of application A. After monitoring the data flow of application A, the subsequent steps are executed.

[0339] It should be noted that since the network channel carrying the data flow can be obtained in the data flow, the traffic perception 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.

[0340] Step B14: the flow-level policy management component determines to request a backup network according to the data flow characteristics and the evaluation result.

[0341] Step B15: When the flow-level policy management component sends the request information of the backup path to the flow-level path management component, the request information may carry the identifier of the primary network (or the path of the primary network).

[0342] Step B16: The flow-level path management component sends a request message for a backup path to the channel-level path management component, which may also carry the identifier of the primary network (or the path of the primary network).

[0343] After the channel-level path management component receives the request information carrying the identification of the primary network sent by the stream-level path management component, it can sequentially request the status of other network channels in the network channels supported by the electronic device except the primary network, and when the status is available, request to monitor the quality monitoring results of the available network channels, and finally wake up the available network channel with the best quality and send it to the stream-level path management component as a backup network. For details, please refer to the description of steps B17 to B27. Please refer to the description in the above embodiment, which will not be repeated here.

[0344] Step 28: When the flow-level path management component determines that the primary network is not 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 the backup path.

[0345] The description of subsequent steps B29 to B36 may refer to the description in the above embodiment.

[0346] As another embodiment of the present application, as shown in Table 2, the transmission quality improvement strategy also includes: concurrency. In the embodiment of the present application, when the upload and download type (storage type) application is used to download large files, the data stream is first divided into multiple available network channels of the electronic device. After being divided into multiple network channels, if any data stream meets the switching conditions specified by the network quality assessment algorithm (for example, the transmission rate is slow), the data stream that meets the switching conditions specified by the network quality assessment algorithm will be switched to other network channels with better quality. For details, please refer to Fig.11 Description of the illustrated embodiment.

[0347] The description of the steps before step B11 can refer to the description in the above embodiment, which will not be repeated here.

[0348] Step B11, the traffic sensing component determines the need to distribute the data flow to multiple network channels based on the characteristics of the data flow.

[0349] For example, in Table 2, when a certain upload and download application is downloading a large file, it is necessary to divide the data stream that meets certain characteristics into multiple network channels.

[0350] Step J1, the traffic sensing component sends information requesting all backup networks to the channel-level path management component.

[0351] Step B17: After receiving the request information of all backup paths, the channel-level path management component starts to execute steps B17 to B26 for other networks except the primary network in the network channel supported by the electronic device.

[0352] It should be noted that, in the embodiment of the present application, all other available network channels other than the primary network need to be awakened. Therefore, after step B21, step B24 is directly executed to request awakening of the currently available network channel. Each available network channel other than the primary network is awakened according to the above process.

[0353] Step B27: the channel-level path management component sends the path and quality monitoring results (which can be expressed by quality parameters) of each awakened standby network to the stream-level path management component.

[0354] Step B28: The stream-level path management component stores the path and quality parameters of each backup network.

[0355] It should be noted that, during the process of the electronic device executing steps J1, B17 to B28, the traffic reporting component has been reporting the data flow, and the traffic perception component has been transmitting the identifier of the currently monitored data flow to the flow-level path management component.

[0356] 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, the multiple data flows are distributed to multiple network channels (the primary network and the backup network).

[0357] As an example, if the flow-level path management component receives a path of one primary network and three paths of three backup networks, and the number of received data flow identifiers is five, the five data flow identifiers can be divided into four network channels.

[0358] During allocation, the number of data streams and the number of network channels can be evenly divided. If even division is not possible, the difference between the number of data streams allocated to each network channel is less than 2. That is, the allocation in step K3 allocates multiple data streams to multiple network channels as evenly as possible.

[0359] Of course, in actual applications, other allocation principles may also be adopted, for example, multiple data streams may be allocated to multiple network channels according to the quality of each network channel, so that a network channel with better quality carries more data streams, and a network channel with poorer quality carries fewer data streams. Other allocation principles will not be given one by one.

[0360] Of course, the principle of equal distribution may be adopted for the first allocation when the application is running in the foreground, and other principles may be adopted for the next allocation after the first allocation (for example, the allocation cycle may be set).

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

[0362] If it is executed in the stream-level path management component, the stream-level policy management component is required to send the data flow identifier to the stream-level path management component.

[0363] If it is executed in the stream-level policy management component, the stream-level path management component is required to send multiple network paths to the stream-level policy management component and cancel step K2.

[0364] Step K4: the stream-level path management component sends the path of the network channel corresponding to each data flow identifier to the stream-level policy management component.

[0365] Step K5: the flow-level policy management component sends the path of the network channel corresponding to each data flow identifier received to the policy management component.

[0366] Step K6: the policy management component switches the data flow corresponding to the data flow identifier to the corresponding network channel according to each received data flow identifier and the path of the corresponding network channel.

[0367] As before, the message monitoring hook has been monitoring the data flow and has also been reporting the monitored data flow, see step B29.

[0368] After allocating multiple data streams from the main network channel to multiple network channels, the data streams monitored by the message monitoring hook are carried on the corresponding network channels. Therefore, after the traffic sensing component receives the data stream reported by the traffic reporting component, it can determine that the multiple data streams have been allocated to multiple network channels based on the monitored data streams.

[0369] Step K7, after the traffic perception component determines that multiple data flows have been distributed to multiple network channels, the characteristics of each data flow can be used to obtain an evaluation algorithm C corresponding to each data flow.

[0370] Step B30, the traffic sensing component obtains the transmission quality evaluation result of each data stream according to the evaluation algorithm C for determining each data stream.

[0371] Steps B31 to B36 may refer to the description of the above embodiment and will not be described again here.

[0372] In the embodiment of the present application, when 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 other network channels with better quality.

[0373] As before, in the case of determining concurrency, the network quality of each network channel can be monitored regularly and sent to the flow-level path management component.

[0374] Step K8, the stream-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 (for example, the fastest transmission rate) according to the quality of each network channel received regularly.

[0375] This example switches the data stream that does not meet the conditions set by algorithm C to a network channel with better quality. In practical applications, other switching methods can also be set. As an example, switch to the network channel that currently carries the least number of data streams. Alternatively, in the case where a certain data service of the user is an unlimited traffic package, the data stream that does not meet the conditions set by algorithm C on the current Wi-Fi network is preferentially switched to the data service network of the unlimited traffic package. Of course, in the case where the user's data services are all limited traffic packages, the data stream that does not meet the conditions set by algorithm C on a Wi-Fi network is preferentially switched to another Wi-Fi network.

[0376] The above switching methods are only used as examples. In actual applications, the switching method 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 charges.

[0377] As another embodiment of the present application, see Fig.12 , which is another network acceleration method provided in an embodiment of the present application.

[0378] and Fig.11 The differences shown include:

[0379] (1) The way to trigger the traffic reporting component to register the message monitoring hook is different. Fig.11 Triggered by the flow-level path management component, Fig.12 Triggered by the traffic sensing component.

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

[0381] Then, through steps B17 to B26, the network channels available to the electronic device are awakened, and the path and quality monitoring results of each awakened network channel are sent to the stream-level path management component. The stream-level path management component distributes the data flow to multiple network channels. Steps B28 to B36 can refer to Fig.11 The description of the illustrated embodiment will not be repeated here. Fig.12 The network C in the description is any network channel supported by the electronic device.

[0382] In the above embodiments, the message monitoring hook in the traffic reporting component monitors the data flow of application A as an example for explanation. The following will describe how the message monitoring hook monitors the data flow of application A and sends the monitored data flow to the traffic perception component.

[0383] As mentioned above, there is a Netfilter component in the system of the electronic device, through which the data flow of the application corresponding to the specific application identifier can be obtained. The traffic reporting component can obtain the data flow message of application A by calling the Netfilter component. In the specific implementation, the information reported by the traffic reporting component to the traffic perception component includes not only the data flow message of application A, but also some statistical information of the data flow message of application A. For details, please refer to Fig.13 Description of the illustrated embodiment.

[0384] See also Fig.13 , the traffic reporting component can pre-register the message monitoring hook (for example, the nf_hook hook function).

[0385] After the traffic reporting component calls the Netfilter component, the Netfilter component reports the data flow message of application A. After the traffic reporting component receives the data flow message reported by the Netfilter component, it calls the pre-registered nf_hook hook function.

[0386] The nf_hook hook function performs the following operations on the received data stream message: message parsing, flow table query and message analysis.

[0387] When parsing, you can check whether the message has an application identifier and the four-tuple (or five-tuple) of the message to get the parsing result. If there is an application identifier, the application corresponding to the message can be determined. The four-tuple includes the source IP, destination IP, source port, and destination port; the five-tuple includes: source IP, destination IP, source port, destination port, and protocol number. That is, some features of the data flow in Table 2 above are carried by the four-tuple or five-tuple of the message. In addition, the message (data packet) itself also carries header features.

[0388] After parsing, the flow table is queried according to the parsing results, and the statistics of the flow table are updated. The flow table stores the identification information of the data flow in each application and the statistics of each data flow. The statistics of each flow include: the number of messages received for the data flow, the total number of bytes, the number of error packets, etc.

[0389] In practical applications, the statistical information of each flow can be determined according to the parameters set in the network quality assessment algorithm. Therefore, the statistical information of each flow can also include other information, for example, the flow distribution information of the data flow where the data packet belongs to which changes with time, which is generated according to the size of the data packet received at a time point.

[0390] Of course, if the identification information or relevant statistical information of a data flow does not exist in the flow table, the identification of the data flow and the relevant statistical information may be added to the flow table.

[0391] After the flow table is checked and the flow table information is updated, the message can be analyzed, for example, the message can be filtered to obtain all or part of the message.

[0392] As an example, the filtering process may be filtering the heartbeat packet message of a certain data stream. After filtering, the heartbeat packet message of the data stream is obtained. The filtering process may be: by presetting certain features, the message satisfying the features is retained. That is, the message satisfying certain pre-set features is the filtered message.

[0393] Wherein, the heartbeat packet message is a message present in the data stream at a certain time interval. The heartbeat packet message has a fixed feature (such as 0x64 or 0x65) at a fixed position (such as the 6th byte). Since the heartbeat packet message is a message existing at a certain time, because, it is possible to calculate and obtain a time delay (for example, the mobile phone sends a heartbeat request message to the server, until the mobile phone receives the heartbeat response message fed back by the server, the total time experienced) based on the heartbeat packet message. The time delay information is used to determine whether the data stream meets the condition of the improved transmission quality set in the above-mentioned table 2.

[0394] The above example uses filtering of heartbeat packets as an example for explanation. In actual applications, filtering can also be performed to obtain data packets that meet other characteristics.

[0395] As another example, the filtering condition may also include: selecting to retain a data packet message of a specific length. In specific implementation, it is determined whether the length of the data packet message is a preset specific length, if so, retain the message, if not, filter out the message.

[0396] After the above processing, the filtered partial messages are stored in the SKB queue.

[0397] The policies for reporting the messages of the data flow stored in the SKB queue include: immediate reporting and periodic reporting.

[0398] If reporting is done immediately, a specific thread in the traffic reporting component checks the queue in a timely manner and reports the messages in the queue to the traffic perception component in a timely manner.

[0399] If reporting is done periodically, a timer is set in the traffic reporting component. Based on the time set by the timer, the messages in the SKB queue are checked at a certain period, and some or all of the messages in the queue are reported to the traffic perception component.

[0400] Of course, in actual applications, some of the data flow messages stored in the SKB queue need to be reported immediately, while others need to be reported periodically. In the same principle, a specific thread in the traffic reporting component checks the queue in a timely manner and reports the messages in the queue that need to be reported immediately to the traffic perception component in a timely manner. A timer is also set in the traffic reporting component. Based on the time set by the timer, the messages in the SKB queue are checked at a certain period, and the messages in the queue that need to be reported periodically are reported to the traffic perception component.

[0401] It should be noted that when reporting a message, statistical information related to the message may also be reported.

[0402] Based on the above understanding, the traffic reporting component does not report all the messages sent by the Netfilter component to the traffic perception component. Instead, it reports the messages that meet specific characteristics (which can carry the statistical information of the messages that meet the specific characteristics) to the traffic perception component. At the same time, the statistical information related to the messages that meet the characteristics will be reported.

[0403] As an example, if both message 1 and message 2 belong to the same data flow. When the flow table is checked after message 1 is received, the statistical information about the data flow in the flow table is updated according to message 1. However, message 1 does not meet the specific characteristics, so message 1 is filtered out and will not be reported to the traffic perception component. When the flow table is checked after message 2 is received, the statistical information about the data flow in the flow table is updated according to message 2. Message 2 meets the specific characteristics, so message 2 will not be filtered out, and message 2 will be reported to the traffic perception component. That is, although some messages are reported, the statistical information is obtained based on all messages under the data flow.

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

[0405] As an example, messages (data packets) with the same four-tuple (source address, source port, destination address, destination port) belong to the same data stream. If multiple messages with the same four-tuple are transmitted through a network channel, then multiple messages with the same four-tuple belong to the same data stream, which can also be understood as: multiple messages can exist in a data stream. At the same time, a message under a data stream carries the sequence number of the message in the data stream. Since these messages have the same characteristics, an identifier of the data stream to which the message belongs can be generated based on the same characteristics. As an example, an identifier of the data stream to which the message belongs can be generated based on the four-tuple of the message.

[0406] After receiving the message, the traffic reporting component can determine the application to which the message belongs based on the application identifier carried in the message, and can also generate the identifier of the data flow to which the message belongs based on the four-tuple of the message.

[0407] Of course, after the traffic upload component uploads the message to the traffic perception component, the traffic perception component can also determine the identifier of the application to which it belongs and the identifier of the data flow to which it belongs based on the received message. The traffic reporting component can determine the protocol in the data flow characteristics according to the protocol number in the quintuple of the message, and the port in the data flow characteristics can be determined by the destination port in the quadruple or quintuple. The message features in the data flow characteristics can be determined by the header features of the message. That is, the characteristics of the data flow to which the message belongs can be determined based on the message reported by the traffic reporting component.

[0408] Of course, the above method for determining the characteristics of the data flow is only used as an example. In actual applications, the characteristics of the data flow to which the message belongs may also be determined by other methods.

[0409] After the electronic device is able to determine the characteristics of the data stream to which the received message belongs, it can determine the conditions for improving the transmission quality set by the corresponding network quality assessment algorithm based on the characteristics of the data stream.

[0410] Of course, in actual applications, in order to ensure that the conditions for improving transmission quality set by the network quality assessment algorithm are accurate, additional limiting conditions can be added: the application identification, that is, the corresponding network quality assessment algorithm is determined based on the application identification and the characteristics of the data flow to improve the transmission quality.

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

[0412] When evaluating the transmission quality, one or more of the following parameters may be used: delay, packet loss rate, presence or absence of response, and rate.

[0413] As before, the latency can be determined by the heartbeat packet under a certain data stream. Since the message carries the sequence number of the message in the data stream, the packet loss situation can be determined based on the sequence number. Determine whether there is no response to the downlink by the total number of messages in the statistical information in the above example. As an example, if the total number of messages received in two consecutive cycles is the same, it is determined that there is no response to the downlink. Determine the transmission rate by the total number of bytes in the statistical information in the above example. As an example, the ratio of the difference between the total number of bytes received in the previous cycle and the current cycle to the cycle is the downlink rate of this cycle.

[0414] Of course, the above parameters are determined by way of example only. In practical applications, the above parameters may also be determined by other methods.

[0415] As another embodiment of the present application, a certain application may be installed in multiple electronic devices, and the multiple electronic devices can communicate with the server corresponding to the application.

[0416] See also Fig.14 , which is a scene graph for applications in multiple electronic devices to communicate with the server corresponding to the application.

[0417] In this diagram, application A is installed in multiple electronic devices, and multiple electronic devices communicate with a server corresponding to application A, wherein electronic device A, electronic device B, and electronic device C communicate with the server corresponding to application A respectively. Fig.14 The network architecture shown is a content delivery network (CDN) architecture.

[0418] In specific implementation, communication can also be achieved through other network architecture forms. Fig.15 , which is another network architecture provided in an embodiment of the present application.

[0419] In this diagram, Fig.14 Based on the network architecture shown, multiple electronic devices can also communicate with each other. For example, electronic device A and electronic device B can communicate with each other, electronic device B and electronic device C can also communicate with each other, and electronic device A and electronic device C can also communicate with each other. The architecture of communication between electronic devices is a peer-to-peer (P2P) architecture. That is, Fig.15 The network architecture shown includes a CDN architecture and a P2P architecture.

[0420] use Fig.14In the CDN architecture shown, each electronic device can upload its own stored data to the server. If electronic device A needs to obtain data A, electronic device A needs to send a query request for data A to the server. Based on the query request for data A, the server transmits the data A uploaded to the server in advance by electronic device B to electronic device A.

[0421] use Fig.15 In the P2P architecture shown, each electronic device can upload a list of its stored data to a server. If electronic device A needs to obtain data A, electronic device A needs to send a query request for data A to the server. The server returns the address of electronic device B where data A is located based on the query request for data A. Electronic device A requests electronic device B to obtain data A based on the received address, and electronic device B returns data A to electronic device A.

[0422] In actual applications, especially in video business scenarios of video applications, if the CDN architecture is adopted, it is possible that application A in multiple electronic devices will communicate with the server at the same time to request video stream data, which will cause the server to be overloaded or even paralyzed. Therefore, P2P technology is usually used on the basis of the CDN architecture to improve the above problems. For the convenience of description, the video stream received by the electronic device through the CDN architecture can be recorded as a CDN stream, and the video stream received by the electronic device through the P2P architecture can be recorded as a P2P stream.

[0423] To have a clearer understanding of the P2P flow, the P2P flow is described through the following scenario.

[0424] When electronic device A is ready to share video file A, electronic device A segments video file A through the BitTorrent protocol (for example, client software BitTorrent, BitComet and BitSpirit, which can exist as plug-ins for browser applications) and uploads the segment information and download address of video file A to the server.

[0425] Electronic device A, as a seed node of video file A, can be downloaded by other electronic devices. Electronic device B can obtain the download address of video file A on the server, and then download video file A from the seed node of electronic device A based on the download address. During the download process, electronic device B may download part of the video fragments, and the part of the video fragments already downloaded in electronic device B can also be shared with other electronic devices (for example, the following electronic device C). If electronic device C also needs to download video file A, electronic device C can obtain the download address of video file A on the server (electronic device A and electronic device B), and then download video file A from the seed node of electronic device A or download video fragments from electronic device B based on the download address; at the same time, the video fragments already downloaded by electronic device C can also be shared with other electronic devices for download. If electronic device D also needs to download video file A, electronic device D can obtain the download address of video file A on the server (electronic device A, electronic device B and electronic device C), and then download video fragments of video file A from the seed node of electronic device A or download video fragments from electronic device B or download video fragments from electronic device C based on the download address; at the same time, the video fragments already downloaded by electronic device D can also be shared with other electronic devices for download. In this process, the more electronic devices are downloading, the more download addresses can be shared, and the faster the download speed is.

[0426] Of course, in the above example, whether electronic device B is in the process of downloading video segments of video file A from electronic device A, or after the download of video file A from electronic device A is completed, if electronic device A has not deleted the downloaded video files (or video segments) and is in an Internet-connected state, electronic device A can provide a download address for other electronic devices to download.

[0427] It should be noted that the use of the BitTorrent protocol to transmit P2P streams is only an example. In actual applications, any method of transmitting P2P streams using the P2P technical principle can be used in the embodiments of the present application to transmit P2P streams between electronic devices.

[0428] In the above example, from the user's perspective, user 1 uploads the relevant information of video file A through a client software on user 1's electronic device A, and user 2 sees the relevant information of video file A on the client software on user 2's electronic device B, and clicks download, and user 2's electronic device B downloads video file A from user 1's electronic device A. After user 3 sees the relevant information of video file A on the client software on user 3's electronic device C, he clicks download, and user 3's electronic device C downloads video file A from user 1's electronic device A or user 2's electronic device B. It should be noted that user 3's electronic device C can download a video segment of video file A from user 1's electronic device A, and another video segment of video file A from user 2's electronic device B. After user 4 sees the relevant information of video file A on the client software on user 4's electronic device D, he clicks download, and user 4's electronic device D downloads video file A from user 1's electronic device A, user 2's electronic device B, or user 3's electronic device C. It should be noted that electronic device D of user 4 can download part of the video segments of video file A from electronic device A of user 1, download part of the video segments of video file A from electronic device B of user 2, and download part of the video segments of video file A from electronic device C of user 3, and finally electronic device D of user 4 obtains the complete video file A.

[0429] Of course, in the above process, user 1, user 2 and user 3 can also download at the same time, for example, user 1 downloads video segment 1 of video file A, user 2 downloads video segment 2 of video file A, and user 3 downloads video segment 3 of video file A. User 1 can download video segment 2 from electronic device B of user 2, and download video segment 3 from electronic device C of user 3. User 2 can download video segment 1 from electronic device A of user 1, and download video segment 3 from electronic device C of user 3. User 3 can download video segment 1 from electronic device A of user 1, and download video segment 2 from electronic device B of user 2. Other possible situations will not be given one by one.

[0430] In the above process, if an electronic device (for example, electronic device B) that has downloaded video file A (or video fragment) deletes the downloaded video file A or video fragment after downloading video file A (or video fragment) (of course, there may be other situations, such as the client software is closed, the electronic device is not connected to the Internet, etc.), then other electronic devices (for example, electronic device C and electronic device D) cannot download the video fragment of video file A from electronic device B during the process of downloading the video file A (or video fragment), but can download the video fragment of video file A from other electronic devices that have already downloaded video file A or video fragment.

[0431] Of course, when P2P streams are transmitted between electronic devices, it is not direct communication between the two electronic devices (e.g., Bluetooth communication, etc.), but communication can be carried out through the network to which each electronic device is connected. That is, as long as each electronic device has a networking function, even if the electronic devices are not in the same space where they can be directly connected and communicated, P2P stream transmission can be achieved.

[0432] When using the network acceleration method provided in Table 2 above, the data stream is usually identified by using its characteristics (e.g., protocol, port, etc.), and the transmission quality of the data stream is evaluated. When it is determined that the transmission quality of the data stream is poor and needs to be improved, the data stream is usually switched to a backup network (or the data stream is transmitted concurrently on multiple network channels) based on the characteristics of the data stream (e.g., IP address, port, etc.). CDN streams usually have fixed characteristics, however, P2P streams usually do not have fixed characteristics, for example, there are many types and no fixed service ports.

[0433] In other words, although the embodiments of the present application can identify P2P streams, and when identifying P2P streams, the current stream can be determined to be a P2P stream based on the original data, protocol and source port of the data stream. However, when switching the stream level of the data stream, control is usually performed based on the IP address and port of the data stream to switch the data stream to other network channels. The P2P stream received by an electronic device may be a data stream transmitted between the current electronic device and multiple other electronic devices; and in different time periods, the other electronic devices that transmit the P2P stream to this electronic device are not fixed, which results in the P2P stream having no fixed IP address (source IP address and destination IP address) and port (source port and destination port), so it is impossible to switch a separate P2P stream to other network channels.

[0434] This means that when the data stream transmitted by the electronic device contains both CDN streams and P2P streams, it may be necessary to determine the transmission quality based on the data stream with CDN stream characteristics. In the case of poor transmission quality, only the relevant transmission quality improvement strategy can be implemented for the data stream with CDN stream characteristics, such as switching the CDN stream to the backup network. This is equivalent to identifying the CDN stream but not the P2P stream when both CDN streams and P2P streams exist in the application. After switching the CDN stream to the backup network, the P2P stream is still transmitted on the original network, resulting in the inability to solve the jamming problem.

[0435] The embodiments of the present application respectively set identification features according to the characteristics of CDN flow and P2P flow.

[0436] As an example, a data stream of a video application with the following characteristics can be set as a CDN stream: http requests are sent through a URL, and the request suffix contains the string ts; the file extension (content-type) of the first data packet of the http response contains video; the http HLS streaming media protocol is used, and the destination port of the data stream is 80.

[0437] The data stream of the video application with the following characteristics can be set as a P2P stream: the original data (payload data) of the recorded information in the data stream starts with 020000 or 000000; the UDP protocol is used, and the source port is the same.

[0438] The above example only takes the characteristics of CDN flow and P2P flow of a certain video application as an example. In actual applications, for different applications, it is necessary to reset based on the characteristics of CDN flow and P2P flow of the application: whether there are CDN flow characteristics in the data flow of the application and whether there are P2P flow characteristics in the data flow of the application.

[0439] The focus of the embodiments of the present application is not on which features are used to identify CDN flows and P2P flows respectively. In actual applications, other features can also be used to identify CDN flows and P2P flows in data flows, and examples are not given one by one here.

[0440] When there is CDN flow but no P2P flow in the data flow of application A (determined by pre-set characteristics of CDN flow and P2P flow), the transmission quality of the data flow (CDN flow) of application A is evaluated by pre-set network quality assessment algorithm 1. When the transmission quality of the CDN flow of application A is poor (for example, the conditions for improving the transmission quality set in the network quality assessment algorithm are met) and the transmission quality needs to be improved, the CDN flow of application A is switched to the backup network for transmission.

[0441] When both CDN stream and P2P stream exist in the data stream of application A, the transmission quality of the data stream of application A is evaluated by network quality evaluation algorithm 2 in Table 4. When the transmission quality of the application data stream is poor and needs to be improved, all data streams of the electronic device (including all data streams of application A) are switched to the backup network for transmission.

[0442] It should be noted that the network quality assessment algorithm 1 and the network quality assessment algorithm 2 may be the same or different.

[0443] Table 4 Network quality assessment algorithm and transmission quality improvement strategy for video applications

[0444]

[0445] The network quality evaluation algorithm 2 shown in Table 4 is only used as an example. In practical applications, the CDN flow and P2P flow of application A can be regarded as a type of data flow to evaluate the transmission quality of the data flow, and the details can be referred to Table 5.

[0446] Table 5 Algorithm evaluation examples of application A’s data streams with and without P2P streams

[0447]

[0448] When the data stream of application A includes both CDN stream and P2P stream, the network quality assessment algorithm 2 in Table 5 can be used to assess the CDN stream and P2P stream of application A, that is, the CDN stream and P2P stream are treated as a type of data stream and the transmission quality of the data stream of application A is assessed simultaneously. When the transmission quality meets the conditions for improving the transmission quality set in Table 5, all data streams of the electronic device (including all data streams of application A) are switched to the backup network.

[0449] Of course, in actual applications, the network quality assessment algorithm 2 can also be used to assess the transmission quality of the CDN stream of application A and the transmission quality of the P2P stream respectively. When any of the transmission quality of the CDN stream of application A and the transmission quality of the P2P stream meets the conditions for improving the transmission quality set in Table 6, all data streams of the electronic device (including all data streams of application A) are switched to the backup network. That is, Algorithm 2-1 and Algorithm 2-2 in Table 6 can be the same.

[0450] Table 6 Another example of algorithm evaluation for application A's data streams containing P2P streams and not containing P2P streams

[0451]

[0452] Of course, in actual applications, different network quality assessment algorithms can be set for CDN streams and P2P streams respectively. As an example, network quality assessment algorithm 2-1 is set for CDN streams, and network quality assessment algorithm 2-2 is set for P2P streams. Algorithm 2-1 is used to evaluate the transmission quality of CDN streams, and algorithm 2-2 is used to evaluate the transmission quality of P2P streams. When the transmission quality of the CDN stream meets the conditions for improving the transmission quality set by algorithm 2-1 and / or the transmission quality of the P2P stream meets the conditions for improving the transmission quality set by algorithm 2-2, all data streams of the electronic device (including all data streams of application A) are switched to the backup network. That is, Algorithm 2-1 and Algorithm 2-2 in Table 6 may be different.

[0453] In addition, the purpose of WLAN+channel switching in the transmission quality improvement strategies in Tables 4 to 6 is to switch all data flows of application A (including at least CDN flows and P2P flows) to the backup network.

[0454] Since the characteristics of P2P flows are not completely fixed, although P2P flows can be identified, it is impossible to accurately switch data flows with P2P flow characteristics to the backup network. Therefore, all data flows of applications of the entire electronic device can be switched to the backup network. In the above embodiment, taking the primary network as a Wi-Fi network as an example, the backup network can be a cellular network.

[0455] The above embodiments are only used as examples. In actual applications, any primary network can be used to switch to a backup network, and the method is not limited to the above embodiments in which the primary Wi-Fi network is switched to a cellular network.

[0456] It can also be understood from the above examples that the transmission quality improvement strategies in Tables 4 to 6 are channel-level switching, and the transmission quality improvement strategy in Table 2 is stream-level switching.

[0457] When executing the transmission quality improvement strategy, the data requests of all applications on the electronic device can be switched to the backup network for transmission. The data streams (CDN streams and P2P streams) of application A are naturally also transmitted through the backup network.

[0458] For a clearer understanding of the above embodiments, refer to Fig.16 A timing diagram of a network acceleration method for P2P flow is shown.

[0459] Fig.16 The timing diagram and Figure 8 The differences between the timing diagrams shown include: different transmission quality improvement strategies are implemented. The specific implementation process is described below.

[0460] The description of step B2 to step B10 refers to the description in the above embodiment and will not be repeated here.

[0461] Step P1, after the traffic sensing component receives the data flow reported by the traffic reporting component, it matches various pre-set features according to the received data flow, and the matching result includes: the received data flow contains a P2P flow.

[0462] Step B11, when the received data stream meets the preset characteristics of including P2P streams, a network quality assessment algorithm corresponding to the preset characteristics of including P2P streams is obtained. Fig.16 Algorithm B in may be Algorithm 2 (or Algorithm 2-2) in the above embodiment.

[0463] In practical applications, step P1 may not be included, that is, the characteristics of containing P2P streams may be preset, and when the received data stream meets the preset characteristics of containing P2P streams, algorithm B is obtained. Algorithm B is used to evaluate the data stream that meets the set characteristics of containing P2P streams, and the data stream is a P2P stream.

[0464] The contents of step B12 and step B13 may refer to the description in the above embodiment and will not be repeated here.

[0465] Of course, what is sent in step B13 may also be the identifier of the data stream characteristics (using different identifiers to represent different data stream characteristics) and the evaluation result identifier (using different identifiers to indicate whether the conditions for improving the transmission quality are met, or using different identifiers to indicate the quality of the transmission quality).

[0466] Step B14: After the stream-level policy management component receives the data stream characteristics and the evaluation result, if the evaluation result is that the transmission quality needs to be improved, it determines to request channel switching based on the data stream characteristics.

[0467] In a specific implementation, when the data stream feature is a pre-set feature including a P2P stream and the evaluation result satisfies a pre-set condition for improving transmission quality, a channel switching strategy is obtained.

[0468] Step B15: the stream-level policy management component sends information indicating a request for channel switching to the stream-level path management component.

[0469] Step B16: After receiving the information indicating the request for channel switching, the flow-level path management component checks that no backup network is stored, and then sends information indicating the request for channel switching to the channel-level path management component.

[0470] After step B16, steps B17 to B23 are executed. The contents of steps B17 to B23 refer to the description in the above embodiment and are not repeated here.

[0471] Step P2: After determining in step B23 that the network with the best quality is the primary card network, the channel-level path management component sends a start request and a switch request of the primary card network to the network connection management component.

[0472] Step P3, the network connection management component wakes up the primary card network and switches all system data requests (requests for P2P resources of current application A, requests for CDN resources, and other network requests of other applications) to the primary card network.

[0473] Step P4: After completing the awakening of the standby network and the channel switching, the network connection component returns information indicating that the primary card network has been awakened and the channel switching has been completed to the channel-level path management component.

[0474] Step P5: After receiving the information indicating that the main card network has been awakened and the channel switching has been completed, the channel-level path management component sends the path of the main card network to the stream-level path management component.

[0475] Step P6: The flow-level path management component stores the path of the primary card network as the path of the primary network.

[0476] Fig.16 In the illustrated embodiment, when the evaluated data stream meets the transmission quality improvement conditions set by the algorithm (the evaluation method of the embodiment shown in Table 5 or the evaluation method of the embodiment shown in Table 6), a backup network is determined; after the backup network is determined, all data requests of the system are switched to the backup network; finally, the determined backup network is updated to the current primary network.

[0477] In practical applications, when it is determined that there is a P2P flow, a backup network can also be determined in advance; when the evaluated data flow meets the transmission quality improvement conditions set by the algorithm (the evaluation method of the embodiment shown in Table 5 or the evaluation method of the embodiment shown in Table 6), all data requests of the system are switched to the backup network; finally, the determined backup network is updated to the current main network. For details, please refer to Fig.17 The embodiment shown.

[0478] Fig.17 A timing diagram of another network acceleration method for P2P flow provided in an embodiment of the present application.

[0479] Steps B2 to P1 can refer to Fig.16 Description of the illustrated embodiment.

[0480] Step J1: When the traffic sensing component determines that there is a P2P flow based on the data flow characteristics, the traffic sensing component sends a request information for a backup path to the channel-level path management component.

[0481] The request information is used to request to wake up and store the path of the backup network so that when the traffic perception component evaluates the transmission quality of the data stream, if the data stream meets the transmission quality improvement conditions set by the algorithm (the evaluation method of the embodiment shown in Table 5 or the evaluation method of the embodiment shown in Table 6), it will switch to the awakened and stored backup network.

[0482] The contents of step B17 to step F1 may refer to the description in the above embodiment and will not be repeated here.

[0483] Step J1 may be after step P1 or after step B11, which is not limited in the present embodiment.

[0484] After step B10, the electronic device executes step B11 to step B13. The details may refer to the description in the above embodiment, which will not be repeated here.

[0485] Since the traffic reporting component continuously reports the data flow of application A to the traffic perception component, the traffic perception component also continuously obtains evaluation results and continuously sends data flow characteristics and evaluation results to the flow-level policy management component.

[0486] Step B14: If the evaluation result shows that the condition for improving the transmission quality is met, determining to request channel switching based on the data stream characteristics.

[0487] Step B15: the stream-level policy management component sends information indicating a request for channel switching to the stream-level path management component.

[0488] Step B16: After receiving the information indicating the request for channel switching, the flow-level path management component checks that a backup network is stored, and then sends information indicating the request for channel switching to the channel-level path management component.

[0489] Steps P2 to P6 may refer to the description in the above embodiment, except that the standby network has been awakened, and there is no need to awaken the standby network, but all data requests of the system are switched to the standby network.

[0490] Fig.16 and Fig.17 These are just two specific implementations for implementing the case where the data streams of the applications in Tables 4 to 6 include P2P streams. In practical applications, other methods may also be used to implement the case where the data streams of the applications in Tables 4 to 6 include P2P streams and how to improve the transmission quality of the data streams of the applications when the transmission quality of the data streams is poor.

[0491] The above embodiment takes P2P flow as an example to describe that when it is difficult to achieve stream-level switching, or when the stream-level switching effect is poor (for example, when a data stream is switched to another network channel with better network quality, the freezing time is long and the user experience is poor), the network quality evaluation algorithm can be determined by the characteristics of the data stream. When it is determined through the network quality evaluation algorithm that the data stream needs to be switched, the data streams of all applications of the electronic device are switched to a backup network (the backup network can be a network with the best network quality other than the currently used main network) to achieve channel-level switching.

[0492] That is, the network quality assessment algorithm can be determined according to the characteristics of the data stream. When it is determined through the network quality assessment algorithm that the transmission quality of the data stream needs to be improved, different switching methods can be selected in different application scenarios to enable users to obtain a better user experience. For example, stream-level switching (a single data stream, or a single data stream and data streams related to the single data stream), application-level switching (all data streams of the application in which a single data stream is located) or channel-level switching (all data streams in the electronic device) can be selected.

[0493] Of course, in practical applications, some steps in the above embodiments may be combined to implement the network acceleration method. For example, the timing of requesting and waking up the backup network may be different. In specific implementation, two judgment conditions may be set for the network quality assessment algorithm, one judgment condition is used to request and wake up the backup network, and the other judgment condition is used to switch the data requests of all applications of the electronic device to the awakened backup network.

[0494] The above embodiment can be applied in the following scenario, when an electronic device is used for networking services through a wireless LAN network card, when the signal of the wireless router received by the wireless LAN network card of the electronic device has a first strength, the electronic device runs an application (referred to as the first application), and the electronic device can transmit the data stream of the first application through the wireless LAN network card. The data stream of the first application may include multiple types of data streams (for example, a first data stream and a second data stream), that is, data streams with multiple different characteristics. For example, it may include a video stream (the first data stream) and a session stream (the second data stream) at the same time.

[0495] When the electronic device is far away from the wireless router, the signal of the wireless router received by the wireless LAN card of the electronic device may be reduced to the second strength. In this case, if the wireless LAN can no longer meet the network requirements of the first data stream (for example, the flow quality parameters of the first data stream meet the pre-set first condition), but meet the network requirements of the second data stream (for example, the flow quality parameters of the second data stream do not meet the pre-set second condition), in this case, the electronic device transmits the first data stream through other network cards (which can be recorded as the second network card) and still transmits the second data stream through the wireless LAN card. In this scenario, the data stream of the first application does not include P2P streams.

[0496] In another scenario, see Fig.18 , when an electronic device (e.g., mobile phone 1) is used for networking services through a wireless LAN network card (the wireless network card in the figure), when the signal of the wireless router received by the wireless LAN network card of the electronic device has a first strength, the electronic device runs another application (recorded as the second application, the video application A in the figure), and the electronic device transmits the data stream of the second application through the wireless LAN network card. The data stream of the second application can include one type or multiple types of data streams. Take the data stream of the second application including a P2P stream (a data stream transmitted between mobile phone 2, the fourth data stream) and a CDN stream (a data stream transmitted between the application server, the third data stream) as an example.

[0497] When the electronic device is far away from the wireless router, the signal from the wireless router received by the wireless LAN network card of the electronic device may be reduced to the second strength. In this case, if the wireless LAN can no longer meet the network requirements of the P2P flow (the flow quality parameters of the P2P flow meet the pre-set fourth condition), the electronic device transmits all data streams of the electronic device (including CDN flows and P2P flows) through other network cards (which can be recorded as the second network card, the data service network card in the figure).

[0498] In the above scenario, different types of data streams correspond to different characteristics (specifically refer to Table 2), the first data stream may be a data stream with the first characteristic, different types of data streams correspond to different conditions for improving transmission quality, the first data stream may correspond to the first condition, the first condition is a condition for determining whether the first data stream is transmitted through other network cards other than the network card where the first data stream is currently located. The first condition specifies the conditions that the flow quality parameters of the first data stream should meet. The flow quality parameters include at least one of the following: delay, rate, packet loss rate, retransmission rate, and whether the message response is timed out. When the flow quality parameters of the first data stream meet the first condition, it means that the network where the first data stream is currently located can no longer meet the transmission requirements of the first data stream. Similarly, the second data stream may be a data stream with the second characteristic, the second data stream may correspond to the second condition, the second condition is a condition for determining whether the second data stream is transmitted through other network cards other than the network card where the second data stream is currently located. The second condition specifies the conditions that the flow quality parameters of the second data stream should meet. When the flow quality parameters of the second data stream meet the second condition, it means that the network where the second data stream is currently located can no longer meet the transmission requirements of the second data stream.

[0499] When the signal of the wireless router received by the first network card has a first strength, the network quality is good, the flow quality parameter of the first data stream does not meet the first condition, and the flow quality parameter of the second data stream does not meet the second condition.

[0500] When the signal of the wireless router received by the first network card has a second strength, the network quality is poor, the flow quality parameter of the first data flow meets the first condition, and the flow quality parameter of the second data flow does not meet the second condition.

[0501] Of course, when the signal of the wireless router received by the first network card has the third strength, the network quality is worse, the flow quality parameter of the first data stream meets the first condition, and the flow quality parameter of the second data stream meets the second condition.

[0502] As can be understood from the above description, the third data stream has a third characteristic, which may correspond to the third condition, and the fourth data stream has a fourth characteristic, which may correspond to the fourth condition, the third condition being the condition for the third data stream to be transmitted to the second network card, or the condition for the third data stream and the fourth data stream to be transmitted to the second network card, and the fourth condition being the condition for the third data stream and the fourth data stream to be transmitted to the second network card;

[0503] When the signal of the wireless router received by the first network card has a first strength, the network quality is good, the flow quality parameter of the third data flow does not meet the third condition, and the flow quality parameter of the fourth data flow does not meet the fourth condition;

[0504] If the third condition is a condition for the third data stream to be transmitted to the second network card, when the signal of the wireless router received by the first network card has a second strength, the network quality is poor, and the flow quality parameter of the fourth data stream meets the fourth condition;

[0505] If the third condition is the condition for the third data stream and the fourth data stream to be transmitted to the second network card, when the signal of the wireless router received by the first network card has a second strength, the network quality is poor, and the flow quality parameter of the third data stream satisfies the third condition or the flow quality parameter of the fourth data stream satisfies the fourth condition.

[0506] When the signal of the wireless router received by the first network card has a third strength, the network quality is worse, the flow quality parameter of the third data stream meets the third condition, and the flow quality parameter of the fourth data stream meets the fourth condition. At this time, all data streams of the electronic device are transmitted through the second network card.

[0507] The first application and the second application may be the same application or different applications. In the case where the first application and the second application are the same application, the different transmitted data streams (sometimes including P2P streams and sometimes not including P2P streams) are caused by different business scenarios. The third condition and the fourth condition may be the same or different. Of course, the first condition and the third condition may be the same or different.

[0508] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean 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 the present application.

[0509] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0510] The embodiment of the present application also provides a computer program product. When the computer program product is executed on a first device, the first device can implement the steps in the above-mentioned method embodiments.

[0511] If the integrated unit is implemented in the form of 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, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: 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, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

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

[0513] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0514] Those of ordinary skill in the art will appreciate that the units and method steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0515] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A network acceleration method, characterized in that: include: An electronic device runs a first application, and the electronic device transmits a first data stream and a second data stream of the first application through a first network card. The signal received by the first network card has a first strength. The first data stream is not a P2P stream, and the second data stream is a P2P stream. When the signal received by the first network card has a second strength, the electronic device transmits the first data stream and the second data stream through the second network card, the second strength is less than the first strength, and the network quality of the second network card is higher than the network quality of the first network card.

2. The method according to claim 1, characterized in that The method further comprises: The electronic device runs a second application, and the electronic device transmits a third data stream and a fourth data stream of the second application through the first network card, the signal received by the first network card has a first strength, and the third data stream and the fourth data stream are not P2P streams; When the signal received by the first network card has a second strength, the electronic device transmits the third data stream through the second network card, and the electronic device transmits the fourth data stream through the first network card, and the network quality of the second network card is higher than that of the first network card.

3. The method according to claim 2, characterized in that The third data stream is a data stream composed of data packets with a first characteristic, and the fourth data stream is a data stream composed of data packets with a second characteristic. At least one of the following parameters in the first characteristic and the second characteristic is different: the transmission protocol, transmission port and header characteristics of the data packets.

4. The method according to claim 3, characterized in that In the process of transmitting, by the electronic device, the third data stream and the fourth data stream of the second 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 first condition being a condition for the third data stream to be transmitted to the second network card, and the second condition being a condition for the fourth data stream to be transmitted to the second network card; The electronic device determines whether the flow quality parameters of the third data stream meet the first condition, and determines whether the flow quality parameters of the fourth data stream meet the second condition, wherein the flow quality parameters include at least one of the following parameters: delay, rate, packet loss rate, retransmission rate, and whether the message response times out.

5. The method according to claim 4, characterized in that When the signal received by the first network card has a first strength, the flow quality parameter of the third data flow does not meet the first condition, and the flow quality parameter of the fourth data flow does not meet the second condition; When the signal received by the first network card has a second strength, the flow quality parameter of the third data flow meets the first condition, and the flow quality parameter of the fourth data flow does not meet the second condition.

6. The method according to any one of claims 1 to 5, characterized in that: The first data stream is a data stream having a third characteristic, and the second data stream is a data stream having a fourth characteristic; at least one of the following parameters in the third characteristic and the fourth characteristic is different: a transmission protocol, a transmission port and a header characteristic of the data message.

7. The method according to claim 6, characterized in that In 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 third condition corresponding to the third feature and a fourth condition corresponding to the fourth feature, the third condition being a condition for the first data stream to be transmitted to the second network card, or a condition for the first data stream and the second data stream to be transmitted to the second network card, and the fourth condition being a condition for the first data stream and the second data stream to be transmitted to the second network card; The electronic device determines whether the flow quality parameters of the first data stream meet the third condition, and determines whether the flow quality parameters of the second data stream meet the fourth condition, wherein the flow quality parameters include at least one of the following parameters: delay, rate, packet loss rate, retransmission rate, and whether the message response times out.

8. The method according to claim 7, characterized in that When the signal received by the first network card has a first strength, the flow quality parameter of the first data flow does not meet the third condition, and the flow quality parameter of the second data flow does not meet the fourth condition; If the third condition is a condition for the first data stream to be transmitted to the second network card, when the signal received by the first network card has a second strength, the flow quality parameter of the second data stream satisfies the fourth condition; If the third condition is the condition for the first data stream and the second data stream to be transmitted to the second network card, when the signal received by the first network card has a second strength, the flow quality parameter of the first data stream satisfies the third condition or the flow quality parameter of the second data stream satisfies the fourth condition.

9. The method according to any one of claims 2 to 5, characterized in that: The electronic device transmitting the first data stream and the second data stream through the second network card includes: The electronic device checks whether the electronic device has a backup network stored therein; In the case that the electronic device stores the backup network, the electronic device transmits the first data stream and the second data stream through the backup network, wherein the backup network includes the second network corresponding to the second network card.

10. The method according to claim 9, characterized in that The method further comprises: In the case that the electronic device does not store the backup network, the electronic device obtains a network quality parameter of a network corresponding to a third network card of the electronic device, where the third network card is a network card other than the first network card in the electronic device, and the network quality parameter includes at least one of the following: bandwidth, latency, and air interface rate; In the case where 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 parameter.

11. The method according to claim 10, 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 wakes up the second network corresponding to the second network card.

12. The method according to claim 10, 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 obtains a network quality parameter of a first network corresponding to the first network card; Correspondingly, the electronic device storing the second network corresponding to the second network card as the backup network includes: When 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.

13. The method according to claim 12, characterized in that The electronic device running the first application includes: The electronic device runs the first application in the foreground; Accordingly, the method further includes: After the electronic device detects that the first application is running in the foreground, the electronic device sequentially performs the primary network determination steps according to the priority order of the network cards of the electronic device until the primary network of the electronic device is obtained; The step of determining the primary network includes: The electronic device obtains a network status of a network corresponding to a fourth network card, where the fourth network card is a network card of the electronic device; When the network status of the fourth network card is available, the electronic device obtains the network quality parameter of the fourth network card; when the network status of the fourth network card is unavailable, the current round of primary network determination step is ended; When the network quality parameter of the fourth network card is within a preset range, the fourth network card is stored as the primary network of the electronic device; when the network quality parameter of the fourth network card is not within the preset range, the current round of primary network determination step is ended.

14. The method according to claim 13, characterized in that The electronic device acquiring the network quality parameter of the first network corresponding to the first network card includes: After obtaining the primary network of the electronic device, the electronic device monitors the network quality parameters of the primary network in a first period.

15. The method according to claim 12, characterized in that The electronic device acquiring the network quality parameter of the first network corresponding to the first network card includes: The electronic device obtains a network for transmitting the first data stream and the second data stream, where the network for transmitting the first data stream and the second data stream is the first network corresponding to the first network card; The electronic device monitors a network quality parameter of the first network at a first period.

16. An electronic device, characterized in that: The electronic device comprises a processor, and the processor is used to run a computer program stored in a memory, so that the electronic device implements the method according to any one of claims 1 to 15.

17. A chip system, characterized in that: The method comprises a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to implement the method according to any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a processor, the method according to any one of claims 1 to 15 is implemented.