WO2024082811A1 - 一种网络加速方法和装置 - Google Patents

一种网络加速方法和装置 Download PDF

Info

Publication number
WO2024082811A1
WO2024082811A1 PCT/CN2023/114694 CN2023114694W WO2024082811A1 WO 2024082811 A1 WO2024082811 A1 WO 2024082811A1 CN 2023114694 W CN2023114694 W CN 2023114694W WO 2024082811 A1 WO2024082811 A1 WO 2024082811A1
Authority
WO
WIPO (PCT)
Prior art keywords
elevator
application
network
electronic device
fence
Prior art date
Application number
PCT/CN2023/114694
Other languages
English (en)
French (fr)
Inventor
王金香
梁恒辉
陈志辉
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024082811A1 publication Critical patent/WO2024082811A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/083Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability for increasing network speed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/0085Hand-off measurements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/16Performing reselection for specific purposes
    • H04W36/165Performing reselection for specific purposes for reducing network power consumption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/021Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences

Definitions

  • the present application relates to the field of terminals, and in particular to a network acceleration method and device.
  • the network signal cellular network signal or wireless-fidelity (Wi-Fi) network signal
  • Wi-Fi wireless-fidelity
  • 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.
  • 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.
  • the foreground 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 being stuck after the user enters the elevator, so that subsequent users can continue to view relevant content of the first application (for example, continue to watch short videos, continue to watch movies, etc.) while in the elevator.
  • network acceleration processing such as caching application data in advance and/or reducing the resolution, frame rate, bit rate, etc.
  • the electronic device stores fence data of a geographic fence corresponding to at least one elevator, the fence data includes the address of a Wi-Fi access point that the electronic device can connect to near the elevator and searchable Wi-Fi list information, the Wi-Fi list information includes 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: obtaining target fence data from the fence data of the geographic fence corresponding to at least one elevator, the address of the Wi-Fi access point that can be connected to 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 the current first Wi-Fi list information, the current first Wi-Fi list information includes the address of the Wi-Fi access point 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 the first condition, it is determined that the user is waiting to enter the target elevator.
  • the electronic device checks the currently connected Whether there is corresponding fence data for the Wi-Fi access point address (BSSID). If the BSSID corresponding to the connected Wi-Fi has fence data (target fence data), the electronic device can 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.
  • BSSID Wi-Fi access point address
  • the Wi-Fi list information searched 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 can be understood that Wi-Fi list information with a high similarity to the Wi-Fi list information corresponding to the target elevator can only be searched near the target elevator).
  • the Wi-Fi list information also includes the network signal strength of the corresponding Wi-Fi access point address, and before determining that the user is waiting to enter the target elevator, it also includes: the number of matchable Wi-Fi network access points in the same Wi-Fi network access point address meets the second condition, and the matchable Wi-Fi network access point is the Wi-Fi network access point whose corresponding network signal strength difference in the same Wi-Fi network access point address is less than the first threshold.
  • 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 the 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 number of all Wi-Fi access points in the target fence data exceeds the third threshold.
  • the second condition is that the number of matching Wi-Fi network access points exceeds the 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 the fifth threshold. The more the number of matching Wi-Fi network access points, the greater the similarity between the Wi-Fi list information searched by the user at the current location (the current first Wi-Fi list information) and the Wi-Fi list information corresponding to the target elevator.
  • At least one fence data stored in the electronic device is pre-acquired through the following steps: when it is determined that the user enters or exits the elevator according to the change state of acceleration, and the electronic device is connected to a Wi-Fi network, the second Wi-Fi list information when the user enters or exits the elevator is collected; when the number of records of 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 the fence data of a geographic fence, and the network signal strength of the Wi-Fi access point corresponding to the fence data is the average value of the network signal strengths of the Wi-Fi access points with the same address. That is, the electronic device can generate fence data according to the information collected by itself.
  • At least one fence data stored in the electronic device is pre-acquired through the following steps: when it is determined that the user enters or exits the elevator according to the change state of acceleration, and the electronic device is connected to a Wi-Fi network, the second Wi-Fi list information when the user enters or exits the elevator is collected; the second Wi-Fi list information is sent to the server; and the fence data of at least one geographic fence is received from the server. That is, the electronic device can send the information collected by itself to the server, and the server generates the fence data.
  • the method before acquiring the target fence data in at least one fence data, the method further includes: determining that the user has switched from a moving state to a stopped state according to the acceleration of the electronic device, and the electronic device is connected to a Wi-Fi network. It is understandable that when the user is waiting for the elevator, he usually switches from walking to stopping, and 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 then further determining whether the user is waiting to enter the target elevator.
  • the method further includes: determining that the signal strength of the Wi-Fi network currently connected to the electronic device is less than the seventh threshold, and switching the currently connected Wi-Fi network to a cellular network.
  • the signal strength of the Wi-Fi network currently connected to the electronic device is less than the seventh threshold, it can be considered that the elevator is closed after the user enters the elevator, causing the signal strength of the currently connected Wi-Fi network to drop sharply.
  • the electronic device can switch the data stream of the application from the Wi-Fi network to the cellular network (the signal covers the cellular network of 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 freezes of the application, and can better improve the user's Internet experience.
  • the electronic device includes a fence management module, and the fence management module is used to collect second Wi-Fi list information of the user entering or exiting the elevator when it is determined that the user enters or exits the elevator and the electronic device is connected to a Wi-Fi network; cluster and generate fence data of a geographic fence corresponding to at least one elevator according to the second Wi-Fi list information, or send the second Wi-Fi list information to a server, and receive fence data of a geographic fence corresponding to at least one elevator from the server.
  • the fence management module is used to collect second Wi-Fi list information of the user entering or exiting the elevator when it is determined that the user enters or exits the elevator and the electronic device is connected to a Wi-Fi network; cluster and generate fence data of a geographic fence corresponding to at least one elevator according to the second Wi-Fi list information, or send the second Wi-Fi list information to a server, and receive fence data of a geographic fence corresponding to at least one elevator from the server.
  • the electronic device also includes a perception module
  • the method also includes: the perception module senses 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 application programs support network acceleration, and the multiple application programs include the first application; wherein the multiple application programs 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 application programs in the application configuration library are applications that require network acceleration based on user manual settings.
  • the electronic device also includes a decision module
  • 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 an application identifier of the first application, application configuration information, and a network quality assessment standard, and the application configuration information includes header features of data packets when the first application transmits data streams.
  • the kernel layer of the electronic device also includes a traffic reporting module
  • 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.
  • the electronic device also includes a traffic management module
  • the method also includes: the traffic reporting module periodically reports the communication parameters and statistical information of the data flow of the first application to the traffic management module, the communication parameters include 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 includes 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 performs a network quality assessment based on the communication parameters and the statistical information to obtain a current experience quality QoE measurement result; the traffic management module periodically reports the current QoE measurement result to the decision module.
  • the method further includes: the decision module reports the stuck information to the fence management module; after receiving the stuck information, the fence management module collects stuck fingerprint information, modifies the Wi-Fi list information corresponding to at least one elevator according to the stuck fingerprint information, and filters the Wi-Fi list information corresponding to the first elevator.
  • the electronic device is connected to the first Wi-Fi access point at the first elevator, the fence management module has not received the jam information reported by the decision module when the electronic device is connected to the first Wi-Fi access point, and the jam fingerprint information includes the Wi-Fi list collected after receiving the jam information.
  • the electronic device also includes a network acceleration service module
  • 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 senses 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; the perception module sends a registration request to the fence management module.
  • the method also 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; the network acceleration service module sends the registration result to the first application.
  • the method also includes: a fence management module monitors changes in the user's motion state; when determining that the user enters or exits the elevator based on the change in the user's motion state, detecting whether there is a geographic fence corresponding to the elevator; if the geographic 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 user's motion state change includes the user changing from a walking state to a stop, and maintaining a relatively static state.
  • the method 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 hours.
  • the fence management module detects whether there is a geographical fence corresponding to an elevator around, including: checking whether the BSSID of the 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 the target fence data, the fence management module obtains the current first Wi-Fi list information, and the current first Wi-Fi list information includes the address of the Wi-Fi access point that can be currently searched by the electronic device; if the number of the same 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 the first condition, it is determined that there is a geographical fence corresponding to the elevator around.
  • the method also 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.
  • the electronic device also includes a policy execution module and a path management module
  • the method also 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 user entering the elevator event; after the decision module receives the user entering the elevator event, the better path request is sent 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.
  • the method further includes: 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; the decision module receives the user exiting the elevator event, and the decision module receives the user exiting the elevator event.
  • 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; the decision module receives the user exiting the elevator event, and the decision module receives the user exiting the elevator event.
  • the method 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, 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.
  • the method further includes: 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 QoE measurement of the first application; and the policy execution module stops QoE measurement of the first application.
  • the present application provides a computer-readable storage medium, the computer-readable storage medium comprising computer instructions.
  • the 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.
  • 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.
  • an embodiment of the present application provides a network acceleration device, including a processor, the processor and a memory are coupled, the memory stores program instructions, and 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 may be a component of an electronic device, such as a chip.
  • an embodiment of the present application provides a network acceleration device, which can be divided into different logical units or modules according to functions, and each unit or module performs different functions, so that the device executes the method described in the first aspect and any possible design method thereof.
  • the present application provides a chip system, the chip system comprising one or more interface circuits and one or more processors.
  • the interface circuit and the processor are interconnected via a line.
  • the chip system can be applied to an electronic device including a communication module and a memory.
  • the interface circuit is used to receive a signal from the memory of the electronic device and send the received signal to the processor, where the signal includes a computer instruction stored in the memory.
  • the processor executes the computer instruction
  • the electronic device can execute the method described in the first aspect and any possible design thereof.
  • 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 aspect and the fifth aspect, and the chip system described in the sixth aspect provided above can be referred to as the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here.
  • FIG1A is a schematic diagram of a network channel provided in an embodiment of the present application.
  • FIG1B is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application.
  • FIG3 is a display schematic diagram provided in an embodiment of the present application.
  • FIG4 is another display schematic diagram provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a module interaction provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of an elevator fence provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a process flow provided in an embodiment of the present application.
  • FIG8 is another schematic diagram of a process flow provided in an embodiment of the present application.
  • FIG9 is another display schematic diagram provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of a message detection provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of a rate characteristic of a data stream of a short video application provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of rate characteristics of a data stream of another short video application provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of another elevator fence provided in an embodiment of the present application.
  • FIG14 is a schematic diagram of an electronic device performing different processes at different times provided by an embodiment of the present application.
  • QoE Quality of experience
  • QoE refers to the subjective feeling of end users on the service performance provided by mobile networks.
  • QoE can express the end users' experience and feelings about services and networks through a nearly quantitative method, and reflect the gap between the current service and network quality and user expectations.
  • QoS quality of service
  • QoS in a broad sense is "the comprehensive effect of service performance that determines user satisfaction", which includes a wide range of content at multiple levels.
  • QoS in a narrow sense refers to the performance indicators of underlying packet data transmission, such as latency, jitter, bandwidth, bit error, etc.
  • the QoS mechanism is mainly responsible for business management and service differentiation from the perspective of the network. Network entities handle different services according to different quality requirements. However, experiencing QoS from the perspective of end users is a broader and more subjective issue, which is the scope defined by QoE.
  • Hook function A hook function is actually a program segment that processes messages. Whenever a specific message is sent, before it reaches the destination window, the hook function can capture the message first, that is, the hook function gets control first. The hook function can process (change) the message, or continue to pass the message without processing, or force the message to end.
  • Data stream In the embodiment of the present application, the data sequence transmitted between two electronic devices (for example, a mobile phone and an application server) is recorded as a data stream.
  • a data stream can also be called a business stream.
  • the data stream may include a video stream, an audio stream, a download stream, a session stream, etc.
  • Geofencing is the use of positioning system networks (e.g., global positioning system (GPS) network, 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, which can be called a geofence.
  • Geofencing can be paired with hardware/software applications so that the application can respond to the geofence in some way as indicated by the program parameters.
  • 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 referred to as a fence for short).
  • the corresponding fence is associated with applications such as video applications and game applications. Applications such as video applications and game applications can perform corresponding processing based on whether the electronic device is in the fence corresponding to the elevator.
  • the video application can cache the video currently being played or the video to be played, reduce the resolution, and other operations; when the electronic device is not in the fence corresponding to the elevator, the video application can stop caching the video currently being played or the video to be played, restore the resolution of the video, and other operations.
  • Network channel a channel for exchanging data between two electronic devices.
  • a network channel established between an electronic device and other electronic devices via a wireless network card can be recorded as a Wi-Fi network
  • a network channel established between an electronic device and other electronic devices via a data service network card can be recorded as a cellular network.
  • the wireless network card is a device that supports wireless local area network (WLAN) Internet access
  • the data service network card is a device that supports long-term evolution (LTE), fifth-generation mobile communication technology (5G), global system for mobile communications (GSM), general packet radio service (GPRS) and other mobile communication technologies Internet access.
  • LTE long-term evolution
  • 5G fifth-generation mobile communication technology
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • the quality of the network channel varies with the environment the user is in. For example, when the user is in a closed metal environment, such as an elevator, after the elevator is closed, the metal door of the elevator absorbs electromagnetic wave signals, causing a significant attenuation of the Wi-Fi network signal, which causes the user's Internet access to be stuck, resulting in a poor user experience.
  • a user uses a game application A in a mobile phone to play a game, wherein application A in the mobile phone establishes a network connection with server A of application A through the wireless network card in the mobile phone, and the data stream A generated between application A and server A (for example, the data stream generated during a game battle) is transmitted through the Wi-Fi network between the wireless network card on the mobile phone and the wireless router.
  • the elevator shuts down, causing a sudden drop in the Wi-Fi network signal, which in turn reduces the data stream A.
  • there is a freeze phenomenon resulting in a poor user experience.
  • the mobile phone can switch data stream A to the cellular network between the data service network card of the mobile phone and the base station, 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.
  • the timing when the mobile phone switches from Wi-Fi network to cellular network is after the built-in acceleration sensor on the mobile phone detects that the user is taking the elevator, and then switches from Wi-Fi network to cellular network. That is, the mobile phone determines whether to switch from Wi-Fi network to cellular network by detecting the user's movement status after the user enters the elevator and the elevator is running. For the user, at this time, the elevator has closed its door and is running, which has reduced the data flow A of application A, causing the user's Internet access to be stuck.
  • 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 and other elevator events, so that the currently running application can cache application data in advance and/or reduce resolution and other processing according to the user and other elevator events, so that the subsequent user can continue to view the relevant content of the application when in the elevator (for example, continue to watch short videos, continue to watch movies, etc.).
  • 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 can better improve the user's Internet experience.
  • the network acceleration method provided in the embodiment of the present application can be applied to electronic devices.
  • a schematic structural diagram of an electronic device 100 is provided.
  • 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.
  • SIM subscriber identification module
  • the sensor module 180 may 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.
  • the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • 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 processor (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), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • controller a memory
  • video codec a digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated in one or more processors.
  • 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.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the interface connection relationship between the modules shown in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device 100.
  • the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger. While the charging management module 140 is charging the battery 142 , it can also power the electronic device through the power management module 141 .
  • 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 supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 may also be disposed in the processor 110.
  • the power management module 141 and the charging management module 140 may also be disposed in the same device.
  • 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.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-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.
  • the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
  • the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied to the electronic device 100.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared
  • the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering processing, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify the signal, and convert it into electromagnetic waves for radiation through the antenna 2.
  • 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 (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc.
  • the GNSS may include GPS, global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi-zenith satellite system, QZSS) and/or satellite based augmentation system (satellite based augmentation systems, SBAS).
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation system
  • the electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.
  • LCD liquid crystal display
  • LED light-emitting diode
  • OLED organic light-emitting diode
  • AMOLED active-matrix organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.
  • the electronic device 100 can realize the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back by the camera 193.
  • the camera 193 is used to capture static 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.
  • MPEG moving picture experts group
  • the number of cameras 193 may be 1 to N.
  • the electronic device may include 2 front cameras and 4 rear cameras.
  • NPU is a neural network (NN) computing processor.
  • NN neural network
  • applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
  • 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 the 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 codes, and the executable program codes include 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.
  • the processor 110 can execute the instructions stored in the internal memory 121, and the internal memory 121 may include a program storage area and a data storage area.
  • 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.
  • 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.
  • the electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signals.
  • the audio module 170 can also be used to encode and decode audio signals.
  • Speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • Receiver 170B also called “earpiece”, is used to convert audio electrical signals into sound signals.
  • Microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • Earphone jack 170D is used to connect wired earphones.
  • the key 190 includes a power key, a volume key, etc.
  • the key 190 can be a mechanical key. It can also be a touch key.
  • the electronic device 100 can receive key input and generate key signal input related to the user settings and function control of the electronic device 100.
  • the motor 191 can generate a vibration prompt.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect the SIM card.
  • the SIM card can be inserted into the SIM card interface 195, or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the electronic device 100 can support 1 or N SIM card interfaces, N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present invention takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device 100.
  • the layered architecture divides the software into several layers, each of which has a clear role and division of labor.
  • the layers communicate with each other through interfaces.
  • 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 embodiment of the present application. In actual applications, it may also include layers and components not shown in FIG2 . Of course, it may also include only some of the components shown in FIG2 .
  • the service layer includes a network acceleration service module, a perception module, a path management module, and a fence management module.
  • the network acceleration service module is a channel for the application to interact with the perception module.
  • the network acceleration service module 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 can realize communication between different processes.
  • the fence management module may include submodules such as elevator perception, user status identification, fence data collection, fence database, fence data generation, fence data prediction, etc. (not shown in Figure 2).
  • the elevator perception submodule is used to sense whether the user enters and exits the elevator.
  • the elevator perception submodule can notify the fence data collection submodule of the user entering and exiting the elevator.
  • the fence data collection submodule is used to collect the Wi-Fi information currently connected to the electronic device and the Wi-Fi list information that can be scanned currently.
  • the fence database is used to store the data collected by the fence data collection submodule.
  • the fence data generation submodule is used to generate fence data of at least one geographic fence based on the data collected by the fence data.
  • the fence data of each geographic fence can correspond to the Wi-Fi network (BSSID) connected when the user enters and exits the elevator, that is, the Wi-Fi network (BSSID) connected when the user enters and exits a certain elevator can be used to identify the geographic fence corresponding to the elevator.
  • the user status identification submodule is used to identify the changes in the user's motion state and motion stop state, and then trigger 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 arrived at the elevator entrance and whether he has 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 arrived at the elevator entrance or entered the target elevator, the event of the user arriving at the elevator entrance or entering the target elevator is reported to the perception module.
  • the perception module can detect various events of the upper layer application. As an example, the perception module can detect the opening of the application It can also detect the application currently switched to the foreground/background, and can also detect the installation and uninstallation of applications. When the perception module detects that the application is opened or switched to the foreground, it can notify the lower-level module (decision-making module) to start the data flow monitoring function.
  • 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 wireless network card 1 and a 5.0GHz 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.
  • the path management module is also used to evaluate the quality of the network channel.
  • the path management module can evaluate the quality of the Wi-Fi network in the 2.4 GHz band and the quality of the Wi-Fi network in the 5.0 GHz band. It can also evaluate the quality of the cellular network of operator A and the quality of the cellular network of operator B.
  • the path management module can also store the paths of multiple network channels. For example, it can store the paths of the network channels (e.g., the main network channels) and the backup network channels currently used by the application.
  • the path management module can also be used to update the selection of network channels according to 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 network channel in the awake state can be used directly.
  • the path management module can close the non-optimal channel, that is, convert the network channel from an awake state to a dormant state, and the network channel in the dormant state cannot be used temporarily.
  • the strategy layer is equipped with a traffic management module and a decision-making module.
  • 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.
  • 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 enters the elevator, the system acceleration strategy is executed and a new network channel is requested for tuning (for example, the application service can be switched from the Wi-Fi network to the cellular network). When it is determined that the user exits 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).
  • the kernel layer has a policy execution module and a traffic reporting module.
  • the traffic reporting module is used to collect data flow information and report the collected data flow information.
  • the policy execution module is used to execute the switching of network channels.
  • one 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.
  • the path management module of the service layer can be divided 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 network and cellular network supported by the electronic device.
  • the path control module can be used to update the selection of network channels according to the policy changes of the decision module, trigger network channel quality detection, and dynamically select the optimal channel.
  • the user 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 operation for enabling the network acceleration function in advance.
  • the mobile phone displays a desktop 201.
  • the mobile phone may display a settings interface 203.
  • the settings interface 203 may include a WLAN option 204, and may also include a search box and personal accounts, Bluetooth, Functional options such as mobile network, desktop and wallpaper.
  • the mobile phone can display the WLAN interface 205.
  • the WLAN interface 205 may include a WLAN switch 206.
  • the WLAN switch 206 is in the on state, indicating that the mobile phone can connect to the WLAN for Internet access.
  • the WLAN interface 205 may also include a network acceleration option 207, as well as more WLAN setting options and an available WLAN list.
  • the available WLAN list may include the names of multiple WLAN networks currently scanned by the mobile phone (such as HONOR1, HONOR2, HONOR3, etc.) and signal strength identifiers, etc.
  • the mobile phone may display the network acceleration interface 208.
  • the network acceleration interface 208 may include a text description 209 of the network acceleration function, which indicates that the function of the network acceleration function is to "evaluate the current network quality, intelligently use WLAN and mobile data to improve the Internet experience, and this process will connect to the Internet and consume part of the mobile data traffic.”
  • a text description 209 of the network acceleration function indicates that the function of the network acceleration function is to "evaluate the current network quality, intelligently use WLAN and mobile data to improve the Internet experience, and this process will connect to the Internet and consume part of the mobile data traffic."
  • network acceleration will provide a smarter service.
  • the user can click on the link "Honor Smart Capabilities and Privacy Statement” to view the description of Honor Smart Capabilities.
  • the operating system can collect the user's habits of using the mobile phone and provide personalized services to the user based on the user's habits.
  • the network acceleration interface 208 may also include a switch 210 corresponding to network acceleration (LINK Trubo).
  • switch 210 When switch 210 is turned on, it means that the user agrees to turn on the network acceleration function, so that the mobile phone can evaluate the current network quality and intelligently use WLAN and mobile data to improve the Internet experience.
  • the user can choose to turn off switch 210, that is, turn off the network acceleration function.
  • a text box 211 can be displayed, and the text in the text box 211 is used to explain the effect of the network acceleration function and the traffic usage to the user. For example, after the network acceleration function is turned on, the download speed is increased by 35%, and the traffic is 100M; the network freeze is reduced by 40 times, and the traffic is 40M.
  • 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 on or off the multi-channel download mode.
  • the multi-channel download mode 213 is turned on, when the electronic device is connected to the WLAN and the mobile network, multiple network channels can be used simultaneously for concurrent downloading to obtain a faster download experience.
  • the multi-channel download mode 213 is in a closed state.
  • the collaborative acceleration function 214 includes an intelligent mode 215 and a custom mode 216. In the intelligent mode 215, applications that require network acceleration can be intelligently turned on based on user traffic consumption and application usage preferences.
  • the user can turn on or off the intelligent mode through the control 218.
  • the control 218 is selected and the intelligent mode is turned on.
  • the custom mode 216 the user can manually turn on the application that needs to be accelerated (network acceleration).
  • the user can turn on or off the custom mode through the control 219.
  • the control 219 in (d) of Figure 3 is not selected, the custom mode is turned off.
  • the electronic device can switch the stuck network channel to a network channel with better communication quality to obtain a better Internet experience.
  • the mobile phone in response to the user selecting control 219 to turn on custom mode 216 , as shown in (b) of FIG. 4 , the mobile phone can display information (icons, names, etc.) of various applications installed on the mobile phone and their corresponding switches.
  • 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 corresponding switch 225 of the music application, etc.
  • the user can manually select the application to be accelerated according to their needs.
  • 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
  • FIG. 5 there is a timing diagram of a network acceleration method implemented based on the modules shown in FIG. 2 provided in an embodiment of the present application, which includes two parts.
  • the first part is the generation process of the geographic fence corresponding to the elevator, including step 301a; the second part is the prediction of the user's arrival, entry or exit of the elevator and the corresponding network acceleration process, including steps 301b-337.
  • the fence management module collects Wi-Fi information near the elevator entrance and clusters to generate a fence corresponding to the elevator.
  • a fence is a geographical concept and can refer to a geographical area with boundaries.
  • FIG6 which is a schematic diagram of a fence corresponding to an elevator, and the fence corresponding to the elevator covers the area around the elevator.
  • the elevator may refer to an elevator frequently used by the user.
  • the elevators frequently used by the user may include elevators near the user's residence (home), elevators near the user's office, elevators near restaurants and supermarkets that the user often visits, etc.
  • Wi-Fi access points there are usually multiple fixed Wi-Fi access points around the elevator. For example, for 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.
  • the BSSIDs of multiple Wi-Fi access points are different (for example, a company has a large area and has installed multiple Wi-Fi access points (wireless access point (AP) or wireless routers).
  • AP wireless access point
  • 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.
  • the electronic device can collect Wi-Fi information when the user enters and exits the elevator (enters and/or exits the elevator).
  • the electronic device can determine whether the user enters or exits the elevator based on data from sensors such as accelerometers. For example, if the accelerometer detects that the acceleration of the electronic device increases from zero and then decreases to zero, it is determined that the user is in the elevator and is about to exit the elevator.
  • the Wi-Fi information collected by the electronic device when the user enters or exits the elevator may include the Wi-Fi information collected by the electronic device within a preset time (e.g., 10-30 seconds) before the user enters or exits the elevator. That is, the electronic device can cache the BSSID and signal strength of the Wi-Fi access point scanned within 10-30 seconds before the user enters or exits the elevator.
  • the Wi-Fi information collected by the electronic device includes the address and signal strength information of the Wi-Fi access point connected by the electronic device before the user enters or exits the elevator, and the 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.
  • 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.
  • the address of the Wi-Fi access point may be the BSSID.
  • the strength of the Wi-Fi network signal may be (received signal strength indication, RSSI).
  • the Wi-Fi list may also include the power-on time of the electronic device and the center frequency of the Wi-Fi signal, etc., which is not limited in this application.
  • the embodiment of the present application can generate the fence data of the geo-fence by collecting Wi-Fi list information multiple times, such as the embodiment shown in FIG7.
  • at least one fence data stored in the electronic device is pre-acquired by the following steps:
  • Wi-Fi list information is collected.
  • the electronic device may collect Wi-Fi list information every time the user enters/exits the elevator, and the electronic device may collect multiple Wi-Fi list information within a period of time (eg, one week, two weeks, one month).
  • the BSSID of the Wi-Fi network connected when the user enters and exits the elevator can be used as the identifier of the geo-fence corresponding to the elevator, thereby distinguishing the geo-fences corresponding to different elevators.
  • the BSSID of the Wi-Fi network connected by the electronic device at the residence can be used as the identifier of the geo-fence of the target elevator at the residence.
  • the BSSID of the Wi-Fi network connected in the office can be used as the identifier of the geo-fence of the target elevator corresponding to the office.
  • the electronic device selects Wi-Fi access points with the same address from these Wi-Fi access points (all Wi-Fi lists collected when the electronic device is connected to the same Wi-Fi access point), and obtains the fence data of the geographic fence corresponding to the elevator based on the information of the Wi-Fi access points with the same address.
  • the preset threshold may be 2, 3, 4 or a larger value, which is not limited in the embodiments of the present application.
  • 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).
  • the Wi-Fi list information recorded each time the electronic device enters or exits the elevator may include the BSSID and RSSI of the Wi-Fi access point to which the electronic device is connected when the user enters or exits the elevator, and the BSSID and RSSI of the Wi-Fi access point searched by the electronic device at that time.
  • the Wi-Fi list information recorded each time the electronic device enters or exits the elevator may also include the timestamp of the user entering or exiting the elevator.
  • the electronic device selects a Wi-Fi access point with the same address in the two Wi-Fi lists.
  • 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, so the addresses of Wi-Fi access points in the generated fence data are divided into 6c:16:32:17:3c:95, 6c:16:32:17:3c:51 and 6c:17:32:27:2c:92, as shown in Table 2.
  • the signal strength of Wi-Fi access points with the same address can be averaged to generate fence data.
  • the RSSIs corresponding to the Wi-Fi access point with BSSID 6c:16:32:17:3c:95 are -50dBm and -48dBm respectively, and the average of -50dBm and -48dBm is -49dBm.
  • the fence data includes the RSSI of the Wi-Fi access point with BSSID 6c:16:32:17:3c:95, which is -49dBm.
  • the RSSI of the Wi-Fi access point with BSSID 6c:16:32:17:3c:51 is -61dBm
  • the RSSI of the Wi-Fi access point with BSSID 6c:17:32:27:2c:92 is -71dBm.
  • the method provided in the embodiment of the present application generates fence data of an elevator (e.g., an elevator at a residence) by taking the intersection of records of Wi-Fi list information collected when users enter and exit the same elevator (e.g., an elevator at a residence) at different times and calculating the average network signal strength.
  • the generated fence data can be made closer to the actual geographical location of the elevator (e.g., an elevator at a residence), thereby improving the accuracy of the electronic device in predicting whether the user is waiting to enter the elevator.
  • the process of an electronic device generating fence data of a geographic fence corresponding to an elevator may include: the electronic device obtains Wi-Fi information collected when a user enters and exits an elevator; the Wi-Fi list (i.e., the Wi-Fi list scanned by the electronic device when entering and exiting the elevator) is classified according to the BSSID to which the electronic device is connected when the user enters and exits the elevator (i.e., the BSSID of the Wi-Fi access point connected when the electronic device enters and exits the elevator), and multiple Wi-Fi lists corresponding to each BSSID in the multiple BSSIDs connected when the user enters and exits the elevator are obtained.
  • the signal strength of each Wi-Fi access point in each Wi-Fi list in the multiple Wi-Fi lists collected when the electronic device is connected to the same BSSID can be converted into a distance, and the distances corresponding to the Wi-Fi access points with the same address in the multiple Wi-Fi lists are averaged to obtain List A.
  • the multiple Wi-Fi lists collected when the electronic device is connected to the same BSSID can be collected in the recent period of time (e.g., the last 7 days, the last 14 days, etc.). Based on the preset distance, the Wi-Fi access points in List A are filtered (eliminated) to obtain List B.
  • List B is the fence data.
  • the Wi-Fi access point is discarded to obtain List B, in which 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.
  • 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.
  • the electronic device can create a fence corresponding to at least one elevator.
  • fences corresponding to elevators near the user's residence (home) fences corresponding to elevators near the user's office, fences corresponding to elevators near restaurants and supermarkets that the user often visits, etc.
  • the electronic device can send the collected Wi-Fi list information to the server (cloud server), and the server generates fence data according to 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.
  • 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 are connected 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.
  • Application A is an application program in the application layer, such as a video application.
  • application A is started, and the electronic device can display the relevant interface of application A.
  • application A is the foreground application, that is, the program code of application A is running in the CPU.
  • the video playback interface 403 may include controls such as a display window of the currently playing video, a media title, and a selection button.
  • step 301b may be that application A switches from the background to the foreground, and application A is still the foreground application.
  • the perception module senses that application A is started and queries whether application A supports network acceleration.
  • the perception module can monitor the current foreground application (for example, application A) through functions such as RunningProcess, ActivityLifecycleCallbacks, and UsageStatsManager, and obtain the identification of the foreground application.
  • the terminal device is an Android system
  • the current foreground application can be monitored through the accessibility function that comes with Android, and the identification of the foreground application can be obtained.
  • 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 identification of the foreground application.
  • the specific judgment process can refer to the prior art and will not be repeated here.
  • the application identification is used to uniquely identify an application, and can have a one-to-one correspondence with the package name of the application, or the package name of the application can be used.
  • the perception module may include an application configuration library, in which information on whether multiple application programs support network acceleration is stored, and the multiple application programs include application A. As shown in Table 3, information on whether some application programs support network acceleration is exemplified.
  • the application configuration library may only store information of application programs that support network acceleration. As shown in Table 4, information of some application programs that support network acceleration is exemplified.
  • the application configuration library can also store multiple application identifiers, each of which uses different characters to indicate whether the application represented by the application identifier supports network acceleration. As an example, “1" can be used to indicate that network acceleration is supported, and "0" can be used to indicate that network acceleration is not supported. Other ways to determine whether an application supports network acceleration are not listed one by one.
  • multiple applications in the application configuration library may be intelligently determined as applications that require network acceleration based on user traffic consumption and application usage preferences.
  • multiple applications in the application configuration library may be applications that require network acceleration based on the user's manual settings.
  • Corresponding switches 221, QQ Corresponding switch 222, video application corresponding switch 223, TikTok Corresponding to switch 224, the multiple applications in the application configuration library may include WeChat QQ Video apps and TikTok
  • the perception module sends a network quality assessment request to the decision module.
  • a network quality evaluation request may be sent to the decision module. After receiving the network quality evaluation request, the decision module may execute step 304.
  • the network quality assessment request is used to request the decision module to perform network quality assessment.
  • the network quality assessment request may include an application identifier, application configuration information, and a network quality assessment standard.
  • the application configuration information refers to the message characteristics when the application performs services, and the message characteristics are the header characteristics of the data packet when the application transmits a data stream.
  • the perception module senses that application A has switched 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.
  • the decision module registers a message monitoring hook with the traffic reporting module of the kernel layer.
  • 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.
  • application A may generate one or more data streams. If it is detected that multiple data streams are generated, the communication parameters and statistical information of each data stream of application A may be periodically detected.
  • 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.
  • the traffic reporting module can obtain the message of the data flow of application A by calling the Netfilter component.
  • the information reported by the traffic reporting module to the traffic management module includes not only the message of the data flow of application A, but also some communication parameters and statistical information of the message of the data flow of application A.
  • the traffic reporting module may 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 the traffic reporting module receives the message of the data flow reported by the Netfilter component, it calls the pre-registered nf_hook hook function.
  • a message monitoring hook e.g., nf_hook hook function
  • the nf_hook hook function performs the following operations on the received data stream message: message parsing, flow table query and message analysis.
  • the message When parsing a message, you can check whether the message has an application identifier and the four-tuple (or five-tuple) of the message to get the parsing result. If there is an application identifier, the application corresponding to the message can be determined.
  • the four-tuple includes the source IP, destination IP, source port, and destination port; the five-tuple includes: source IP, destination IP, source port, destination port, and protocol number.
  • the message (data packet) itself also carries header features.
  • the four-tuple (or five-tuple) of the message of the data stream and the parameters such as the header features of the message can be collectively referred to as the communication parameters of the data stream.
  • the flow table After parsing the message, the flow table is queried according to the parsing result, and the statistical information of the flow table is updated.
  • the flow table stores the identification information of the data flow of each application, as well as the total number of messages, the number of bytes sent and received (including the number of bytes received and the number of bytes sent), the number of error packets, etc. of each data flow. Further, it can be determined whether there is no response to the downlink according to the total number of messages. For example, if the total number of messages received in two consecutive cycles is the same, it is determined that there is no response to the downlink.
  • the transmission rate can be determined according to the number of bytes received and sent.
  • the ratio of the difference between the number of bytes received in the previous cycle and the current cycle and the cycle is the downlink rate of the current cycle.
  • the packet loss situation can be determined according to the sequence number carried in the message.
  • 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.
  • the determination method of the above parameters is only for example. In actual applications, the above parameters can also be determined by other methods.
  • the total number of messages, the number of error packets, the packet loss rate, the number of bytes sent and received, the rate (uplink rate, downlink rate) and other information of the 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 flow distribution information of the data flow that changes over time, delay information of the packets of the data flow, etc.
  • 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.
  • the message can be analyzed, for example, the message can be filtered to obtain all or part of the message.
  • the filtering process may be filtering the heartbeat packet message of a certain data stream. After filtering, the heartbeat packet message of the data stream is obtained.
  • the filtering process may be: by presetting certain features, the message satisfying the features is retained. That is, the message satisfying certain pre-set features is the filtered message.
  • the heartbeat packet message is a message that exists in the data stream at a certain time interval.
  • There are fixed features e.g., 0x64 or 0x65
  • a fixed position e.g., the 6th byte. Since the heartbeat packet message is a message that exists at a certain time, the delay (e.g., the total time from when the mobile phone sends a heartbeat request message to the server to when the mobile phone receives a heartbeat response message fed back by the server) can be calculated based on the heartbeat packet message.
  • filtering can also be performed to obtain data packets that meet other characteristics.
  • the filtering condition may also include: selecting to retain a data packet message of a specific length.
  • the filtered partial messages are stored in socket buffer (SKB) queues.
  • SKB socket buffer
  • the policies for reporting the messages of the data flow stored in the SKB queue include: immediate reporting and periodic reporting.
  • a specific thread in the traffic reporting module will check the queue in time and report the messages in the queue to the traffic management module in time.
  • a timer is set in the traffic reporting module.
  • the messages in the SKB queue are checked at a certain period based on the time set by the timer, and part or all of the messages in the queue are reported to the traffic management module.
  • the specific thread in the traffic reporting module checks the queue in a timely manner and reports the messages in the queue that need to be reported immediately to the traffic management module in a timely manner.
  • a timer is also set in the traffic reporting module. Based on the time set by the timer, the message in the SKB queue is checked at a certain period, and the messages in the queue that need to be reported periodically are reported to the traffic management module.
  • the traffic reporting module does not report all messages sent by the Netfilter component to the traffic management module. Instead, it reports messages that meet specific characteristics (which can carry communication parameters and statistical information of the messages that meet specific characteristics) to the traffic management module. At the same time, it reports the communication parameters and statistical information related to the messages that meet the characteristics.
  • both message 1 and message 2 belong to the same data flow.
  • the flow table is checked after message 1 is received, the statistical information about the data flow in the flow table is updated according to message 1.
  • message 1 does not meet the specific characteristics, so message 1 is filtered out and will not be reported to the traffic management module.
  • the flow table is checked after message 2 is received, the statistical information about the data flow in the flow table is updated according to message 2.
  • message 2 meets the specific characteristics, so message 2 will not be filtered out, and message 2 will be reported to the traffic management module. That is, although some messages are reported, the statistical information is obtained based on all messages under the data flow.
  • the traffic reporting module periodically reports the communication parameters and statistical information of the data flow to the traffic management module.
  • the communication parameters of the data stream may include protocol type, source IP address and port/destination IP address and port, message features, message information (payload), etc.
  • the protocol type is the protocol type when the application transmits the data stream
  • the source IP address and port are the IP address and port used when sending the data stream
  • the destination IP address and port are the IP address and port used when receiving the data stream
  • the message features are the header features of the data packet when the application transmits the data stream.
  • the communication parameters of the data stream may be obtained from the quad-tuple or quintuple of the message of the data stream.
  • the UDP protocol is used to transmit data packets.
  • 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.
  • the statistical information of data flow can include round trip time (RTT), packet loss rate, number of bytes sent and received, rate (uplink rate, downlink rate), etc.
  • 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 of sending data flow
  • the downlink rate is the rate of receiving data flow.
  • RTT refers to the total time from the electronic device (sender) sending data to receiving confirmation from the other end (receiver) (the other end sends confirmation immediately after receiving the data).
  • the number of bytes sent and received are 10MB/8MB respectively
  • the uplink and downlink rates are 200kbit/180kbit respectively
  • the RTT is 50ms.
  • 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.
  • the traffic reporting module may report the communication parameters and statistical information of the above-mentioned application network messages through one message, or may report the communication parameters and statistical information of the application network messages separately through multiple messages, which is not limited in this application.
  • 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.
  • the traffic management module 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 Douyin) and record it in the flow table.
  • 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 by application A when using 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.
  • the traffic management module can regularly perform QoE evaluation on the data stream of the application running in the foreground.
  • the QoE evaluation conditions corresponding to different applications may be the same or different.
  • the QoE evaluation conditions may refer to the conditions satisfied by the statistical information of the data stream in several consecutive cycles.
  • the QoE evaluation conditions corresponding to different business scenarios of the same application may be the same or different.
  • the QoE evaluation conditions of the battle scene and the running picture scene of the game application may be different.
  • the QoE evaluation conditions of the video selection scene, the video playback scene, and the small window playback scene in the video application may be different. Designing different QoE evaluation conditions based on different business scenarios can make the QoE evaluation more accurate.
  • Different business scenarios can be distinguished by communication parameters. When the conditions satisfied by the communication parameters are different, the business scenarios corresponding to the communication parameters are also different.
  • the same business scenario of the same application may 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 may correspond to the same QoE measurement result, and when any of the multiple QoE evaluation conditions is met, the same QoE measurement result can be obtained.
  • 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 occurring 2 times in a row within 3 seconds, and/or the delay of the battle scene meets the condition of 200ms delay occurring 2 times in a row within 4 seconds, it can be considered that the game is not jamming.
  • the QoE measurement result of the battle scene is poor, that is, lag occurs during the battle.
  • the QoE measurement results may include: excellent (smooth without lag), medium (possibly lag) and poor (lag).
  • the mark of the excellent QoE measurement result may be 00
  • the mark of the medium QoE measurement result may be 10
  • the mark of the poor QoE measurement result may be 11.
  • the current business scenarios of the applications running in the foreground can be distinguished according to the conditions satisfied by the communication parameters of the data stream. Furthermore, the QoE measurement results of the corresponding business scenarios can be determined according to the different QoE evaluation conditions corresponding to different business scenarios. When the communication parameters and statistical information of the data stream of the application meet different conditions respectively, the QoE measurement results are different.
  • 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 data flow of an application meet the corresponding conditions, the corresponding QoE measurement result can be obtained.
  • the data stream uses UDP protocol + any port + 0x10 message header, and the data stream is continuous for 3 cycles within 5 cycles (statistical cycle) If the delay exceeds 150ms, or the packet loss exceeds 20% for 3 consecutive cycles within 4 cycles, the QoE measurement result is poor.
  • Table 5 only lists the QoE evaluation conditions (including the conditions that the communication parameters and statistical information of the data flow need to meet) and QoE measurement results of the data flows of some applications, and is only used for example. In actual applications, other different QoE evaluation conditions can also be used to obtain QoE measurement results.
  • 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 starts to download the short video through the network channel and caches part of the data frames of the short video that have been downloaded, and then obtains the data frames of the short video from the cache and starts playing. If the playback time of the short video is 15 seconds, the time starting point is the time when the user swipes to the short video.
  • the download rate per unit time will increase rapidly; from the 2nd second to the 5th second, the download rate per unit time will quickly decrease to 0; from the 5th second to the end of the playback at the 15th second, the download rate per unit time remains at 0.
  • the QoE measurement result of the data stream is poor.
  • the rate (average) in multiple consecutive cycles is 0, which may determine that the current data stream is stuck, that is, the transmission quality on the current network channel is poor.
  • the embodiment of the present application provides another method for evaluating the QoE measurement results of short video applications.
  • the characteristics of the data stream of short video applications are as follows: using the http protocol, requesting video content from the server through get, and carrying the mp4 field in the get data packet.
  • the rate of the video stream is distributed in a periodic manner, and each period includes a time period when the rate is not 0 and a time period when the rate is 0.
  • the rate distribution of the video stream includes: a continuous first time period, a second time period, and a third time period, wherein the rates of the first time period and the third time period are not 0, and the rate of the second time period is 0.
  • the average rate of the first part in 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 the network quality, and the electronic device transmits the video stream through the first network card in the third time period.
  • the rate distribution of the video stream may further include: a continuous fourth time period, a fifth time period, and a sixth time period, the rates of the fourth time period and the sixth time period are not 0, and the rate of the fifth time period is 0.
  • the average rate of the second part in the fourth time period is less than or equal to the first value, indicating 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.
  • the duration of the second part can be set equal to the duration of the first part.
  • 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.
  • a part of the time can be selected (for example, the same length as the first part) within the period, which can be recorded as the seventh time period, and the average rate of the seventh time period is determined to be less than or equal to the first time period.
  • the electronic device transmits the video stream through the second network card in the eighth time period, wherein the start time of the eighth time period is the end time of the seventh time period.
  • the average rate of the seventh time period is greater than the first value, and the electronic device transmits the video stream through the first network card in the eighth time period.
  • the case where the rate is 0 and the case where the rate is not 0 can be considered separately.
  • the rate in the embodiment of the present application represents the average downlink rate of the video stream within the mean period (for example, 300ms, 400ms, 500ms, 600ms, 700ms, etc.).
  • the average rate does not have a zero value: if the average rates in multiple (e.g., 2, 3, 4, 5, etc.) average periods are all small, the transmission quality of the data stream is poor. Of course, if the average rate value in one average period is small, the transmission quality of the data stream is poor.
  • the situation where the average rate is 0 When the average rate is 0 due to network reasons, usually before the average rate is 0, the average rate has begun to decrease (in specific implementation, the average rate within a period of time can be taken, and the end time of the period can be the time when the rate becomes 0). In this case, the transmission quality needs to be improved; when the average rate is 0 due to the end of the cache of the currently played short video, usually the average rate is still large before the average rate is 0, and in this case, the transmission quality does not need to be improved.
  • the average rate of the period when the average rate is 0 can be extended to the average rate of the previous average period when the average rate first becomes 0 (the last average period of non-0 rate).
  • the average rate of the previous average period is extended. Then, when the average rates in multiple average periods are small, the transmission quality of the data stream is poor.
  • the average rate of multiple average cycles can be set as a reference.
  • the periodic transmission quality of the current average cycle is determined according to the average rate of a single average cycle (which can be recorded as the first cycle), and then the data stream transmission quality of the current data stream is determined according to the periodic transmission quality of multiple average cycles.
  • the periodic transmission quality of the current mean period can be determined to be poor 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); when the average rate is greater than threshold A, the periodic transmission quality of the current mean period is determined to be excellent. If the average rate is 0, in the case of continuing to use the average rate of the previous mean period, it is equivalent to continuing to use the periodic transmission quality (poor or excellent) of the previous mean period.
  • 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 in the case where 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.
  • the average rate is 0, it can also be determined based on the periodic transmission quality of multiple mean periods (for example, 3, 5, 7, etc.) in the past, for example, according to the majority of the identifiers of multiple mean period transmission qualities.
  • results of the periodic transmission quality of a single mean period include the following:
  • the average speed of the current averaging period is greater than or equal to threshold A (for example, 50 kb/s); or, the average rate is equal to 0, and the periodic transmission quality of the previous averaging period is excellent.
  • threshold A for example, 50 kb/s
  • the average speed is less than the 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.
  • the data stream transmission quality of the data stream is determined to be poor. Wherein, N is less than or equal to M. If the periodic transmission qualities of less than N periodic transmission qualities of the average period are poor, the data stream transmission quality of the data stream is determined to be excellent.
  • the traffic management module periodically reports the current QoE measurement result to the decision module.
  • the traffic reporting module can periodically detect the network quality of the network used by application A, and periodically report the communication parameters and statistical information of the application network message.
  • the traffic management module periodically performs network quality evaluation based on the communication parameters and statistical information of the application network message to obtain the QoE measurement result, and periodically notifies the decision module of the current QoE measurement result until application A is closed.
  • 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 assessment to obtain QoE measurement results, and periodically notifying the decision module of the current QoE measurement results.
  • step 305 to step 306b may be executed periodically when application A is started (or when it is in the foreground).
  • 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.
  • the registration request may carry the identifier of application A and the identifier of the service (elevator prediction service) to be registered.
  • the elevator prediction service can sense whether the user has arrived at the elevator or entered the elevator. After application A registers the elevator prediction service, it can know whether the user has arrived at the elevator or entered the elevator.
  • the network acceleration service module sends a registration request to the perception module.
  • the perception module sends a registration request to the fence management module.
  • the fence management module records the application information of the registered elevator prediction capability and sends the registration result to the perception module.
  • the fence management module 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) used to provide basic services to the application layer (application).
  • SDK software development kit
  • 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., the elevator prediction permission).
  • the application with the elevator prediction permission can obtain the elevator event (for example, the elevator event such as the user arriving at the elevator entrance, the user entering the elevator event) from the operating system of the electronic device, and determine whether to perform network acceleration processing according to 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.
  • the fence management module After the fence management module successfully authenticates and verifies the registered application, for example, if it is determined that application A supports network acceleration, application A is running in the foreground, and application A has the elevator prediction permission, the application information of application A can be recorded. In addition, the fence management module can send the registration result to the perception module, and the registration result is successful. In this way, the subsequent fence management module will notify the corresponding registrant (for example, application A) after detecting the elevator event.
  • the perception module sends the registration result to the network acceleration service module.
  • the network acceleration service module sends the registration result to application A.
  • steps 302-step 306b and steps 307-step 310 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 at the same time. This embodiment does not specifically limit the execution order of the above steps.
  • the decision module reports the jamming information to the fence management module.
  • the jamming information may be sent to the fence management module.
  • 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.
  • the freeze fingerprint information may include a timestamp (the time when the freeze information is received), a Wi-Fi connection list collected after receiving the freeze information (including the address and signal strength of the Wi-Fi access point), GPS and other information.
  • the freeze fingerprint information may also include information such as the model of the electronic device.
  • the electronic device can correct the Wi-Fi list corresponding to the elevator based on the jam fingerprint information, so that the fence data can be more accurate. If the fence management module has never received jam information reported by the decision module when the electronic device is connected to the Wi-Fi access point (e.g., the first Wi-Fi access point) of an elevator (e.g., the first elevator), and it is believed that there will be no jam when the user takes the elevator (e.g., there is a Wi-Fi AP in the elevator), then 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.
  • the Wi-Fi access point e.g., the first Wi-Fi access point
  • an elevator e.g., the first elevator
  • there is a Wi-Fi AP in the elevator 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.
  • the electronic device may periodically upload the collected jam fingerprint information to a cloud server so that the cloud server can update the fence data according to the jam fingerprint information.
  • the fence management module monitors the user's motion state changes. When the user's motion state changes meet 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.
  • the preset condition is set for the motion characteristics of the user when taking the elevator. It is understandable that when taking the elevator, the user generally needs to walk to the elevator entrance first, stand still in front of the elevator entrance and wait for the elevator door to open. Exemplarily, the preset condition can be that the user stops from walking 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 the gyroscope.
  • 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.
  • the electronic device can determine that the user has switched from a moving state to a stopped state through a 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.
  • a preset time period which can be a rush hour time period (e.g., 8:30-9:30, 17:30-18:30). It is understandable that the user is more likely to take the elevator within the preset time period, so detecting whether there is a fence corresponding to the elevator within the preset time period can avoid wasted power consumption.
  • the fence management module detects whether there is a fence corresponding to the elevator around, for example, it can check the current Whether the BSSID corresponding to the connected Wi-Fi has corresponding fence data. If the BSSID corresponding to the connected Wi-Fi has fence data, the electronic device can scan the Wi-Fi information. The fence management module obtains the scanned Wi-Fi information and matches it with the fence data stored in the electronic device to determine whether the scanned BSSID meets the preset conditions.
  • the preset conditions can be, for example, that the scanned BSSID overlaps with the BSSID in the fence data (target fence data) corresponding to a certain elevator (that is, there is the same BSSID), and the number of BSSIDs with a signal strength difference of less than t dbm in the same BSSID accounts for >80% of the number of all BSSIDs in the target fence data. If the scanned BSSID meets the preset conditions and the match is successful, the elevator entrance arrival event is reported.
  • the electronic device stores at least one fence corresponding to an elevator.
  • 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 often visits, and the like.
  • 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 is commonly used (often connected) by the user when entering and exiting the elevator.
  • BSSID Wi-Fi access point
  • the address of the Wi-Fi access point connected by the user at the target elevator in the office can be used to correspond to the fence corresponding to the elevator in the office.
  • the address of the Wi-Fi access point connected by the user at the residence can be used to correspond to the fence corresponding to the elevator in the residence.
  • 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 greater value, and the embodiment of the present application does not limit the specific value of the second threshold.
  • 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.
  • the number of addresses of the same Wi-Fi access points between the Wi-Fi list scanned by the current electronic device and the target fence data exceeds 2, and the electronic device can determine that the user is waiting to enter the target elevator.
  • 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.
  • 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.
  • the third threshold of 70% is 4
  • the number of all Wi-Fi access points in the target fence data is 5
  • the number of identical Wi-Fi access point addresses accounts for 80%, which exceeds 70% of the third threshold.
  • the electronic device can determine that the user is waiting to enter the target elevator.
  • the above method provided in the embodiment of the present application can compare the fence data pre-stored in 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.
  • the electronic device can determine that the user is waiting to enter the target elevator.
  • the matchable Wi-Fi access point is a Wi-Fi access point whose corresponding network signal strength difference in the same Wi-Fi access point address is less than a first threshold.
  • the first threshold may be 5, 8, 10 or 12, etc., and the embodiment of the present application does not limit the specific value of the first threshold.
  • 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.
  • 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.
  • address 4 is a matchable Wi-Fi access point
  • address 5 is not a matchable Wi-Fi access point.
  • the second condition may be that the number of matchable Wi-Fi access points exceeds a fourth threshold.
  • the fourth threshold may be 2, 3, 4 or a greater value, and the embodiment of the present application does not limit the specific value of the fourth threshold.
  • the fourth threshold is 3 for exemplary description.
  • the number of matchable Wi-Fi access points in Table 6 is 2, that is, the Wi-Fi list scanned by the current 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.
  • the second condition may be that 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 exceeds a fifth threshold.
  • the fifth threshold may be 50%, 60%, 70% or 80%, and the embodiment of the present application does not limit the specific value of the fifth threshold.
  • the fifth threshold is 70% for exemplary description.
  • 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
  • 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%, that is, the electronic device determines that the user is not waiting to enter the target elevator.
  • the above method provided in the embodiment of the present application when predicting whether the user is waiting to enter the 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 same Wi-Fi access point between 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.
  • user 1201 carries electronic device 1202 and walks from position T1 to position T2, and stops walking at position T2. If the user is stationary at position T2 (no displacement, but it does not mean that the body cannot move) for more than 5 seconds, electronic device 1202 can start fence detection to detect whether there is a fence corresponding to the elevator around. Specifically, electronic device 1202 can perform Wi-Fi list scanning and compare the scanned Wi-Fi list with the pre-stored fence data.
  • t can be 5, 8, 10 or 12, etc.
  • the BSSID connected by the electronic device 1202 at position T2 and the scanned Wi-Fi list may be shown in Table 7.
  • the Wi-Fi access point connected by the electronic device 1202 at position T2 is AP1 (AP1 corresponds to BSSID1, that is, the electronic device 1202 connects to BSSID1 at position T2), and the signal strength of AP1 is -50.
  • the Wi-Fi access points scanned by the electronic device 1202 at position 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 the corresponding signal strengths are -60, -42, -32, and -30, respectively.
  • the Wi-Fi list corresponding to the fence corresponding to the elevator Take the Wi-Fi list corresponding to the fence corresponding to the elevator as Table 8 as an example. 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 of 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 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.
  • the user can walk from position T2 to position T3, and stop walking at position T3. If the user remains stationary at position T3 for more than 5 seconds, the electronic device 1202 can start fence detection again to detect whether there is a fence corresponding to the elevator around. Specifically, the electronic device 1202 can perform a Wi-Fi list scan and compare the scanned Wi-Fi list with the pre-stored fence data. If the number of the same BSSID with a signal strength difference less than t dbm accounts for >80%, it is considered that the match is successful, and the prediction result is that the user is within the elevator fence, that is, it is determined that the user has arrived at the elevator entrance, and the elevator entrance arrival event can be reported to the perception module.
  • the Wi-Fi list scanned by the electronic device 1202 at position T2 may be as shown in Table 9.
  • the Wi-Fi access point connected by the electronic device 1202 at position T3 is AP1 (AP1 corresponds to BSSID1, that is, the electronic device 1202 connects to BSSID1 at position T2), and the signal strength of AP1 is -50.
  • the Wi-Fi access points scanned by the electronic device 1202 at position 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 the corresponding signal strengths are -80, -58, -48, and -78, respectively.
  • the same BSSIDs in the Wi-Fi list scanned by the electronic device 1202 at position T3 and the Wi-Fi list corresponding to the fence of the elevator may include AP1, AP2, AP3, AP4, and AP5.
  • the number of identical BSSIDs with a signal strength difference less than t dbm accounts for >80%. Therefore, the match is successful, and the prediction result is that the user is in the elevator fence, and it is determined that the user has reached the elevator entrance.
  • 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.
  • 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 application A of elevator events such as the user arriving at the elevator entrance.
  • Application A receives elevator events such as the user arriving at the elevator entrance, and performs network acceleration in advance.
  • Application A receives elevator events such as the user arriving at the elevator entrance, determines that the user is waiting to enter the target elevator, and performs network acceleration processing.
  • 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.
  • 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 freezes and improve user experience.
  • application A can switch the game server and reduce the game frame rate to reduce subsequent lag and improve user experience.
  • the fence management module determines that the user enters the elevator.
  • the electronic device When the user enters the elevator from position T3, the electronic device detects a sudden drop in the WI-FI signal strength (the drop in signal strength is greater than a preset threshold) when the elevator door closes.
  • the fence management module determines that the user has entered the elevator based on the change in WI-FI signal strength, and can report the elevator entry event to the perception module to notify the user to enter the elevator.
  • the seventh threshold value can be -60dBm, -70dBm, -75dBm, etc.
  • the embodiment of the present application does not limit the specific value of the seventh threshold value.
  • the fence management module notifies the perception module of the event of the user entering the elevator.
  • the perception module notifies the decision module of the event of the user entering the elevator.
  • the decision module executes the system acceleration strategy and requests a new network channel for tuning.
  • the decision module sends a better path request to the path management module.
  • 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 to determine whether there is a network channel with better quality than the current network channel.
  • the path management module 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.
  • the electronic device is equipped with a 2.4GHz wireless network card 1, a 5.0GHz wireless network card 2, a data service network card 1 of operator A, and a data service network card 2 of operator B, then one of the wireless network card 1 or the wireless network card 2 can be defaulted as the primary Wi-Fi, and the other wireless network card can be defaulted as the secondary Wi-Fi; one of the data service network card 1 of operator A and the data service network card 2 of operator B can be defaulted as the primary card, and the other data service network card can be defaulted as the secondary card.
  • 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
  • the network channel corresponding to the data service network card 2 is the secondary cellular network.
  • the system defaults the current primary network of the electronic device or foreground application to the primary Wi-Fi network.
  • the primary Wi-Fi network is unavailable, the system defaults the current primary network of the electronic device or foreground application to the primary card cellular network.
  • the primary 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.
  • the secondary Wi-Fi network is unavailable, the system defaults the current primary network of the electronic device or foreground application to the secondary card cellular network.
  • Application A 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.
  • 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).
  • the path management module notifies the decision module of the network channel with better quality.
  • the path management module may inform the decision module of the network paths of the above-mentioned networks that are available and meet the quality requirements.
  • 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.
  • the decision module triggers the switch so as to switch the data stream of application A to a better network channel.
  • the data stream 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 that of the Wi-Fi network).
  • the policy execution module switches the data flow of application A to a more optimal network channel.
  • application A can access the Internet through a better network channel, which can improve user experience.
  • the decision module may notify the policy execution module of the kernel layer to switch the data stream of application A to multiple network channels with better quality (network quality is better than the network channel currently in use).
  • the policy execution module switches the data stream of application A to multiple network channels with better quality, so that application A can access the Internet through multiple network channels with better quality, which can improve user experience.
  • the fence management module detects that the user exits the elevator.
  • the fence management module notifies the perception module of the user exiting the elevator.
  • the perception module notifies the decision module of the user exiting the elevator.
  • the decision module restores the service of application A to the Wi-Fi network.
  • 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).
  • Application A sends a registration request to the network acceleration service module, requesting to stop the elevator prediction service.
  • the network acceleration service module sends a registration request to the perception module.
  • 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.
  • the fence management module stops the elevator prediction service of application A and no longer notifies application A whether the user enters the elevator.
  • the perception module notifies the decision module to stop network acceleration and QoE measurement of application A.
  • the perception module 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.
  • the decision module notifies the policy execution module to stop network acceleration and QoE measurement of application A.
  • the policy execution module stops network acceleration and QoE measurement of application A.
  • the operating system of the electronic device can notify the currently running application of the elevator event such as the user, so that the currently running application can cache application data in advance and/or reduce the resolution according to the elevator event such as the user, so that the subsequent user can continue to view the relevant content of the application when in the elevator (for example, continue to watch short videos, continue to watch movies, etc.).
  • 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 of the application, and better improving the user's Internet experience.
  • the embodiment of the present application further provides a computer-readable storage medium, which stores a computer program.
  • a computer program When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
  • the embodiment of the present application also provides a computer program product.
  • the computer program product When the computer program product is executed on a first device, the first device can implement the steps in the above-mentioned method embodiments.
  • 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.
  • 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 the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor.
  • the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form.
  • the computer-readable medium may at least include: any entity or device that can carry the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium.
  • a recording medium e.g., a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
  • ROM read-only memory
  • RAM Random Access Memory
  • an electric carrier signal e.g., a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
  • computer-readable media cannot be electric carrier signals and telecommunication signals.
  • the embodiment of the present application also provides a chip system, the chip system includes a processor, the processor is coupled to a memory, and the processor executes a computer program stored in the memory to implement the steps of any method embodiment of the present application.
  • the chip system can be a single chip or a chip module composed of multiple chips.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例提供一种网络加速方法和装置,涉及终端领域,能够解决用户进入电梯后上网卡顿的问题。其方法为:电子设备运行第一应用;电子设备预测用户是否等待进入目标电梯;若确定用户等待进入目标电梯,电子设备的第一应用进行网络加速处理,网络加速处理包括提前缓存第一应用的运行数据、降低第一应用的帧率、降低第一应用的码率或降低第一应用的分辨率中的至少一种。

Description

一种网络加速方法和装置
本申请要求于2022年10月17日提交国家知识产权局、申请号为202211284598.2、发明名称为“一种网络加速方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端领域,尤其涉及一种网络加速方法和装置。
背景技术
随着互联网的快速发展,人们在日常生活中越来越离不开互联网。人们经常会利用碎片时间上网,比如在等待/乘坐电梯的碎片时间使用社交短视频类应用观看短视频。
然而,用户在上网过程中进入电梯时,由于电梯对网络信号的屏蔽作用,用户使用的电子设备(例如,手机)的网络信号(蜂窝网络信号或无线保真(wireless-fidelity,Wi-Fi)网络信号)通常会突然变差甚至掉网,从而造成用户上网卡顿,导致用户体验较差。
发明内容
本申请实施例提供一种网络加速方法和装置,能够解决用户进入电梯后上网卡顿的问题。
第一方面,本申请实施例提供一种网络加速方法,应用于电子设备,包括:电子设备运行第一应用;电子设备预测用户是否等待进入目标电梯;若确定用户等待进入目标电梯,电子设备的第一应用进行网络加速处理,网络加速处理包括提前缓存第一应用的运行数据、降低第一应用的帧率、降低第一应用的码率或降低第一应用的分辨率中的至少一种。
基于本申请实施例提供的网络加速方法,在用户等待进入目标电梯(即用户在电梯口附近等待)期间,前台应用(第一应用)可以进行网络加速处理,例如提前缓存应用数据和/或降低分辨率、帧率、码率等处理,避免用户进入电梯后上网卡顿的问题,使得后续用户在电梯内时可以继续查看第一应用的相关内容(例如,继续刷短视频,继续看电影等)。
在一种可能的实现方式中,电子设备存储至少一个电梯对应的地理围栏的围栏数据,围栏数据包括电子设备在电梯附近可连接到的Wi-Fi接入点的地址和可搜索到的Wi-Fi列表信息,Wi-Fi列表信息包括至少一个Wi-Fi接入点的地址;电子设备预测用户是否等待进入目标电梯,包括:从至少一个电梯对应的地理围栏的围栏数据中获取目标围栏数据,目标围栏数据指示的可连接到的Wi-Fi接入点地址与电子设备当前连接的Wi-Fi接入点地址相同;电子设备获取当前第一Wi-Fi列表信息,当前第一Wi-Fi列表信息包括所示电子设备当前可搜索到的Wi-Fi接入点的地址;若当前第一Wi-Fi列表信息与目标围栏数据指示的可搜索到的Wi-Fi列表信息之间相同的Wi-Fi接入点地址的数量满足第一条件,确定用户等待进入目标电梯。即电子设备检查当前连接的 Wi-Fi接入点地址(的BSSID)是否有对应的围栏数据。若连接的Wi-Fi对应的BSSID存在围栏数据(目标围栏数据),电子设备可以进行Wi-Fi信息扫描得到当前第一Wi-Fi列表信息,将当前第一Wi-Fi列表信息与目标围栏数据指示的可搜索到的Wi-Fi列表信息进行对比。若当前第一Wi-Fi列表信息与目标围栏数据指示的可搜索到的Wi-Fi列表信息之间相同的Wi-Fi接入点地址的数量满足第一条件(例如,相同的Wi-Fi接入点地址的数量大于80%),即用户在当前位置搜索到的Wi-Fi列表信息与目标电梯对应的Wi-Fi列表信息相似度较大,说明用户已经非常靠近目标电梯,等待进入目标电梯(可以理解的是,在目标电梯附近处才可以搜索到与目标电梯对应的Wi-Fi列表信息相似度较大的Wi-Fi列表信息)。
在一种可能的实现方式中,Wi-Fi列表信息还包括对应Wi-Fi接入点地址的网络信号强度,确定用户等待进入目标电梯之前,还包括:相同的Wi-Fi网络接入点地址中存在的可匹配Wi-Fi网络接入点的数量满足第二条件,可匹配Wi-Fi网络接入点为相同的Wi-Fi网络接入点地址中对应的网络信号强度之差小于第一阈值的Wi-Fi网络接入点。这样,基于相同的Wi-Fi网络接入点地址的数量和网络信号强度之差小于第一阈值的Wi-Fi网络接入点的数量,可以更加准确地判断出用户是否等待进入目标电梯(即用户是否到达电梯口),减少误差。
在一种可能的实现方式中,第一条件为当前第一Wi-Fi列表信息与目标围栏数据之间相同的Wi-Fi接入点地址的数量超过第二阈值,或者第一条件为当前第一Wi-Fi列表信息与目标围栏数据之间相同的Wi-Fi接入点地址的数量占目标围栏数据中所有Wi-Fi接入点数量的比值超过第三阈值。当前第一Wi-Fi列表信息与目标围栏数据之间相同的Wi-Fi接入点地址的数量越多,表示用户在当前位置搜索到的Wi-Fi列表信息(当前第一Wi-Fi列表信息)与目标电梯对应的Wi-Fi列表信息相似度较大。
在一种可能的实现方式中,第二条件为可匹配Wi-Fi网络接入点的数量超过第四阈值,或者第二条件为可匹配Wi-Fi网络接入点的数量占目标围栏数据中所有Wi-Fi接入点数量的比值超过第五阈值。可匹配Wi-Fi网络接入点的数量越多,用户在当前位置搜索到的Wi-Fi列表信息(当前第一Wi-Fi列表信息)与目标电梯对应的Wi-Fi列表信息相似度越大。
在一种可能的实现方式中,电子设备存储的至少一个围栏数据通过以下步骤预先获得:当根据加速度的变化状态确定用户进电梯或出电梯,且电子设备连接有Wi-Fi网络,采集用户进电梯或出电梯时的第二Wi-Fi列表信息;当第二Wi-Fi列表信息的记录条数超过第六阈值,选取所有第二Wi-Fi列表信息中Wi-Fi接入点地址相同的Wi-Fi接入点作为一个地理围栏的围栏数据对应的Wi-Fi接入点,且该围栏数据对应的Wi-Fi接入点的网络信号强度为地址相同的Wi-Fi接入点的网络信号强度的平均值。即电子设备可以根据自身采集到的信息生成围栏数据。
在一种可能的实现方式中,电子设备存储的至少一个围栏数据通过以下步骤预先获得:当根据加速度的变化状态确定用户进电梯或出电梯,且电子设备连接有Wi-Fi网络,采集用户进电梯或出电梯时的第二Wi-Fi列表信息;向服务器发送第二Wi-Fi列表信息;从服务器接收至少一个地理围栏的围栏数据。即电子设备可以将自身采集到的信息发送至服务器,由服务器生成围栏数据。
在一种可能的实现方式中,在至少一个围栏数据中获取目标围栏数据之前,该方法还包括:根据电子设备的加速度确定用户由运动状态转换为停止状态,且电子设备连接有Wi-Fi网络。可以理解的,用户在等待电梯时,通常由走动转换到停止,进而电子设备可以通过速度的变化确定用户由运动状态转换为停止状态,触发预测用户是否等待进入目标电梯,进而可以进一步确定用户是否等待进入目标电梯。
在一种可能的实现方式中,该方法还包括:确定电子设备当前连接的Wi-Fi网络信号强度小于第七阈值,将当前连接的Wi-Fi网络切换为蜂窝网络。电子设备当前连接的Wi-Fi网络信号强度小于第七阈值时,可以认为用户进入电梯后电梯关闭导致当前连接的Wi-Fi网络信号强度骤降,此时电子设备可以将应用的数据流从Wi-Fi网络切换到蜂窝网络(信号覆盖相应电梯的蜂窝网络),保证用户进入电梯后可以通过蜂窝网络上网,大大降低了应用的上网卡顿概率,能更好地提升用户的上网体验。
在一种可能的实现方式中,电子设备包括围栏管理模块,围栏管理模块用于当确定用户进电梯或出电梯,且电子设备连接有Wi-Fi网络,采集用户进电梯或出电梯时的第二Wi-Fi列表信息;根据第二Wi-Fi列表信息聚类生成至少一个电梯对应的地理围栏的围栏数据,或者将第二Wi-Fi列表信息发送至服务器,并从服务器接收至少一个电梯对应的地理围栏的围栏数据。
在一种可能的实现方式中,电子设备还包括感知模块,该方法还包括:感知模块感知到第一应用启动,查询第一应用是否支持网络加速;其中,感知模块中包括应用配置库,应用配置库中存储了多个应用程序是否支持网络加速的信息,多个应用程序包括第一应用;其中,应用配置库中的多个应用程序是基于用户流量消耗情况和用户对应用的使用偏好确定出的需要网络加速的应用程序;或者应用配置库中的多个应用程序是基于用户的手动设置确定出的需要网络加速的应用。
在一种可能的实现方式中,电子设备还包括决策模块,该方法还包括:若确定第一应用支持网络加速,感知模块向决策模块发送网络质量评估请求,网络质量评估请求中包括第一应用的应用标识、应用的配置信息以及网络质量评估的标准,应用的配置信息包括第一应用传输数据流时的数据包的头部特征。
在一种可能的实现方式中,电子设备的内核层还包括流量上报模块,该方法还包括:决策模块向流量上报模块注册报文监测钩子,报文监测钩子用于周期性探测第一应用使用的网络通道的路径,以及监测第一应用使用的网络通道传输的数据流的通信参数和统计信息。
在一种可能的实现方式中,电子设备还包括流量管理模块,该方法还包括:流量上报模块向流量管理模块周期性上报第一应用的数据流的通信参数和统计信息,通信参数包括协议类型、源网际协议IP地址和端口/目的IP地址和端口、报文特征中的至少一项,统计信息包括往返时延RTT、丢包率、收发字节数、速率中的至少一项;流量管理模块根据通信参数和统计信息周期性进行网络质量评估得出当前体验质量QoE测量结果;流量管理模块周期性向决策模块上报当前QoE测量结果。
在一种可能的实现方式中,若QoE测量结果为卡顿,该方法还包括:决策模块向围栏管理模块上报卡顿信息;围栏管理模块接收到卡顿信息后采集卡顿指纹信息,根据卡顿指纹信息对至少一个电梯对应的Wi-Fi列表信息进行修正,过滤第一电梯对应 的Wi-Fi列表信息,电子设备在第一电梯处连接第一Wi-Fi接入点,电子设备连接第一Wi-Fi接入点时围栏管理模块未接收到过决策模块上报的卡顿信息,卡顿指纹信息包括接收到卡顿信息后采集到的Wi-Fi列表。
在一种可能的实现方式中,电子设备还包括网络加速服务模块,该方法还包括:第一应用向网络加速服务模块发送注册请求,注册请求用于请求电梯预测服务,以便第一应用感知用户是否到达电梯口等待进入目标电梯;网络加速服务模块向感知模块发送注册请求;感知模块向围栏管理模块发送注册请求。
在一种可能的实现方式中,该方法还包括:围栏管理模块接收注册请求后,若确定第一应用支持网络加速,第一应用在前台运行,且第一应用具备电梯预测权限,记录第一应用的应用信息,向感知模块发送注册结果,注册结果为成功;感知模块向网络加速服务模块发送注册结果;网络加速服务模块向第一应用发送注册结果。
在一种可能的实现方式中,该方法还包括:围栏管理模块监听用户的运动状态变化;当根据用户的运动状态变化确定用户进电梯或出电梯时,检测是否存在电梯对应的地理围栏;若检测到电梯对应的地理围栏,确定用户到达电梯口等待进入目标电梯;其中,用户的运动状态变化包括用户从步行状态到停止,并保持相对静止状态。
在一种可能的实现方式中,检测是否存在电梯对应的地理围栏前,该方法还包括:判断当前时间是否处于预设时间段内,预设时间段是根据上下班高峰时间确定的。
在一种可能的实现方式中,围栏管理模块检测周围是否存在电梯对应的地理围栏包括:检查电子设备当前连接的Wi-Fi接入点的BSSID是否有对应的围栏数据;若电子设备当前连接的Wi-Fi接入点的BSSID对应目标围栏数据,围栏管理模块获取当前第一Wi-Fi列表信息,当前第一Wi-Fi列表信息包括所示电子设备当前可搜索到的Wi-Fi接入点的地址;若当前第一Wi-Fi列表信息与目标围栏数据指示的可搜索到的Wi-Fi列表信息之间相同的Wi-Fi接入点地址的数量满足第一条件,确定周围存在电梯对应的地理围栏。
在一种可能的实现方式中,该方法还包括:围栏管理模块向感知模块通知用户到达电梯口等电梯事件;感知模块向网络加速服务模块通知用户到达电梯口等电梯事件;网络加速服务模块向第一应用通知用户到达电梯口等电梯事件;电子设备的第一应用进行网络加速处理包括:第一应用接收到用户到达电梯口等电梯事件,进行网络加速处理。
在一种可能的实现方式中,电子设备还包括策略执行模块和路径管理模块,该方法还包括:围栏管理模块确定用户进入电梯,向感知模块通知用户进入电梯事件;感知模块通知决策模块用户进入电梯事件;决策模块接收到用户进入电梯事件后,向路径管理模块发送更优路径请求,更优路径请求用于请求一条相比当前网络通道质量更优的网络通道;路径管理模块激活并探测各个网络通道的网络质量,确定存在相比当前网络通道质量更优的网络通道,向决策模块通知更优的网络通道;决策模块指示策略执行模块将第一应用的数据流切换到更优的网络通道上;策略执行模块将第一应用的数据流切换到更优的网络通道上。
在一种可能的实现方式中,该方法还包括:围栏管理模块检测到用户出电梯,向感知模块通知用户出电梯事件;感知模块通知决策模块用户出电梯事件;决策模块接 收到用户出电梯事件后,将第一应用的数据流切换回Wi-Fi网络。
在一种可能的实现方式中,第一应用切换到后台或关闭时,该方法还包括:第一应用向网络加速服务模块发送去注册请求,去注册请求用于请求停止电梯预测服务;网络加速服务模块向感知模块发送去注册请求;感知模块向围栏管理模块发送去注册请求;围栏管理模块停止第一应用的电梯预测服务,不再向第一应用通知用户是否进入电梯。
在一种可能的实现方式中,该方法还包括:感知模块向决策模块通知停止第一应用的QoE测量;决策模块向策略执行模块通知停止第一应用的QoE测量;策略执行模块停止第一应用的QoE测量。
第二方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令。当计算机指令在电子设备(如手机)上运行时,使得该电子设备执行如第一方面及其任一种可能的设计方式所述的方法。
第三方面,本申请提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如第一方面及其任一种可能的设计方式所述的方法。
第四方面,本申请实施例提供了一种网络加速装置,包括处理器,处理器和存储器耦合,存储器存储有程序指令,当存储器存储的程序指令被处理器执行时使得所述装置实现上述第一方面及其任一种可能的设计方式所述的方法。所述装置可以为电子设备;或可以为电子设备中的一个组成部分,如芯片。
第五方面,本申请实施例提供了一种网络加速装置,所述装置可以按照功能划分为不同的逻辑单元或模块,各单元或模块执行不同的功能,以使得所述装置执行上述第一方面及其任一种可能的设计方式所述的方法。
第六方面,本申请提供一种芯片系统,该芯片系统包括一个或多个接口电路和一个或多个处理器。该接口电路和处理器通过线路互联。
上述芯片系统可以应用于包括通信模块和存储器的电子设备。该接口电路用于从电子设备的存储器接收信号,并向处理器发送接收到的信号,该信号包括存储器中存储的计算机指令。当处理器执行该计算机指令时,电子设备可以执行如第一方面及其任一种可能的设计方式所述的方法。
可以理解地,上述提供的第二方面所述的计算机可读存储介质,第三方面所述的计算机程序产品及第四方面、第五方面所述的装置以及第六方面所述的芯片系统,所能达到的有益效果,可参考如第一方面及其任一种可能的设计方式中的有益效果,此处不再赘述。
附图说明
图1A为本申请实施例提供的一种网络通道的示意图;
图1B为本申请实施例提供的一种电子设备的硬件结构示意图;
图2为本申请实施例提供的一种电子设备的软件架构示意图;
图3为本申请实施例提供的一种显示示意图;
图4为本申请实施例提供的又一种显示示意图;
图5为本申请实施例提供的一种模块交互示意图;
图6为本申请实施例提供的一种电梯围栏示意图;
图7为本申请实施例提供的一种流程示意图;
图8为本申请实施例提供的又一种流程示意图;
图9为本申请实施例提供的又一种显示示意图;
图10为本申请实施例提供的一种报文检测的示意图;
图11为本申请实施例提供的一种短视频类应用的数据流的速率特点的示意图;
图12为本申请实施例提供的又一种短视频类应用的数据流的速率特点的示意图;
图13为本申请实施例提供的又一种电梯围栏示意图;
图14为本申请实施例提供的一种电子设备在不同时刻进行不同处理的示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“至少一个”是指一个或多个,“多个”是指两个或多于两个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
为了下述各实施例的描述清楚简洁,首先给出相关概念或技术的简要介绍:
体验质量(quality of experience,QoE):终端用户对移动网络提供的业务性能的主观感受。QoE可以通过接近量化的方法来表示终端用户对业务与网络的体验和感受,并反映当前业务和网络的质量与用户期望间的差距。
从移动通信网络的角度来说,要想获得更好的QoE的最佳方案就是提供一个优良的端到端的服务质量(quality of service,QoS)。广义的QoS为“决定用户满意程度的服务性能的综合效果”,包含多个层面较为广泛的内容。狭义QoS为底层分组数据传输的性能指标,如时延、抖动、带宽、误码等。QoS机制主要负责从网络的角度进行业务管理和提供业务的差异性,网络实体根据不同的质量需求来处理不同业务。但从终端用户的角度来体验QoS是一个更广、更主观的问题,即QoE所定义的范畴。
钩子(HOOK)函数:钩子函数实际上是一个处理消息的程序段。每当特定的消息发出,在没有到达目的窗口前,钩子函数可以先捕获该消息,亦即钩子函数先得到控制权。钩子函数可以加工处理(改变)该消息,也可以不作处理而继续传递该消息,还可以强制结束消息的传递。
数据流:本申请实施例中,将两个电子设备(例如,手机和应用程序的服务器)之间传输的数据序列记为数据流。数据流也可以称为业务流。在实际应用中,基于数据流的业务场景分类,数据流可以包括视频流、音频流、下载流、会话流等。
地理围栏:是使用定位系统网络(例如,全球卫星定位系统(global positioning system,GPS)网络、北斗卫星导航系统(beidou navigation satellite system,BDS)网络)和/或本地射频标识符(例如,Wi-Fi接入点(Wi-Fi节点)、蓝牙信标)在特定位置周围创建虚拟边界,该虚拟边界可以称为地理围栏。可以将地理围栏与硬件/软件应用程序配对,使得应用程序可以根据程序参数的指示以某种方式对地理边界进行响应。
本申请实施例中,特定位置可以是电梯,即可以在电梯周围创建虚拟边界,电梯周围的虚拟边界即是电梯对应的地理围栏(地理围栏可以简称为围栏)。可以将电梯 对应的围栏与视频类应用、游戏类应用等应用程序关联起来。视频类应用、游戏类应用等应用程序可以基于电子设备是否处于电梯对应的围栏进行相应处理。例如,当电子设备处于电梯对应的围栏中时,视频类应用可以对当前正在播放的视频或即将要播放的视频进行缓存、降低分辨率等操作;当电子设备不在电梯对应的围栏中时,视频类应用可以停止对当前正在播放的视频或即将要播放的视频进行缓存、恢复视频的分辨率等操作。
网络通道:两个电子设备之间交互数据的通道。为了便于描述,可以将一个电子设备通过无线网卡与其他电子设备之间建立的网络通道记为Wi-Fi网络;将一个电子设备通过数据业务网卡与其他电子设备之间建立的网络通道记为蜂窝网络。
其中,无线网卡为支持无线局域网(Wireless Local Area Network,WLAN)上网的装置;数据业务网卡为支持长期演进(long term evolution,LTE)、第五代移动通信技术(5th generation mobile communication technology,5G)、全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS)等移动通信技术上网的装置。
在实际应用中,网络通道的质量随用户所处的环境而变化。例如,当用户处于封闭的金属环境内时,例如电梯中,电梯关闭后,电梯的金属门吸收电磁波信号造成Wi-Fi网络信号的大幅衰减,从而造成用户上网卡顿,导致用户体验较差。
以电子设备为手机为例说明用户所处的环境对网络通道质量的影响。参见图1A中的(a),用户使用手机中的游戏应用A玩游戏,其中,手机中的应用A通过手机中的无线网卡与应用A的服务器A建立网络连接,应用A和服务器A之间产生的数据流A(例如,游戏对战时产生的数据流)通过手机上的无线网卡和无线路由器之间的Wi-Fi网络传输。当用户进入电梯后,电梯关闭会造成Wi-Fi网络信号的骤降,进而导致数据流A减小,用户使用应用A时出现卡顿的现象,导致用户体验较差。
为了解决上述问题,参见图1A中的(b),手机可以将数据流A切换到手机的数据业务网卡和基站之间的蜂窝网络上,以通过该蜂窝网络与服务器A传输数据流A,进而减小Wi-Fi网络信号骤降带来的上网卡顿。
然而,上述手机将Wi-Fi网络切换为蜂窝网络切换的时机是通过手机上内置的加速度传感器检测到用户乘坐电梯后,将Wi-Fi网络切换为蜂窝网络。即手机通过检测用户进入电梯且电梯运行后用户的移动状态来判断是否将Wi-Fi网络切换为蜂窝网络。对于用户而言,此时电梯已经关门并运行,已经使得应用A的数据流A减小,造成用户上网卡顿。
鉴于此,本申请实施例提供一种网络加速方法,在用户在电梯口附近等待期间,电子设备的操作系统可以向当前正在运行的应用通知用户等电梯事件,使得当前正在运行的应用可以根据用户等电梯事件进行提前缓存应用数据和/或降低分辨率等处理,以便后续用户在电梯内时可以继续查看应用的相关内容(例如,继续刷短视频,继续看电影等)。进一步的,在电梯关门瞬间,电子设备可以将应用的数据流从Wi-Fi网络切换到蜂窝网络,从而保证了用户进入电梯后依然能有流畅的上网体验,大大降低了应用的上网卡顿概率,能更好地提升用户的上网体验。
本申请实施例提供的网络加速方法可以应用于电子设备。图1B为本申请实施例 提供的一种电子设备100的结构示意图。
如图1B所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。
其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本实施例示意的结构并不构成对电子设备100的具体限定。在另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括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,和/或IR技术等。所述GNSS可以包括GPS,全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。该显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),发光二极管(light-emitting diode,LED),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。ISP用于处理摄像头193反馈的数据。摄像头193用于捕获静态图像或视频。数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
摄像头193可以包括1~N个。例如电子设备可以包括2个前置摄像头和4个后置摄像头。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。例如,在本申请实施例中,处理器110可以通过执行存储在内部存储器121中的指令,内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。扬声器 170A,也称“喇叭”,用于将音频电信号转换为声音信号。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。耳机接口170D用于连接有线耳机。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。
以下实施例中的方法均可以在具有上述硬件结构的电子设备100中实现。
上述电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过接口通信。
在一些实施例中,如图2所示,电子设备100的技术架构包括:应用层、服务层、策略层和内核层。应该理解的是,图2中仅示出了与本申请实施例相关的部分层和部分组件(模块),实际应用中,还可以包括图2中未示出的层级和组件。当然,也可以仅包含图2所示的组件中的部分组件。
其中,应用层中存在各种应用,例如视频类应用,游戏类应用等。
服务层中存在网络加速服务模块、感知模块、路径管理模块和围栏管理模块。
其中,网络加速服务模块是应用程序与感知模块交互的通道。网络加速服务模块可以基于Binder机制为应用程序与感知模块转发消息(例如,注册请求)。其中,Binder是一种进程间通信机制,可以实现不同进程之间的通信。
围栏管理模块可以包括电梯感知、用户状态识别、围栏数据采集、围栏数据库、围栏数据生成、围栏数据预测等子模块(图2中未示出)。其中,电梯感知子模块用于感知用户是否进出电梯。电梯感知子模块可以将用户进出电梯事件通知围栏数据采集子模块。围栏数据采集子模块用于采集电子设备当前连接的Wi-Fi信息和当前可扫描到的Wi-Fi列表信息。围栏数据库用于存储围栏数据采集子模块采集的数据。围栏数据生成子模块用于根据围栏数据采集的数据生成至少一个地理围栏的围栏数据,每个地理围栏的围栏数据可以与用户进出电梯时连接的Wi-Fi网络(的BSSID)对应,即可以用用户进出某电梯时连接的Wi-Fi网络(的BSSID)标识该电梯对应的地理围栏。用户状态识别子模块用于识别用户运动状态和运动停止状态的变化,进而触发围栏数据预测子模块预测用户是否等待进入电梯。围栏数据预测子模块用于根据当前电子设备连接的Wi-Fi网络和地理围栏数据预测用户是否到达电梯口以及是否进入电梯,当预测用户到达电梯口或进入目标电梯,向感知模块上报用户到达电梯口或进入目标电梯的事件。
感知模块可以探测上层应用的各种事件。作为示例,感知模块可以探测应用的打 开、退出,还可以探测当前切换到前台/后台的应用,还可以探测应用的安装、卸载等。当感知模块探测到应用打开或应用切换到前台时,可以通知下层模块(决策模块)开启数据流的监控功能。
路径管理模块可以用于探测电子设备支持的Wi-Fi网络和蜂窝网络的状态(开启或关闭等)。作为示例,若电子设备中设置有2.4GHz频段的无线网卡1和5.0GHz频段的无线网卡2。路径管理模块可以探测2.4GHz频段的无线网络为开启还是关闭状态;还可以探测5.0GHz频段的无线网络为开启或关闭状态。若电子设备中设有运营商A的数据业务网卡1和运营商B的数据业务网卡2。路径管理模块可以探测运营商A的数据业务为开启还是关闭状态;还可以探测运营商B的数据业务为开启还是关闭状态。
路径管理模块还用于评估网络通道的质量。作为示例,路径管理模块可以评估2.4GHz频段的Wi-Fi网络的质量,还可以评估5.0GHz频段的Wi-Fi网络的质量。也可以评估运营商A的蜂窝网络的质量,还可以评估运营商B的蜂窝网络的质量。
路径管理模块还可以存储多条网络通道的路径,示例性的,可以存储应用当前使用的网络通道(例如,主网络通道)及备用网络通道的路径。路径管理模块还可以用于根据决策模块的策略变化更新网络通道的选取,触发网络通道质量探测,动态选取最优通道。路径管理模块可以启动选取的最优通道,即将网络通道从休眠状态转换为唤醒状态,唤醒状态的网络通道可以直接被使用。路径管理模块可以关闭非最优通道,即将网络通道从唤醒状态转换为休眠状态,休眠状态的网络通道暂时无法被使用。
策略层中设有流量管理模块和决策模块。
其中,流量管理模块用于对内核层上报的数据流进行统计,评估各个数据流的网络质量。
决策模块可以根据用户是否进出电梯执行相应的处理。例如,当确定用户进入电梯后,执行系统加速策略,请求一条新的网络通道进行调优(例如,可以将应用的业务从Wi-Fi网络切换到蜂窝网络)。当确定用户出电梯后,恢复应用的业务到Wi-Fi网络(即将应用的业务从蜂窝网络切换回Wi-Fi网络)。
内核层存在策略执行模块和流量上报模块。其中,流量上报模块用于收集数据流信息,并上报收集的数据流信息。策略执行模块用于执行网络通道的切换。
在本申请另一实施例中,上述实施例中一个模块(组件)可以拆分为两个或多个模块,或者位于同一层级的两个或多个模块可以合并为同一模块。
作为示例,服务层的路径管理模块可以拆分为路径探测模块和路径控制模块,路径探测模块可以用于探测电子设备支持的Wi-Fi网络和蜂窝网络的状态和质量。路径控制模块可以用于根据决策模块的策略变化更新网络通道的选取,触发网络通道质量探测,动态选取最优通道。
为了便于理解,以下结合附图对本申请实施例提供的网络加速方法进行具体介绍。
电子设备的操作系统执行网络加速方法前,需要用户提前开启网络加速功能。下面对用户提前开启网络加速功能的UI界面和用户操作进行说明。
示例性的,如图3中的(a)所示,手机显示桌面201。响应于用户在桌面201点击设置应用的图标202的操作,如图3中的(b)所示,手机可以显示设置界面203。设置界面203中可以包括WLAN选项204,还可以包括搜索框以及个人账号、蓝牙、 移动网络、桌面和壁纸等功能选项。响应于用户点击WLAN选项204对应的控件的操作,如图3中的(c)所示,手机可以显示WLAN界面205。WLAN界面205中可以包括WLAN开关206。WLAN开关206为开启状态,表示手机可以连接WLAN进行上网。WLAN界面205中还可以包括网络加速选项207,以及更多WLAN设置选项和可用WLAN列表,可用WLAN列表可以包括手机当前扫描到的多个WLAN网络的名称(例如HONOR1、HONOR2、HONOR3等)和信号强度标识等。响应于用户点击网络加速选项207对应的控件的操作,如图3中的(d)所示,手机可以显示网络加速界面208。网络加速界面208中可以包括网络加速功能的文字说明209,文字说明209表示网络加速功能的作用是“评估当前网络质量,智能使用WLAN和移动数据提升上网体验,此过程会联网并消耗部分移动数据流量”。可选的,若用户开启荣耀智慧能力,网络加速将提供更智能的服务。用户可以点击链接“荣耀智慧能力与隐私的声明”来查看荣耀智慧能力的说明。其中,荣耀智慧能力开启后,操作系统可以收集用户使用手机的习惯,根据用户的习惯为用户提供个性化服务。网络加速界面208中还可以包括网络加速(LINK Trubo)对应的开关210。开关210为开启状态,表示用户同意开启网络加速功能,从而手机可以评估当前网络质量,智能使用WLAN和移动数据提升上网体验。当然,用户可以选择关闭开关210,即关闭网络加速功能。在开关210下方,可以显示文本框211,文本框211中的文字用于向用户说明网络加速功能的效果和流量使用情况。例如,网络加速功能开启后,提升下载速度35%,使用流量100M;减少网络卡顿40次,使用流量40M。需要说明的是,网络加速功能可以包括并发加速功能212和协同加速功能214。并发加速功能212包括多通道下载模式213,用户可以通过控件217进入多通道下载模式的设置界面,开启或关闭多通道下载模式。多通道下载模式213开启时,电子设备连接WLAN和移动网络时,可以同时使用多个网络通道并发下载,获得更极速的下载体验。图3中的(d)中多通道下载模式213是已关闭状态。协同加速功能214包括智能模式215和自定义模式216。智能模式215下,可以基于用户流量消耗情况和应用使用偏好,智能开启需要网络加速的应用。用户可以通过控件218开启或关闭智能模式。图3中的(d)中控件218为选中状态,智能模式开启。自定义模式216下,用户可以手动开启需要加速(网络加速)的应用。用户可以通过控件219开启或关闭自定义模式。图3中的(d)中控件219为未选中状态时,自定义模式关闭。用户选择协同加速功能214的智能模式215或自定义模式216时,相应应用程序(智能模式215下智能开启的需要网络加速的应用,或自定义模式216下用户手动选择的需要网络加速的应用)在前台运行时,若发生网络卡顿,电子设备可以将卡顿的网络通道切换到通信质量更好的网络通道,获得更好的上网体验。
如图4中的(a)所示,响应于用户选中控件219以开启自定义模式216的操作,如图4中的(b)所示,手机可以显示手机安装的各种应用程序的信息(图标、名称等)及其对应的开关。例如,手机可以显示微信对应的开关221、QQ对应的开关222、视频应用对应的开关223、抖音对应的开关224和音乐应用对应的开关225等。用户可以根据自己的需求手动选择需要加速的应用程序。例如,用户可以开启微信对应的开关221、QQ对应的开关222、视频应用对应的开关223、抖音对应的开关224,表示用户在使用微信QQ视频应用和抖音时,手机需要开启网络加速以保证 用户的使用体验。
参见图5,为本申请实施例提供的基于图2所示的各个模块实现的一种网络加速方法的时序图,包括两部分,第一部分是电梯对应的地理围栏的生成过程,包括步骤301a;第二部分是对用户到达、进入或走出电梯事件的预测和相应的网络加速过程,包括步骤301b-337。
301a、围栏管理模块采集电梯口附近的Wi-Fi信息,聚类生成电梯对应的围栏。
可以理解的,围栏是一个地域概念,可以指代有边界的地理区域。示例性的,参见图6,为一种电梯对应的围栏的示意图,电梯对应的围栏覆盖电梯周围区域。其中,电梯可以是指用户经常使用的电梯。用户经常使用的电梯可以包括用户的住所(家)附近的电梯,用户的办公室附近的电梯,用户常去的餐厅、商超附近的电梯等。
可以理解的是,电梯周围通常有多个固定的Wi-Fi接入点。例如,对于一梯多户的住宅楼,某一楼层的电梯口附近会有多个住户家中设置的Wi-Fi接入点。多个住户家中设置的Wi-Fi接入点的BSSID不同。又例如,对于办公楼,某一楼层的电梯口附近会有多个Wi-Fi接入点。其中,多个Wi-Fi接入点的BSSID不同(例如,一家公司面积比较大,安装了多个Wi-Fi接入点(无线访问接入点(wireless access point,AP)或者无线路由器),该公司可以将多个Wi-Fi接入点的SSID设置为相同,但多个Wi-Fi接入点的BSSID不同)。参见图6,电梯对应的围栏内包括AP1、AP2、AP3、AP4、AP5等Wi-Fi接入点,这些Wi-Fi接入点是用户进出电梯时电子设备可以扫描到的Wi-Fi接入点。
电子设备可以在用户进出电梯(进电梯和/或出电梯)时采集Wi-Fi信息。电子设备可以根据加速度计等传感器的数据确定用户是否进出电梯。例如,若加速度计检测到电子设备的加速度从零开始增加,然后又降低为零,确定用户处于乘坐电梯的场景,并即将出电梯。
在一些实施例中,电子设备在用户进出电梯时采集到的Wi-Fi信息可以包括电子设备在用户进电梯前或出电梯后预设时间(例如,10-30秒)内采集到的Wi-Fi信息。也就是说,电子设备可以缓存用户进电梯前或出电梯后10-30秒内扫描到的Wi-Fi接入点的BSSID和信号强度。其中,电子设备采集到的Wi-Fi信息包括用户进电梯前或出电梯后电子设备连接的Wi-Fi接入点的地址和信号强度信息,以及电子设备扫描到的Wi-Fi列表信息。电子设备扫描到的Wi-Fi列表信息可以包括电子设备在电梯口扫描(搜索)到的至少一个Wi-Fi接入点的地址。可选的,Wi-Fi列表还可以包括电子设备在电梯口搜索到的至少一个Wi-Fi接入点的信号强度。示例性的,Wi-Fi接入点的地址可以是BSSID。Wi-Fi网络信号的强度可以是(received signal strength indication,RSSI)。可选的,Wi-Fi列表中还可以包括电子设备的开机时间和Wi-Fi信号的中心频率等,本申请不做限定。
为了更加准确地表征目标电梯所处的实际地理位置,本申请实施例可以通过多次采集Wi-Fi列表信息的方式生成地理围栏的围栏数据,例如图7所示的实施例。如图7所示,电子设备存储的至少一个围栏数据通过以下步骤预先获得:
S1、当根据加速度的变化状态确定用户进/出电梯,且电子设备连接有Wi-Fi网络,采集Wi-Fi列表信息。
可以理解的是,每次用户进/出电梯时电子设备可以采集Wi-Fi列表信息,一段时间(例如,一周、两周、一月)内电子设备可以采集多个Wi-Fi列表信息。
在一种可能的设计中,可以通过用户进出电梯时连接的Wi-Fi网络的BSSID作为该电梯对应的地理围栏的标识,从而区分不同电梯对应的地理围栏。例如,用户在住所乘坐电梯上下楼的应用场景下,可以采用电子设备在住所连接的Wi-Fi网络的BSSID作为住所的目标电梯的地理围栏的标识。又例如,用户在办公室乘坐电梯上下楼的应用场景下,可以采用在办公室连接的Wi-Fi网络的BSSID作为对应办公室的目标电梯的地理围栏的标识。
S2、当电子设备连接同一个Wi-Fi接入点时采集到的Wi-Fi列表的数目超过预设阈值,电子设备选取这些Wi-Fi列表(电子设备连接同一个Wi-Fi接入点采集到的全部Wi-Fi列表)中地址相同的Wi-Fi接入点,根据地址相同的Wi-Fi接入点的信息得到电梯对应的地理围栏的围栏数据。
可选的,预设阈值可以是2、3、4或者更大的数值,本申请实施例对此不做限定。
可以理解的,电子设备连接同一个Wi-Fi接入点时采集到的Wi-Fi列表可以是指电子设备连接相同Wi-Fi接入点(例如,住所的Wi-Fi接入点)的情况下,用户在不同时间进出电梯时采集得到的Wi-Fi列表信息。
以BSSID表示Wi-Fi接入点的地址,以RSSI表示Wi-Fi网络信号强度为例,示例性说明电子设备连接同一个Wi-Fi接入点时采集到的Wi-Fi列表的记录。
参见表1,电子设备每次进或出电梯时记录的Wi-Fi列表信息可以包括用户进或出电梯时电子设备连接的Wi-Fi接入点的BSSID和RSSI,以及电子设备当时所搜索到的Wi-Fi接入点的BSSID和RSSI。可选的,电子设备每次进或出电梯时记录的Wi-Fi列表信息还可以包括用户进或出电梯的时间戳。
表1
示例性的,以预设阈值为2,当Wi-Fi列表的记录数目超过2时,电子设备选取该2个Wi-Fi列表中Wi-Fi接入点地址相同的Wi-Fi接入点。比如表1中,第一条记录和第二记录之间地址相同的BSSID为6c:16:32:17:3c:95、6c:16:32:17:3c:51和 6c:17:32:27:2c:92,因此生成的围栏数据中Wi-Fi接入点的地址分为6c:16:32:17:3c:95、6c:16:32:17:3c:51和6c:17:32:27:2c:92,如表2所示。
进一步的,可以对地址相同的Wi-Fi接入点的信号强度取平均值生成围栏数据。参见表1,BSSID为6c:16:32:17:3c:95的Wi-Fi接入点对应的RSSI分别为-50dBm和-48dBm,对-50dBm和-48dBm取平均值为-49dBm。参见表2,围栏数据包括BSSID为6c:16:32:17:3c:95的Wi-Fi接入点的RSSI为-49dBm。同理,BSSID为6c:16:32:17:3c:51的Wi-Fi接入点的RSSI为-61dBm,BSSID为6c:17:32:27:2c:92的Wi-Fi接入点的RSSI为-71dBm。
表2
本申请实施例提供的方法,通过对不同时间下用户进出同一部电梯(例如,住所的电梯)时采集到的Wi-Fi列表信息的记录取交集和计算平均网络信号强度的方式,来生成电梯(例如,住所的电梯)的围栏数据,可以使得生成的围栏数据更接近电梯(例如,住所的电梯)所在实际的地理位置,进而提高电子设备预测用户是否等待进入电梯的准确程度。
在另一种可能的设计中,如图8所示,电子设备生成电梯对应的地理围栏的围栏数据(即电梯对应的围栏数据)的过程可以包括:电子设备获取用户进出电梯时采集到的Wi-Fi信息;根据电子设备在用户进出电梯时连接的BSSID(即电子设备进出电梯时连接的Wi-Fi接入点的BSSID)对Wi-Fi列表(即电子设备进出电梯时扫描到的Wi-Fi列表)进行分类,得到用户进出电梯时连接的多个BSSID中每个BSSID对应的多个Wi-Fi列表。可以将电子设备连接同一个BSSID时采集到的多个Wi-Fi列表中每个Wi-Fi列表中的每个Wi-Fi接入点的信号强度转换为距离,对所述多个Wi-Fi列表中地址相同的Wi-Fi接入点对应的距离取均值得到列表A。其中,电子设备连接同一个BSSID时采集到的多个Wi-Fi列表可以是在最近一段时间(例如,最近7天,最近14天等)采集到的。基于预设距离过滤(剔除)列表A中的Wi-Fi接入点得到列表B。列表B即围栏数据。换句话说,列表A中Wi-Fi接入点对应的距离大于预设距离时,丢弃该Wi-Fi接入点,得到列表B,列表B中每个Wi-Fi接入点对应的距离都不大于(小于或等于)预设距离。这样,可以使得后续生成的围栏的范围更加精确。然后,可以使用采集到的Wi-Fi列表匹配列表B,即对列表B进行有效性校验。当Wi-Fi列表的数据与列表B代表的围栏数据的相似度(包括BSSID的和距离的相似度)满足预设条件(例如,相似度达到80%)时,认为列表B代表的围栏数据有效,即可以用列表B表示电梯的围栏数据。
基于上述方法,电子设备可以创建至少一个电梯对应的围栏。例如,电子设备可 以创建用户的住所(家)附近的电梯对应的围栏,用户的办公室附近的电梯对应的围栏,用户常去的餐厅、商超附近的电梯对应的围栏等。
在一些实施例中,电子设备可以将采集到的Wi-Fi列表信息发送给服务器(云服务器),服务器根据电子设备采集到的Wi-Fi列表信息生成围栏数据,服务器生成围栏数据的过程可以参考上文中电子设备生成围栏数据的过程。电子设备可以从服务器接收围栏数据并存储起来。
在一种可能的设计中,服务器可以接收多个电子设备在同一个电梯处上报的Wi-Fi列表信息,选取这些Wi-Fi列表(多个电子设备连接同一个Wi-Fi接入点采集到的全部Wi-Fi列表)中地址相同的Wi-Fi接入点,根据地址相同的Wi-Fi接入点的信息生成电梯对应的地理围栏的围栏数据,使得生成的围栏数据更加精确。
301b、响应于用户打开应用A的操作,应用A启动。
应用A是应用层的一个应用程序,例如可以是视频应用。响应于用户打开应用A的操作,应用A启动,电子设备可以显示应用A的相关界面。此时应用A是前台应用,即应用A的程序代码正在CPU中运行。
以应用A为游戏应用为例,如图9中的(a)所示,响应于用户在桌面401点击游戏应用的图标402的操作,视频应用启动,手机可以显示视频应用的主界面。响应于用户在视频应用的主界面选择一个视频进行播放,如图9中的(b)所示,手机可以显示视频播放界面403。视频播放界面403可以包括当前正在播放的视频的显示窗口、媒体标题和选集按钮等控件。
或者,步骤301b可以是应用A从后台切换至前台,此时应用A仍是前台应用。
302、感知模块感知到应用A启动,查询应用A是否支持网络加速。
示例性的,感知模块可以通过RunningProcess、ActivityLifecycleCallbacks、UsageStatsManager等函数监测当前的前台应用(例如,应用A),并获取前台应用的标识。或者,若终端设备为Android系统,可以通过Android自带的无障碍功能监测当前的前台应用,并获取前台应用的标识。或者,若终端设备为Linux系统,可以读取Linux系统内核保存在/proc目录下的process进程信息监测当前的前台应用,并获取前台应用的标识。具体判断过程可以参考现有技术,在此不做赘述。其中,应用的标识用于唯一识别一个应用,可以和应用的包名具有一一对应的关系,也可以采用应用的包名。
感知模块中可以包括应用配置库,应用配置库中存储了多个应用程序是否支持网络加速的信息,多个应用程序包括应用A。如表3所示,示例性示出部分应用程序是否支持网络加速的信息。
表3

或者,应用配置库中可以仅存储支持网络加速的应用程序的信息。如表4所示,示例性示出部分支持网络加速的应用程序的信息。
表4
实际应用中,该应用配置库还可以存储多个应用标识,每个应用标识采用不同的字符表示该应用标识表示的应用是否支持网络加速。作为示例,可以采用“1”表示支持网络加速,采用“0”表示不支持网络加速。其他确定应用是否支持网络加速的方式不再一一举例。
在一种可能的实施方式中,如图3中的(d)所示,若用户选择协同加速功能214的智能模式215,应用配置库中的多个应用程序可以是基于用户流量消耗情况和应用使用偏好,智能确定出的需要网络加速的应用程序。
在另一种可能的实施方式中,如图4中的(a)所示,若用户选择协同加速功能的自定义模式216,应用配置库中的多个应用可以是基于用户的手动设置确定出的需要网络加速的应用。例如,如图4中的(b)所示,若用户开启微信对应的开关221、QQ对应的开关222、视频应用对应的开关223、抖音对应的开关224,应用配置库中的多个应用程序可以包括微信QQ视频应用和抖音
303、若确定应用A支持网络加速,感知模块向决策模块发送网络质量评估请求。
若感知模块通过查询应用配置库确定应用A支持网络加速,可以向决策模块发送网络质量评估请求。决策模块接收到网络质量评估请求后,可以执行步骤304。
其中,网络质量评估请求用于请求决策模块进行网络质量评估。网络质量评估请求中可以包括应用标识、应用的配置信息以及网络质量评估的标准。其中,应用的配置信息是指应用进行业务时的报文特征,报文特征为应用传输数据流时的数据包的头部特征。
或者,感知模块感知到应用A切换到前台,可以通知决策模块,决策模块可以查询应用配置库确定应用A是否支持网络加速,若确定应用A支持网络加速,可以执行步骤304。
304、决策模块向内核层的流量上报模块注册报文监测钩子。
报文监测钩子可以周期性探测应用A当前使用的网络通道的路径,以及监测应用A使用的网络通道传输的数据流的通信参数和统计信息。
应用A在实现某个功能时,可能产生一个或多个数据流。若检测到产生多个数据流,可以周期性检测应用A的每条数据流的通信参数和统计信息。
下面具体描述报文监测钩子如何监测应用A的数据流的通信参数和统计信息,并将监测到的数据流的通信参数和统计信息发送给流量管理模块。
电子设备的系统中存在Netfilter组件(钩子函数管理组件),通过该组件可以获取到特定应用标识对应的应用(例如,应用A)的数据流。流量上报模块可以通过调用Netfilter组件获取应用A的数据流的报文。具体实现时,流量上报模块上报给流量管理模块的信息不仅包括应用A的数据流的报文,还包括应用A的数据流的报文的一些通信参数和统计信息。
参见图10,流量上报模块可以预先注册报文监测钩子(例如,nf_hook钩子函数)。在流量上报模块调用Netfilter组件后,Netfilter组件上报应用A的数据流的报文,流量上报模块接收到Netfilter组件上报的数据流的报文之后,调用预先注册的nf_hook钩子函数。
该nf_hook钩子函数对接收到的数据流的报文进行以下操作:报文解析、查流表和报文分析等操作。
在进行报文解析时,可以查看该报文是否存在应用标识以及该报文的四元组(或五元组),以得到解析结果。若存在应用标识,则可以确定该报文对应的应用程序。四元组中包括源IP、目的IP、源端口、目的端口;五元组中包括:源IP、目的IP、源端口、目的端口以及协议号。另外,报文(数据包)本身也携带了头部特征。数据流的报文的四元组(或五元组)以及报文的头部特征等参数可以统称为数据流的通信参数。
在进行报文解析之后,根据解析结果查询流表,并更新流表的统计信息。流表中存储了各个应用中数据流的标识信息、以及各个数据流的报文总数、收发字节数(包括接收字节数和发送字节数)、错误包数量等。进一步的,可以根据报文总数确定是否下行无响应,例如,连续两个周期内接收到的报文总数相同,则确定下行无响应。可以根据收发字节数确定传输速率,例如,上一周期和本周期接收到的字节数的差值与周期的比值为本周期下行速率。可以根据报文中携带的序列号确定丢包情况,例如,丢包率(loss tolerance或packet loss rate)可以是缺失的序列号的数目与现有的序列号的数目的比值。当然,上述参数的确定方式仅用于举例,在实际应用中,还可以通过其他方式确定上述参数。数据流的报文总数、错误包数量、丢包率、收发字节数、速率(上行速率、下行速率)等信息可以统称为数据流的统计信息。实际应用中,各个流的统计信息还可以包括其他信息,例如,数据流随时间变化的流量分布信息、数据流的报文的时延信息等。
当然,若流表中不存在某个数据流的标识信息或相关统计信息时,则可以在流表中增加该数据流的标识以及相关的统计信息。
在查流表并更新流表信息之后,则可以对报文进行分析。例如,过滤报文,从而得到全部或部分报文。
作为一种示例,该过滤过程可以是过滤某个数据流的心跳包报文。则经过过滤处理后,得到该数据流的心跳包报文。该过滤处理过程可以是:通过预先设置某些特征,将满足该特征的报文保留。即满足预先设置的某些特征的报文就为过滤后的报文。
其中,心跳包报文为按照一定的时间间隔存在于数据流中的报文。心跳包报文在 固定位置(例如第6个字节)存在固定特征(例如0x64或0x65)。由于该心跳包报文为按照一定时间存在的报文,因此可以基于该心跳包报文计算获得时延(例如,手机向服务器发送心跳请求报文开始,到手机接收到服务器反馈的心跳响应报文为止,总共经历的时间)。
上述示例以过滤心跳包为例进行说明,实际应用中,还可以过滤处理以获得满足其它特征的数据包报文。
作为另一示例,过滤条件还可以包括:选择保留特定长度的数据包报文。在具体实现时,确定数据包报文的长度是否为预先设置的特定长度,若是,则保留该报文,若否,则将该报文过滤掉。
经过上述处理后,得到的过滤后的部分报文被存储在套接字缓存(Socket-Buffer,SKB)队列(queues)中。
SKB队列中存储的数据流的报文上报时的策略包括:立即上报和定期上报。
若为立即上报,流量上报模块中的特定线程及时查看队列,将队列中的报文及时上报给流量管理模块。
若为定期上报,流量上报模块中设置了定时器,基于该定时器设置的时间以一定的周期查看SKB队列中的报文,将队列中的部分或全部报文上报给流量管理模块。
当然,实际应用中,SKB队列中存储的数据流的报文有些是需要立即上报的,有些是需要定期上报的。同样的原理,流量上报模块中的特定线程及时查看队列,将队列中的需要立即上报的报文及时上报给流量管理模块。流量上报模块中还设置了定时器,基于该定时器设置的时间以一定的周期查看SKB队列中的报文,将队列中的需要定期上报的报文上报给流量管理模块。
需要说明,上报报文时,还可以一并上报该报文相关的统计信息。
基于上述理解,流量上报模块并不是将Netfilter组件发送的所有报文均上报给流量管理模块。而是,将满足特定特征的报文(可以携带该满足特定特征的报文的通信参数和统计信息)上报给流量管理模块。同时上报该满足特征的报文相关的通信参数和统计信息。
作为示例,若报文1和报文2均属于同一数据流的报文。接收到报文1后查流表时,根据报文1更新流表中关于该数据流的统计信息,然而,报文1不满足特定特征,所以报文1被过滤掉,不会上报给流量管理模块。接收到报文2后查流表时,根据报文2更新流表中关于该数据流的统计信息,报文2满足特定特征,所以报文2不会被过滤掉,报文2会被上报给流量管理模块。即虽然上报了部分报文,然而,统计信息是基于该数据流下的所有报文得到的。
305、流量上报模块向流量管理模块周期性上报数据流的通信参数和统计信息。
其中,数据流的通信参数可以包括协议类型、源IP地址和端口/目的IP地址和端口、报文特征、报文信息(payload)等。其中,协议类型为应用传输数据流时的协议类型,源IP地址和端口为发送数据流时使用的IP地址和端口,目的IP地址和端口为接收数据流时使用的IP地址和端口,报文特征为应用传输数据流时的数据包的头部特征。数据流的通信参数可以是从数据流的报文的四元组或五元组获取到的。
例如,某社交通信类应用在进行音视频通话时,数据流对应的数据包的头部特征 为97开头,即data[0]=97,传输数据包时采用UDP协议,源IP地址和端口分别为221.11.6.XX和8080,目的IP地址和端口分别为221.14.4.XX和5050。
数据流的统计信息可以包括往返时延(round trip time,RTT)、丢包率、收发字节数、速率(上行速率、下行速率)等。其中,收发字节数包括发送字节数(即上传流量)和接收字节数(即下载流量)。丢包率为丢失数据包数量占所发送数据包的比率。上行速率为发送数据流的速率,下行速率为接收数据流的速率。RTT表示从电子设备(发送端)发送数据开始,到接收收到来自对端(接收端)的确认(对端接收到数据后便立即发送确认),总共经历的时长。
例如,某社交通信类应用在进行音视频通话时,收发字节数分别为10MB/8MB,上行速率和下行速率分别为200kbit/180kbit,RTT为50ms。
当然,实际应用中,流量上报模块还可以向流量管理模块上报应用网络报文的其他参数,例如流间隔时间、包间隔时间、包大小和流量分布等信息,本申请不做限定。
可选的,流量上报模块可以通过一条消息上报上述应用网络报文的通信参数和统计信息,或者,可以通过多条消息分别上报应用网络报文的通信参数和统计信息,本申请不做限定。
306a、流量管理模块根据数据流的通信参数和统计信息周期性进行网络质量评估得出当前QoE测量结果。
流量管理模块接收到应用A的数据流的通信参数和统计信息后,可以查询应用A的流特征库,比如可以根据报文的协议类型、端口、报文协议头等特征识别出前台运行的应用的业务场景(例如,识别出是抖音的短视频播放场景)并记录到流表中。其中,应用A的流特征库中存储该应用A的数据流的各种信息,例如,应用A使用当前网络时采用的协议的协议特征,应用A使用当前网络时传输的数据包的头部特征等。当然,还可以包括应用A使用当前网络时的流量特征等,在此不做限定。
流量管理模块可以定期对前台运行的应用的数据流进行QoE评估。实际应用中,不同的应用对应的QoE评估条件可以相同或不同。其中,QoE评估条件可以是指连续几个周期内数据流的统计信息满足的条件。同一个应用的不同业务场景对应的QoE评估条件可以相同或不同。例如,游戏应用的对战场景和跑图场景的QoE评估条件可以不同,又例如,视频应用中的视频选择场景、视频播放场景,小窗播放场景的QoE评估条件可以不同,基于不同的业务场景设计不同的QoE评估条件可以使得QoE评估更加准确。不同业务场景可以通过通信参数进行区分,通信参数满足的条件不同时,通信参数对应的业务场景也不同。同一个应用的同一个业务场景可以对应一种或多种QoE评估条件。每种QoE评估条件对应一个QoE测量结果(也可以称为QoE评估结果)。多种QoE评估条件可以对应同一个QoE测量结果,满足该多种QoE评估条件中的任一种时,可以得到相同的QoE测量结果。
以王者荣耀的对战场景为例,王者荣耀的对战场景对应的QoE评估条件可以是根据丢包率和/或时延满足的条件评估对战的卡顿情况。例如,若对战场景中丢包率满足3s内连续出现2次丢包20%的条件,和/或,对战场景的时延满足4s内连续出现2次时延超过200ms的条件,可以认为王者荣耀的对战场景的QoE测量结果为差,即对战过程中发生卡顿。
示例性的,QoE测量结果可以包括:优(流畅不卡顿)、中(可能卡顿)和差(卡顿)。例如,QoE测量结果为优的标识可以为00,QoE测量结果为中的标识可以为10,QoE测量结果为差的标识可以为11。
如表5所示,可以根据数据流的通信参数满足的条件对前台运行的应用的当前业务场景进行区分。进一步的,可以根据不同业务场景对应的不同QoE评估条件确定相应业务场景的QoE测量结果。应用程序的数据流的通信参数和统计信息分别满足不同条件时,QoE测量结果是不同的。
表5
其中,表5中的com.tencent.mm为微信包名,com.tencent.tmgp.sgame为王者荣耀包名。表5中一个条目表示应用程序的数据流的通信参数和统计信息分别满足相应条件时,可以得到相应的QoE测量结果。例如,王者荣耀的数据流采用udp协议+任意端口+0x10报文头部时,且该数据流在5个周期(统计周期)内连续3个周期时 延超过150ms,或在4个周期内连续3个周期丢包超过20%,则QoE测量结果为差。
表5仅列举了部分应用程序的数据流的QoE评估条件(包括数据流的通信参数和统计信息分别需要满足的条件)和QoE测量结果,且仅用于示例。在实际应用中还可以采用其他不同的QoE评估条件得到QoE测量结果。
在一些情况下,基于表5得到的QoE测量结果可能出现误判的情况。例如,用户使用短视频类应用时,若用户刷到某短视频,短视频类应用开始通过网络通道下载该短视频并缓存已经下载的该短视频的部分数据帧,再从缓存中获取该短视频的数据帧并开始播放。若该短视频的播放时长为15秒,以用户刷到该短视频为时间起点,从时间起点开始至第2秒,单位时间的下载速率会快速增大;从第2秒至第5秒,单位时间的下载速率会快速降低至0;从第5秒至第15秒播放结束,单位时间的下载速率维持0。
若采用上述表5中的条件,若确定端视频应用的数据流连续多个周期的时延超过350ms或连续多个周期的下行速率(均值)小于51kb/s,则表示数据流的QoE测量结果为差。上述示例中,在第5秒至第15秒期间,连续多个周期内的速率(均值)均为0,可能会判定当前数据流发生卡顿,即在当前网络通道上的传输质量较差。
然而,在具体应用中,在第5秒至第15秒期间,该应用的数据流所在的网络通道的网络质量并不差,只是当前没有从其他电子设备下载数据流的需求,所以连续多个周期内的速率均为0。鉴于此,本申请实施例提供另一种评估短视频类应用的QoE测量结果的方法。短视频类应用的数据流的特征如下:采用http协议、通过get向服务器请求视频内容、且get数据包中携带mp4字段。
参见图11,为本申请实施例提供的网络通道质量较好时,短视频类应用的数据流的速率特点。视频流的速率呈周期分布,每个周期包括速率不为0的时间段和速率为0的时间段。
例如,图11中,视频流的速率分布包括:连续的第一时间段、第二时间段和第三时间段,其中,第一时间段、第三时间段的速率不为0,第二时间段的速率为0。在第一时间段中的第一部分的平均速率大于第一值,表示视频流的传输质量满足要求,不需要提升网络质量,电子设备在第三时间段通过第一网卡传输视频流。
参见图12,视频流的速率分布还可以包括:连续的第四时间段、第五时间段和第六时间段,第四时间段和第六时间段的速率不为0,第五时间段的速率为0。在第四时间段中的第二部分的平均速率小于或等于第一值,表示视频流的传输质量不满足要求,需要提升网络质量,电子设备在第六时间段通过电子设备的第二网卡传输视频流,为了评判标准统一,可以设置第二部分的时长和第一部分的时长相等。
为了使得速率为0的情况下,评判标准更精确,还可以设置第一时间段中的第一部分的结束时间和第一时间段的结束时间相同,第四时间段中的第二部分的结束之间和第四时间段的结束时间相同。
根据图11所示的速率特点和图12所示的速率特点可以理解:速率为0的情况比较特殊,在评估短视频类应用的视频流的传输质量时需要将速率为0的情况单独考虑。
速率不为0的一段时间段内,该段时间内可以选取一部分时间(例如,和第一部分的时长相同),可以记为第七时间段,确定第七时间段的平均速率小于或等于第一 值,电子设备在第八时间段通过第二网卡传输视频流,其中,第八时间段的开始时间为第七时间段的结束时间。当然,确定第七时间段的平均速率大于第一值,电子设备在第八时间段通过第一网卡传输视频流。
在具体实现时,可以将速率为0的情况和速率不为0的情况分开考虑。其中,本申请实施例中的速率表示均值周期(例如,300ms、400ms、500ms、600ms、700ms等)内视频流的平均下行速率。
平均速率不存在0的情况:多个(例如,2个,3个,4个,5个等)均值周期内的平均速率均较小,则该数据流的传输质量较差。当然,也可以是1个均值周期内的平均速率值较小,则该数据流的传输质量较差。
平均速率存在0的情况:由于网络原因导致平均速率出现0的情况,通常平均速率出现0之前,平均速率已经开始变小(在具体实现时,可以取一段时间内的平均速率,该段时间的结束时间可以为速率变为0的时间),这种情况才需要提升传输质量;由于当前播放的短视频缓存结束导致平均速率出现0的情况,通常平均速率出现0之前平均速率仍然较大,这种情况不需要提升传输质量。所以,平均速率出现0时,需要追溯到平均速率首次变为0的均值周期之前一个均值周期(最后一个非0速率的均值周期)的平均速率;在具体实现时,可以将平均速率出现0的周期的平均速率延用平均速率首次变为0时上一个均值周期(最后一个非0速率的均值周期)的平均速率。当然,也可以理解每出现平均速率为0的情况,均延用上一均值周期的平均速率。然后在多个均值周期内的平均速率均较小时,则该数据流的传输质量较差。
鉴于上述描述,可以设置以多个均值周期的平均速率作为参考。首先根据单个均值周期(可以记为第一周期)的平均速率确定当前均值周期的周期传输质量,然后根据多个均值周期的周期传输质量确定当前数据流的数据流传输质量。
在确定单个均值周期的周期传输质量时,若平均速率不为0,则可以在平均速率小于或等于阈值A(可以等于第一值,也可以不等于第一值)的情况下,判定当前均值周期的周期传输质量为差;在平均速率大于阈值A的情况下,判定当前均值周期的周期传输质量为优。若平均速率为0,在延用上一均值周期的平均速率的情况下,相当于延用了上一均值周期的周期传输质量(差或优)。因此在上一均值周期的周期传输质量为差的情况下,认为当前均值周期的周期传输质量也为差,在上一均值周期为优的情况下,认为当前均值周期的周期传输质量也为优。本申请实施例对平均速率为0的情况采用延用上一均值周期的周期传输质量还是延用上一均值周期的速率不做限定。当然,实际应用中,平均速率为0时,也可以根据过去多个均值周期(例如,3,5,7个等)的周期传输质量确定,例如,根据多个均值周期传输质量的标识中的众数确定。
综上所述,单个均值周期的周期传输质量的结果包括以下:
优:本均值周期的平均速度大于或等于阈值A(例如,50kb/s);或者,平均速率等于0、且上一个均值周期的周期传输质量为优。
差:平均速度小于阈值A、且不等于0;或者,平均速率等于0、且上一个均值周期的周期传输质量为差。
在确定各个均值周期的周期传输质量之后,在当前均值周期可以查看本均值周期以及本均值周期之前连续的M-1个均值周期的周期传输质量,在连续的M个均值周期 的周期传输质量中,若存在至少N个均值周期的周期传输质量为差,则判定数据流的数据流传输质量为差。其中,N小于或等于M。若少于N个均值周期的周期传输质量为差,则判定数据流的数据流传输质量为优。
306b、流量管理模块周期性向决策模块上报当前QoE测量结果。
需要说明的是,应用A启动之后,流量上报模块可以周期性检测应用A使用的网络的网络质量,并周期性上报应用网络报文的通信参数和统计信息。流量管理模块根据应用网络报文的通信参数和统计信息周期性进行网络质量评估得出QoE测量结果,并周期性向决策模块通知当前QoE测量结果,直至应用A关闭。
也就是说,在应用A启动期间(或前台运行期间),流量上报模块一直在周期性检测应用A使用的网络的网络质量,流量管理模块一直在周期性进行网络质量评估得出QoE测量结果,并周期性向决策模块通知当前QoE测量结果。
即,步骤305-步骤306b在应用A启动期间(或前台运行期间)可以周期性执行。
另外,应用A启动之后,还可以包括以下步骤:
307、应用A向网络加速服务模块发送注册请求,该注册请求用于请求电梯预测服务,以便应用A可以感知用户是否到达电梯口。
其中,注册请求可以携带应用A的标识以及需要注册的服务(电梯预测服务)的标识。电梯预测服务可以感知用户是否到达电梯或进入电梯。应用A注册电梯预测服务后,可以获知用户是否到达电梯或进入电梯。
308a、网络加速服务模块向感知模块发送注册请求。
308b、感知模块向围栏管理模块发送注册请求。
309a、围栏管理模块记录注册电梯预测能力的应用信息,向感知模块发送注册结果。
围栏管理模块接收到应用A的注册请求后,对注册的应用进行鉴权和校验,例如可以进行以下判断:(1)查询应用配置库确定应用A是否支持网络加速;(2)确定应用A是否在前台运行;(3)确定应用A是否具备电梯预测权限。需要说明的是,应用A若需要注册电梯预测服务,首先可以在开发者网站(例如,荣耀开发者网站)上注册开发者,注册开发者成功后可以申请appid和电梯预测服务kit的权限。kit是一种用于向应用层(的应用程序)提供基础服务的软件开发工具包(software development kit,SDK)。后续感知模块检查应用A是否是荣耀开发者网站上注册过的合法用户,并且查看应用A是否具有电梯预测服务kit的权限(即电梯预测权限)。其中,具有电梯预测权限的应用可以从电子设备的操作系统获取电梯事件(例如,用户到达电梯口等电梯事件、用户进入电梯事件),根据电梯事件确定是否进行网络加速处理,网络加速处理包括提前缓存第一应用的运行数据、降低第一应用的帧率、降低第一应用的码率、降低第一应用的分辨率中的至少一种。
围栏管理模块对注册的应用鉴权和校验成功后,例如确定应用A支持网络加速,应用A在前台运行,且应用A具备电梯预测权限,可以记录应用A的应用信息。并且,围栏管理模块可以向感知模块课发送注册结果,注册结果为注册成功。这样,后续围栏管理模块检测到电梯事件后会通知给对应的注册者(例如,应用A)。
309b、感知模块向网络加速服务模块发送注册结果。
310、网络加速服务模块向应用A发送注册结果。
需要说明的是,步骤302-步骤306b和步骤307-步骤310之间没有必然的执行先后顺序,可以是先执行步骤302-步骤306b,再执行步骤307-步骤310;也可以是先执行步骤307-步骤310,再执行步骤302-步骤306b;还可以是同时执行步骤302-步骤306b和步骤307-步骤310;本实施例对上述各步骤之间的执行先后顺序不作具体限定。
311、决策模块向围栏管理模块上报卡顿信息。
当决策模块从流量管理模块接收到卡顿信息(即QoE测量结果为差(卡顿))后,可以将卡顿信息发送给围栏管理模块。
312、围栏管理模块接收到卡顿信息后采集卡顿指纹信息,根据卡顿指纹信息对电梯对应的Wi-Fi连接列表(Wi-Fi列表)进行修正。
其中,卡顿指纹信息可以包括时间戳(接收到卡顿信息的时间)、接收到卡顿信息后采集到的Wi-Fi连接列表(包括Wi-Fi接入点的地址和信号强度)、GPS等信息。可选的,卡顿指纹信息还可以包括电子设备的型号等信息。
电子设备可以根据卡顿指纹信息对电梯对应的Wi-Fi列表进行修正,这样可以使得围栏数据更加精确。如果电子设备连接某电梯(例如,第一电梯)的Wi-Fi接入点(例如,第一Wi-Fi接入点)时,围栏管理模块从未接收到决策模块上报的卡顿信息,认为用户乘坐该电梯时不会发生卡顿(例如,电梯里有Wi-Fi的AP的场景),则无需为该电梯生成围栏数据,即可以过滤掉电子设备在该电梯处采集的Wi-Fi连接列表等信息。
在一些实施例中,电子设备可以将采集的卡顿指纹信息定期上传到云服务器,以便云服务器根据卡顿指纹信息对围栏数据进行更新。
313、围栏管理模块监听用户的运动状态变化,在用户的运动状态变化满足预设条件时,检测是否存在电梯对应的围栏,若检测到电梯对应的围栏,确定用户到达电梯口。
其中,预设条件是针对用户乘坐电梯时的运动特征设置的。可以理解的是,用户乘坐电梯时一般需要先步行到电梯口,在电梯口前静止等待电梯门打开。示例性的,预设条件可以是用户从步行状态到停止,并保持相对静止状态(例如,持续5s)。其中,用户的运动状态(例如,步行状态或静止状态)可以是根据陀螺仪采集的数据确定的。
可选的,电子设备内可以设置有加速度传感器、陀螺仪传感器等识别用户的状态是步行状态还是停止状态。
可以理解的,用户在等待电梯时,通常由走动转换到停止,进而电子设备可以通过速度的变化确定用户由运动状态转换为停止状态,触发预测用户是否等待进入目标电梯,进而可以进一步确定用户是否等待进入目标电梯。
可选的,检测是否存在电梯对应的围栏前,可以判断当前时间是否处于预设时间段内,预设时间段可以是上下班高峰时间段(例如,8:30-9:30、17:30-18:30)。可以理解的是,在预设时间段内用户乘坐电梯的可能性较高,因此在预设时间段内检测是否存在电梯对应的围栏可以避免功耗浪费。
围栏管理模块检测周围是否存在电梯对应的围栏,例如可以是检查电子设备当前 连接的Wi-Fi对应的BSSID是否有对应的围栏数据,若连接的Wi-Fi对应的BSSID存在围栏数据,电子设备可以进行Wi-Fi信息扫描。围栏管理模块获取扫描到的Wi-Fi信息与电子设备存储的围栏数据进行匹配,确定扫描到的BSSID是否满足预设条件,预设条件例如可以是扫描到的BSSID与某电梯对应的围栏数据(目标围栏数据)中的BSSID有重叠(即有相同的BSSID),且相同BSSID中信号强度差小于t dbm的BSSID的个数占目标围栏数据中所有BSSID数量的比值>80%,若扫描到的BSSID满足预设条件,匹配成功,则上报到达电梯口事件。
可选的,电子设备存储有至少一个电梯对应的围栏。例如,电子设备可以存储用户的住所(家)附近的电梯对应的围栏,用户的办公室附近的电梯对应的围栏,用户常去的餐厅、商超附近的电梯对应的围栏等。在电子设备存储的至少一个电梯对应的围栏中,每个电梯对应的围栏对应一个Wi-Fi接入点的地址(例如,BSSID),该Wi-Fi接入点是用户进出该电梯时常用(经常连接的)的Wi-Fi接入点。例如,在目标电梯处于办公场所的场景下,可以使用用户在办公场所的目标电梯处连接的Wi-Fi接入点的地址来对应该办公场所的电梯对应的围栏。又例如,在目标电梯处于住所的场景下,可以使用用户在住所出所连接的Wi-Fi接入点的地址来对应住处的电梯对应的围栏。
若当前电子设备扫描到的Wi-Fi列表信息与目标围栏数据之间相同的Wi-Fi接入点地址的数量满足第一条件,确定用户等待进入目标电梯。
可选的,第一条件可以是当前电子设备扫描到的Wi-Fi列表信息与目标围栏数据之间相同的Wi-Fi接入点地址的数量超过第二阈值。第二阈值可以是1、2、3、4或者更大的数值,本申请实施例不对第二阈值的具体数值做限定。
示例性的,以第二阈值为2为例进行示例性说明,参见表6,当前电子设备扫描到的Wi-Fi列表和目标围栏数据之间相同的Wi-Fi接入点的地址为:连接的地址1、地址2、地址4和地址5,当前电子设备扫描到的Wi-Fi列表和目标围栏数据之间相同的Wi-Fi接入点的地址的数量超过2,电子设备可以确定用户等待进入目标电梯。
表6
可选的,第一条件还可以是当前电子设备扫描到的Wi-Fi列表信息与目标围栏数据之间相同的Wi-Fi接入点地址的数量占所述目标围栏数据中所有Wi-Fi接入点数量的比值超过第三阈值。
可选的,第三阈值可以是50%、60%、70%或者80%,本申请实施例不对第三阈值的具体数值做限定。
示例性的,以第三阈值为70%为例进行示例性说明,再次参见表6,当前电子设备扫描到的Wi-Fi列表和目标围栏数据之间相同的Wi-Fi接入点的地址的数量为4个,目标围栏数据中所有Wi-Fi接入点数量为5个,相同的Wi-Fi接入点的地址的数量的占比为80%,超过第三阈值的70%,电子设备可以确定用户等待进入目标电梯。
本申请实施例提供的上述方法,在预测用户是否等待进入目标电梯时,可以通过电子设备预先存储的围栏数据与当前电子设备扫描到的Wi-Fi网络列表进行对比,当满足第一条件时,电子设备可以确定用户等待进入目标电梯。
在一种可能的设计中,确定用户等待进入目标电梯之前,确定相同的Wi-Fi接入点地址中存在的可匹配Wi-Fi接入点的数量满足第二条件,可匹配Wi-Fi接入点为相同的Wi-Fi接入点地址中对应的网络信号强度之差小于第一阈值的Wi-Fi接入点。可选的,第一阈值可以是5、8、10或者12等,本申请实施例对第一阈值的具体数值不做限定。
示例性的,以第一阈值为10为例进行示例性说明,再次参见表6,当前电子设备扫描到的Wi-Fi列表与目标围栏数据之间相同的Wi-Fi接入点的地址为:连接的地址1、地址2、地址4和地址5。其中,当前电子设备扫描到的Wi-Fi列表的连接的地址1与目标围栏数据的连接的地址1之间的网络信号强度之差为2,小于第一阈值,即连接的地址1为可匹配Wi-Fi接入点。当前电子设备扫描到的Wi-Fi列表的地址2与目标围栏数据的地址2之间的网络信号强度之差为18,大于第一阈值,即地址2不是可匹配Wi-Fi接入点。同理,地址4是可匹配Wi-Fi接入点,地址5不是可匹配Wi-Fi接入点。
可选的,第二条件可以是可匹配Wi-Fi接入点的数量超过第四阈值。可选的,第四阈值可以是2、3、4或者更大的数值,本申请实施例不对第四阈值的具体数值做限定。
示例性的,以第四阈值为3进行示例性说明,再次参见表6,结合上述可匹配Wi-Fi接入点的说明,表6中可匹配Wi-Fi接入点的数量为2个,即表6中的当前电子设备扫描到的Wi-Fi列表不满足第二条件,电子设备确定用户没有等待进入目标电梯。
可选的,第二条件可以是可匹配Wi-Fi接入点的数量占所述目标围栏数据中所有Wi-Fi接入点数量的比值超过第五阈值。可选的,第五阈值可以是50%、60%、70%或者80%,本申请实施例不对第五阈值的具体数值做限定。
示例性的,以第五阈值为70%进行示例性说明,再次参见表6,结合上述可匹配Wi-Fi接入点的说明,表6中可匹配Wi-Fi接入点的数量为2个,表6中目标围栏数据中的所有Wi-Fi接入点的数量为5个,可匹配Wi-Fi接入点的数量目标围栏数据中所有Wi-Fi接入点数量的比值为40%,即电子设备确定用户没有等待进入目标电梯。
本申请实施例提供的上述方法,在通过围栏数据预测用户是否等待进入目标电梯时,在通过当前电子设备扫描到的Wi-Fi接入点与目标围栏数据之间相同的Wi-Fi接入点的地址进行预测时,引入网络信号强度,增加围栏数据表征对应的目标电梯所在的地理位置的相似度,提高预测的准确度。
在实际应用时,如图13所示,用户1201携带电子设备1202从T1位置步行到T2位置,在T2位置停止步行,若用户在T2位置处于静止状态(没有位移,但是不代表身体不可以动)超过5s,则电子设备1202可以启动围栏检测,检测周围是否存在电梯对应的围栏。具体的,电子设备1202可以进行Wi-Fi列表扫描,并将扫描到的Wi-Fi列表与预先存储的围栏数据进行比对,如果信号强度差小于t dbm的相同BSSID的个数占目标围栏数据中所有Wi-Fi接入点数量的比值<80%,则认为匹配不成功,预测结果为用户不在电梯围栏内,判定用户未到达电梯口。其中,t可以是5、8、10或者12等。
例如,电子设备1202在T2位置连接的BSSID和扫描到的Wi-Fi列表可以如表7所示。电子设备1202在T2位置连接的Wi-Fi接入点为AP1(AP1对应BSSID1,即电子设备1202在T2位置连接BSSID1),AP1的信号强度为-50。电子设备1202在T2位置扫描到的Wi-Fi接入点可以包括AP2、AP5,AP7、AP8。AP2、AP5,AP7、AP8分别对应的BSSID为BSSID1、BSSID2、BSSID5、BSSID7、BSSID8,分别对应的信号强度为-60、-42、-32、-30。
表7
以电梯对应的围栏对应的Wi-Fi列表为表8为例。可见,电子设备1202在T2位置扫描到的Wi-Fi列表和电梯对应的围栏对于的Wi-Fi列表中相同的BSSID可以包括BSSID1、BSSID2、BSSID5。BSSID1、BSSID2、BSSID5的信号强度差分别为2、18、35。信号强度差小于t dbm(例如,t=10)的相同BSSID的个数占比<80%。因此匹配不成功,预测结果为用户不在电梯围栏内,判定用户未到达电梯口。
表8
进一步的,用户可以从T2位置步行到T3位置,在T3位置停止步行,若用户在T3位置处于静止状态超过5s,则电子设备1202可以再次启动围栏检测,检测周围是否存在电梯对应的围栏。具体的,电子设备1202可以进行Wi-Fi列表扫描,并将扫描到的Wi-Fi列表与预先存储的围栏数据进行比对,如果信号强度差小于t dbm的相同BSSID的个数占比>80%,则认为匹配成功,预测结果为在电梯围栏内,即判定用户已到达电梯口,可以向感知模块上报到达电梯口事件。
例如,电子设备1202在T2位置扫描到的Wi-Fi列表可以如表9所示。电子设备1202在T3位置连接的Wi-Fi接入点为AP1(AP1对应BSSID1,即电子设备1202在T2位置连接BSSID1),AP1的信号强度为-50。电子设备1202在T3位置扫描到的Wi-Fi接入点可以包括AP2、AP3,AP4、AP5。AP2、AP3,AP4、AP5分别对应的BSSID为BSSID1、BSSID2、BSSID5、BSSID7、BSSID8,分别对应的信号强度为-80、-58、-48、-78。
表9
以电梯对应的围栏对应的Wi-Fi列表为表8为例,可见,电子设备1202在T3位置扫描到的Wi-Fi列表和电梯对应的围栏对于的Wi-Fi列表中相同的BSSID可以包括AP1、AP2、AP3、AP4、AP5。信号强度差小于t dbm(例如,t=10)的相同BSSID的个数占比>80%。因此匹配成功,预测结果为用户在电梯围栏内,判定用户到达电梯口。
参考图13,假设应用A为短视频应用,如图14所示,电子设备在T1位置可以连接BSSID1播放视频,视频分辨率正常;在T2位置可以连接BSSID1播放视频,视频分辨率正常;在T3位置可以连接BSSID1播放视频,并且提前缓存,降低视频分辨率。
314、围栏管理模块向感知模块通知用户到达电梯口等电梯事件。
315、感知模块向网络加速服务模块通知用户到达电梯口等电梯事件。
316、网络加速服务模块向应用A通知用户到达电梯口等电梯事件。
317、应用A接收到用户到达电梯口等电梯事件,提前进行网络加速。
应用A接收到用户到达电梯口等电梯事件,确定用户等待进入目标电梯,应用A(第一应用)进行网络加速处理,网络加速处理包括提前缓存第一应用的运行数据、降低第一应用的帧率、降低第一应用的码率或降低第一应用的分辨率中的至少一种。
以应用A为视频类应用为例,应用A接收到用户到达电梯口等电梯事件后,应用A可以提前缓存当前播放的视频或即将播放的视频,和/或降低当前视频的分辨率,以减少后续视频卡顿现象,提升用户体验。
以应用A为游戏类应用为例,应用A接收到用户到达电梯口等电梯事件后,应用A可以切换游戏服务器、降低游戏帧率,以减少后续的卡顿现象,提升用户体验。
318、围栏管理模块确定用户进入电梯。
用户从T3位置进入电梯,电梯关门瞬间电子设备检测到WI-FI信号强度骤降(信号强度下降幅度大于预设阈值),围栏管理模块基于WI-FI信号强度的变化判定用户已进入电梯,可以向感知模块上报进入电梯事件,通知用户进入电梯。可选的,第七阈值可以是-60dBm、-70dBm、-75dBm等,本申请实施例不对第七阈值的具体数值做限定。
319、围栏管理模块通知感知模块用户进入电梯事件。
320、感知模块通知决策模块用户进入电梯事件。
321、决策模块接收到用户进入电梯事件后,执行系统加速策略,请求一条新的网络通道进行调优。
322、决策模块向路径管理模块发送更优路径请求。
其中,更优路径请求用于请求一条相比当前网络通道质量更优的网络通道。
323、路径管理模块激活并探测网络质量,确定存在相比当前网络通道质量更优的网络通道。
路径管理模块接收到决策模块发送的更优路径请求时,可以激活并探测各个网络通道的网络质量,确定是否存在相比当前网络通道质量更优的网络通道。
在实际应用中,若电子设备中设有2.4GHz频段的无线网卡1、5.0GHz频段的无线网卡2、运营商A的数据业务网卡1和运营商B的数据业务网卡2。则可以默认无线网卡1或无线网卡2中的一个为主Wi-Fi,另一无线网卡为副Wi-Fi;默认运营商A的数据业务网卡1和运营商B的数据业务网卡2中的一个为主卡,另一个数据业务网卡为副卡。
作为示例,2.4GHz频段的网络通道为主Wi-Fi网络,5.0GHz频段的网络通道为辅Wi-Fi网络,数据业务网卡1对应的网络通道为主蜂窝网络,数据业务网卡2对应的网络通道为辅蜂窝网络。
在主Wi-Fi网络可用的情况下,系统默认电子设备或前台应用当前的主用网络为主Wi-Fi网络,在主Wi-Fi网络不可用的情况下,系统默认电子设备或前台应用当前的主用网络为主卡蜂窝网络。在主卡蜂窝网络不可用的情况下,系统默认电子设备或前台应用当前的主用网络为副Wi-Fi网络,在副Wi-Fi网络不可用的情况下,系统默认电子设备或前台应用当前的主用网络为副卡蜂窝网络。
在应用A开启后在前台运行时,应用A按照上述规则使用主用网络;即使应用A在前台时,系统将应用A中的部分数据流切换到其他网络上,在应用A切换到后台后,应用A中的数据流恢复使用系统默认的主用网络;在应用A从后台切换到前台后,应用A继续使用系统默认的主用网络。
路径管理模块可以按照主Wi-Fi、主卡网络、副Wi-Fi和副卡网络的顺序依次请求,直到找到一条可用且质量满足要求(网络质量优于当前正在使用的网络通道)的网络通道。
324、路径管理模块向决策模块通知质量更优的网络通道。
路径管理模块可以将上述可用且质量满足要求的网络的网络路径通知给决策模块。
325、决策模块向内核层的策略执行模块通知将应用A的数据流切换到更优的网络通道上。
即决策模块触发切换,以便将应用A的数据流切换到更优的网络通道上。例如,可以将应用A的数据流从Wi-Fi网络切换到蜂窝网络(蜂窝网络在电梯中的信号质量优于Wi-Fi网络)。
326、策略执行模块将应用A的数据流切换到更优的网络通道上。
这样,应用A可以通过更优的网络通道进行上网,可以提高用户体验。
在一些实施例中,决策模块可以向内核层的策略执行模块通知将应用A的数据流切换到多条质量较优(网络质量优于当前正在使用的网络通道)的网络通道上。策略执行模块将应用A的数据流切换到多条质量较优的网络通道上,以便应用A可以通过多条质量较优的网络通道进行上网,可以提高用户体验。
327、围栏管理模块检测到用户出电梯。
328、围栏管理模块通知感知模块用户出电梯事件。
329、感知模块通知决策模块用户出电梯事件。
330、决策模块接收到用户出电梯事件后,恢复应用A的业务到Wi-Fi网络。
即决策模块可以将应用A的业务从蜂窝网络切换回Wi-Fi网络(Wi-Fi网络在电梯外的信号质量优于蜂窝网络)。
当应用A停止运行或切换到后台时,可以执行以下步骤:
331、应用A向网络加速服务模块发送去注册请求,请求停止电梯预测服务。
332、网络加速服务模块向感知模块发送去注册请求。
333、感知模块向围栏管理模块发送去注册请求,通知围栏管理模块停止应用A的电梯预测服务。
334、围栏管理模块停止应用A的电梯预测服务,不再向应用A通知用户是否进入电梯。
335、感知模块向决策模块通知停止应用A的网络加速和QoE测量。
感知模块感知到应用A停止运行或切换到后台或接收到应用A发送的去注册请求后,通知决策模块停止对该应用进行网络加速,恢复数据流,释放已请求的网络。
336、决策模块向策略执行模块通知停止应用A的网络加速和QoE测量。
337、策略执行模块停止应用A的网络加速和QoE测量。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
基于本申请实施例提供的网络加速方法,在用户在电梯口附近等待期间,电子设备的操作系统可以向当前正在运行的应用通知用户等电梯事件,使得当前正在运行的应用可以根据用户等电梯事件进行提前缓存应用数据和/或降低分辨率等处理,以便后续用户在电梯内时可以继续查看应用的相关内容(例如,继续刷短视频,继续看电影等)。进一步的,在电梯关门瞬间,电子设备可以将应用的数据流从Wi-Fi网络切换到蜂窝网络,从而保证了用户进入电梯后依然能有流畅的上网体验,大大降低了应用的上网卡顿概率,能更好地提升用户的上网体验。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时可实现上述各个方法实施例中的步骤。
本申请实施例还提供了一种计算机程序产品,当计算机程序产品在第一设备上运行时,使得第一设备可实现上述各个方法实施例中的步骤。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质至少可以包括:能够将计算机程序代码携带到第一设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。
本申请实施例还提供了一种芯片系统,芯片系统包括处理器,处理器与存储器耦合,处理器执行存储器中存储的计算机程序,以实现本申请任一方法实施例的步骤。芯片系统可以为单个芯片,或者多个芯片组成的芯片模组。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及方法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (27)

  1. 一种网络加速方法,其特征在于,应用于电子设备,包括:
    所述电子设备运行第一应用;
    所述电子设备预测用户是否等待进入目标电梯;
    若确定用户等待进入所述目标电梯,所述电子设备的所述第一应用进行网络加速处理,所述网络加速处理包括提前缓存所述第一应用的运行数据、降低所述第一应用的帧率、降低所述第一应用的码率或降低所述第一应用的分辨率中的至少一种。
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备存储至少一个电梯对应的地理围栏的围栏数据,所述围栏数据包括所述电子设备在电梯附近可连接到的Wi-Fi接入点的地址和可搜索到的Wi-Fi列表信息,所述Wi-Fi列表信息包括至少一个Wi-Fi接入点的地址;
    所述电子设备预测用户是否等待进入目标电梯,包括:
    从所述至少一个电梯对应的地理围栏的围栏数据中获取目标围栏数据,所述目标围栏数据指示的可连接到的Wi-Fi接入点地址与所述电子设备当前连接的Wi-Fi接入点地址相同;
    所述电子设备获取当前第一Wi-Fi列表信息,所述当前第一Wi-Fi列表信息包括所示电子设备当前可搜索到的Wi-Fi接入点的地址;
    若所述当前第一Wi-Fi列表信息与所述目标围栏数据指示的可搜索到的Wi-Fi列表信息之间相同的Wi-Fi接入点地址的数量满足第一条件,确定用户等待进入所述目标电梯。
  3. 根据权利要求2所述的方法,其特征在于,所述Wi-Fi列表信息还包括对应Wi-Fi接入点地址的网络信号强度,所述确定用户等待进入所述目标电梯之前,还包括:
    所述相同的Wi-Fi网络接入点地址中存在的可匹配Wi-Fi网络接入点的数量满足第二条件,所述可匹配Wi-Fi网络接入点为相同的Wi-Fi网络接入点地址中对应的网络信号强度之差小于第一阈值的Wi-Fi网络接入点。
  4. 根据权利要求2所述的方法,其特征在于,
    所述第一条件为所述当前第一Wi-Fi列表信息与所述目标围栏数据之间相同的Wi-Fi接入点地址的数量超过第二阈值,或者
    所述第一条件为所述当前第一Wi-Fi列表信息与所述目标围栏数据之间相同的Wi-Fi接入点地址的数量占所述目标围栏数据中所有Wi-Fi接入点数量的比值超过第三阈值。
  5. 根据权利要求3所述的方法,其特征在于,
    所述第二条件为所述可匹配Wi-Fi网络接入点的数量超过第四阈值,或者
    所述第二条件为所述可匹配Wi-Fi网络接入点的数量占所述目标围栏数据中所有Wi-Fi接入点数量的比值超过第五阈值。
  6. 根据权利要求2所述的方法,其特征在于,所述电子设备存储的至少一个围栏数据通过以下步骤预先获得:
    当根据加速度的变化状态确定用户进电梯或出电梯,且所述电子设备连接有Wi-Fi网络,采集用户进电梯或出电梯时的第二Wi-Fi列表信息;
    当所述第二Wi-Fi列表信息的记录条数超过第六阈值,选取所有第二Wi-Fi列表信息中Wi-Fi接入点地址相同的Wi-Fi接入点作为一个地理围栏的围栏数据对应的Wi-Fi接入点,且该围栏数据对应的Wi-Fi接入点的网络信号强度为所述地址相同的Wi-Fi接入点的网络信号强度的平均值。
  7. 根据权利要求2所述的方法,其特征在于,所述电子设备存储的至少一个围栏数据通过以下步骤预先获得:
    当根据加速度的变化状态确定用户进电梯或出电梯,且所述电子设备连接有Wi-Fi网络,采集用户进电梯或出电梯时的第二Wi-Fi列表信息;
    向服务器发送所述第二Wi-Fi列表信息;
    从所述服务器接收至少一个地理围栏的围栏数据。
  8. 根据权利要求2所述的方法,其特征在于,所述在所述至少一个围栏数据中获取目标围栏数据之前,所述方法还包括:
    根据电子设备的加速度确定用户由运动状态转换为停止状态,且所述电子设备连接有Wi-Fi网络。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    确定所述电子设备当前连接的Wi-Fi网络信号强度小于第七阈值,将当前连接的Wi-Fi网络切换为蜂窝网络。
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述电子设备包括围栏管理模块,
    所述围栏管理模块用于当确定用户进电梯或出电梯,且所述电子设备连接有Wi-Fi网络,采集用户进电梯或出电梯时的第二Wi-Fi列表信息;
    根据所述第二Wi-Fi列表信息聚类生成所述至少一个电梯对应的地理围栏的围栏数据,或者将所述第二Wi-Fi列表信息发送至服务器,并从服务器接收所述至少一个电梯对应的地理围栏的围栏数据。
  11. 根据权利要求10所述的方法,其特征在于,所述电子设备还包括感知模块,所述方法还包括:
    所述感知模块感知到所述第一应用启动,查询所述第一应用是否支持网络加速;
    其中,所述感知模块中包括应用配置库,所述应用配置库中存储了多个应用程序是否支持网络加速的信息,所述多个应用程序包括所述第一应用;
    其中,所述应用配置库中的所述多个应用程序是基于用户流量消耗情况和用户对应用的使用偏好确定出的需要网络加速的应用程序;或者所述应用配置库中的所述多个应用程序是基于用户的手动设置确定出的需要网络加速的应用。
  12. 根据权利要求11所述的方法,其特征在于,所述电子设备还包括决策模块,所述方法还包括:
    若确定所述第一应用支持网络加速,所述感知模块向所述决策模块发送网络质量评估请求,所述网络质量评估请求中包括所述第一应用的应用标识、应用的配置信息以及网络质量评估的标准,所述应用的配置信息包括所述第一应用传输数据流时的数据包的头部特征。
  13. 根据权利要求12所述的方法,其特征在于,所述电子设备的内核层还包括流 量上报模块,所述方法还包括:
    所述决策模块向所述流量上报模块注册报文监测钩子,所述报文监测钩子用于周期性探测所述第一应用使用的网络通道的路径,以及监测所述第一应用使用的网络通道传输的数据流的通信参数和统计信息。
  14. 根据权利要求13所述的方法,其特征在于,所述电子设备还包括流量管理模块,所述方法还包括:
    所述流量上报模块向所述流量管理模块周期性上报所述第一应用的数据流的通信参数和统计信息,所述通信参数包括协议类型、源网际协议IP地址和端口/目的IP地址和端口、报文特征中的至少一项,所述统计信息包括往返时延RTT、丢包率、收发字节数、速率中的至少一项;
    所述流量管理模块根据所述通信参数和所述统计信息周期性进行网络质量评估得出当前体验质量QoE测量结果;
    所述流量管理模块周期性向所述决策模块上报所述当前QoE测量结果。
  15. 根据权利要求14所述的方法,其特征在于,若所述QoE测量结果为卡顿,所述方法还包括:
    所述决策模块向所述围栏管理模块上报卡顿信息;
    所述围栏管理模块接收到所述卡顿信息后采集卡顿指纹信息,根据所述卡顿指纹信息对至少一个电梯对应的Wi-Fi列表信息进行修正,过滤第一电梯对应的Wi-Fi列表信息,所述电子设备在所述第一电梯处连接第一Wi-Fi接入点,所述电子设备连接所述第一Wi-Fi接入点时所述围栏管理模块未接收到过所述决策模块上报的卡顿信息,所述卡顿指纹信息包括接收到所述卡顿信息后采集到的Wi-Fi列表。
  16. 根据权利要求9-15任一项所述的方法,其特征在于,所述电子设备还包括网络加速服务模块,所述方法还包括:
    所述第一应用向所述网络加速服务模块发送注册请求,所述注册请求用于请求电梯预测服务,以便所述第一应用感知用户是否到达电梯口等待进入目标电梯;
    所述网络加速服务模块向所述感知模块发送所述注册请求;
    所述感知模块向所述围栏管理模块发送所述注册请求。
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:
    所述围栏管理模块接收所述注册请求后,若确定所述第一应用支持网络加速,所述第一应用在前台运行,且所述第一应用具备电梯预测权限,记录所述第一应用的应用信息,向所述感知模块发送注册结果,所述注册结果为成功;
    所述感知模块向所述网络加速服务模块发送所述注册结果;
    所述网络加速服务模块向所述第一应用发送所述注册结果。
  18. 根据权利要求16或17所述的方法,其特征在于,所述方法还包括:
    所述围栏管理模块监听用户的运动状态变化;
    当根据用户的运动状态变化确定用户进电梯或出电梯时,检测是否存在电梯对应的地理围栏;
    若检测到电梯对应的地理围栏,确定用户到达电梯口等待进入目标电梯;
    其中,所述用户的运动状态变化包括用户从步行状态到停止,并保持相对静止状 态。
  19. 根据权利要求18所述的方法,其特征在于,所述检测是否存在电梯对应的地理围栏前,所述方法还包括:
    判断当前时间是否处于预设时间段内,所述预设时间段是根据上下班高峰时间确定的。
  20. 根据权利要求18或19所述的方法,其特征在于,所述围栏管理模块检测周围是否存在电梯对应的地理围栏包括:
    检查所述电子设备当前连接的Wi-Fi接入点的BSSID是否有对应的围栏数据;
    若所述电子设备当前连接的Wi-Fi接入点的BSSID对应目标围栏数据,所述围栏管理模块获取当前第一Wi-Fi列表信息,所述当前第一Wi-Fi列表信息包括所示电子设备当前可搜索到的Wi-Fi接入点的地址;
    若所述当前第一Wi-Fi列表信息与所述目标围栏数据指示的可搜索到的Wi-Fi列表信息之间相同的Wi-Fi接入点地址的数量满足第一条件,确定周围存在电梯对应的地理围栏。
  21. 根据权利要求18-20任一项所述的方法,其特征在于,所述方法还包括:
    所述围栏管理模块向所述感知模块通知用户到达电梯口等电梯事件;
    所述感知模块向所述网络加速服务模块通知所述用户到达电梯口等电梯事件;
    所述网络加速服务模块向所述第一应用通知所述用户到达电梯口等电梯事件;
    所述电子设备的所述第一应用进行网络加速处理包括:
    所述第一应用接收到所述用户到达电梯口等电梯事件,进行所述网络加速处理。
  22. 根据权利要求18-21任一项所述的方法,其特征在于,所述电子设备还包括策略执行模块和路径管理模块,所述方法还包括:
    所述围栏管理模块确定用户进入电梯,向所述感知模块通知用户进入电梯事件;
    所述感知模块通知所述决策模块所述用户进入电梯事件;
    所述决策模块接收到所述用户进入电梯事件后,向所述路径管理模块发送更优路径请求,所述更优路径请求用于请求一条相比当前网络通道质量更优的网络通道;
    所述路径管理模块激活并探测各个网络通道的网络质量,确定存在相比当前网络通道质量更优的网络通道,向所述决策模块通知所述更优的网络通道;
    所述决策模块指示所述策略执行模块将所述第一应用的数据流切换到所述更优的网络通道上;
    所述策略执行模块将所述第一应用的数据流切换到所述更优的网络通道上。
  23. 根据权利要求18-22任一项所述的方法,其特征在于,所述方法还包括:
    所述围栏管理模块检测到用户出电梯,向所述感知模块通知用户出电梯事件;
    所述感知模块通知所述决策模块所述用户出电梯事件;
    所述决策模块接收到所述用户出电梯事件后,将所述第一应用的数据流切换回Wi-Fi网络。
  24. 根据权利要求18-23任一项所述的方法,其特征在于,所述第一应用切换到后台或关闭时,所述方法还包括:
    所述第一应用向网络加速服务模块发送去注册请求,所述去注册请求用于请求停 止电梯预测服务;
    所述网络加速服务模块向感知模块发送去所述注册请求;
    所述感知模块向围栏管理模块发送所述去注册请求;
    所述围栏管理模块停止所述第一应用的电梯预测服务,不再向所述第一应用通知用户是否进入电梯。
  25. 根据权利要求24所述的方法,其特征在于,所述方法还包括:
    所述感知模块向所述决策模块通知停止所述第一应用的QoE测量;
    所述决策模块向所述策略执行模块通知停止所述第一应用的QoE测量;
    所述策略执行模块停止所述第一应用的QoE测量。
  26. 一种电子设备,其特征在于,所述电子设备包括处理器,所述处理器用于运行存储器中存储的计算机程序,以使得所述电子设备实现如权利要求1至25任一项所述的方法。
  27. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储计算机程序,所述计算机程序在处理器上运行时实现如权利要求1至25任一项所述的方法。
PCT/CN2023/114694 2022-10-17 2023-08-24 一种网络加速方法和装置 WO2024082811A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211284598.2 2022-10-17
CN202211284598.2A CN116744328B (zh) 2022-10-17 2022-10-17 一种网络加速方法和装置

Publications (1)

Publication Number Publication Date
WO2024082811A1 true WO2024082811A1 (zh) 2024-04-25

Family

ID=87903176

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/114694 WO2024082811A1 (zh) 2022-10-17 2023-08-24 一种网络加速方法和装置

Country Status (2)

Country Link
CN (1) CN116744328B (zh)
WO (1) WO2024082811A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170026786A1 (en) * 2015-07-21 2017-01-26 International Business Machines Corporation Geo-fence management using a cluster analysis technique
CN109890067A (zh) * 2019-02-21 2019-06-14 华为技术有限公司 对特定路线上的特定位置进行识别的方法及电子设备
US20200280922A1 (en) * 2019-02-28 2020-09-03 Samsung Electronics Co., Ltd. Electronic device for supporting user state-based geofencing services
CN114173372A (zh) * 2020-09-10 2022-03-11 华为技术有限公司 数据缓存方法及电子设备
CN115002849A (zh) * 2021-12-14 2022-09-02 荣耀终端有限公司 网络切换的方法和终端
CN115002850A (zh) * 2021-12-14 2022-09-02 荣耀终端有限公司 网络切换方法、电子设备及可读介质
CN115022897A (zh) * 2021-12-14 2022-09-06 荣耀终端有限公司 通信方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109743764A (zh) * 2018-12-29 2019-05-10 努比亚技术有限公司 一种识别电梯场景方法及装置、移动终端设备及存储介质
CN111526246A (zh) * 2020-04-07 2020-08-11 咪咕音乐有限公司 缓存方法、电子设备和计算机可读存储介质
CN111757412B (zh) * 2020-07-02 2023-01-31 Oppo广东移动通信有限公司 网络切换方法、装置、电子设备和计算机可读存储介质
CN114268998B (zh) * 2020-09-16 2023-11-10 华为技术有限公司 数据缓存方法及相关装置
CN114286402B (zh) * 2021-06-16 2022-11-22 荣耀终端有限公司 通道切换方法、电子设备及存储介质
CN113747347B (zh) * 2021-07-26 2023-04-07 荣耀终端有限公司 电子设备及其上网卡切换方法、可读介质
CN116614848A (zh) * 2021-07-30 2023-08-18 荣耀终端有限公司 基于电子设备位置的网络链路切换方法和电子设备
CN115002848B (zh) * 2021-11-17 2023-06-16 荣耀终端有限公司 网络切换方法、介质、程序产品和电子设备
CN115065996B (zh) * 2021-12-14 2023-04-07 荣耀终端有限公司 生成电子围栏的方法、终端和通信系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170026786A1 (en) * 2015-07-21 2017-01-26 International Business Machines Corporation Geo-fence management using a cluster analysis technique
CN109890067A (zh) * 2019-02-21 2019-06-14 华为技术有限公司 对特定路线上的特定位置进行识别的方法及电子设备
US20200280922A1 (en) * 2019-02-28 2020-09-03 Samsung Electronics Co., Ltd. Electronic device for supporting user state-based geofencing services
CN114173372A (zh) * 2020-09-10 2022-03-11 华为技术有限公司 数据缓存方法及电子设备
CN115002849A (zh) * 2021-12-14 2022-09-02 荣耀终端有限公司 网络切换的方法和终端
CN115002850A (zh) * 2021-12-14 2022-09-02 荣耀终端有限公司 网络切换方法、电子设备及可读介质
CN115022897A (zh) * 2021-12-14 2022-09-06 荣耀终端有限公司 通信方法及装置

Also Published As

Publication number Publication date
CN116744328B (zh) 2024-04-23
CN116744328A (zh) 2023-09-12

Similar Documents

Publication Publication Date Title
WO2020143380A1 (zh) 一种数据传输方法及电子设备
WO2021115007A1 (zh) 一种网络切换方法及电子设备
CN113795040B (zh) 通道切换方法、电子设备及存储介质
CN113810938B (zh) 通道切换方法、电子设备及存储介质
US20240022518A1 (en) Channel Switching Method, Electronic Device and Storage Medium
CN114286402B (zh) 通道切换方法、电子设备及存储介质
CN113301586B (zh) 网络选择方法及电子设备
CN113890905B (zh) 通道切换方法、电子设备及存储介质
WO2021016771A1 (zh) 信道检测方式切换方法、装置及存储介质
CN113810965B (zh) 通道切换方法、电子设备及存储介质
WO2024082811A1 (zh) 一种网络加速方法和装置
CN116709442A (zh) 一种无线网络切换方法和电子设备
CN116155729A (zh) 基于用户流量画像的网络加速方法及相关电子设备
CN116709367B (zh) 一种网络加速方法和装置
CN116709368B (zh) 一种网络加速方法和装置
RU2802678C1 (ru) Способ переключения каналов, электронное устройство и носитель хранения данных
CN116405960B (zh) 一种网络质量的检测方法及相关电子设备
US12120772B2 (en) Network access card switching method and electronic device
CN117915356A (zh) 一种网络加速方法和装置
US20220191682A1 (en) Network Access Card Switching Method and Electronic Device
CN116744329A (zh) 一种网络加速方法和电子设备
CN118056425A (zh) 信息处理方法及装置、通信设备及存储介质
CN116724500A (zh) 信息处理方法、系统及装置、通信设备及存储介质
CN118056386A (zh) 丢包处理方法、装置、通信设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23878806

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2023878806

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2023878806

Country of ref document: EP

Effective date: 20240808