Network acceleration method and device

CN120036022APending Publication Date: 2025-05-23HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380073464.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-10-17
Filing Date
2023-08-24
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

After the user enters the elevator, the network signal is blocked, causing the quality of the device network to decline, causing Internet lag and affecting the user experience.

Method used

By predicting when the user enters the elevator, application data is cached in advance and the resolution or frame rate is reduced, switching to the cellular network to keep the network stable.

Benefits of technology

This effectively avoids Internet lag in the elevator and improves the user's network experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120036022A_ABST
    Figure CN120036022A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a network acceleration method and device, relates to the field of terminals, and can solve the problem that a user cannot access a network after entering an elevator. The method comprises the steps that the electronic equipment runs a first application; the electronic equipment predicts whether the user waits to enter the target elevator; if it is determined that the user waits to enter the target elevator, the first application of the electronic equipment conducts network acceleration processing, and the network acceleration processing comprises at least one of caching operation data of the first application in advance, reducing the frame rate of the first application, reducing the code rate of the first application or reducing the resolution of the first application.
Need to check novelty before this filing date? Find Prior Art

Description

Network acceleration method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on October 17, 2022, with application number 202211284598.2 and invention name “A Network Acceleration Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminals, and in particular to a network acceleration method and device. Background Art

[0003] With the rapid development of the internet, people are becoming increasingly dependent on it in their daily lives. People often use their spare time to surf the internet, such as watching short videos on social media apps while waiting for or riding an elevator.

[0004] However, when a user enters an elevator while surfing the Internet, due to the elevator's shielding effect on the network signal, the network signal (cellular network signal or wireless-fidelity (Wi-Fi) network signal) of the user's electronic device (for example, a mobile phone) will usually suddenly deteriorate or even be disconnected, causing the user's Internet access to be stuck, resulting in a poor user experience.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a network acceleration method and device, which can solve the problem of Internet access lag after a user enters an elevator.

[0007] In a first aspect, an embodiment of the present application provides a network acceleration method, which is applied to an electronic device, including: the electronic device runs a first application; the electronic device predicts whether a user is waiting to enter a target elevator; if it is determined that the user is waiting to enter the target elevator, the first application of the electronic device performs network acceleration processing, and the network acceleration processing includes at least one of caching the running data of the first application in advance, reducing the frame rate of the first application, reducing the bit rate of the first application, or reducing the resolution of the first application.

[0008] Based on the network acceleration method provided in the embodiment of the present application, while the user is waiting to enter the target elevator (i.e., the user is waiting near the elevator entrance), the foreground application (first application) can perform network acceleration processing, such as caching application data in advance and / or reducing the resolution, frame rate, bit rate, etc., to avoid the problem of Internet access lag after the user enters the elevator, so that subsequent users can continue to view related content of the first application while in the elevator (for example, continue to watch short videos, continue to watch movies, etc.).

[0009] In one possible implementation, an electronic device stores geofence data corresponding to at least one elevator, the geofence data including addresses of Wi-Fi access points connectable to the electronic device near the elevator and searchable Wi-Fi list information, the Wi-Fi list information including the address of at least one Wi-Fi access point. The electronic device predicts whether a user is waiting to enter a target elevator, including: obtaining target fence data from the geofence data corresponding to the at least one elevator, the address of the connectable Wi-Fi access point indicated by the target fence data being identical to the address of the Wi-Fi access point currently connected to the electronic device; obtaining current first Wi-Fi list information, the current first Wi-Fi list information including the addresses of Wi-Fi access points currently searchable by the electronic device; and determining that the user is waiting to enter the target elevator if the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the searchable Wi-Fi list information indicated by the target fence data meets a first condition. Specifically, the electronic device checks whether the address (BSSID) of the currently connected Wi-Fi access point corresponds to geofence data. If fence data (target fence data) exists for the BSSID corresponding to the connected Wi-Fi, the electronic device may perform a Wi-Fi information scan to obtain the current first Wi-Fi list information and compare the current first Wi-Fi list information with the searchable Wi-Fi list information indicated by the target fence data. If the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the searchable Wi-Fi list information indicated by the target fence data meets a first condition (for example, the number of identical Wi-Fi access point addresses is greater than 80%), then the Wi-Fi list information searched for by the user at the current location is highly similar to the Wi-Fi list information corresponding to the target elevator, indicating that the user is very close to the target elevator and is waiting to enter the target elevator (it is understood that Wi-Fi list information that is highly similar to the Wi-Fi list information corresponding to the target elevator can only be searched near the target elevator).

[0010] In one possible implementation, the Wi-Fi list information also includes the network signal strength of the corresponding Wi-Fi access point address. Before determining that the user is waiting to enter the target elevator, the following is also included: the number of matching Wi-Fi access points with the same Wi-Fi access point address meets the second condition, and the matching Wi-Fi access points are Wi-Fi access points with the same Wi-Fi access point address whose corresponding network signal strength difference is less than a first threshold. In this way, based on the number of identical Wi-Fi access point addresses and the number of Wi-Fi access points with a network signal strength difference less than the first threshold, it is possible to more accurately determine whether the user is waiting to enter the target elevator (i.e., whether the user has reached the elevator entrance), reducing errors.

[0011] In one possible implementation, the first condition is that the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the target fence data exceeds a second threshold, or the first condition is that the ratio of the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the target fence data to the total number of Wi-Fi access points in the target fence data exceeds a third threshold. The greater the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the target fence data, the greater the similarity between the Wi-Fi list information searched for at the user's current location (the current first Wi-Fi list information) and the Wi-Fi list information corresponding to the target elevator.

[0012] In one possible implementation, the second condition is that the number of matching Wi-Fi network access points exceeds a fourth threshold, or the second condition is that the ratio of the number of matching Wi-Fi network access points to the number of all Wi-Fi access points in the target fence data exceeds a fifth threshold. The greater the number of matching Wi-Fi network access points, the greater the similarity between the Wi-Fi list information searched for at the user's current location (the current first Wi-Fi list information) and the Wi-Fi list information corresponding to the target elevator.

[0013] In one possible implementation, at least one piece of fence data stored in the electronic device is pre-acquired through the following steps: when a user is determined to have entered or exited an elevator based on a change in acceleration, and the electronic device is connected to a Wi-Fi network, second Wi-Fi list information is collected when the user enters or exits the elevator; when the number of records in the second Wi-Fi list information exceeds a sixth threshold, all Wi-Fi access points with the same Wi-Fi access point address in the second Wi-Fi list information are selected as Wi-Fi access points corresponding to fence data for a geo-fence, and the network signal strength of the Wi-Fi access point corresponding to the fence data is the average of the network signal strengths of the Wi-Fi access points with the same address. In other words, the electronic device can generate fence data based on the information it has collected.

[0014] In one possible implementation, the at least one geofence data item stored in the electronic device is pre-acquired through the following steps: when a user enters or exits an elevator based on a change in acceleration, and the electronic device is connected to a Wi-Fi network, collecting second Wi-Fi list information when the user enters or exits the elevator; sending the second Wi-Fi list information to a server; and receiving at least one geofence data item from the server. Specifically, the electronic device can send the collected information to the server, which then generates the geofence data.

[0015] In one possible implementation, before obtaining target fence data from at least one fence data set, the method further includes: determining, based on the acceleration of the electronic device, that the user has transitioned from a moving state to a stationary state, and that the electronic device is connected to a Wi-Fi network. It is understood that when waiting for an elevator, a user typically transitions from walking to a stationary state. The electronic device can then determine the transition from a moving state to a stationary state based on the change in speed, triggering a prediction of whether the user is waiting to enter the target elevator, and further determining whether the user is waiting to enter the target elevator.

[0016] In one possible implementation, the method further includes: determining that the signal strength of the Wi-Fi network currently connected to the electronic device is less than a seventh threshold, and switching the currently connected Wi-Fi network to a cellular network. When the signal strength of the Wi-Fi network currently connected to the electronic device is less than the seventh threshold, it can be assumed that the elevator was shut down after the user entered the elevator, causing the signal strength of the currently connected Wi-Fi network to drop sharply. At this time, the electronic device can switch the application's data stream from the Wi-Fi network to the cellular network (the cellular network whose signal covers the corresponding elevator), ensuring that the user can access the Internet through the cellular network after entering the elevator, greatly reducing the probability of Internet access lag in the application, and better improving the user's Internet experience.

[0017] In one possible implementation, the electronic device includes a fence management module. The fence management module is configured to, when determining that a user enters or exits an elevator and the electronic device is connected to a Wi-Fi network, collect second Wi-Fi list information of the user entering or exiting the elevator; cluster and generate fence data for at least one geo-fence corresponding to the elevator based on the second Wi-Fi list information, or send the second Wi-Fi list information to a server and receive fence data for at least one geo-fence corresponding to the elevator from the server.

[0018] In one possible implementation, the electronic device also includes a perception module, and the method further includes: the perception module perceives that the first application is started, and queries whether the first application supports network acceleration; wherein the perception module includes an application configuration library, and the application configuration library stores information on whether multiple applications support network acceleration, and the multiple applications include the first application; wherein the multiple applications in the application configuration library are applications that require network acceleration based on user traffic consumption and user usage preferences for applications; or the multiple applications in the application configuration library are applications that require network acceleration based on user manual settings.

[0019] In one possible implementation, the electronic device also includes a decision module, and the method also includes: if it is determined that the first application supports network acceleration, the perception module sends a network quality assessment request to the decision module, and the network quality assessment request includes the application identifier of the first application, the configuration information of the application, and the network quality assessment standard, and the configuration information of the application includes the header characteristics of the data packet when the first application transmits the data stream.

[0020] In one possible implementation, the kernel layer of the electronic device also includes a traffic reporting module, and the method also includes: the decision module registers a message monitoring hook to the traffic reporting module, and the message monitoring hook is used to periodically detect the path of the network channel used by the first application, and monitor the communication parameters and statistical information of the data flow transmitted by the network channel used by the first application.

[0021] In one possible implementation, the electronic device further includes a traffic management module, and the method further includes: the traffic reporting module periodically reporting communication parameters and statistical information of the data flow of the first application to the traffic management module, the communication parameters including at least one of the protocol type, the source Internet Protocol IP address and port / destination IP address and port, and the message characteristics, and the statistical information including at least one of the round-trip delay RTT, the packet loss rate, the number of bytes sent and received, and the rate; the traffic management module periodically performing a network quality assessment based on the communication parameters and the statistical information to obtain a current quality of experience (QoE) measurement result; and the traffic management module periodically reporting the current QoE measurement result to the decision module.

[0022] In one possible implementation, if the QoE measurement result is jamming, the method further includes: the decision module reporting jamming information to the fence management module; after receiving the jamming information, the fence management module collects jamming fingerprint information, corrects Wi-Fi list information corresponding to at least one elevator based on the jamming fingerprint information, filters the Wi-Fi list information corresponding to the first elevator, the electronic device connects to the first Wi-Fi access point at the first elevator, the fence management module does not receive the jamming information reported by the decision module when the electronic device is connected to the first Wi-Fi access point, and the jamming fingerprint information includes the Wi-Fi list collected after receiving the jamming information.

[0023] In one possible implementation, the electronic device also includes a network acceleration service module, and the method also includes: the first application sends a registration request to the network acceleration service module, the registration request is used to request an elevator prediction service, so that the first application can sense whether the user has arrived at the elevator entrance and is waiting to enter the target elevator; the network acceleration service module sends a registration request to the perception module; and the perception module sends a registration request to the fence management module.

[0024] In one possible implementation, the method further includes: after the fence management module receives the registration request, if it is determined that the first application supports network acceleration, the first application is running in the foreground, and the first application has elevator prediction authority, the application information of the first application is recorded, and the registration result is sent to the perception module, and the registration result is successful; the perception module sends the registration result to the network acceleration service module; and the network acceleration service module sends the registration result to the first application.

[0025] In one possible implementation, the method further includes: a fence management module monitoring changes in the user's motion state; when determining whether the user enters or exits an elevator based on the change in the user's motion state, detecting whether there is a geo-fence corresponding to the elevator; if the geo-fence corresponding to the elevator is detected, determining that the user has arrived at the elevator entrance and is waiting to enter the target elevator; wherein the change in the user's motion state includes the user changing from a walking state to a stopped state and maintaining a relatively stationary state.

[0026] In one possible implementation, before detecting whether there is a geographic fence corresponding to the elevator, the method further includes: determining whether the current time is within a preset time period, where the preset time period is determined based on rush hour and commuting time.

[0027] In one possible implementation, the fence management module detects whether a geo-fence corresponding to an elevator exists in the surrounding area, including: checking whether a BSSID of a Wi-Fi access point currently connected to the electronic device has corresponding fence data; if the BSSID of the Wi-Fi access point currently connected to the electronic device corresponds to target fence data, the fence management module obtains current first Wi-Fi list information, where the current first Wi-Fi list information includes addresses of Wi-Fi access points currently searchable by the electronic device; and if the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the searchable Wi-Fi list information indicated by the target fence data meets a first condition, determining that a geo-fence corresponding to an elevator exists in the surrounding area.

[0028] In a possible implementation, the method further includes: the fence management module notifies the perception module of elevator events such as the user arriving at the elevator entrance; the perception module notifies the network acceleration service module of elevator events such as the user arriving at the elevator entrance; the network acceleration service module notifies the first application of elevator events such as the user arriving at the elevator entrance; the first application of the electronic device performs network acceleration processing, including: the first application receives elevator events such as the user arriving at the elevator entrance, and performs network acceleration processing.

[0029] In one possible implementation, the electronic device further includes a policy execution module and a path management module, and the method further includes: the fence management module determines that a user enters an elevator, and notifies the perception module of the user entering the elevator event; the perception module notifies the decision module of the user entering the elevator event; after the decision module receives the user entering the elevator event, the decision module sends a better path request to the path management module, and the better path request is used to request a network channel with better quality than the current network channel; the path management module activates and detects the network quality of each network channel, determines that there is a network channel with better quality than the current network channel, and notifies the decision module of the better network channel; the decision module instructs the policy execution module to switch the data stream of the first application to the better network channel; the policy execution module switches the data stream of the first application to the better network channel.

[0030] In one possible implementation, the method further includes: the fence management module detects that a user exits the elevator and notifies the perception module of the user exiting the elevator event; the perception module notifies the decision module of the user exiting the elevator event; and after the decision module receives the user exiting the elevator event, the decision module switches the data stream of the first application back to the Wi-Fi network.

[0031] In one possible implementation, when the first application switches to the background or is closed, the method also includes: the first application sends a deregistration request to the network acceleration service module, and the deregistration request is used to request to stop the elevator prediction service; the network acceleration service module sends a deregistration request to the perception module; the perception module sends a deregistration request to the fence management module; the fence management module stops the elevator prediction service of the first application and no longer notifies the first application whether the user has entered the elevator.

[0032] In a possible implementation, the method further includes: the perception module notifying the decision module to stop QoE measurement of the first application; the decision module notifying the policy execution module to stop QoE measurement of the first application; and the policy execution module stopping QoE measurement of the first application.

[0033] In a second aspect, the present application provides a computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device (such as a mobile phone), the electronic device executes the method described in the first aspect and any possible design thereof.

[0034] In a third aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the first aspect and any possible design thereof.

[0035] In a fourth aspect, embodiments of the present application provide a network acceleration device, comprising a processor coupled to a memory, the memory storing program instructions. When the program instructions stored in the memory are executed by the processor, the device implements the method described in the first aspect and any possible design thereof. The device may be an electronic device or a component of an electronic device, such as a chip.

[0036] In a fifth aspect, an embodiment of the present application provides a network acceleration device, which can be divided into different logical units or modules according to function, and each unit or module performs a different function, so that the device executes the method described in the first aspect and any possible design method thereof.

[0037] In a sixth aspect, the present application provides a chip system, which includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines.

[0038] The chip system described above can be applied to an electronic device including a communication module and a memory. The interface circuit is configured to receive a signal from the memory of the electronic device and transmit the received signal to the processor. The signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device can perform the method described in the first aspect and any possible design thereof.

[0039] It can be understood that the beneficial effects that can be achieved by the computer-readable storage medium described in the second aspect, the computer program product described in the third aspect, the devices described in the fourth and fifth aspects, and the chip system described in the sixth aspect provided above can refer to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] FIG1A is a schematic diagram of a network channel provided in an embodiment of the present application;

[0041] FIG1B is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0042] FIG2 is a schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;

[0043] FIG3 is a schematic diagram of a display provided in an embodiment of the present application;

[0044] FIG4 is another display diagram provided in an embodiment of the present application;

[0045] FIG5 is a schematic diagram of module interaction provided in an embodiment of the present application;

[0046] FIG6 is a schematic diagram of an elevator fence provided in an embodiment of the present application;

[0047] FIG7 is a schematic diagram of a process provided in an embodiment of the present application;

[0048] FIG8 is another schematic diagram of a process according to an embodiment of the present application;

[0049] FIG9 is another display diagram provided in an embodiment of the present application;

[0050] FIG10 is a schematic diagram of a message detection provided in an embodiment of the present application;

[0051] FIG11 is a schematic diagram of the rate characteristics of a data stream of a short video application provided in an embodiment of the present application;

[0052] FIG12 is a schematic diagram of the rate characteristics of a data stream of another short video application provided in an embodiment of the present application;

[0053] FIG13 is a schematic diagram of another elevator fence provided in an embodiment of the present application;

[0054] FIG14 is a schematic diagram of an electronic device performing different processing at different times provided by an embodiment of the present application. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the present application, unless otherwise specified, "at least one" means one or more, and "a plurality of" means two or more than two. In addition, in order to facilitate the clear description of the technical solutions in the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0056] To make the description of the following embodiments clear and concise, a brief introduction to the relevant concepts or technologies is first given:

[0057] Quality of Experience (QoE) refers to the end user's subjective perception of the performance of mobile network services. QoE can be used to quantitatively represent the end user's experience and feelings about services and the network, and reflects the gap between current service and network quality and user expectations.

[0058] From the perspective of mobile communication networks, the best solution for achieving better QoE is to provide excellent end-to-end quality of service (QoS). QoS, in a broad sense, is defined as "the combined effect of service performance that determines user satisfaction," encompassing a wide range of aspects across multiple dimensions. In a narrower sense, QoS refers to performance metrics for underlying packet data transmission, such as latency, jitter, bandwidth, and bit errors. QoS mechanisms primarily manage services and provide differentiated services from a network perspective, with network entities handling different services based on varying quality requirements. However, the end-user's experience of QoS is a broader and more subjective issue, encompassing the scope of QoE.

[0059] Hook function: A hook function is essentially a program segment that processes messages. Whenever a specific message is sent, before it reaches the destination window, the hook function captures the message, giving the hook function control. The hook function can process (modify) the message, pass it on without processing, or forcibly terminate message delivery.

[0060] Data stream: In the embodiments of this application, the data sequence transmitted between two electronic devices (for example, a mobile phone and an application server) is referred to as a data stream. A data stream can also be referred to as a service flow. In practical applications, based on the service scenario classification of data streams, data streams can include video streams, audio streams, download streams, conversation streams, etc.

[0061] Geofencing: Geofencing is the use of positioning system networks (e.g., the Global Positioning System (GPS) network, the Beidou Navigation Satellite System (BDS) network) and / or local radio frequency identifiers (e.g., Wi-Fi access points (Wi-Fi nodes), Bluetooth beacons) to create a virtual boundary around a specific location. This virtual boundary can be called a geofence. Geofencing can be paired with hardware / software applications so that the application can respond to the geofence in a certain manner based on program parameters.

[0062] In an embodiment of the present application, the specific location may be an elevator, that is, a virtual boundary may be created around the elevator, and the virtual boundary around the elevator is the geographic fence corresponding to the elevator (the geographic fence may be simply referred to as a fence). The fence corresponding to the elevator may be associated with applications such as video applications and game applications. Applications such as video applications and game applications may perform corresponding processing based on whether the electronic device is in the fence corresponding to the elevator. For example, when the electronic device is in the fence corresponding to the elevator, the video application may cache the video currently being played or the video to be played, reduce the resolution, and perform other operations; when the electronic device is not in the fence corresponding to the elevator, the video application may stop caching the video currently being played or the video to be played, restore the resolution of the video, and perform other operations.

[0063] Network channel: A channel for exchanging data between two electronic devices. For ease of description, a network channel established between an electronic device and another electronic device via a wireless network card can be referred to as a Wi-Fi network; a network channel established between an electronic device and another electronic device via a data service network card can be referred to as a cellular network.

[0064] Among them, wireless network cards are devices that support wireless local area network (WLAN) Internet access; data service network cards are devices that support mobile communication technologies such as long term evolution (LTE), fifth generation mobile communication technology (5G), global system for mobile communications (GSM), and general packet radio service (GPRS) Internet access.

[0065] In practice, the quality of network channels varies depending on the user's environment. For example, when a user is in a closed metal environment, such as an elevator, the metal door absorbs electromagnetic waves, causing significant attenuation of the Wi-Fi network signal. This can cause network lag and a poor user experience.

[0066] Taking a mobile phone as an example, the impact of the user's environment on network channel quality is explained. Referring to (a) in Figure 1A, a user is playing a game using game application A on their phone. Application A establishes a network connection with server A of application A through the phone's wireless network card. Data stream A generated between application A and server A (for example, the data stream generated during a game) is transmitted via the Wi-Fi network between the phone's wireless network card and the wireless router. When the user enters an elevator, the elevator shuts down, causing a sudden drop in the Wi-Fi network signal, which in turn reduces data stream A. This causes lag when the user uses application A, resulting in a poor user experience.

[0067] To solve the above problem, see (b) in Figure 1A, the mobile phone can switch data stream A to the cellular network between the mobile phone's data service network card and the base station, so as to transmit data stream A to server A through the cellular network, thereby reducing Internet access lag caused by a sudden drop in Wi-Fi network signal.

[0068] However, the aforementioned phone switches from Wi-Fi to cellular network after detecting the user entering an elevator using the phone's built-in accelerometer. This is because the phone determines whether to switch from Wi-Fi to cellular network based on the user's movement after entering the elevator and the elevator is in operation. For the user, the elevator door is already closed and in operation, reducing data flow A for application A and causing internet lag.

[0069] In view of this, an embodiment of the present application provides a network acceleration method. While the user is waiting near the elevator entrance, the operating system of the electronic device can notify the currently running application of the user waiting for the elevator event, so that the currently running application can pre-cache the application data and / or reduce the resolution and other processing according to the user waiting for the elevator event, so that the subsequent user can continue to view the relevant content of the application while in the elevator (for example, continue to watch short videos, continue to watch movies, etc.). Furthermore, at the moment the elevator door closes, the electronic device can switch the application's data stream from the Wi-Fi network to the cellular network, thereby ensuring that the user can still have a smooth Internet experience after entering the elevator, greatly reducing the probability of the application's Internet access being stuck, and better improving the user's Internet experience.

[0070] The network acceleration method provided in the embodiment of the present application can be applied to electronic devices. FIG1B is a schematic diagram of the structure of an electronic device 100 provided in the embodiment of the present application.

[0071] As shown in Figure 1B, 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, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0072] Among them, the sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0073] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0074] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

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

[0076] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0077] In some embodiments, the processor 110 may 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.

[0078] It is understood that the interface connection relationship between the modules illustrated in this embodiment is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0079] The charging management module 140 is configured to receive charging input from a charger. While charging the battery 142 , the charging management module 140 can also provide power to the electronic device through the power management module 141 .

[0080] 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 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160. In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.

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

[0082] 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 antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network.

[0083] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for 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), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via the antenna 1.

[0084] The modem 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- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs sound signals through an audio device (including but not limited to the speaker 170A, the receiver 170B, etc.) or displays images or videos through the display screen 194.

[0085] 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 that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0086] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include GSM, GPRS, code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), LTE, BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include GPS, global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).

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

[0088] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), a light-emitting diode (LED), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED).

[0089] The electronic device 100 can realize the shooting function through the ISP, camera 193, video codec, GPU, display screen 194 and application processor. The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture still images or videos. The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0090] The number of cameras 193 may be 1 to N. For example, the electronic device may include 2 front cameras and 4 rear cameras.

[0091] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[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. For example, files such as music and videos are saved in the external memory card. The internal memory 121 can be used to store computer executable program code, and the executable program code includes instructions. The processor 110 can execute various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 can execute instructions stored in the internal memory 121, and 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, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), 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.

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

[0094] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. The speaker 170A, also known as a "speaker," is used to convert audio electrical signals into sound signals. The receiver 170B, also known as a "handset," is used to convert audio electrical signals into sound signals. The microphone 170C, also known as a "microphone" or "microphone," is used to convert sound signals into electrical signals. The headphone jack 170D is used to connect wired headphones.

[0095] The buttons 190 include a power button, a volume button, etc. The buttons 190 can be mechanical buttons. They can also be touch buttons. The electronic device 100 can receive button inputs and generate key signal inputs related to the user settings and function controls of the electronic device 100. The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts or for touch vibration feedback. The indicator 192 can be an indicator light that can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or removing it from 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. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.

[0096] The methods in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure.

[0097] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. This embodiment of the present invention uses the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100. A layered architecture divides software into several layers, each with a clear role and division of labor. Layers communicate with each other via interfaces.

[0098] In some embodiments, as shown in FIG2 , the technical architecture of the electronic device 100 includes: an application layer, a service layer, a policy layer, and a kernel layer. It should be understood that FIG2 only shows some layers and some components (modules) related to the embodiments of the present application. In actual applications, layers and components not shown in FIG2 may also be included. Of course, only some of the components shown in FIG2 may also be included.

[0099] Among them, there are various applications in the application layer, such as video applications, game applications, etc.

[0100] The service layer includes a network acceleration service module, a perception module, a path management module, and a fence management module.

[0101] The network acceleration service module is the channel for applications to interact with the perception module. It can forward messages (e.g., registration requests) between the application and the perception module based on the Binder mechanism. Binder is an inter-process communication mechanism that enables communication between different processes.

[0102] The fence management module may include submodules such as elevator sensing, user status identification, fence data collection, a fence database, fence data generation, and fence data prediction (not shown in FIG2 ). The elevator sensing submodule is used to sense whether a user enters or exits an elevator. The elevator sensing submodule can notify the fence data collection submodule of user entry or exit events. The fence data collection submodule is used to collect information about the Wi-Fi network currently connected to the electronic device and a list of currently scannable Wi-Fi networks. The fence database is used to store data collected by the fence data collection submodule. The fence data generation submodule is used to generate fence data for at least one geofence based on the data collected by the fence data collection. The fence data for each geofence can correspond to the Wi-Fi network (BSSID) to which the user connected when entering or exiting the elevator. That is, the geofence corresponding to a particular elevator can be identified by the Wi-Fi network (BSSID) to which the user connected when entering or exiting the elevator. The user status identification submodule is used to identify changes in the user's motion state and motion stop state, thereby triggering the fence data prediction submodule to predict whether the user is waiting to enter the elevator. The fence data prediction submodule is used to predict whether the user has reached the elevator entrance and entered the elevator based on the Wi-Fi network to which the current electronic device is connected and the geo-fence data. When it is predicted that the user has reached the elevator entrance or entered the target elevator, the event of the user reaching the elevator entrance or entering the target elevator is reported to the perception module.

[0103] The perception module can detect various events in upper-layer applications. For example, it can detect application opening and exiting, applications switching to the foreground or background, and applications being installed and uninstalled. When the perception module detects an application opening or switching to the foreground, it can notify the lower-layer module (decision module) to enable data flow monitoring.

[0104] The path management module can be used to detect the status (on or off, etc.) of the Wi-Fi network and cellular network supported by the electronic device. As an example, if the electronic device is provided with a 2.4GHz band wireless network card 1 and a 5.0GHz band wireless network card 2. The path management module can detect whether the wireless network in the 2.4GHz band is on or off; it can also detect whether the wireless network in the 5.0GHz band is on or off. If 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 path management module 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.

[0105] The path management module is also used to evaluate the quality of network channels. For example, the path management module can evaluate the quality of Wi-Fi networks in the 2.4 GHz band and the 5.0 GHz band. It can also evaluate the quality of the cellular networks of operator A and operator B.

[0106] The path management module can also store the paths of multiple network channels. For example, it can store the paths of the network channel currently used by the application (for example, the primary network channel) and the backup network channel. The path management module can also be used to update the selection of network channels based on the policy changes of the decision module, trigger network channel quality detection, and dynamically select the optimal channel. The path management module can start the selected optimal channel, that is, convert the network channel from a dormant state to an awake state, and the awakened network channel can be used directly. The path management module can close non-optimal channels, that is, convert the network channel from an awake state to a dormant state, and the dormant network channel can be temporarily unavailable.

[0107] The strategy layer includes a traffic management module and a decision-making module.

[0108] The traffic management module is used to collect statistics on the data flows reported by the kernel layer and evaluate the network quality of each data flow.

[0109] The decision module can perform corresponding processing based on whether the user enters or exits the elevator. For example, when it is determined that the user has entered the elevator, the system acceleration strategy is executed, requesting a new network channel for optimization (for example, the application service can be switched from the Wi-Fi network to the cellular network). When it is determined that the user has exited the elevator, the application service is restored to the Wi-Fi network (that is, the application service is switched from the cellular network back to the Wi-Fi network).

[0110] The kernel layer contains a policy enforcement module and a traffic reporting module. The traffic reporting module collects and reports data flow information. The policy enforcement module switches network channels.

[0111] In another embodiment of the present application, a module (component) in the above embodiment can be split into two or more modules, or two or more modules at the same level can be merged into the same module.

[0112] For example, the path management module at the service layer can be split into a path detection module and a path control module. The path detection module can be used to detect the status and quality of the Wi-Fi and cellular networks supported by the electronic device. The path control module can be used to update the network channel selection based on policy changes in the decision module, trigger network channel quality detection, and dynamically select the optimal channel.

[0113] For ease of understanding, the network acceleration method provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0114] Before the operating system of the electronic device executes the network acceleration method, the user needs to enable the network acceleration function in advance. The following describes the UI interface and user operations for enabling the network acceleration function in advance.

[0115] For example, as shown in FIG3(a), the mobile phone displays desktop 201. In response to a user clicking on the settings app icon 202 on desktop 201, the mobile phone may display settings interface 203, as shown in FIG3(b). Settings interface 203 may include a WLAN option 204, as well as a search box and functional options such as personal account, Bluetooth, mobile network, desktop, and wallpaper. In response to a user clicking on the control corresponding to WLAN option 204, the mobile phone may display a WLAN interface 205, as shown in FIG3(c). WLAN interface 205 may include a WLAN switch 206. When WLAN switch 206 is turned on, it indicates that the mobile phone can connect to a WLAN for Internet access. WLAN interface 205 may also include a network acceleration option 207, as well as more WLAN setting options and a list of available WLANs. The list of available WLANs may include the names of multiple WLAN networks currently scanned by the mobile phone (e.g., HONOR1, HONOR2, HONOR3, etc.) and signal strength indicators. In response to the user clicking the control corresponding to the network acceleration option 207, as shown in (d) of FIG3 , the mobile phone may display a network acceleration interface 208. Network acceleration interface 208 may include a text description 209 of the network acceleration function. This description 209 indicates that the network acceleration function "evaluates the current network quality and intelligently uses WLAN and mobile data to improve the online experience. This process will connect to the network and consume some mobile data traffic." Optionally, if the user enables Honor Smart Capabilities, network acceleration will provide even more intelligent services. The user can click the link "Honor Smart Capabilities and Privacy Statement" to view a description of Honor Smart Capabilities. When Honor Smart Capabilities are enabled, the operating system can collect user phone usage habits and provide personalized services based on these habits. Network acceleration interface 208 may also include a switch 210 corresponding to network acceleration (LINK Trubo). When switch 210 is on, it indicates that the user agrees to enable the network acceleration function, allowing the phone to evaluate the current network quality and intelligently use WLAN and mobile data to improve the online experience. Of course, the user can choose to turn off switch 210, thereby disabling the network acceleration function. Below the switch 210, a text box 211 may be displayed. The text in the text box 211 is used to explain to the user the effect of the network acceleration function and the traffic usage. For example, after the network acceleration function is turned on, the download speed is increased by 35%, and 100M of traffic is used; the network freeze is reduced 40 times, and 40M of traffic is used. It should be noted that the network acceleration function may include a concurrent acceleration function 212 and a collaborative acceleration function 214. The concurrent acceleration function 212 includes a multi-channel download mode 213. The user can enter the setting interface of the multi-channel download mode through the control 217 to turn the multi-channel download mode on or off.When the multi-channel download mode 213 is turned on, when the electronic device is connected to WLAN and mobile network, multiple network channels can be used simultaneously for concurrent downloading to obtain a faster download experience. In (d) of Figure 3, the multi-channel download mode 213 is in a closed state. The collaborative acceleration function 214 includes a smart mode 215 and a custom mode 216. In the smart mode 215, applications that require network acceleration can be intelligently enabled based on the user's traffic consumption and application usage preferences. The user can turn the smart mode on or off through the control 218. In (d) of Figure 3, the control 218 is selected, and the smart mode is turned on. In the custom mode 216, the user can manually turn on applications that require acceleration (network acceleration). The user can turn the custom mode on or off through the control 219. When the control 219 in (d) of Figure 3 is not selected, the custom mode is turned off. When the user selects the smart mode 215 or custom mode 216 of the collaborative acceleration function 214, when the corresponding application (the application that requires network acceleration that is intelligently enabled in the smart mode 215, or the application that requires network acceleration that is manually selected by the user in the custom mode 216) is running in the foreground, if network lag occurs, the electronic device can switch the stuck network channel to a network channel with better communication quality to obtain a better Internet experience.

[0116] As shown in (a) of FIG4 , in response to the user selecting the control 219 to turn on the custom mode 216, as shown in (b) of FIG4 , the mobile phone can display information (icons, names, etc.) of various applications installed on the mobile phone and their corresponding switches. For example, the mobile phone can display WeChat Corresponding switches 221, QQ Corresponding switch 222, video application corresponding switch 223, TikTok The corresponding switch 224 and the music application corresponding switch 225, etc. Users can manually select the application to be accelerated according to their needs. For example, the user can turn on WeChat Corresponding switches 221, QQ Corresponding switch 222, video application corresponding switch 223, TikTok The corresponding switch 224 indicates that the user is using WeChat QQ Video apps and TikTok When using NFC, the phone needs to turn on network acceleration to ensure the user experience.

[0117] Referring to FIG5 , there is shown a timing diagram of a network acceleration method implemented based on the modules shown in FIG2 according to an embodiment of the present application. The timing diagram includes two parts: the first part is the process of generating the geographic fence corresponding to the elevator, including step 301a; the second part is the prediction of the user arriving at, entering, or exiting the elevator and the corresponding network acceleration process, including steps 301b-337.

[0118] 301a. The fence management module collects Wi-Fi information near the elevator entrance and clusters it to generate a fence corresponding to the elevator.

[0119] As can be understood, a fence is a geographical concept that can refer to a bounded geographical area. For example, see Figure 6, which is a schematic diagram of a fence corresponding to an elevator. The fence corresponding to the elevator covers the area surrounding the elevator. The elevators may be elevators frequently used by users. Frequently used elevators may include elevators near the user's residence (home), elevators near the user's office, and elevators near restaurants and supermarkets that the user frequently visits.

[0120] It is understandable that there are usually multiple fixed Wi-Fi access points around the elevator. For example, in a residential building with multiple households per elevator, there will be multiple Wi-Fi access points installed in the homes of multiple residents near the elevator entrance on a certain floor. The BSSIDs of the Wi-Fi access points installed in multiple households are different. For another example, in an office building, there will be multiple Wi-Fi access points near the elevator entrance on a certain floor. Among them, the BSSIDs of multiple Wi-Fi access points are different (for example, a company with a large area has installed multiple Wi-Fi access points (wireless access point (AP) or wireless router)). The company can set the SSIDs of multiple Wi-Fi access points to the same, but the BSSIDs of the multiple Wi-Fi access points are different). Referring to Figure 6, the fence corresponding to the elevator includes Wi-Fi access points such as AP1, AP2, AP3, AP4, and AP5. These Wi-Fi access points are Wi-Fi access points that can be scanned by electronic devices when users enter and exit the elevator.

[0121] Electronic devices can collect Wi-Fi information when a user enters and / or exits an elevator. Electronic devices can determine whether a user is entering or exiting an elevator based on data from sensors such as accelerometers. For example, if an accelerometer detects that the acceleration of the electronic device increases from zero and then decreases to zero, it can be determined that the user is in an elevator and is about to exit.

[0122] In some embodiments, the Wi-Fi information collected by the electronic device when a user enters or exits an elevator may include Wi-Fi information collected by the electronic device within a preset time (e.g., 10-30 seconds) before or after the user enters or exits the elevator. That is, the electronic device may cache the BSSIDs and signal strengths of Wi-Fi access points scanned within 10-30 seconds before or after the user enters or exits the elevator. The Wi-Fi information collected by the electronic device includes the addresses and signal strength information of the Wi-Fi access points to which the electronic device connected before or after the user enters or exits the elevator, as well as Wi-Fi list information scanned by the electronic device. The Wi-Fi list information scanned by the electronic device may include the address of at least one Wi-Fi access point scanned (searched) by the electronic device at the elevator entrance. Optionally, the Wi-Fi list may also include the signal strength of at least one Wi-Fi access point searched by the electronic device at the elevator entrance. Exemplarily, the address of the Wi-Fi access point may be a BSSID. The strength of the Wi-Fi network signal may be a received signal strength indication (RSSI). Optionally, the Wi-Fi list may also include information such as the power-on time of the electronic device and the center frequency of the Wi-Fi signal, which is not limited in this application.

[0123] In order to more accurately represent the actual geographical location of the target elevator, the embodiment of the present application can generate geo-fence data by collecting Wi-Fi list information multiple times, such as the embodiment shown in Figure 7. As shown in Figure 7, at least one fence data stored in the electronic device is pre-acquired through the following steps:

[0124] S1. When it is determined based on the change state of acceleration that the user enters / exits the elevator and the electronic device is connected to a Wi-Fi network, Wi-Fi list information is collected.

[0125] It is understandable that the electronic device may collect Wi-Fi list information each time the user enters / exits the elevator, and may collect multiple Wi-Fi list information within a period of time (eg, one week, two weeks, one month).

[0126] In one possible design, the BSSID of the Wi-Fi network connected when the user enters or exits an elevator can be used as the identifier of the geofence corresponding to that elevator, thereby distinguishing the geofences corresponding to different elevators. For example, in an application scenario where a user takes an elevator up or down the stairs at home, the BSSID of the Wi-Fi network connected to the electronic device at home can be used as the identifier of the geofence for the target elevator at the residence. For another example, in an application scenario where a user takes an elevator up or down the stairs at the office, the BSSID of the Wi-Fi network connected at the office can be used as the identifier of the geofence for the target elevator corresponding to the office.

[0127] S2. When the number of Wi-Fi lists collected when the electronic device is connected to the same Wi-Fi access point exceeds a preset threshold, the electronic device selects Wi-Fi access points with the same address from these Wi-Fi lists (all Wi-Fi lists collected when the electronic device is connected to the same Wi-Fi access point), and obtains fence data of the geographic fence corresponding to the elevator based on the information of the Wi-Fi access points with the same address.

[0128] Optionally, the preset threshold may be 2, 3, 4 or a larger value, which is not limited in the embodiments of the present application.

[0129] It can be understood that the Wi-Fi list collected when the electronic device is connected to the same Wi-Fi access point may refer to the Wi-Fi list information collected when the user enters and exits the elevator at different times when the electronic device is connected to the same Wi-Fi access point (for example, the Wi-Fi access point of the residence).

[0130] Taking BSSID representing the address of a Wi-Fi access point and RSSI representing the Wi-Fi network signal strength as an example, records of a Wi-Fi list collected when an electronic device is connected to the same Wi-Fi access point are exemplified.

[0131] Referring to Table 1, the Wi-Fi list information recorded each time the electronic device enters or exits an elevator may include the BSSID and RSSI of the Wi-Fi access point to which the electronic device was connected when the user entered or exited the elevator, as well as the BSSID and RSSI of the Wi-Fi access point searched by the electronic device at that time. Optionally, the Wi-Fi list information recorded each time the electronic device enters or exits the elevator may also include a timestamp of the user's entry or exit.

[0132] Table 1

[0133] For example, with a preset threshold of 2, when the number of records in the Wi-Fi list exceeds 2, the electronic device selects a Wi-Fi access point with the same address in the two Wi-Fi lists. For example, in Table 1, the BSSIDs with the same address between the first record and the second record are 6c:16:32:17:3c:95, 6c:16:32:17:3c:51, and 6c:17:32:27:2c:92. Therefore, the addresses of the Wi-Fi access points in the generated fence data are 6c:16:32:17:3c:95, 6c:16:32:17:3c:51, and 6c:17:32:27:2c:92, as shown in Table 2.

[0134] Furthermore, fence data can be generated by averaging the signal strengths of Wi-Fi access points with the same address. As shown in Table 1, the RSSIs for the Wi-Fi access point with BSSID 6c:16:32:17:3c:95 are -50dBm and -48dBm, respectively. The average of these values ​​is -49dBm. As shown in Table 2, the fence data includes the RSSI of -49dBm for the Wi-Fi access point with BSSID 6c:16:32:17:3c:95. Similarly, the RSSI of -61dBm for the Wi-Fi access point with BSSID 6c:16:32:17:3c:51 and -71dBm for the Wi-Fi access point with BSSID 6c:17:32:27:2c:92.

[0135] Table 2

[0136] The method provided in an embodiment of the present application generates fence data for an elevator (e.g., a residential elevator) by taking the intersection of records of Wi-Fi list information collected when a user enters and exits the same elevator (e.g., a residential elevator) at different times and calculating the average network signal strength. This can make the generated fence data closer to the actual geographic location of the elevator (e.g., a residential elevator), thereby improving the accuracy of the electronic device's prediction of whether a user is waiting to enter the elevator.

[0137] In another possible design, as shown in FIG8 , the process of an electronic device generating fence data for a geo-fence corresponding to an elevator (i.e., fence data corresponding to the elevator) may include: the electronic device obtaining Wi-Fi information collected when a user enters or exits the elevator; classifying a Wi-Fi list (i.e., a Wi-Fi list scanned by the electronic device when entering or exiting the elevator) according to the BSSID to which the electronic device connects when the user enters or exits the elevator (i.e., the BSSID of the Wi-Fi access point connected when the electronic device enters or exits the elevator), thereby obtaining multiple Wi-Fi lists corresponding to each of the multiple BSSIDs connected when the user enters or exits the elevator. The signal strength of each Wi-Fi access point in each of the multiple Wi-Fi lists collected when the electronic device connects to the same BSSID may be converted into a distance, and the distances corresponding to Wi-Fi access points with the same address in the multiple Wi-Fi lists may be averaged to obtain List A. The multiple Wi-Fi lists collected when the electronic device connects to the same BSSID may be collected within a recent period (e.g., the last 7 days, the last 14 days, etc.). Wi-Fi access points in List A are filtered (eliminated) based on a preset distance to obtain List B. List B is the fence data. In other words, when the distance corresponding to a Wi-Fi access point in List A is greater than the preset distance, the Wi-Fi access point is discarded and List B is obtained. The distance corresponding to each Wi-Fi access point in List B is not greater than (less than or equal to) the preset distance. In this way, the range of the fence generated subsequently can be more accurate. Then, the collected Wi-Fi list can be used to match List B, that is, List B is verified for validity. When the similarity between the data in the Wi-Fi list and the fence data represented by List B (including the similarity of BSSID and distance) meets the preset conditions (for example, the similarity reaches 80%), the fence data represented by List B is considered valid, that is, List B can be used to represent the fence data of the elevator.

[0138] Based on the above method, the electronic device can create a fence corresponding to at least one elevator. For example, the electronic device can create a fence corresponding to an elevator near the user's residence (home), a fence corresponding to an elevator near the user's office, a fence corresponding to an elevator near a restaurant or supermarket that the user frequently visits, and so on.

[0139] In some embodiments, the electronic device can send the collected Wi-Fi list information to a server (cloud server), and the server generates fence data based on the Wi-Fi list information collected by the electronic device. The process of the server generating fence data can refer to the process of the electronic device generating fence data above. The electronic device can receive the fence data from the server and store it.

[0140] In one possible design, the server can receive Wi-Fi list information reported by multiple electronic devices at the same elevator, select Wi-Fi access points with the same address from these Wi-Fi lists (all Wi-Fi lists collected when multiple electronic devices connect to the same Wi-Fi access point), and generate fence data for the geographic fence corresponding to the elevator based on the information of the Wi-Fi access points with the same address, so that the generated fence data is more accurate.

[0141] 301b. In response to the user opening application A, application A starts.

[0142] Application A is an application program in the application layer, such as a video application. In response to a user opening Application A, Application A starts up, and the electronic device displays the relevant interface of Application A. At this time, Application A is the foreground application, meaning that the program code of Application A is running on the CPU.

[0143] Taking application A as an example, as shown in FIG9(a), in response to a user clicking on the game application icon 402 on the desktop 401, the video application is launched, and the mobile phone may display the main interface of the video application. In response to the user selecting a video to play on the main interface of the video application, the mobile phone may display the video playback interface 403, as shown in FIG9(b). Video playback interface 403 may include controls such as a display window for the currently playing video, a media title, and an episode selection button.

[0144] Alternatively, step 301b may be that application A switches from the background to the foreground, and at this time, application A is still the foreground application.

[0145] 302. The perception module perceives that application A is started and queries whether application A supports network acceleration.

[0146] Exemplarily, the perception module can monitor the current foreground application (for example, application A) through functions such as RunningProcess, ActivityLifecycleCallbacks, and UsageStatsManager, and obtain the identifier of the foreground application. Alternatively, if the terminal device is an Android system, the current foreground application can be monitored through the accessibility function that comes with Android, and the identifier of the foreground application can be obtained. Alternatively, if the terminal device is a Linux system, the process information stored in the / proc directory of the Linux system kernel can be read to monitor the current foreground application and obtain the identifier of the foreground application. The specific judgment process can refer to the existing technology and will not be described here. Among them, the application identifier is used to uniquely identify an application, and can have a one-to-one correspondence with the application package name, or the application package name can be used.

[0147] The perception module may include an application configuration library, which stores information on whether multiple application programs support network acceleration, including application A. Table 3 shows exemplary information on whether some application programs support network acceleration.

[0148] Table 3

[0149] Alternatively, the application configuration library may only store information about applications that support network acceleration. As shown in Table 4, information about some applications that support network acceleration is exemplified.

[0150] Table 4

[0151] In actual applications, the application configuration library can also store multiple application identifiers, each of which uses a different character to indicate whether the application supports network acceleration. As an example, "1" can be used to indicate support for network acceleration, and "0" can be used to indicate non-support for network acceleration. Other methods for determining whether an application supports network acceleration are not listed here.

[0152] In one possible implementation, as shown in (d) in FIG3 , if the user selects the intelligent mode 215 of the collaborative acceleration function 214 , multiple applications in the application configuration library may be intelligently determined to be applications requiring network acceleration based on user traffic consumption and application usage preferences.

[0153] In another possible implementation, as shown in FIG4 (a), if the user selects the custom mode 216 of the collaborative acceleration function, multiple applications in the application configuration library can be applications that require network acceleration based on the user's manual settings. For example, as shown in FIG4 (b), if the user opens WeChat Corresponding switches 221, QQ Corresponding switch 222, video application corresponding switch 223, TikTok Corresponding to switch 224, multiple applications in the application configuration library may include WeChat QQ Video apps and TikTok

[0154] 303. If it is determined that application A supports network acceleration, the perception module sends a network quality assessment request to the decision module.

[0155] If the perception module determines that application A supports network acceleration by querying the application configuration library, it can send a network quality assessment request to the decision module. After receiving the network quality assessment request, the decision module can execute step 304.

[0156] The network quality assessment request is used to request the decision module to perform a network quality assessment. The network quality assessment request may include an application identifier, application configuration information, and network quality assessment criteria. Application configuration information refers to the message characteristics of the application when performing services. Message characteristics are the header characteristics of data packets transmitted by the application.

[0157] Alternatively, the perception module perceives that application A switches to the foreground and can notify the decision module. The decision module can query the application configuration library to determine whether application A supports network acceleration. If it is determined that application A supports network acceleration, step 304 can be executed.

[0158] 304. The decision module registers a message monitoring hook with the traffic reporting module of the kernel layer.

[0159] The message monitoring hook can periodically detect the path of the network channel currently used by application A, and monitor the communication parameters and statistical information of the data flow transmitted by the network channel used by application A.

[0160] When implementing a certain function, application A may generate one or more data flows. If multiple data flows are detected, the communication parameters and statistical information of each data flow of application A can be periodically detected.

[0161] The following describes in detail how the message monitoring hook monitors the communication parameters and statistical information of the data flow of application A, and sends the monitored communication parameters and statistical information of the data flow to the traffic management module.

[0162] The electronic device system contains a Netfilter component (a hook function management component) that can be used to obtain the data stream of an application (e.g., Application A) corresponding to a specific application identifier. The traffic reporting module can obtain the data stream packets of Application A by calling the Netfilter component. In specific implementations, the information reported by the traffic reporting module to the traffic management module includes not only the data stream packets of Application A but also certain communication parameters and statistical information of the data stream packets of Application A.

[0163] 10 , the traffic reporting module can pre-register a message monitoring hook (e.g., nf_hook hook function). After the traffic reporting module calls the Netfilter component, the Netfilter component reports the message of the data flow of application A. After receiving the message of the data flow reported by the Netfilter component, the traffic reporting module calls the pre-registered nf_hook hook function.

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

[0165] When parsing a message, the message can be checked for an application identifier and its four-tuple (or five-tuple) to obtain the parsing result. If an application identifier is present, the application corresponding to the message can be determined. The four-tuple includes the source IP address, destination IP address, source port, and destination port; the five-tuple includes the source IP address, destination IP address, source port, destination port, and protocol number. Furthermore, the message (data packet) itself also carries header features. The four-tuple (or five-tuple) of a data stream message and the message header features and other parameters can be collectively referred to as the communication parameters of the data stream.

[0166] After parsing the message, the flow table is queried based on the parsing results and its statistical information is updated. The flow table stores the identification information of the data flow in each application, as well as the total number of messages, the number of bytes sent and received (including the number of bytes received and sent), the number of error packets, and so on for each data flow. Furthermore, whether there is a downlink response can be determined based on the total number of messages. For example, if the total number of messages received in two consecutive cycles is the same, then a downlink response is determined. The transmission rate can be determined based on the number of bytes sent and received. For example, the ratio of the difference between the number of bytes received in the previous cycle and the current cycle to the cycle is the downlink rate for the current cycle. The packet loss situation can be determined based on the sequence number carried in the message. For example, the packet loss rate (loss tolerance or packet loss rate) can be the ratio of the number of missing sequence numbers to the number of existing sequence numbers. Of course, the above parameter determination method is for example only. In actual applications, the above parameters can also be determined by other methods. Information such as the total number of messages, the number of error packets, the packet loss rate, the number of bytes sent and received, and the rate (uplink rate, downlink rate) of a data flow can be collectively referred to as the statistical information of the data flow. In practical applications, the statistical information of each flow may also include other information, such as traffic distribution information of the data flow that changes over time, delay information of packets in the data flow, etc.

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

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

[0169] As an example, the filtering process can be filtering heartbeat packets in a data stream. After filtering, the heartbeat packets in the data stream are obtained. The filtering process can be based on pre-set characteristics and retain messages that meet the characteristics. In other words, messages that meet the pre-set characteristics are filtered messages.

[0170] Wherein, heartbeat packet message is the message that is present in data stream according to certain time interval.There is fixed feature (such as 0x64 or 0x65) in the heartbeat packet message at fixed position (such as the 6th byte).Because this heartbeat packet message is the message that exists according to certain time, therefore can calculate and obtain time delay (such as, mobile phone sends heartbeat request message to server and starts, till mobile phone receives the heartbeat response message that server feeds back, the time of total experience) based on this heartbeat packet message.

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

[0172] As another example, the filtering condition may also include: selecting and retaining data packets of a specific length. In a specific implementation, it is determined whether the length of the data packet is a preset specific length. If so, the packet is retained; if not, the packet is filtered out.

[0173] After the above processing, the filtered partial messages are stored in socket buffer (SKB) queues.

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

[0175] If the report is immediate, a specific thread in the traffic reporting module checks the queue in a timely manner and reports the messages in the queue to the traffic management module in a timely manner.

[0176] If reporting is done periodically, a timer is set in the traffic reporting module. 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 management module.

[0177] Of course, in actual applications, some packets in the data flow stored in the SKB queue need to be reported immediately, while others require periodic reporting. Similarly, a dedicated thread in the traffic reporting module promptly checks the queue and reports packets that require immediate reporting to the traffic management module. The traffic reporting module also has a timer that periodically checks the SKB queue based on the timer's set timer and reports packets that require periodic reporting to the traffic management module.

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

[0179] Based on the above understanding, the traffic reporting module does not report all packets sent by the Netfilter component to the traffic management module. Instead, it reports packets that meet specific characteristics (which may carry communication parameters and statistical information of these packets) to the traffic management module. It also reports the communication parameters and statistical information related to these packets.

[0180] As an example, if both message 1 and message 2 belong to the same data flow. When the flow table is checked after receiving message 1, the statistical information about the data flow in the flow table is updated based on 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 management module. When the flow table is checked after receiving message 2, the statistical information about the data flow in the flow table is updated based on 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 management module. That is, although some messages are reported, the statistical information is obtained based on all messages under the data flow.

[0181] 305. The traffic reporting module periodically reports the communication parameters and statistical information of the data flow to the traffic management module.

[0182] The communication parameters of a data flow may include the protocol type, source IP address and port / destination IP address and port, message characteristics, and message information (payload). The protocol type refers to the protocol type used when the application transmits the data flow, the source IP address and port refer to the IP address and port used when sending the data flow, the destination IP address and port refer to the IP address and port used when receiving the data flow, and the message characteristics refer to the header characteristics of the data packet used when the application transmits the data flow. The communication parameters of a data flow may be obtained from the four-tuple or five-tuple of the data flow's message.

[0183] For 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. The UDP protocol is used to transmit the data packet, and the source IP address and port are 221.11.6.XX and 8080 respectively, and the destination IP address and port are 221.14.4.XX and 5050 respectively.

[0184] Statistical information of data streams can include round trip time (RTT), packet loss rate, number of bytes sent and received, rate (uplink rate, downlink rate), etc. Among them, the number of bytes sent and received includes the number of bytes sent (i.e., upload traffic) and the number of bytes received (i.e., download traffic). The packet loss rate is the ratio of the number of lost data packets to the number of data packets sent. The uplink rate is the rate at which the data stream is sent, and the downlink rate is the rate at which the data stream is received. RTT refers to the total time from the time the electronic device (sender) sends data to the time it receives confirmation from the other end (receiver) (the other end sends confirmation immediately after receiving the data).

[0185] For example, when a social communication application conducts an audio or video call, the number of bytes sent and received is 10MB / 8MB respectively, the uplink and downlink rates are 200kbit / 180kbit respectively, and the RTT is 50ms.

[0186] Of course, in actual applications, the traffic reporting module can also report other parameters of the application network message to the traffic management module, such as flow interval time, packet interval time, packet size and traffic distribution information, which is not limited in this application.

[0187] Optionally, the traffic reporting module may report the communication parameters and statistical information of the above-mentioned application network message through one message, or may report the communication parameters and statistical information of the application network message separately through multiple messages, which is not limited in this application.

[0188] 306a. The traffic management module periodically performs network quality evaluation based on the communication parameters and statistical information of the data flow to obtain a current QoE measurement result.

[0189] After the traffic management module receives the communication parameters and statistical information of the data flow of application A, it can query the flow feature library of application A. For example, it can identify the business scenario of the application running in the foreground based on the protocol type, port, message protocol header and other features of the message (for example, identify the short video playback scenario of Tik Tok) and record it in the flow table. Among them, the flow feature library of application A stores various information about the data flow of application A, such as the protocol characteristics of the protocol used by application A when using the current network, the header characteristics of the data packets transmitted when application A uses the current network, etc. Of course, it can also include the traffic characteristics when application A uses the current network, etc., which are not limited here.

[0190] The traffic management module can regularly perform QoE evaluations on the data flows of foreground applications. In practical applications, the QoE evaluation conditions corresponding to different applications can be the same or different. Specifically, a QoE evaluation condition can refer to a condition that must be met by the statistical information of the data flow over several consecutive periods. The QoE evaluation conditions corresponding to different business scenarios of the same application can be the same or different. For example, the QoE evaluation conditions for the battle scenario and the running map scenario of a gaming application can be different. Another example is that the QoE evaluation conditions for the video selection scenario, video playback scenario, and small window playback scenario of a video application can be different. Designing different QoE evaluation conditions based on different business scenarios can make QoE evaluation more accurate. Different business scenarios can be distinguished by communication parameters. If the conditions met by the communication parameters are different, the corresponding business scenarios are also different. The same business scenario of the same application can correspond to one or more QoE evaluation conditions. Each QoE evaluation condition corresponds to a QoE measurement result (also referred to as a QoE evaluation result). Multiple QoE evaluation conditions can correspond to the same QoE measurement result. When any of the multiple QoE evaluation conditions is met, the same QoE measurement result can be obtained.

[0191] Honor of Kings For example, King of Glory The QoE evaluation condition corresponding to the battle scene can be to evaluate the jamming of the battle according to the packet loss rate and / or delay conditions. For example, if the packet loss rate in the battle scene meets the condition of 20% packet loss for 2 consecutive times within 3 seconds, and / or the delay of the battle scene meets the condition of 200ms for 2 consecutive times within 4 seconds, it can be considered that King of Glory is not good. The QoE measurement result of the battle scene is poor, that is, lag occurs during the battle.

[0192] Exemplarily, the QoE measurement results may include: excellent (smooth without lag), medium (possible lag), and poor (lag). For example, the QoE measurement result of excellent may be marked as 00, the QoE measurement result of medium may be marked as 10, and the QoE measurement result of poor may be marked as 11.

[0193] As shown in Table 5, the current business scenarios of applications running in the foreground can be differentiated based on the conditions met by the communication parameters of the data flow. Furthermore, the QoE measurement results for each business scenario can be determined based on the different QoE evaluation conditions corresponding to each business scenario. When the communication parameters and statistical information of the application's data flow meet different conditions, the QoE measurement results will be different.

[0194] Table 5

[0195] Among them, com.tencent.mm in Table 5 is WeChat Package name, com.tencent.tmgp.sgame is Honor of Kings Package name. An entry in Table 5 indicates that when the communication parameters and statistical information of the application's data flow meet the corresponding conditions, the corresponding QoE measurement results can be obtained. For example, King of Glory If a data stream uses the UDP protocol, any port, and a 0x10 packet header, and the data stream has a latency of more than 150ms for three consecutive cycles within five cycles (the statistical period), or a packet loss rate of more than 20% for three consecutive cycles within four cycles, the QoE measurement result is poor.

[0196] Table 5 lists only the QoE evaluation conditions (including the conditions that the communication parameters and statistical information of the data flows must meet) and QoE measurement results for data flows of some applications. This is for illustrative purposes only. In actual applications, other different QoE evaluation conditions can also be used to obtain QoE measurement results.

[0197] In some cases, the QoE measurement results obtained based on Table 5 may be misjudged. For example, when a user uses a short video application, if the user swipes to a short video, the short video application begins to download the short video through the network channel and caches the data frames of the short video that have been downloaded. Then, the data frames of the short video are retrieved from the cache and start playing. If the playback time of the short video is 15 seconds, the download rate per unit time will increase rapidly from the time the user swipes to the short video to the second second; from the second to the fifth second, the download rate per unit time will quickly decrease to 0; from the fifth second to the end of the playback at the 15th second, the download rate per unit time will remain at 0.

[0198] Using the conditions in Table 5 above, if the latency of the video application data stream exceeds 350ms for multiple consecutive periods or the downlink rate (average) is less than 51kb / s for multiple consecutive periods, the QoE measurement result of the data stream is poor. In the above example, if the rate (average) is 0 for multiple consecutive periods from the 5th to the 15th second, it may be determined that the current data stream is experiencing lag, that is, the transmission quality on the current network channel is poor.

[0199] However, in a specific application, during the period from the 5th to the 15th second, the network quality of the network channel where the data stream of the application is located is not poor. It is just that there is no current need to download the data stream from other electronic devices, so the rate is 0 for multiple consecutive periods. In view of this, the embodiment of the present application provides another method for evaluating the QoE measurement results of short video applications. The data stream of short video applications is characterized as follows: it uses the HTTP protocol, requests video content from the server via GET, and the GET data packet carries the MP4 field.

[0200] Figure 11 shows the data stream rate characteristics of a short video application when the network channel quality is good, as provided in an embodiment of the present application. The video stream rate is distributed periodically, with each period consisting of a period where the rate is non-zero and a period where the rate is zero.

[0201] For example, in Figure 11, the rate distribution of the video stream includes a first time period, a second time period, and a third time period. The rates in the first and third time periods are not zero, and the rate in the second time period is zero. The average rate of the first portion of the first time period is greater than the first value, indicating that the transmission quality of the video stream meets the requirements and there is no need to improve network quality. The electronic device transmits the video stream through the first network interface card during the third time period.

[0202] Referring to FIG12 , the rate distribution of the video stream may further include: a fourth time period, a fifth time period, and a sixth time period, wherein the rates of the fourth and sixth time periods are not zero, and the rate of the fifth time period is zero. If the average rate of the second portion of the fourth time period is less than or equal to the first value, it indicates that the transmission quality of the video stream does not meet the requirements and the network quality needs to be improved. The electronic device transmits the video stream through the second network card of the electronic device in the sixth time period. To unify the evaluation criteria, the duration of the second portion may be set equal to the duration of the first portion.

[0203] In order to make the evaluation criteria more accurate when the rate is 0, the end time of the first part of the first time period can be set to be the same as the end time of the first time period, and the end time of the second part of the fourth time period can be set to be the same as the end time of the fourth time period.

[0204] Based on the rate characteristics shown in Figure 11 and Figure 12, it can be understood that the case where the rate is 0 is relatively special. When evaluating the transmission quality of the video stream of short video applications, the case where the rate is 0 needs to be considered separately.

[0205] Within a period of time in which the rate is not zero, a portion of time can be selected from the period (for example, the same length as the first portion) and recorded as a seventh time period. If the average rate of the seventh time period is determined to be less than or equal to the first value, the electronic device transmits the video stream through the second network card in an eighth time period, wherein the start time of the eighth time period is the end time of the seventh time period. Of course, if the average rate of the seventh time period is determined to be greater than the first value, the electronic device transmits the video stream through the first network card in the eighth time period.

[0206] In a specific implementation, the case where the rate is 0 and the case where the rate is not 0 can be considered separately. In this embodiment of the present application, the rate represents the average downlink rate of the video stream within the average period (for example, 300ms, 400ms, 500ms, 600ms, 700ms, etc.).

[0207] The average rate does not have a value of 0: if the average rate over multiple averaging periods (e.g., 2, 3, 4, 5, etc.) is small, the data stream transmission quality is poor. Of course, if the average rate over one averaging period is small, the data stream transmission quality is poor.

[0208] When the average rate reaches 0: If the average rate reaches 0 due to network issues, the average rate usually begins to decrease before it reaches 0 (in specific implementations, the average rate over a period of time can be used, with the end time of the period being the time when the rate reaches 0). In this case, transmission quality improvement is required. If the average rate reaches 0 due to the expiration of the cache of the currently playing short video, the average rate is usually still high before it reaches 0, and in this case, transmission quality improvement is not required. Therefore, when the average rate reaches 0, it is necessary to trace back to the average rate of the averaging period before the averaging period in which the average rate first reached 0 (the last averaging period with a non-zero rate). In specific implementations, the average rate of the period in which the average rate reaches 0 can be extended to the average rate of the previous averaging period (the last averaging period with a non-zero rate). Of course, it is also possible to use the average rate of the previous averaging period for each occurrence of the average rate reaching 0. If the average rate is low over multiple averaging periods, the transmission quality of the data stream is poor.

[0209] In view of the above description, the average rate of multiple averaging periods can be set as a reference. First, the periodic transmission quality of the current averaging period is determined based on the average rate of a single averaging period (which can be recorded as the first period). Then, the data stream transmission quality of the current data stream is determined based on the periodic transmission quality of multiple averaging periods.

[0210] When determining the periodic transmission quality of a single mean period, if the average rate is not 0, then when the average rate is less than or equal to threshold A (which may be equal to the first value or may not be equal to the first value), the periodic transmission quality of the current mean period can be determined to be poor; when the average rate is greater than threshold A, the periodic transmission quality of the current mean period can be determined to be excellent. If the average rate is 0, when the average rate of the previous mean period is continued, it is equivalent to continuing the periodic transmission quality (poor or excellent) of the previous mean period. Therefore, when the periodic transmission quality of the previous mean period is poor, it is considered that the periodic transmission quality of the current mean period is also poor, and when the previous mean period is excellent, it is considered that the periodic transmission quality of the current mean period is also excellent. The embodiment of the present application does not limit whether the periodic transmission quality of the previous mean period or the rate of the previous mean period is continued when the average rate is 0. Of course, in practical applications, when the average rate is 0, it can also be determined based on the periodic transmission qualities of multiple past average periods (eg, 3, 5, 7, etc.), for example, based on the mode of the identifiers of the multiple average period transmission qualities.

[0211] In summary, the results of the periodic transmission quality for a single averaging period include the following:

[0212] Excellent: The average speed of the current averaging period is greater than or equal to threshold A (for example, 50 kb / s); or, the average speed is equal to 0, and the periodic transmission quality of the previous averaging period is excellent.

[0213] Poor: The average speed is less than threshold A and is not equal to 0; or, the average speed is equal to 0 and the periodic transmission quality of the previous averaging period is poor.

[0214] After determining the periodic transmission quality of each averaging period, the periodic transmission quality of the current averaging period and the M-1 consecutive averaging periods before the current averaging period can be checked. If the periodic transmission quality of at least N averaging periods in the M consecutive averaging periods is poor, the data stream transmission quality is determined to be poor. Where N is less than or equal to M. If the periodic transmission quality of less than N averaging periods is poor, the data stream transmission quality is determined to be excellent.

[0215] 306b. The traffic management module periodically reports the current QoE measurement result to the decision module.

[0216] It should be noted that after Application A is started, the traffic reporting module can periodically monitor the network quality of the network used by Application A and periodically report the communication parameters and statistical information of the application network packets. The traffic management module periodically performs network quality assessment based on the communication parameters and statistical information of the application network packets to obtain QoE measurement results and periodically notifies the decision module of the current QoE measurement results until Application A is shut down.

[0217] That is to say, during the startup of application A (or during foreground operation), the traffic reporting module has been periodically detecting the network quality of the network used by application A, the traffic management module has been periodically performing network quality evaluation to obtain QoE measurement results, and periodically notifying the decision module of the current QoE measurement results.

[0218] That is, steps 305 to 306b may be executed periodically while application A is started (or running in the foreground).

[0219] In addition, after application A is started, the following steps may also be included:

[0220] 307. Application A sends a registration request to the network acceleration service module. The registration request is used to request an elevator prediction service so that Application A can sense whether the user has arrived at the elevator entrance.

[0221] The registration request may include the identifier of application A and the identifier of the service to be registered (the elevator prediction service). The elevator prediction service can sense whether a user has arrived at or entered an elevator. After application A registers with the elevator prediction service, it can determine whether the user has arrived at or entered the elevator.

[0222] 308a. The network acceleration service module sends a registration request to the perception module.

[0223] 308b. The perception module sends a registration request to the fence management module.

[0224] 309a. The fence management module records the application information of the registered elevator prediction capability and sends the registration result to the perception module.

[0225] After receiving the registration request from application A, the fence management module authenticates and verifies the registered application. For example, the following judgments can be made: (1) querying the application configuration library to determine whether application A supports network acceleration; (2) determining whether application A is running in the foreground; (3) determining whether application A has the elevator prediction permission. It should be noted that if application A needs to register for the elevator prediction service, it can first register as a developer on the developer website (for example, the Honor developer website). After the developer registration is successful, it can apply for the appid and the permission of the elevator prediction service kit. Kit is a software development kit (SDK) for providing basic services to the application layer (application). The subsequent perception module checks whether application A is a legitimate user registered on the Honor developer website, and checks whether application A has the permission of the elevator prediction service kit (i.e., elevator prediction permission). Among them, the application with elevator prediction permission can obtain elevator events (for example, elevator events such as the user arriving at the elevator door and the user entering the elevator) from the operating system of the electronic device, and determine whether to perform network acceleration processing based on the elevator event. The network acceleration processing includes at least one of caching the running data of the first application in advance, reducing the frame rate of the first application, reducing the bit rate of the first application, and reducing the resolution of the first application.

[0226] After the fence management module successfully authenticates and verifies the registered application, for example, if it determines that Application A supports network acceleration, is running in the foreground, and has elevator prediction permissions, it can record Application A's application information. Furthermore, the fence management module can send the registration result, indicating successful registration, to the perception module. This way, when the fence management module detects an elevator event, it will notify the corresponding registrant (e.g., Application A).

[0227] 309b. The perception module sends the registration result to the network acceleration service module.

[0228] 310. The network acceleration service module sends the registration result to application A.

[0229] It should be noted that there is no necessary execution order between steps 302-step 306b and steps 307-step 310. Steps 302-step 306b may be executed first, and then steps 307-step 310; steps 307-step 310 may be executed first, and then steps 302-step 306b; or steps 302-step 306b and steps 307-step 310 may be executed simultaneously. This embodiment does not specifically limit the execution order between the above steps.

[0230] 311. The decision module reports the jam information to the fence management module.

[0231] When the decision module receives the jamming information from the traffic management module (ie, the QoE measurement result is poor (jamming)), the jamming information may be sent to the fence management module.

[0232] 312. After receiving the jam information, the fence management module collects the jam fingerprint information and modifies the Wi-Fi connection list (Wi-Fi list) corresponding to the elevator according to the jam fingerprint information.

[0233] The jam fingerprint information may include a timestamp (the time when the jam information was received), a Wi-Fi connection list collected after receiving the jam information (including the address and signal strength of the Wi-Fi access point), GPS, and other information. Optionally, the jam fingerprint information may also include information such as the model of the electronic device.

[0234] The electronic device can modify the Wi-Fi list corresponding to the elevator based on the jam fingerprint information, which can make the fence data more accurate. If the electronic device is connected to the Wi-Fi access point (e.g., the first Wi-Fi access point) of a certain elevator (e.g., the first elevator), the fence management module has never received the jam information reported by the decision module and believes that there will be no jam when the user rides the elevator (e.g., there is a Wi-Fi AP in the elevator). In this case, there is no need to generate fence data for the elevator, that is, the Wi-Fi connection list and other information collected by the electronic device at the elevator can be filtered out.

[0235] In some embodiments, the electronic device may periodically upload the collected jam fingerprint information to the cloud server so that the cloud server can update the fence data according to the jam fingerprint information.

[0236] 313. The fence management module monitors the user's motion state changes. When the user's motion state changes meet the preset conditions, it detects whether there is a fence corresponding to the elevator. If the fence corresponding to the elevator is detected, it is determined that the user has reached the elevator entrance.

[0237] The preset conditions are set based on the user's motion characteristics when riding an elevator. It is understood that when riding an elevator, a user generally needs to walk to the elevator entrance first, then stand still in front of the elevator entrance and wait for the elevator door to open. For example, the preset conditions can be that the user goes from a walking state to a stop and remains relatively still (for example, for 5 seconds). The user's motion state (for example, walking state or still state) can be determined based on data collected by a gyroscope.

[0238] Optionally, the electronic device may be provided with an acceleration sensor, a gyroscope sensor, etc. to identify whether the user is in a walking state or a stopped state.

[0239] It is understandable that when a user is waiting for an elevator, he or she usually switches from walking to stopping. Then, the electronic device can determine that the user has switched from a moving state to a stopped state through the change in speed, triggering a prediction of whether the user is waiting to enter the target elevator, and further determining whether the user is waiting to enter the target elevator.

[0240] Optionally, before detecting whether there is a fence corresponding to an elevator, it can be determined whether the current time is within a preset time period. The preset time period can be a rush hour period (for example, 8:30-9:30, 17:30-18:30). It is understandable that users are more likely to take an elevator during the preset time period, so detecting whether there is a fence corresponding to an elevator during the preset time period can avoid wasted power consumption.

[0241] The fence management module detects whether there is a fence corresponding to an elevator in the surrounding area. For example, it can check whether there is corresponding fence data for the BSSID corresponding to the Wi-Fi network to which the electronic device is currently connected. If fence data exists for the BSSID corresponding to the connected Wi-Fi network, the electronic device can scan for Wi-Fi information. The fence management module obtains the scanned Wi-Fi information and matches it with the fence data stored by the electronic device to determine whether the scanned BSSID meets preset conditions. The preset conditions can be, for example, that the scanned BSSID overlaps with the BSSID in the fence data corresponding to a certain elevator (i.e., they have the same BSSID), and the number of BSSIDs with a signal strength difference of less than t dBm in the target fence data accounts for >80% of the total number of BSSIDs in the target fence data. If the scanned BSSID meets the preset conditions and the match is successful, an elevator arrival event is reported.

[0242] Optionally, the electronic device stores a fence corresponding to at least one elevator. For example, the electronic device may store a fence corresponding to an elevator near the user's residence (home), a fence corresponding to an elevator near the user's office, a fence corresponding to an elevator near a restaurant or supermarket that the user frequently visits, and the like. Among the fences corresponding to at least one elevator stored by the electronic device, each fence corresponding to an elevator corresponds to the address of a Wi-Fi access point (e.g., BSSID), which is a Wi-Fi access point that the user frequently uses (often connects to) when entering and exiting the elevator. For example, in a scenario where the target elevator is in an office, the address of the Wi-Fi access point to which the user is connected at the target elevator in the office can be used to correspond to the fence corresponding to the elevator in the office. For another example, in a scenario where the target elevator is in a residence, the address of the Wi-Fi access point to which the user is connected at the residence can be used to correspond to the fence corresponding to the elevator in the residence.

[0243] If the number of identical Wi-Fi access point addresses between the Wi-Fi list information currently scanned by the electronic device and the target fence data meets the first condition, it is determined that the user is waiting to enter the target elevator.

[0244] Optionally, the first condition may be that the number of identical Wi-Fi access point addresses between the Wi-Fi list information scanned by the current electronic device and the target fence data exceeds a second threshold. The second threshold may be 1, 2, 3, 4, or a larger value. This embodiment of the application does not limit the specific value of the second threshold.

[0245] For example, taking the second threshold value of 2 as an example, referring to Table 6, the addresses of the Wi-Fi access points that are the same between the Wi-Fi list currently scanned by the electronic device and the target fence data are: connected address 1, address 2, address 4, and address 5. The number of the addresses of the Wi-Fi access points that are the same between the Wi-Fi list currently scanned by the electronic device and the target fence data exceeds 2. The electronic device can determine that the user is waiting to enter the target elevator.

[0246] Table 6

[0247] Optionally, the first condition may also be that the ratio of the number of identical Wi-Fi access point addresses between the Wi-Fi list information scanned by the current electronic device and the target fence data to the number of all Wi-Fi access points in the target fence data exceeds a third threshold.

[0248] Optionally, the third threshold may be 50%, 60%, 70% or 80%. The embodiment of the present application does not limit the specific value of the third threshold.

[0249] For example, taking the third threshold of 70% as an example, referring to Table 6 again, the number of identical Wi-Fi access point addresses between the Wi-Fi list currently scanned by the electronic device and the target fence data is 4, the number of all Wi-Fi access points in the target fence data is 5, and the proportion of the number of identical Wi-Fi access point addresses is 80%, which exceeds the third threshold of 70%. The electronic device can determine that the user is waiting to enter the target elevator.

[0250] The above method provided in the embodiment of the present application can compare the fence data pre-stored by the electronic device with the Wi-Fi network list scanned by the current electronic device when predicting whether the user is waiting to enter the target elevator. When the first condition is met, the electronic device can determine that the user is waiting to enter the target elevator.

[0251] In one possible design, before determining that the user is waiting to enter the target elevator, it is determined that the number of matching Wi-Fi access points with the same Wi-Fi access point address meets the second condition. The matching Wi-Fi access points are Wi-Fi access points with the same Wi-Fi access point address for which the difference in network signal strength corresponding to the Wi-Fi access point address is less than a first threshold. Optionally, the first threshold may be 5, 8, 10, or 12, and the specific value of the first threshold is not limited in this embodiment of the application.

[0252] Exemplarily, taking the first threshold of 10 as an example, referring to Table 6 again, the addresses of the same Wi-Fi access points between the Wi-Fi list scanned by the current electronic device and the target fence data are: connected address 1, address 2, address 4, and address 5. Among them, the difference in network signal strength between the connected address 1 of the Wi-Fi list scanned by the current electronic device and the connected address 1 of the target fence data is 2, which is less than the first threshold, that is, the connected address 1 is a matchable Wi-Fi access point. The difference in network signal strength between the address 2 of the Wi-Fi list scanned by the current electronic device and the address 2 of the target fence data is 18, which is greater than the first threshold, that is, address 2 is not a matchable Wi-Fi access point. Similarly, address 4 is a matchable Wi-Fi access point, and address 5 is not a matchable Wi-Fi access point.

[0253] Optionally, the second condition may be that the number of matching Wi-Fi access points exceeds a fourth threshold. Optionally, the fourth threshold may be 2, 3, 4, or a larger value. The embodiment of the present application does not limit the specific value of the fourth threshold.

[0254] For example, the fourth threshold is 3. Referring to Table 6 again, combined with the above description of the matchable Wi-Fi access points, the number of matchable Wi-Fi access points in Table 6 is 2, that is, the Wi-Fi list currently scanned by the electronic device in Table 6 does not meet the second condition, and the electronic device determines that the user is not waiting to enter the target elevator.

[0255] Optionally, the second condition may be that the ratio of the number of matching Wi-Fi access points to the total number of Wi-Fi access points in the target fence data exceeds a fifth threshold. Optionally, the fifth threshold may be 50%, 60%, 70%, or 80%. This embodiment of the application does not limit the specific value of the fifth threshold.

[0256] For example, the fifth threshold is 70%. Referring to Table 6 again, and in combination with the above description of the matchable Wi-Fi access points, the number of matchable Wi-Fi access points in Table 6 is 2, the number of all Wi-Fi access points in the target fence data in Table 6 is 5, and the ratio of the number of matchable Wi-Fi access points to the number of all Wi-Fi access points in the target fence data is 40%, which means that the electronic device determines that the user is not waiting to enter the target elevator.

[0257] The above method provided in the embodiment of the present application, when predicting whether a user is waiting to enter a target elevator through fence data, introduces network signal strength when making predictions based on the address of the Wi-Fi access point scanned by the current electronic device and the address of the same Wi-Fi access point as the target fence data, thereby increasing the similarity of the geographical location of the target elevator represented by the fence data and improving the accuracy of the prediction.

[0258] In actual application, as shown in Figure 13, user 1201 carries electronic device 1202 and walks from position T1 to position T2, stopping at position T2. ​​If the user remains stationary at position T2 (no movement, but not immobile) for more than 5 seconds, electronic device 1202 can initiate fence detection to detect whether there is a fence corresponding to the elevator nearby. Specifically, electronic device 1202 can perform a Wi-Fi list scan and compare the scanned Wi-Fi list with pre-stored fence data. If the number of identical BSSIDs with a signal strength difference less than t dBm accounts for less than 80% of the total number of Wi-Fi access points in the target fence data, the match is considered unsuccessful, and the prediction result is that the user is not within the elevator fence, and it is determined that the user has not reached the elevator entrance. Wherein, t can be 5, 8, 10, or 12, etc.

[0259] For example, the BSSID connected to and the scanned Wi-Fi list of electronic device 1202 at location T2 may be shown in Table 7. The Wi-Fi access point connected to by electronic device 1202 at location T2 is AP1 (AP1 corresponds to BSSID1, i.e., electronic device 1202 connects to BSSID1 at location T2), and the signal strength of AP1 is -50. The Wi-Fi access points scanned by electronic device 1202 at location T2 may include AP2, AP5, AP7, and AP8. The BSSIDs corresponding to AP2, AP5, AP7, and AP8 are BSSID1, BSSID2, BSSID5, BSSID7, and BSSID8, respectively, and their corresponding signal strengths are -60, -42, -32, and -30, respectively.

[0260] Table 7

[0261] Take Table 8 as an example of the Wi-Fi list corresponding to the fence corresponding to the elevator. It can be seen that the same BSSIDs in the Wi-Fi list scanned by the electronic device 1202 at position T2 and the Wi-Fi list corresponding to the fence corresponding to the elevator may include BSSID1, BSSID2, and BSSID5. The signal strength differences of BSSID1, BSSID2, and BSSID5 are 2, 18, and 35, respectively. The number of identical BSSIDs with a signal strength difference less than t dBm (for example, t = 10) accounts for <80%. Therefore, the match is unsuccessful, and the prediction result is that the user is not in the elevator fence, and it is determined that the user has not reached the elevator entrance.

[0262] Table 8

[0263] Furthermore, the user can walk from position T2 to position T3 and stop at position T3. If the user remains stationary at position T3 for more than 5 seconds, electronic device 1202 can re-activate fence detection to detect whether there is a fence corresponding to the elevator nearby. Specifically, electronic device 1202 can perform a Wi-Fi list scan and compare the scanned Wi-Fi list with pre-stored fence data. If the number of identical BSSIDs with a signal strength difference of less than t dBm accounts for >80%, it is considered a match, and the prediction result is that the user is within the elevator fence, which means that the user has reached the elevator entrance. The arrival event of the elevator entrance can be reported to the perception module.

[0264] For example, the Wi-Fi list scanned by electronic device 1202 at location T2 can be shown in Table 9. The Wi-Fi access point connected by electronic device 1202 at location T3 is AP1 (AP1 corresponds to BSSID1, i.e., electronic device 1202 connects to BSSID1 at location T2), and the signal strength of AP1 is -50. The Wi-Fi access points scanned by electronic device 1202 at location T3 may include AP2, AP3, AP4, and AP5. The BSSIDs corresponding to AP2, AP3, AP4, and AP5 are BSSID1, BSSID2, BSSID5, BSSID7, and BSSID8, respectively, and their corresponding signal strengths are -80, -58, -48, and -78, respectively.

[0265] Table 9

[0266] Taking the Wi-Fi list corresponding to the elevator enclosure as shown in Table 8 as an example, it can be seen that the Wi-Fi list scanned by electronic device 1202 at position T3 and the Wi-Fi list corresponding to the elevator enclosure contain the same BSSIDs as AP1, AP2, AP3, AP4, and AP5. The number of identical BSSIDs with a signal strength difference of less than t dBm (for example, t = 10) accounts for >80%. Therefore, the match is successful, and the prediction result is that the user is inside the elevator enclosure, and the user is determined to have reached the elevator entrance.

[0267] Referring to Figure 13, assuming that application A is a short video application, as shown in Figure 14, the electronic device can connect to BSSID1 at position T1 to play videos with normal video resolution; it can connect to BSSID1 at position T2 to play videos with normal video resolution; it can connect to BSSID1 at position T3 to play videos, and cache them in advance to reduce the video resolution.

[0268] 314. The fence management module notifies the perception module of elevator events such as the user arriving at the elevator entrance.

[0269] 315. The perception module notifies the network acceleration service module of elevator events such as the user arriving at the elevator entrance.

[0270] 316. The network acceleration service module notifies application A of elevator events such as the user arriving at the elevator entrance.

[0271] 317. Application A receives elevator events such as the user arriving at the elevator entrance and performs network acceleration in advance.

[0272] Application A receives an elevator event, such as a user arriving at an elevator entrance, and determines that the user is waiting to enter a target elevator. Application A (the first application) performs network acceleration processing, which includes at least one of caching the running data of the first application in advance, reducing the frame rate of the first application, reducing the bit rate of the first application, or reducing the resolution of the first application.

[0273] Taking application A as a video application as an example, after application A receives an elevator event such as the user arriving at the elevator entrance, application A can cache the currently playing video or the video to be played in advance and / or reduce the resolution of the current video to reduce subsequent video lag and improve the user experience.

[0274] Taking application A as an example, when it receives an elevator event, such as when a user arrives at the elevator entrance, application A can switch the game server and lower the game frame rate to reduce subsequent lag and improve the user experience.

[0275] 318. The fence management module determines that the user enters the elevator.

[0276] When a user enters the elevator at position T3, the electronic device detects a sudden drop in Wi-Fi signal strength (the drop in signal strength is greater than a preset threshold) at the moment the elevator door closes. Based on the change in Wi-Fi signal strength, the fence management module determines that the user has entered the elevator and reports the elevator entry event to the sensing module, notifying the user. Optionally, the seventh threshold value may be -60dBm, -70dBm, -75dBm, etc. This embodiment of the application does not limit the specific value of the seventh threshold value.

[0277] 319. The fence management module notifies the perception module of the user entering the elevator.

[0278] 320. The perception module notifies the decision module of the user entering the elevator event.

[0279] 321. After receiving the event that the user enters the elevator, the decision module executes the system acceleration strategy and requests a new network channel for tuning.

[0280] 322. The decision module sends a better path request to the path management module.

[0281] The better path request is used to request a network channel with better quality than the current network channel.

[0282] 323. The path management module is activated and detects the network quality to determine whether there is a network channel with better quality than the current network channel.

[0283] When the path management module receives the better path request sent by the decision module, it can activate and detect the network quality of each network channel to determine whether there is a network channel with better quality than the current network channel.

[0284] In actual applications, if an 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 wireless network card 1 or wireless network card 2 can be defaulted as the primary Wi-Fi card, and the other as the secondary Wi-Fi card; and one of data service network card 1 of operator A or data service network card 2 of operator B can be defaulted as the primary card, and the other as the secondary card.

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

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

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

[0288] The path management module can request in the order of primary Wi-Fi, primary card network, secondary Wi-Fi and secondary card network until an available network channel is found that meets the quality requirements (network quality is better than the currently used network channel).

[0289] 324. The path management module notifies the decision module of the network channel with better quality.

[0290] The path management module may inform the decision module of the network paths of the networks that are available and meet the quality requirements.

[0291] 325. The decision module notifies the policy execution module of the kernel layer to switch the data flow of application A to a more optimal network channel.

[0292] That is, the decision module triggers a switch to switch the data flow of application A to a more optimal network channel. For example, the data flow of application A can be switched from the Wi-Fi network to the cellular network (the signal quality of the cellular network in the elevator is better than the Wi-Fi network).

[0293] 326. The policy execution module switches the data flow of application A to a more optimal network channel.

[0294] In this way, application A can access the Internet through a more optimal network channel, which can improve user experience.

[0295] In some embodiments, the decision module can notify the policy execution module of the kernel layer to switch the data flow of application A to multiple network channels with higher quality (network quality is better than the currently used network channel). The policy execution module switches the data flow of application A to multiple higher quality network channels so that application A can access the Internet through multiple higher quality network channels, thereby improving the user experience.

[0296] 327. The fence management module detects that the user exits the elevator.

[0297] 328. The fence management module notifies the perception module of the user exiting the elevator.

[0298] 329. The perception module notifies the decision module of the user exiting the elevator.

[0299] 330. After receiving the event that the user exits the elevator, the decision module restores the service of application A to the Wi-Fi network.

[0300] That is, the decision module can switch the service of application A from the cellular network back to the Wi-Fi network (the signal quality of the Wi-Fi network outside the elevator is better than that of the cellular network).

[0301] When application A stops running or switches to the background, you can perform the following steps:

[0302] 331. Application A sends a deregistration request to the network acceleration service module, requesting to stop the elevator prediction service.

[0303] 332. The network acceleration service module sends a registration request to the perception module.

[0304] 333. The perception module sends a deregistration request to the fence management module, notifying the fence management module to stop the elevator prediction service of application A.

[0305] 334. The fence management module stops the elevator prediction service of application A and no longer notifies application A whether the user has entered the elevator.

[0306] 335. The perception module notifies the decision module to stop network acceleration and QoE measurement of application A.

[0307] After the perception module senses that application A stops running or switches to the background or receives a deregistration request sent by application A, it notifies the decision module to stop network acceleration for the application, restore the data flow, and release the requested network.

[0308] 336. The decision module notifies the policy execution module to stop network acceleration and QoE measurement of application A.

[0309] 337. The policy execution module stops network acceleration and QoE measurement of application A.

[0310] 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 this application.

[0311] Based on the network acceleration method provided by the embodiment of the present application, while the user is waiting near the elevator entrance, the operating system of the electronic device can notify the currently running application of the user waiting for the elevator event, so that the currently running application can pre-cache the application data and / or reduce the resolution according to the user waiting for the elevator event, so that the subsequent user can continue to view the relevant content of the application while in the elevator (for example, continue to watch short videos, continue to watch movies, etc.). Furthermore, at the moment the elevator door closes, the electronic device can switch the application's data stream from the Wi-Fi network to the cellular network, thereby ensuring that the user can still have a smooth Internet experience after entering the elevator, greatly reducing the probability of Internet lag in the application, and better improving the user's Internet experience.

[0312] 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 this application.

[0313] An 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.

[0314] An embodiment of the present application further provides a computer program product. When the computer program product is run on a first device, the first device can implement the steps in the above-mentioned various method embodiments.

[0315] 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. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. 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 include at least: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an 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.

[0316] The present application also provides a chip system, comprising a processor coupled to a memory, the processor executing 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.

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

[0318] Those skilled 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 beyond the scope of this application.

[0319] 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 various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A network acceleration method, characterized in that: Used in electronic equipment, including: The electronic device runs a first application; The electronic device predicts whether the user is waiting to enter the target elevator; If it is determined that the user is waiting to enter the target elevator, the first application of the electronic device performs network acceleration processing, and the network acceleration processing includes at least one of caching the running data of the first application in advance, reducing the frame rate of the first application, reducing the bit rate of the first application, or reducing the resolution of the first application.

2. The method according to claim 1, characterized in that The electronic device stores fence data of a geo-fence corresponding to at least one elevator, the fence data including an address of a Wi-Fi access point to which the electronic device can connect near the elevator and searchable Wi-Fi list information, the Wi-Fi list information including the address of at least one Wi-Fi access point; The electronic device predicts whether the user is waiting to enter the target elevator, including: Acquire target fence data from fence data of the geo-fence corresponding to the at least one elevator, wherein the address of a connectable Wi-Fi access point indicated by the target fence data is the same as the address of the Wi-Fi access point currently connected to the electronic device; The electronic device obtains current first Wi-Fi list information, where the current first Wi-Fi list information includes addresses of Wi-Fi access points that the electronic device can currently search for; If the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the searchable Wi-Fi list information indicated by the target fence data meets a first condition, it is determined that the user is waiting to enter the target elevator.

3. The method according to claim 2, characterized in that The Wi-Fi list information also includes the network signal strength of the corresponding Wi-Fi access point address. Before determining that the user is waiting to enter the target elevator, the method further includes: The number of matchable Wi-Fi network access points existing in the same Wi-Fi network access point address satisfies a second condition, and the matchable Wi-Fi network access points are Wi-Fi network access points for which a difference in network signal strength corresponding to the same Wi-Fi network access point address is less than a first threshold.

4. The method according to claim 2, characterized in that The first condition is that the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the target fence data exceeds a second threshold, or The first condition is that a ratio of the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the target fence data to the number of all Wi-Fi access points in the target fence data exceeds a third threshold.

5. The method according to claim 3, characterized in that The second condition is that the number of the matchable Wi-Fi network access points exceeds a fourth threshold, or The second condition is that a ratio of the number of the matchable Wi-Fi network access points to the number of all Wi-Fi access points in the target fence data exceeds a fifth threshold.

6. The method according to claim 2, characterized in that The at least one fence data stored in the electronic device is pre-acquired by the following steps: When it is determined based on the change state of acceleration that the user enters or exits the elevator, and the electronic device is connected to a Wi-Fi network, collecting second Wi-Fi list information when the user enters or exits the elevator; When the number of records in the second Wi-Fi list information exceeds a sixth threshold, all Wi-Fi access points with the same Wi-Fi access point address in the second Wi-Fi list information are selected as Wi-Fi access points corresponding to fence data of a geo-fence, and the network signal strength of the Wi-Fi access point corresponding to the fence data is an average of the network signal strengths of the Wi-Fi access points with the same address.

7. The method according to claim 2, characterized in that The at least one fence data stored in the electronic device is pre-acquired by the following steps: When it is determined based on the change state of acceleration that the user enters or exits the elevator, and the electronic device is connected to a Wi-Fi network, collecting second Wi-Fi list information when the user enters or exits the elevator; Sending the second Wi-Fi list information to the server; Fence data for at least one geofence is received from the server.

8. The method according to claim 2, characterized in that Before acquiring target fence data from the at least one fence data, the method further includes: It is determined according to the acceleration of the electronic device that the user changes from a moving state to a stopped state, and the electronic device is connected to a Wi-Fi network.

9. The method according to claim 8, characterized in that The method further comprises: It is determined that the signal strength of the Wi-Fi network currently connected to the electronic device is less than a seventh threshold, and the currently connected Wi-Fi network is switched to a cellular network.

10. The method according to any one of claims 1 to 9, characterized in that The electronic device includes a fence management module, The fence management module is used to collect the second Wi-Fi list information of the user when it is determined that the user enters or exits the elevator and the electronic device is connected to the Wi-Fi network; Generate the fence data of the geo-fence corresponding to the at least one elevator by clustering the second Wi-Fi list information, or send the second Wi-Fi list information to a server and receive the fence data of the geo-fence corresponding to the at least one elevator from the server.

11. The method according to claim 10, characterized in that The electronic device further includes a sensing module, and the method further includes: The perception module perceives that the first application is started, and queries whether the first application supports network acceleration; The perception module includes an application configuration library, which stores information on whether multiple application programs support network acceleration, and the multiple application programs include the first application. Among them, the multiple applications in the application configuration library are applications that require network acceleration based on user traffic consumption and user usage preferences for applications; or the multiple applications in the application configuration library are applications that require network acceleration based on user manual settings.

12. The method according to claim 11, characterized in that The electronic device further includes a decision module, and the method further includes: If it is determined that the first application supports network acceleration, the perception module sends a network quality assessment request to the decision module. The network quality assessment request includes the application identifier of the first application, the application configuration information and the network quality assessment standard. The application configuration information includes the header characteristics of the data packet when the first application transmits the data stream.

13. The method according to claim 12, characterized in that The core layer of the electronic device further includes a traffic reporting module, and the method further includes: The decision module registers a message monitoring hook with the traffic reporting module, and the message monitoring hook is used to periodically detect the path of the network channel used by the first application, and monitor the communication parameters and statistical information of the data flow transmitted by the network channel used by the first application.

14. The method according to claim 13, characterized in that The electronic device further includes a traffic management module, and the method further includes: The traffic reporting module periodically reports communication parameters and statistical information of the data flow of the first application to the traffic management module, wherein the communication parameters include at least one of a protocol type, a source Internet Protocol (IP) address and port / a destination IP address and port, and a message feature; and the statistical information includes at least one of a round-trip time (RTT), a packet loss rate, a number of bytes sent and received, and a rate; The traffic management module periodically performs network quality evaluation based on the communication parameters and the statistical information to obtain a current quality of experience (QoE) measurement result; The traffic management module periodically reports the current QoE measurement result to the decision module.

15. The method according to claim 14, characterized in that If the QoE measurement result is jamming, the method further includes: The decision module reports the freeze information to the fence management module; After receiving the jam information, the fence management module collects jam fingerprint information, modifies Wi-Fi list information corresponding to at least one elevator based on the jam fingerprint information, and filters the Wi-Fi list information corresponding to the first elevator. The electronic device is connected to a first Wi-Fi access point at the first elevator. When the electronic device is connected to the first Wi-Fi access point, the fence management module has not received the jam information reported by the decision module. The jam fingerprint information includes the Wi-Fi list collected after receiving the jam information.

16. The method according to any one of claims 9 to 15, characterized in that: The electronic device further includes a network acceleration service module, and the method further includes: The first application sends a registration request to the network acceleration service module, where the registration request is used to request an elevator prediction service so that the first application can sense whether the user has arrived at the elevator entrance and is waiting to enter a target elevator; The network acceleration service module sends the registration request to the perception module; The perception module sends the registration request to the fence management module.

17. The method according to claim 16, characterized in that The method further comprises: After receiving the registration request, if the fence management module determines that the first application supports network acceleration, the first application is running in the foreground, and the first application has elevator prediction permission, the fence management module records the application information of the first application and sends a registration result to the perception module, where the registration result is successful; The perception module sends the registration result to the network acceleration service module; The network acceleration service module sends the registration result to the first application.

18. The method according to claim 16 or 17, characterized in that The method further comprises: The fence management module monitors the user's motion status changes; When a user enters or exits an elevator based on a change in the user's motion state, a check is performed to see if there is a geo-fence corresponding to the elevator. If the geo-fence corresponding to the elevator is detected, it is determined that the user has arrived at the elevator entrance and is waiting to enter the target elevator; The user's motion state change includes the user's state of walking, stopping, and maintaining a relatively static state. state.

19. The method according to claim 18, characterized in that Before detecting whether there is a geo-fence corresponding to the elevator, the method further includes: It is determined whether the current time is within a preset time period, where the preset time period is determined based on rush hour.

20. The method according to claim 18 or 19, characterized in that The fence management module detects whether there is a geo-fence corresponding to the elevator around it, including: Check whether the BSSID of the Wi-Fi access point to which the electronic device is currently connected has corresponding fence data; If the BSSID of the Wi-Fi access point to which the electronic device is currently connected corresponds to the target fence data, the fence management module obtains current first Wi-Fi list information, where the current first Wi-Fi list information includes addresses of Wi-Fi access points that the electronic device can currently search; If the number of identical Wi-Fi access point addresses between the current first Wi-Fi list information and the searchable Wi-Fi list information indicated by the target fence data meets a first condition, it is determined that a geo-fence corresponding to an elevator exists in the surrounding area.

21. The method according to any one of claims 18 to 20, characterized in that The method further comprises: The fence management module notifies the perception module of elevator events such as the user arriving at the elevator entrance; The perception module notifies the network acceleration service module of elevator events such as the user arriving at the elevator entrance; The network acceleration service module notifies the first application of elevator events such as the user arriving at the elevator entrance; The first application of the electronic device performing network acceleration processing includes: The first application receives an elevator event such as the user arriving at the elevator entrance, and performs the network acceleration process.

22. The method according to any one of claims 18 to 21, characterized in that The electronic device further includes a policy execution module and a path management module, and the method further includes: The fence management module determines that the user enters the elevator and notifies the perception module of the user entering the elevator event; The perception module notifies the decision module of the event that the user enters the elevator; After receiving the event that the user enters the elevator, the decision module sends a better path request to the path management module, wherein the better path request is used to request a network channel with better quality than the current network channel; The path management module activates and detects the network quality of each network channel, determines that there is a network channel with better quality than the current network channel, and notifies the decision module of the better network channel; The decision module instructs the policy execution module to switch the data flow of the first application to the more optimal network channel; The policy execution module switches the data flow of the first application to the more optimal network channel.

23. The method according to any one of claims 18 to 22, characterized in that The method further comprises: The fence management module detects that the user exits the elevator and notifies the perception module of the user exiting the elevator event; The perception module notifies the decision module of the user exiting the elevator event; After receiving the event that the user exits the elevator, the decision module switches the data stream of the first application back to the Wi-Fi network.

24. The method according to any one of claims 18 to 23, characterized in that When the first application is switched to the background or closed, the method further includes: The first application sends a deregistration request to the network acceleration service module, and the deregistration request is used to request to stop Elevator stop prediction service; The network acceleration service module sends the registration request to the perception module; The perception module sends the deregistration request to the fence management module; The fence management module stops the elevator prediction service of the first application and no longer notifies the first application whether the user enters the elevator.

25. The method according to claim 24, characterized in that The method further comprises: The perception module notifies the decision module to stop QoE measurement of the first application; The decision module notifies the policy execution module to stop the QoE measurement of the first application; The policy execution module stops the QoE measurement of the first application.

26. An electronic device, characterized in that: The electronic device includes a processor, and the processor is configured 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 25.

27. 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 25 is implemented.