Network acceleration method and device, and storage medium

By adding acceleration tags to whitelist applications of smart mobile terminal devices during startup phase and prioritizing their data packets, the problem of network extension when the application is started is solved, and user experience and data loading speed is improved.

CN119094476APending Publication Date: 2024-12-06HONOR DEVICE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411057357.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In smart mobile terminal devices, a large number of preview pictures and animations are required to load when the application starts, resulting in extended network communication and affecting the user experience.

Method used

By adding acceleration tags to applications on the whitelist during the startup phase, priority is given to scheduling of their data packets, and using a dual-ended queue to move them to the head of the queue, achieving network acceleration and improving data loading speed.

Benefits of technology

It significantly reduces the data waiting time of the application during the startup stage, improves the user experience, avoids unnecessary resource usage, and ensures the network acceleration effect of high-frequency applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094476A_ABST
    Figure CN119094476A_ABST
Patent Text Reader

Abstract

The invention provides a network acceleration method and device and a storage medium. According to the method, an acceleration label is added to a data packet generated by a first application in a starting stage of the first application, so that the electronic equipment moves the data packet to a queue head of a data sending queue based on the acceleration label, and the data packet is preferentially sent to a server side of the first application, so that network acceleration is carried out on the data packet, and the data transmission efficiency is improved. The data loading data of the first application in the starting stage is greatly improved, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal devices, and in particular to a network acceleration method, device and storage medium. Background Art

[0002] With the development of network communication technology, intelligent mobile terminals, such as smart phones and PDAs, are becoming more and more popular. Traditional life and entertainment are also gradually transferred to intelligent mobile terminals through various applications, such as watching videos, shopping, reading novels, playing games, etc.

[0003] At present, in order to improve the user experience, the manufacturers of various applications need to load a large number of preview images, animations and other information during the application startup phase to avoid the application presenting a blank interface during the startup phase. However, these preview images, animations and other information need to be obtained from the corresponding server through the network. More preview images and animations will result in longer loading time. Therefore, how to accelerate the network during the application startup phase to improve the user experience is an urgent problem to be solved. Summary of the invention

[0004] The embodiments of the present application provide a network acceleration method, device and storage medium, which are intended to accelerate the network during the startup phase of applications in a whitelist, so that the applications can complete the loading of preview images more quickly during the startup phase, thereby providing users with a better user experience.

[0005] In a first aspect, an embodiment of the present application provides a network acceleration method, which is applied to an electronic device, on which a first application is installed, and the method includes: in response to a user operation on the first application, determining whether the first application has entered a startup phase; when the first application enters the startup phase, adding an acceleration tag to a first data packet generated by the first application, the first data packet being used to instruct a server corresponding to the first application to return a second data packet of a first interface corresponding to the first application; moving the first data packet to the head of a first queue based on the acceleration tag so that the first data packet is sent first; receiving the second data packet fed back by the server; and updating and displaying the first interface according to the second data packet.

[0006] Exemplarily, the first application may be the video A application or the food A application in the following embodiments, as well as a third-party application installed on other mobile terminals.

[0007] Exemplarily, the first application entering the startup phase may be triggered by the user clicking on the icon of the application, or may be triggered by the user switching the first application in the background back to the foreground.

[0008] Exemplarily, the first interface may be the initial interface of the local storage of the first application, which may be Figure 4 The interface 20a shown in (1), or Figure 6 Interface 30a shown in (1).

[0009] Exemplarily, the first data packet may be a data acquisition request in the following embodiment. The second data packet may be data returned by the server in the following embodiment.

[0010] Exemplarily, the acceleration tag may be a character string satisfying a preset rule, and the acceleration tag indicates that the corresponding data packet needs to be scheduled preferentially.

[0011] Exemplarily, the first queue may be a data transmission queue, specifically a double-ended queue in the following embodiment, which is used to sort the data in the queue and then send it to the network in sequence.

[0012] For example, the process of moving the first data packet to the head of the data transmission queue based on the acceleration tag can be seen in Fig.11 .

[0013] Exemplarily, the updated first interface may be an interface displaying the second data packet. Figure 4 Interface 20b shown in (2), or Figure 6 Interface 30b shown in (2).

[0014] Therefore, by judging whether the first application has entered the startup phase when the first application enters the startup phase, if it has entered the startup phase, an acceleration tag is added to the data packet sent by the first application, so that the data packet with the acceleration tag is allocated to the head of the data sending queue for priority scheduling, thereby realizing network acceleration of the first application during the data sending process, greatly improving the data loading data of the first application in the startup phase, and improving the user experience.

[0015] According to the first aspect, after the step of receiving the second data packet fed back by the server, it includes: adding the acceleration tag to the second data packet, and moving the second data packet to the head of the second queue based on the acceleration tag so that the second data packet is sent first.

[0016] It is understandable that after the first application sends the first data packet to the server, the server returns the second data packet corresponding to the first data packet to the first application, so that the first application updates the first interface based on the second data packet and displays the second interface.

[0017] It is wise that the second queue may be a data receiving queue, specifically a double-ended queue in the following embodiment, which is used to sort the data in the queue and then send it to the application in sequence.

[0018] Exemplarily, the second interface may be Figure 4 Interface 20b shown in (2), or Figure 6 Interface 30b shown in (2).

[0019] Therefore, by adding an acceleration tag to the second data packet returned by the server when the first application enters the startup phase, the second data packet with the acceleration tag is assigned to the head of the data receiving queue for priority scheduling, thereby achieving network acceleration for the first application during the data receiving process, greatly improving the data loading speed of the first application in the startup phase, and improving the user experience.

[0020] According to the first aspect, or any implementation method of the first aspect above, when the first application enters the startup phase, an acceleration tag is added to the first data packet generated by the first application, including: when the first application enters the startup phase, determining whether the first application is in a preset whitelist, whether the first application is in the foreground, and whether the first application pulls up a cellular network; if the judgment results are all yes, adding an acceleration tag to the first data packet generated by the first application; otherwise, ending the network acceleration of the first application.

[0021] Exemplarily, the preset whitelist is set in advance in the local storage of the electronic device. Its content can be set by collecting the application usage frequency on each electronic device through the server, or can be set by each electronic device according to the application usage frequency of the local device.

[0022] It is understandable that the setting of the whitelist helps to accelerate the applications that really need acceleration, while the applications that do not need acceleration will not occupy hardware resources, thereby enabling the first application to achieve network acceleration, improve the loading speed of the first application, and improve the user experience.

[0023] Exemplarily, when the first application is not in the foreground but is switched to the background, it means that the user no longer needs to use the first application at this moment, and therefore, it is no longer necessary to perform network acceleration on the first application.

[0024] For example, usually the user will start the first application under the WIFI network, and in order to complete the data loading in the startup phase faster, the first application will use the WIFI network while pulling the cellular network to increase the data transmission speed. Therefore, if the first application does not pull the cellular network, it means that the WIFI network can meet the data transmission needs of the first application, and there is no need to perform network acceleration on the first application at this time.

[0025] Therefore, the embodiment of the present application determines whether the application is in the preset whitelist, whether it is in the foreground, and whether the cellular network is pulled up, thereby avoiding third-party applications that do not need network acceleration from occupying electronic device resources, thereby avoiding reducing the network acceleration effect on the first application, improving the data sending and receiving speed of the first application, and improving the user experience.

[0026] According to the first aspect, or any implementation of the first aspect above, the process of determining whether the first application is in the foreground and whether the first application has pulled up a cellular network includes: monitoring the life cycle events of the first application by implementing the Application.ActivityLifecycleCallbacks interface to identify whether the first application is in the foreground; obtaining the current network connection information through the ConnectivityManager object to identify whether the first application has pulled up a cellular network.

[0027] According to the first aspect, or any implementation of the first aspect above, the field information of the preset whitelist includes serial number, application name, source port number, destination port number, whether acceleration is supported, socket ID and acceleration duration.

[0028] According to the first aspect, or any implementation method of the first aspect above, the process of constructing the preset whitelist includes: obtaining the power consumption ratio of all applications in the electronic device, and when the power consumption ratio is greater than a preset threshold, writing the corresponding application information into the preset whitelist.

[0029] For example, the power consumption of each application on the e-book device is recorded, thereby forming a power consumption percentage ranking. A higher ranking means that the user uses the application more frequently, and therefore the network acceleration of the application is more necessary.

[0030] In one possible implementation, electronic device manufacturers can also collect user data and use big data statistics to write applications that are more frequently launched in electronic devices into a whitelist, thereby more accurately accelerating third-party applications that require network acceleration.

[0031] Therefore, the embodiment of the present application constructs a reasonable whitelist, so as to more accurately perform network acceleration for high-frequency applications on user electronic devices, thereby improving the user experience.

[0032] According to the first aspect, or any implementation method of the first aspect above, the process of determining whether the first application is in a preset whitelist includes: parsing the source port number of the first data packet, matching the first application corresponding to the source port number in the preset whitelist, and if the match is successful, determining that the first application is in the preset whitelist; if the match fails, determining that the first application is not in the preset whitelist.

[0033] According to the first aspect, or any implementation method of the first aspect above, when the first application enters the startup phase, the step of adding an acceleration tag to the first data packet generated by the first application includes: creating a socket, and generating a number for the socket; wherein the first application corresponds to at least one socket, and the socket is used to add the acceleration tag to the data packet of the first application.

[0034] According to the first aspect, or any implementation of the first aspect above, the method further includes: after the first application enters a startup phase on the electronic device for a preset time period, ending network acceleration of the first application.

[0035] Exemplarily, the preset duration is a default value that can be set, and usually the default value may be 5 seconds.

[0036] In one implementation, the preset duration may also be to set an acceleration duration for each application in the whitelist individually according to the user's usage habits.

[0037] Therefore, in the embodiment of the present application, the network acceleration is performed on the first application according to the preset duration, thereby avoiding the situation where multiple applications are accelerated at the same time when the user switches to other applications in the whitelist, thereby reducing the acceleration effect, and further improving the data transmission speed of the application currently accelerated by the network, thereby improving the user experience.

[0038] According to the first aspect, or any implementation of the first aspect above, the method also includes: ending network acceleration for the first application when the first application is switched to the background, the first application is disconnected from the cellular network, the first application is closed, or the process of the first application is killed.

[0039] For example, if the first application is switched to the background and the cellular network is disconnected, it means that the user does not need to use the application temporarily, so there is no need to accelerate the network for it; if the first application is closed or its process is killed, it means that the user is not using the first application during this period, so there is no need to accelerate the network for it. The above-mentioned situations where the first application is switched to the background, the first application is disconnected from the cellular network, the first application is closed, and the process of the first application is killed are all abnormal exit acceleration.

[0040] Therefore, in the embodiment of the present application, when the first application is abnormally exited from acceleration, the network acceleration of the first application is terminated, thereby preventing the first application from occupying the resources of the electronic device for a long time, which in turn causes the acceleration effect to be reduced when other applications use acceleration, thereby increasing the data transmission speed of the application currently accelerated by the network and improving the user experience.

[0041] In a second aspect, an embodiment of the present application provides an electronic device. The electronic device includes: a memory and a processor, the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes instructions of the method in the first aspect or any possible implementation of the first aspect.

[0042] In a third aspect, an embodiment of the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0043] In a fourth aspect, an embodiment of the present application provides a computer program, which includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0044] In a fifth aspect, an embodiment of the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a schematic diagram of the hardware structure of an electronic device shown as an example;

[0046] Figure 2 A schematic diagram of the software structure of an electronic device is shown as an example;

[0047] Figure 3 is a schematic diagram of user operation shown as an example;

[0048] Figure 4The schematic diagram of application startup is shown as an example;

[0049] Figure 5 A schematic diagram of user operation is shown as an example;

[0050] Figure 6 The schematic diagram of application startup is shown as an example;

[0051] Figure 7 This is a schematic diagram of an exemplary application startup time;

[0052] Figure 8 The following is a schematic diagram of the underlying interaction logic shown as an example;

[0053] Fig. 9 is a schematic diagram of a data packet structure shown as an example;

[0054] Fig.10 Add schematic diagrams for the labels shown as examples;

[0055] Fig.11 A schematic diagram of data packet processing is shown as an example;

[0056] Fig.12 The figure is a schematic diagram of an exemplary data acceleration process. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0059] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0060] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0061] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0062] In order to better understand the technical solution provided by the embodiment of the present application, before describing the technical solution of the embodiment of the present application, the hardware structure of the terminal device (such as a mobile phone, a tablet computer, a touch-screen PC, etc.) to which the embodiment of the present application is applicable is first described in conjunction with the accompanying drawings. For the convenience of description, Figure 1 Let's take a mobile phone as an example.

[0063] See also Figure 1 The mobile phone 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 sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0064] Among them, 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 (Modem), a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc., which are not listed one by one here and the present application does not limit this.

[0065] The controller as the processing unit mentioned above may be the nerve center and command center of the mobile phone 100. In practical applications, 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.

[0066] The above-mentioned modulation and demodulation processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal, and transmit the demodulated low-frequency baseband signal to the baseband processor for processing.

[0067] The baseband processor mentioned above is used to process the low-frequency baseband signal transmitted by the regulator, and transmit the processed low-frequency baseband signal to the application processor.

[0068] It should be noted that, in some implementations, the baseband processor may be integrated into the modem, that is, the modem may have the function of the baseband processor.

[0069] The application processor mentioned above is used to output sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or to display images or videos through the display screen 194.

[0070] The digital signal processor mentioned above is used to process digital signals. Specifically, the digital signal processor can process not only digital image signals but also other digital signals.

[0071] The video codec mentioned above is used to compress or decompress digital video. For example, the mobile phone 100 can support one or more video codecs. In this way, the mobile phone 100 can play or record videos in multiple coding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0072] The ISP mentioned above is used to output the digital image signal to the DSP for processing. Specifically, the ISP is used to process the data fed back by the camera 193.

[0073] The DSP mentioned above is used to convert digital image signals into image signals in standard RGB, YUV and other formats.

[0074] In addition, it should be noted that, with respect to the processor 110 including the above-mentioned processing units, in some implementations, different processing units may be independent devices. That is, each processing unit may be regarded as a processor. In other implementations, different processing units may also be integrated into one or more processors. For example, in some implementations, the modem processor may be an independent device. In other implementations, the modem processor may be independent of the processor 110 and be arranged in the same device as the mobile communication module 150 or other functional modules.

[0075] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0076] In addition, the processor 110 may further include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc., which are not listed here one by one, and the present application does not limit this.

[0077] In addition, the processor 110 may also be provided with a memory for storing instructions and data. In some implementations, 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.

[0078] Continue to see Figure 1The 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 mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0079] Continue to see Figure 1 , the internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 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 may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, and the socket creation function mentioned in the embodiment of the present application, etc.). The data storage area may store data created during the use of the mobile phone 100 (such as data carrying an acceleration tag generated based on the technical solution provided in the embodiment of the present application), etc. 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.

[0080] Continue to see Figure 1 The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.

[0081] Continue to see Figure 1 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.

[0082] Continue to see Figure 1 The wireless communication function of the mobile phone 100 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0083] Continue to see Figure 1, the mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the mobile phone 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, and process 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. In some implementations, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some implementations, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0084] Continue to see Figure 1 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 mobile phone 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 processing, 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 the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0085] It should be noted that, in some implementations, the application sends a data request and receives data returned by the destination server, which can be implemented through one or more communication modules among the mobile communication module 150 and the wireless communication module 160 .

[0086] Continue to see Figure 1The audio module 170 may include a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, etc. For example, the mobile phone 100 may implement audio functions through the application processor and the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, etc. in the audio module 170, such as recording and video recording functions.

[0087] Continue to see Figure 1 The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not listed here one by one and are not limited in this application.

[0088] Continue to see Figure 1 The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The mobile phone 100 may receive key input and generate key signal input related to user settings and function control of the mobile phone 100.

[0089] Continue to see Figure 1 , the motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0090] Continue to see Figure 1 The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0091] Continue to see Figure 1 , the camera 193 is used to capture static images or videos. The mobile phone 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.

[0092] Continue to see Figure 1 , the display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some implementations, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. The mobile phone 100 can implement a 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.

[0093] The hardware structure of the mobile phone 100 is introduced here. It should be understood that: Figure 1The illustrated mobile phone 100 is merely an example, and in a specific implementation, the mobile phone 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different component configuration. Figure 1 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0094] To better understand Figure 1 The software structure of the mobile phone 100 is shown, and the software structure of the mobile phone 100 is described below. Before describing the software structure of the mobile phone 100, the architecture that can be adopted by the software system of the mobile phone 100 is first described.

[0095] Specifically, in actual applications, the software system of the mobile phone 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.

[0096] In addition, it is understandable that the software systems currently used by mainstream terminal devices include but are not limited to Windows systems, Android systems, and iOS systems. For ease of explanation, the present application embodiment takes the layered Android system as an example to exemplify the software structure of the terminal device 100.

[0097] In addition, the network acceleration solution provided in the subsequent embodiments of the present application is also applicable to other systems in specific implementations.

[0098] See also Figure 2 , which is a software structure block diagram of the mobile phone 100 according to an embodiment of the present application.

[0099] like Figure 2 As shown, the layered architecture of the mobile phone 100 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some implementations, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.

[0100] The application layer may include a series of application packages. Figure 2 As shown, the application package may include application market, video, food, shopping, permission management, Bluetooth, Wi-Fi, settings and other applications, which are not listed here one by one and are not limited in this application.

[0101] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. In some implementations, these programming interfaces and programming frameworks can be described as functions. Figure 2 As shown, the application framework layer may include a permission management module, a view system, a content provider, a speech recognition module, a wake-up word / command word detection module, a scene recognition module, a speech data fusion module, a voice activity detection module, a voiceprint verification module, a wake-up word voiceprint template management module and other functions, which are not listed one by one here and this application does not impose any restrictions on this.

[0102] Exemplarily, in this embodiment, the permission management module in the application framework layer is used to make permission judgments on applications started in the application layer, thereby determining whether the application needs to perform network acceleration, avoiding applications that do not need network acceleration from occupying network resources, and improving the user experience.

[0103] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0104] In addition, it can be understood that the division of the above functional modules is only an example listed for better understanding the technical solution of this embodiment, and is not the only limitation to this embodiment. In practical applications, the above functions can also be integrated into one functional module, and this embodiment does not limit this.

[0105] In addition, in actual applications, the above-mentioned functional modules can also be expressed as services or frameworks. For example, the speech recognition module can be expressed as a speech recognition service or a speech recognition framework, etc. This embodiment does not impose any limitation on this.

[0106] In addition, it should be noted that the window manager located in the application framework layer is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0107] In addition, it should be noted that the content provider located in the application framework layer is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, dialed and received calls, browsing history and bookmarks, phone book, etc., which are not listed here one by one and are not limited by this application.

[0108] In addition, it should be noted that the above-mentioned view system located in the application framework layer includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures. Specifically, in the technical solution provided in the embodiment of the present application, the view system is used to display the data content received from the server in the display interface during the process of displaying the application interface.

[0109] In addition, it should be noted that the telephone manager located in the application framework layer is used to provide communication functions of the mobile phone 100, such as management of call status (including connection, hang-up, etc.).

[0110] The resource manager provides various resources for the application, such as localized strings, icons, images, layout files, video files, etc., which are not listed here one by one and are not limited in this application.

[0111] In addition, it should be noted that the notification manager located in the application framework layer enables the application to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction.

[0112] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.

[0113] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0114] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0115] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0116] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0117] The media library supports the playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0118] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0119] It can be understood that the 2D graphics engine mentioned above is a drawing engine for 2D drawing.

[0120] In addition, it is understandable that the kernel layer in the Android system is a layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, etc. Exemplarily, the sensor driver can be used to output a detection signal of a sensor (such as a touch sensor) to a view system, so that the view system responds to the detection signal and displays a corresponding application interface. Specifically, in the technical solution provided in the embodiment of the present application, the kernel layer also includes a data acceleration module, which is used to perform network acceleration on the application when the permission management module determines that the application being started needs network acceleration, thereby increasing the priority of the application sending and receiving data, reducing the waiting time for the application to send and receive data, and improving the user experience.

[0121] This concludes the introduction to the software structure of the mobile phone 100. It can be understood that: Figure 2 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.

[0122] In daily life, mobile terminals have become a necessity for users. Users use mobile terminals to shop online, watch movies and TV shows, and order food. The above online shopping, watching movies and TV shows, and ordering food all correspond to one or more applications. These applications introduce items, movies, and food to users through preview images, preview animations, and other information, so that users can quickly find the content they are interested in.

[0123] For example, a user may watch movies and TV shows on a mobile terminal in his or her spare time through a video-related application. After the user clicks to start the application, the application will load some currently popular preview pictures for the user to quickly select a favorite movie.

[0124] For example, the user may also order food through a food-related application on a mobile terminal. After the user clicks to start the application, the food application will load preview pictures of nearby food stores for the customer to select a favorite store.

[0125] In order to better understand the startup process of the application when the user clicks on the above application, the following is combined with the attached Figure 3 To Attachment Figure 6 Provide explanation.

[0126] In the movie viewing scene, see Figure 3 , Figure 3 A mobile phone interface 10a is shown as an example. For example, the interface 10a displays icons of multiple applications, such as an icon 10a-1 for video A, an icon 10a-2 for food A, and icons for applications such as camera, address book, phone, information, clock, calendar, gallery, memo, file management, email, music, calculator, video, recorder, weather, browser, and settings.

[0127] It should be noted that in some possible implementations, Figure 3 The interface 10a shown in (1) can be called the main interface. When the user clicks the icon 10a-1 in the interface 10a, the video playback function of the video A, such as movie playback, animation playback, etc., can be used.

[0128] Continue to see Figure 3 For example, when a user clicks on the icon 10a-1 of the video A application, the mobile phone responds to the user operation, identifies the icon corresponding to the user's click operation as the icon of the video A application, and then calls the corresponding interface in the application framework layer to start the video A application. At the same time, the video A application sends a data acquisition request to the server corresponding to the video A application. At this time, the mobile phone displays the local default interface of the video A application, such as Figure 4 In the interface 20a shown in (1), the server data corresponding to the above data acquisition request has not been sent to the video A application at this moment, so the preview image of each recommended video in the interface 20a is displayed as the LOGO image of the video A application, such as Figure 4 The initial interface 20a shown in (1).

[0129] For example, after the video A application receives the data returned by the server, the video A application updates the initial interface 20a based on the data, and displays the following: Figure 4 The startup completion interface 20b shown in (2) completes the startup process of the video A application.

[0130] Continue to see Figure 4 Middle (2), Figure 4(2) shows an example of an interface 20b displayed by the video A application after the startup is completed. In this interface, the video A application will update the acquired data to the grid corresponding to each movie, thereby providing a more convenient movie selection experience for the user.

[0131] With the development of network communication technology, third-party applications have added preview animations and preview highlights of videos in the startup phase of video A application to further improve the user experience, so that users can obtain video information without clicking to select the video and enter the sub-page (video playback interface). This operation will undoubtedly improve the user experience, but if the preview animation and preview highlights cannot be loaded in time, it will reduce the user experience.

[0132] In some implementations, before the user enters the local default interface of Video A application, Video A application will also add a locally cached advertising animation before the interface. While the advertising animation is playing, the application will send a data acquisition request to the server, so that the data loading in the startup phase is completed before the advertising animation is finished. However, the advertising animation can be actively skipped by the user. After the user actively skips the advertising animation, if Video A application has not yet obtained the data returned by the server, it will display the initial interface without preview images and preview animations. The initial interface is as follows: Figure 4 In (1), since the video A application has not yet received the preview image data returned by the server, the preview image in the interface cannot be loaded, thereby reducing the user experience.

[0133] Continue to see Figure 4 In (1), Figure 4 (1) is the initial interface displayed by the video application A. The initial interface is the recommendation page displayed by the video application A. The page includes the movies recommended by the video application A to the user, including: "XX Time: Going to Space", "XX Rescue Operation", "XX Space Travel", "XX Aviation" and "XX Space". These movies are recommended by the video application A to the user based on the user's preferences and the results of big data analysis, so that the user can quickly obtain the movie he likes and improve the user experience.

[0134] However, since the video A application did not obtain the preview image data returned by the server in time, Figure 4 The page shown in (1) can only display the LOGO of video A application instead of the preview image. Users cannot quickly access their favorite videos through this interface and may even think that the mobile terminal network is not good or the signal is poor, which leads to a deterioration in user experience.

[0135] For example, in some implementations, it usually takes 5 seconds from the completion of loading of interface 20a to the completion of updating of interface 20b. During this 5-second period, the user may think that the network and signal of the mobile terminal are not good, which greatly reduces the user's experience.

[0136] In the food ordering scenario, see Figure 5 , Figure 5 An example of a mobile phone interface 10a' is shown. For example, when a user clicks on the icon 10a-2 of the Food A application, the mobile phone responds to the user operation, identifies the icon corresponding to the user's click operation as the icon of the Food A application, and then calls the corresponding interface in the application framework layer to start the Food A application. At the same time, the Food A application sends a data acquisition request to its corresponding server. At this time, the mobile phone displays the local default interface of the Food A application, such as Figure 6 The interface 30a shown in (1) in FIG. 1 is shown in FIG. 1 , and at this moment, the server data corresponding to the above data acquisition request has not been sent to the Food A application, so the preview image of each recommended store in the interface 30a is not displayed. Figure 6 The initial interface 30a shown in (1).

[0137] Continue to see Figure 6 In (1), Figure 6 (1) is the initial interface displayed by the Food A application. The initial interface is the recommendation page displayed by the Food A application. The page includes the stores recommended by the Food A application for users, including: "XX Canteen", "XX Home Cooking", "XX Barbecue", "XX Small Bowl Dishes", "XX Noodle House", "XX Shaobing", "XX Fried Rice" and "XX Guokui". These stores are recommended by the Food A application for users based on user preferences and big data analysis results, so that users can quickly obtain their favorite food and improve user experience.

[0138] Exemplarily, in some implementations, while loading the initial interface, the Food A application will send a data acquisition request to its corresponding server, so that the server will send the preview image data of the store in the initial interface to the mobile phone.

[0139] For example, after the food A application receives the data returned by the server, the food A application updates the initial interface 30a based on the data, displaying the following: Figure 6 The startup completion interface 30b shown in (2) completes the startup process of the Food A application.

[0140] Continue to see Figure 6 Middle (2), Figure 6(2) shows an example of the interface 30b displayed by the Food A application after the startup is completed. In this interface, the Food A application will update the data returned by the server to the grid corresponding to each store, thereby providing users with a more convenient ordering experience.

[0141] However, the process from the initial interface 30a of the Food A application to the display interface 30b, that is, the process from the Food A application sending data to the server and receiving the data returned by the server, usually takes 5 seconds. During this 5-second period, the user may think that the network of the mobile terminal is not good and the signal is poor, which greatly reduces the user's experience.

[0142] In one implementation, in order to solve this problem, a method of using both WIFI network and mobile network to improve loading speed can be used. For example, when the mobile phone is using WIFI network, the video A application will also pull up data traffic (mobile network) to increase the speed of obtaining preview image data. However, when there are multiple applications in the background sending and receiving data at the same time, simply pulling up data traffic still cannot improve the loading speed of these preview images and preview animations.

[0143] In view of this, an embodiment of the present application provides a network acceleration method. For third-party applications in the whitelist, during the startup phase of the third-party applications, the priority of the data packets of the third-party applications is increased, the data packets of the third-party applications are accelerated, the data waiting time during the application startup phase is reduced, and the user experience is improved.

[0144] For example, in the embodiment of the present application, the third-party application (the application may be the video A application or the food A application) can establish a network connection with its corresponding server through the wireless network card in the electronic device in the startup phase; at the same time, the third-party application can also establish a network connection with its corresponding server through the data service network card. That is, the third-party application can use the wireless network card and the data service network card to establish a network connection with the server at the startup phase, thereby improving the data acquisition speed.

[0145] Before introducing the network acceleration method provided by the embodiment of the present application, the application startup phase is analyzed here. Figure 7 In (1), Figure 7 (1) shows an example of a timing diagram of the current application startup phase. Figure 7In (1), taking the data sending process as an example, the startup phase of the application is divided into five time periods (respectively t1, t2, t3, t4 and t5). Among them, in the t1 phase, in response to the user's click operation, the application is started; in the t2 phase, the application loads the local default interface (that is, the initial interface, corresponding to the above-mentioned interface 20a and interface 30a), and simultaneously sends a data request to the server; in the t3 phase, the data request enters the queue. Since the data in the queue is first-in-first-out, the data request is placed at the end of the queue by default, and moves forward one by one until it moves to the head of the queue and is sent to the server by the mobile terminal; in the t4 phase, the application receives the data returned by the server (here the returned data also needs to enter the queue first, and be queued and sent to the application in a first-in-first-out manner); in the t5 phase, the application updates the default interface based on the data returned by the server, and displays interface 20b and interface 30b.

[0146] based on Figure 7 It can be seen that during the startup phase of an application, its data requests and returned data need to enter the queue and wait, and the waiting time is approximately equal to the loading time of the preview image and preview animation. Therefore, reducing the waiting time of data requests and returned data in the queue is an effective way to solve the slow data loading speed of third-party applications.

[0147] In one implementation, a method for reducing the waiting time of data requests and returned data in the queue is shown in Figure 7 Middle (2), Figure 7 (2) shows an example of an acceleration time diagram of the application startup phase. Figure 7 In (2), taking the data sending process as an example, the startup phase of the application is also five time periods (T1, T2, T3, T4 and T5). In the T3 phase, when the data request of the application enters the queue, the data request is directly scheduled to the head of the queue, thereby reducing the waiting time of the data request and the returned data in the queue.

[0148] In order to further understand how to implement the scheduling process of the data request in the T3 stage in the embodiment of the present application, the following is combined with Figures 8 to 11 The scheduling process is described.

[0149] See also Figure 8 , Figure 8 The following is an example of a schematic diagram of the underlying interaction logic of the data request scheduling process in the startup phase. The underlying interaction logic mainly involves the application layer, the application framework layer, the kernel layer and the hardware layer (driver / chip). Among them, the application layer is installed with a third-party application that needs to be accelerated, the application framework layer is provided with a permission management module, the kernel layer is provided with a data acceleration module, and the hardware layer sends and receives data packets.

[0150] Exemplarily, the network communication model of the embodiment of the present application is an open system interconnection (OSI) model, which can be divided into seven levels, from bottom to top, the physical layer (Physical Layer), data link layer (Data Link Layer), network layer (Network Layer), transport layer (Transport Layer), session layer (Session Layer), presentation layer (Presentation Layer) and application layer (Application Layer). In this model, the kernel mainly involves the network layer and the transport layer, therefore, the data acceleration module of the embodiment of the present application is arranged in the kernel layer, so as to realize the network acceleration of the application in the kernel layer.

[0151] Specifically, when a third-party application is started and sends a data request to the outside, the permission management module authenticates it and determines whether it meets the acceleration scenario.

[0152] Exemplarily, the permission management module obtains the source port number and the destination port number of the data request to obtain the upper-layer application corresponding to the data request, and determines whether the upper-layer application is an application that needs to be accelerated through a preset whitelist. When the upper-layer application is determined to be an application that needs to be accelerated, the life cycle events and network connection information of the upper-layer application are obtained through the interface provided by the system to determine whether it meets the acceleration scenario.

[0153] For example, the onActivityCreated method in the Application.ActivityLifecycleCallbacks interface can be used to obtain whether the upper-layer application is in the startup phase, the onActivityStarted method can be used to obtain whether the upper-layer application is in the foreground, and the network connection information of the upper-layer application can be obtained through the ConnectivityManager object. If the upper-layer application is in the startup phase, in the foreground, and the network connection is a cellular network, it is determined that it meets the acceleration scenario.

[0154] After determining that the application meets the acceleration scenario, the permission management module sends the acceleration message of the application's data request to the data acceleration module. After obtaining the acceleration message, the data acceleration module adds an acceleration tag to the data request. And high priority scheduling is performed on data requests with acceleration tags, so that they are prioritized in the PDCP, MAC and PHY layers, so that the driver / chip will give priority to sending data requests with acceleration tags to the server. In this way, priority adjustment is achieved for data requests that meet the acceleration scenario, reducing the waiting time of data requests and returned data in the queue, and improving the user experience.

[0155] In one implementation, the above-mentioned addition of acceleration tags to data requests is mainly performed in the kernel layer. In the kernel layer, for each data packet that needs to be accelerated, that is, TCP / UDP / DNS data packets, an acceleration tag needs to be added. The structure of each data packet is shown in Fig. 9 .

[0156] In one implementation, the process of adding acceleration tags can be understood as adding acceleration tags to data sent and received by the application. It can be understood that whether the application sends a data request or receives data returned by the server, it can be understood as data interaction between the application and the server.

[0157] For example, the data exchange between the application and the server is based on the Internet, using the TCP / IP protocol. Fig.10 .exist Fig.10 In the startup phase, the application sends (or receives, corresponding to) Fig.10 In the send() and recv() methods) data packet (this data packet is used to request the first screen images, animations and other resources). When the application uses the network to send data packets to the server, it needs to use the kernel operations and network card devices in the mobile terminal's operating system. Therefore, a socket can be created through the operating system, and the operating system returns the number ID of this socket. When the application uses the kernel operations in the operating system, the corresponding socket is called through this number ID to add acceleration tags to the application's data.

[0158] For example, when the food A application creates a network communication process to interact with the server, the system creates a Socket for the network communication process and assigns the Socket ID to the network communication process, so that the food A application can use the Socket to add acceleration tags to the data in the subsequent data interaction through the network communication process. That is, each network communication process corresponds to at least one Socket.

[0159] After the acceleration tag is added to the data packet, the acceleration module can accelerate the data packet if the data packet has the acceleration tag.

[0160] For example, see Fig.11 , Fig.11 The following is an example of a data acceleration diagram based on a double-ended queue. Fig.11It is assumed that the number of windows of the double-ended queue is 5. Before optimization, the application data packets (that is, data requests and server-side return data) must be placed at the end of the queue in order after entering the double-ended queue, and move forward one by one after the previous data packets are sent. After optimization, the data acceleration module determines whether each data packet entering the double-ended queue carries an acceleration tag. If the data packet carries an acceleration tag, it will be moved directly to the head of the double-ended queue.

[0161] Exemplarily, if there are multiple data packets carrying acceleration tags, they are moved to the head of the double-ended queue in the order in which they enter the queue and wait to be sent.

[0162] For example, if there is no congestion in the double-ended queue, the data packet carrying the acceleration tag will always be sent at the head of the queue, so that data acceleration for the application can be achieved.

[0163] Therefore, by adding acceleration tags to the data packets of the application that meet the acceleration scenario, the data packets are sent preferentially based on the acceleration tags, thereby achieving network acceleration for the application, reducing the data waiting time during the application startup phase, and improving the user experience.

[0164] In order to better understand the process of accelerating an application program in the startup phase by a network acceleration method provided in an embodiment of the present application, the following embodiment takes a mobile terminal as a mobile phone 100 as an example, and describes the application program acceleration process in the startup phase in combination with a specific scenario.

[0165] Take the third-party application icon being clicked by the user to enter the startup phase as an example, see Fig.12 , Fig.12 An example is shown Figure 8 The timing diagram of the network acceleration method implemented by each module in the example includes:

[0166] Step S101, in response to a user clicking on the icon of application A, application A is started. Application A sends a data request to a server through a data transceiver module.

[0167] In this embodiment, application A can be any application program in the mobile phone 100 that can connect to the Internet and use the network. Exemplarily, application A is the above-mentioned video A application or food A application. In response to the user clicking the icon of application A, the mobile phone 100 starts application A, and the mobile phone 100 can display the relevant interface of application A (the default is the initial interface shown in the above-mentioned interface 20a or interface 30b), and application A is the foreground application. The foreground application is an application that runs on the mobile phone 100, displays its window, obtains the focus, and its window is not blocked by other applications.

[0168] Correspondingly, a background application is an application that runs on an electronic device but does not display its window, or whose window is blocked by other applications.

[0169] It is understandable that the launch of application A can be triggered by the user clicking on the icon, or by the system automatically restarting after application A is abnormally closed, or by application A switching from background to foreground operation. The embodiments of the present application do not limit this.

[0170] Normally, the operating system groups the states of applications. For example, background groups, foreground groups, etc. Among them, the scheduling priority of the foreground group is higher than that of the background group. Therefore, when application A is switched to the background, the system considers that application A can enter the dormant state. When it switches from the background to the foreground, application A is equivalent to re-entering the startup state, so it is equivalent to application A starting.

[0171] In a specific implementation, application A and its corresponding server establish a network channel through mobile phone 100, and application A transmits data stream through the network channel.

[0172] Exemplarily, the network channel here can be established using the cellular network of the mobile phone 100, or it can be established using both a WIFI network and a cellular network, which is not limited in the embodiments of the present application.

[0173] Step S102, intercepting the data request, and determining whether the corresponding application meets the data acceleration condition according to the data request.

[0174] It is understandable that in the embodiment of the present application, the mobile phone 100 stores an application whitelist, which is used to determine which applications can be accelerated. The whitelist can be a set whitelist sent to the mobile phone 100 by the mobile phone manufacturer after big data analysis of the frequency of application use by users; or it can be a whitelist obtained by counting the proportion of high power consumption of local applications in the mobile phone 100 with a built-in program to count the proportion of high power consumption of the local application, which is not limited in the embodiment of the present application.

[0175] Exemplarily, when the power consumption of an application in the local computer accounts for more than 30%, the application can be set as an application in the whitelist.

[0176] Exemplarily, the above application whitelist is set with information on whether multiple application programs support network access, and the multiple application programs include a video A application and a food A application.

[0177] For example, see Table 1 below, which exemplifies information on whether some of the applications in the whitelist support network acceleration.

[0178] Table 1, Application whitelist

[0179]

[0180]

[0181] When application A is started, mobile phone 100 determines whether application A can be accelerated by the network by matching the name of application A in the above application whitelist.

[0182] In one implementation, the application in the above application whitelist also needs to meet specific acceleration scenarios. For example, the application that can be accelerated must be in the initial startup phase, in the foreground, and the cellular network is turned on. Only when the above conditions are met, the application is allowed to use network acceleration.

[0183] It should be noted that users usually perform entertainment activities under the WIFI network. When the application is connected to the WIFI network, it also opens the cellular network. This can be understood as the application needs to send and receive data, and the speed of data transmission and reception is increased to improve the user experience. Therefore, in the cellular network, accelerating the network of the application can further improve the user experience.

[0184] In one implementation, the Application.ActivityLifecycleCallbacks interface can be implemented to monitor the application's lifecycle events, thereby identifying whether the application is in the startup phase, whether it is in the foreground, and obtaining the current network connection information through ConnectivityManager to determine whether it is a cellular network.

[0185] In the specific implementation, the above data request is intercepted and parsed to obtain the source port number in the data request, and the source port is matched with the application whitelist to determine whether the application A corresponding to the data request is an application that needs to be accelerated. If the result of the determination is that application A needs to be accelerated, it is determined in turn whether the status of application A is in the initial startup stage, in the foreground, and using the cellular network. If the results of the determination are all yes, it is determined that application A meets the data acceleration conditions; if any of the determination results is no, the data request is not processed.

[0186] Step S103: When the acceleration condition is satisfied as a result of the judgment, an acceleration message is sent to the data acceleration module.

[0187] In one implementation, when the above judgment result satisfies the acceleration conditions, the mobile phone 100 generates an acceleration message corresponding to application A, creates a socket, and temporarily writes the number of the socket into the above Table 1. Table 1 can be updated to the following Table 2.

[0188] Table 2, updated application whitelist

[0189] Serial number Application Name Source port number Destination port number Whether to support acceleration Socket ID 0 Video A 00000000:10E1 00000000:006F yes 0001 1 Food A 0100007F:0277 0100007F:0019 yes null 2 ... ... ... yes null

[0190] In one implementation, when there are multiple network communication processes between application A and its corresponding server, a corresponding socket may be created for each network communication process, so that every other socket can add an acceleration tag to a data packet in a network communication process.

[0191] It is understandable that the above socket is used to add an acceleration tag to the data of the target application interacting with the server. That is, during this acceleration process, the mobile phone 100 can use the socket ID to add an acceleration tag to the data of application A.

[0192] Step S104: adding an acceleration tag to the data request.

[0193] For details, please refer to the process of adding the acceleration tag to the data request. Fig.10 When application A interacts with its corresponding server, application A sends a data request by calling the send() method. When the data request is sent to the network (including the intranet, LAN and the Internet), an acceleration tag is added to the data request through the socket API at the TCP protocol layer.

[0194] Exemplarily, the acceleration tag may be a preset string of numbers or a string of characters. The acceleration tag is used to indicate that the data request needs to be scheduled with priority.

[0195] Step S105, moving the data request with the acceleration tag added to the head of the queue.

[0196] Specifically, the data request with the acceleration tag is added to the data transmission queue. Fig.11 The double-ended queue shown. Before optimization, all data packets in the double-ended queue follow the "first in, first out" principle, and the data request of application A can only be sent out after the previous data packet is sent. In the embodiment of the present application, the data request with the acceleration tag is directly moved to the head of the double-ended queue, that is, the data request with the acceleration tag will be sent out first. In this way, if there is no congestion in the double-ended queue, the data packet carrying the acceleration tag will always be sent at the head of the queue, thereby achieving network acceleration for application A.

[0197] Step S106: sending the data request to the server.

[0198] Step S107: receiving the data returned by the server, and sending the data to application A.

[0199] Step S108, intercepting the data and adding an acceleration tag to the data.

[0200] Step S109: Move the data with the acceleration tag added to the head of the queue and send it to application A.

[0201] Specifically, by intercepting and parsing the data packets returned by the server, the obtained destination port number is matched with the above-mentioned application whitelist. After the match is successful, the corresponding socket ID is obtained, and an acceleration tag is added to the data based on the socket ID, so that the data is sent to application A first.

[0202] Step S110: Application A is started.

[0203] Specifically, after receiving the data returned by the server, application A updates the initial interface and displays a startup completion interface such as interface 20b or interface 30b.

[0204] Step S111, determining whether the acceleration exit condition is met.

[0205] Step S112, when the acceleration exit condition is met, end the acceleration.

[0206] In one implementation, after application A completes the startup phase, the network acceleration of application A will also end. For example, a default exit acceleration time can be set for application A. When the predetermined time is reached after application A starts network acceleration, the acceleration will end by default. The preset time can be set to a default value (which can be set to 5 seconds), or it can be set for each application separately. The preset time of each application can be stored locally in the mobile phone 100; specifically, the storage method of the application whitelist mentioned above is shown in Table 3.

[0207] Table 3, whitelist of applications with exit duration

[0208]

[0209] In another implementation, when application A is switched to the background, the application is closed, the process is killed, and the cellular network is disconnected, the acceleration will also be exited. For example, when application A is switched to the background and the application is closed, it can be considered that the user is no longer using the application, and it can be determined that application A does not need to be accelerated. When the process is killed, it can be determined that application A does not meet the acceleration conditions. When the cellular network is disconnected, it can be considered that application A believes that the current network connection can meet the data transmission and reception requirements, so there is no need to use network acceleration.

[0210] Therefore, an acceleration tag is added to the data packet of the application in the whitelist during the startup phase, so that the driver / chip of the mobile phone 100 gives priority to sending the data packet, thereby achieving network acceleration for the application, reducing the data waiting time of the application during the startup phase, and improving the user experience.

[0211] In addition, it is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.

[0212] In addition, it should be noted that the network acceleration method provided by the above embodiments implemented by the electronic device in the actual application scenario can also be performed by a chip system included in the electronic device, wherein the chip system may include a processor. The chip system can be coupled to the memory so that the chip system calls the computer program stored in the memory when it is running to implement the steps performed by the above electronic device. Among them, the processor in the chip system can be an application processor or a processor other than an application processor.

[0213] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the network acceleration method in the above-mentioned embodiment.

[0214] In addition, an embodiment of the present application further provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the above-mentioned related steps to implement the network acceleration method in the above-mentioned embodiment.

[0215] In addition, an embodiment of the present application also provides a chip (which may also be a component or module), which may include one or more processing circuits and one or more transceiver pins; wherein the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the above-mentioned related method steps to implement the network acceleration method in the above-mentioned embodiment, so as to control the receiving pin to receive the signal, so as to control the sending pin to send the signal.

[0216] In addition, it can be seen from the above description that the electronic device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0217] As described above, 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. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A network acceleration method, It is characterized in that Applied to an electronic device, the electronic device having a first application installed thereon, the method comprising: In response to a user operation on the first application, determining whether the first application enters a startup phase; When the first application enters the startup phase, adding an acceleration tag to a first data packet generated by the first application, the first data packet being used to instruct a server corresponding to the first application to return a second data packet of a first interface corresponding to the first application; Moving the first data packet to the head of the first queue based on the acceleration tag, so that the first data packet is sent preferentially; receiving the second data packet fed back by the server; The first interface is updated and displayed according to the second data packet.

2. The method according to claim 1, It is characterized in that After the step of receiving the second data packet fed back by the server, the method further comprises: The acceleration tag is added to the second data packet, and the second data packet is moved to the head of the second queue based on the acceleration tag, so that the second data packet is sent preferentially.

3. The method according to claim 1, It is characterized in that When the first application enters the startup phase, adding an acceleration tag to a first data packet generated by the first application includes: When the first application enters the startup phase, determining whether the first application is in a preset whitelist, whether the first application is in the foreground, and whether the first application has pulled up a cellular network; If the judgment results are all yes, adding an acceleration tag to the first data packet generated by the first application; Otherwise, the network acceleration for the first application is terminated.

4. The method according to claim 3, It is characterized in that The process of determining whether the first application is in the foreground and whether the first application has opened a cellular network includes: Monitoring the lifecycle events of the first application by implementing the Application.ActivityLifecycleCallbacks interface to identify whether the first application is in the foreground; The current network connection information is obtained through the ConnectivityManager object to identify whether the first application has launched a cellular network.

5. The method according to claim 3, It is characterized in that The field information of the preset whitelist includes serial number, application name, source port number, destination port number, whether acceleration is supported, socket ID and acceleration duration.

6. The method according to claim 5, It is characterized in that The process of constructing the preset whitelist includes: The power consumption ratio of all applications in the electronic device is obtained, and when the power consumption ratio is greater than a preset threshold, the corresponding application information is written into the preset whitelist.

7. The method according to claim 5, It is characterized in that The process of determining whether the first application is in a preset whitelist includes: Parsing the source port number of the first data packet, matching the first application corresponding to the source port number in the preset whitelist, and determining that the first application is in the preset whitelist if the match succeeds; In case of a matching failure, it is determined that the first application is not in the preset whitelist.

8. The method according to claim 1, It is characterized in that When the first application enters the startup phase, before the step of adding an acceleration tag to a first data packet generated by the first application, the method includes: A socket is created and a number of the socket is generated; wherein the first application corresponds to at least one socket, and the socket is used to add the acceleration tag to the data packet of the first application.

9. The method according to any one of claims 1 to 8, It is characterized in that The method further comprises: After the first application enters the startup phase on the electronic device for a preset time period, network acceleration of the first application is terminated.

10. The method according to claim 9, It is characterized in that The method further comprises: When the first application is switched to the background, the first application is disconnected from the cellular network, the first application is closed, or the process of the first application is killed, the network acceleration of the first application is terminated.

11. An electronic device, It is characterized in that The electronic device comprises: a memory and a processor, wherein the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the network acceleration method as described in any one of claims 1 to 10.

12. A computer-readable storage medium, It is characterized in that It comprises a computer program, and when the computer program is run on an electronic device, the electronic device executes the network acceleration method as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Webpage loading method, device and electronic equipment

    CN106874520A

  • Network acceleration method and device and storage medium

    CN110730102A

  • Resource loading method on display equipment and display equipment

    CN112836158A

  • Channel switching method, electronic equipment and storage medium

    CN113890905A

  • Network quality detection method and related electronic equipment

    CN116405960A