A network switching method, an electronic device, and a storage medium
By predicting and switching to cellular network before users enter the elevator, the problem of internet lag caused by poor Wi-Fi signal was solved, thus improving the user experience.
Patent Information
- Application Number
- CN202210022948.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-10
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-01-10
AI Technical Summary
When users enter the elevator using Wi-Fi, the network signal weakens, causing internet lag and a poor user experience.
By predicting whether users are waiting to enter the elevator, the system can switch the Wi-Fi network to cellular network in advance, avoiding the need to switch before the network signal weakens.
Predicting and switching networks before users enter the elevator avoids network data transmission lag and improves user experience.
Smart Images

Figure CN116456406B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic devices, in particular to a network switching method, an electronic device and a storage medium. BACKGROUND
[0002] In the case that the electronic device of a user uses a Wireless-Fidelity (Wi-Fi) network to provide network connection for various applications (APPs) installed in the electronic device, the signal of the Wi-Fi network becomes poor when the user enters an elevator, causing network lag and poor user experience.
[0003] Based on this background, the present application provides a network switching method, an electronic device and a storage medium, which are intended to solve the problem of network lag when a user enters an elevator using a Wi-Fi network. SUMMARY
[0004] The present application provides a network switching method, an electronic device and a storage medium, which ensure that the electronic device can still provide a smooth online experience when a user enters an elevator using a Wi-Fi network. The specific application contents of the present application are as follows:
[0005] In a first aspect, the embodiments of the present application provide a network switching method, and the specific contents of the method include:
[0006] predicting whether a user is waiting to enter a target elevator;
[0007] when the user is waiting to enter the target elevator, switching a currently connected Wi-Fi network to a cellular network by the electronic device.
[0008] The network switching method provided by the embodiments of the present application can predict that a user enters an elevator in advance before the user enters the elevator, and switch a Wi-Fi network to a cellular network, that is, the signal strength of the Wi-Fi network does not weaken at this time, and thus the network switching can be performed in advance before the influence is generated, avoiding network lag of the user and improving user experience.
[0009] As an implementation manner of the first aspect of the present application, the electronic device stores at least one fence data, the fence data indicating Wi-Fi list information that can be searched by the electronic device in the vicinity of an elevator, and the Wi-Fi list information includes an address of a Wi-Fi network access point;
[0010] The prediction of whether the user is waiting to enter an elevator includes:
[0011] acquiring target fence data from the at least one fence data, and the target fence data includes the address of the currently connected Wi-Fi network access point;
[0012] obtaining current first Wi-Fi list information of the electronic device, the current first Wi-Fi list information comprising addresses of Wi-Fi network access points currently searchable;
[0013] determining that the user is waiting to enter the target elevator when a number of identical Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data satisfies a first condition.
[0014] As an implementation form of the first aspect of the present application, the Wi-Fi list information further comprises network signal strengths of the corresponding Wi-Fi network access point addresses,
[0015] Before the determining that the user is waiting to enter the target elevator, the method further comprises:
[0016] a number of matchable Wi-Fi network access points existing in the identical Wi-Fi network access point addresses satisfies a second condition, the matchable Wi-Fi network access points being Wi-Fi network access points with a difference between corresponding network signal strengths being less than a first threshold value.
[0017] As an implementation form of the first aspect of the present application, the first condition is that the number of identical Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data exceeds a second threshold value,
[0018] or
[0019] the first condition is that a ratio of the number of identical Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data to a number of all Wi-Fi network access points in the target fence data exceeds a third threshold value.
[0020] As an implementation form of the first aspect of the present application, the second condition is that the number of matchable Wi-Fi network access points exceeds a fourth threshold value,
[0021] or
[0022] the second condition is that a ratio of the number of matchable Wi-Fi network access points to the number of all Wi-Fi network access points in the target fence data exceeds a fifth threshold value.
[0023] As an implementation form of the first aspect of the present application, the at least one fence data stored by the electronic device is obtained in advance by the following steps:
[0024] When it is determined that the user exits the elevator according to the change state of the acceleration, and the electronic device is connected with a Wi-Fi network, second Wi-Fi list information when the user exits the elevator is collected, and the second Wi-Fi list information is taken as the fence data corresponding to the Wi-Fi network connected when the electronic device exits the elevator.
[0025] As an implementation manner of the first aspect of the application, the at least one fence data stored by the electronic device is obtained in advance by the following steps:
[0026] When it is determined that the user exits the elevator according to the change state of the acceleration, and the electronic device is connected with a Wi-Fi network, second Wi-Fi list information when the user exits the elevator is collected.
[0027] When the number of records of the second Wi-Fi list information exceeds a sixth threshold value, Wi-Fi network access points with the same Wi-Fi network access point address in all the second Wi-Fi list information are selected as the Wi-Fi network access points of a fence data, and the network signal strength of the Wi-Fi network access points of the fence data is the average value of the network signal strengths of the selected Wi-Fi network access points.
[0028] As an implementation manner of the first aspect of the application, before predicting whether the user waits to enter the target elevator, the method further comprises:
[0029] When it is determined that the user changes from a motion state to a stop state according to the change state of the speed, and the electronic device is connected with a Wi-Fi network, the step of predicting whether the user waits to enter the target elevator is entered.
[0030] As an implementation manner of the first aspect of the application, when the user waits to enter the target elevator, the electronic device currently connected with the Wi-Fi network is switched to a cellular network, which comprises:
[0031] When the user waits to enter the target elevator, and it is determined that the current connection Wi-Fi network signal strength is less than a seventh threshold value, the current connection Wi-Fi network is switched to a cellular network.
[0032] As an implementation manner of the first aspect of the application,
[0033] The current connection Wi-Fi network is switched to a cellular network, which comprises:
[0034] The cellular network is activated.
[0035] All flows of the application are switched to the cellular network.
[0036] In a second aspect, an electronic device is provided, comprising a processor configured to execute a computer program stored in a memory to implement the method of any one of the first aspect.
[0037] In a third aspect, a chip system is provided, comprising a processor coupled with a memory, the processor being configured to execute a computer program stored in the memory to implement the method of any one of the first aspect.
[0038] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, the computer program being configured to implement the method of any one of the first aspect when executed by one or more processors.
[0039] In a fifth aspect, the present application provides a computer program product, when the computer program product is executed on a device, the device is caused to execute the method of any one of the first aspect.
[0040] It can be understood that the beneficial effects of the second aspect to the fifth aspect described above can be referred to the related description in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the examples of the present application, the drawings needed in the embodiment description will be briefly introduced as follows.
[0042] Figure 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0043] Figure 2 is a network switching schematic diagram provided by an embodiment of the present application;
[0044] Figure 3 is a network switching method flow chart provided by an embodiment of the present application;
[0045] Figure 4 is a fence schematic diagram provided by an embodiment of the present application;
[0046] Figure 5 is a network switching method flow chart provided by another embodiment of the present application;
[0047] Figure 6 is a network switching method flow chart provided by another embodiment of the present application;
[0048] Figure 7 is a network switching method flow chart provided by another embodiment of the present application;
[0049] Figure 8 is a network switching method flow chart provided by another embodiment of the present application;
[0050] Figure 9 is a fence schematic diagram when a user waits for a target elevator provided by an embodiment of the present application;
[0051] Figure 10 A technical architecture diagram of a network switching method provided by an embodiment of the present application;
[0052] Figure 11 A timing diagram of a network switching method provided by an embodiment of the present application based on Figure 10 A timing diagram of a network switching method implemented by each component shown in the figure. DETAILED DESCRIPTION
[0053] In the following description, specific details are set forth, such as particular system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, persons skilled in the art should understand that the present application can be implemented in other embodiments without these specific details.
[0054] It should be understood that when used in the specification and the appended claims of the present application, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0055] It should also be understood that in the embodiments of the present application, "one or more" means one, two, or more than two; "and / or" describes the association relationship of the associated objects, which means that there can be three relationships; for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0056] In addition, in the description of the present application and the appended claims, the terms "first", "second", "third", "fourth", etc. are only used for differentiation and cannot be understood as indicating or implying relative importance.
[0057] In the present application, the reference "one embodiment" or "some embodiments" and the like means that the specific features, structures or characteristics described in connection with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in other some embodiments", "in other some embodiments" and the like appearing in different places in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "include", "contain", "have" and their variants mean "include but are not limited to", unless otherwise specifically emphasized.
[0058] The application provides a network switching method, an electronic device and a storage medium, which can avoid network data transmission of the electronic device from being blocked after a user enters an elevator using a Wi-Fi network, ensure smooth network data transmission and improve user experience.
[0059] The electronic device involved in the embodiments of the application can be a tablet computer, a mobile phone, a wearable device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA) or the like. The embodiments of the application do not limit the specific type of the electronic device.
[0060] Figure 1 A structural schematic diagram of an electronic device is shown. The electronic device 100 can 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, a sensor module 180, a key 190, a motor 191, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, and the like. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, and an acceleration sensor 180E.
[0061] It can be understood that the structure shown in the embodiments of the application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software or a combination of software and hardware.
[0062] The processor 110 can include one or more processing units such as: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors. For example, the processor 110 is configured to perform the network acceleration method in the embodiments of the present application.
[0063] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of fetching instructions and executing instructions.
[0064] The memory in the processor 110 can also be configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. Avoiding repeated access, reducing the waiting time of the processor 110, thus improving the efficiency of the system.
[0065] The USB interface 130 is an interface conforming to the USB standard specification, which can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or can be used to transmit data between the electronic device 100 and the peripheral device.
[0066] The external memory interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external storage card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video, etc. Files in the external storage card.
[0067] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system and at least one application program (such as a sound playing function, an image playing function, etc.) required by a function.
[0068] In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0069] The charging management module 140 is configured to receive a charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments of the wired charging, the charging management module 140 can receive the charging input of the wired charger through the USB interface 130.
[0070] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives the input of the battery 142 and / or the charging management module 140 to supply 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, etc.
[0071] In other embodiments, the power management module 141 can also be arranged in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be arranged in the same device.
[0072] The wireless communication function of the electronic device 100 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.
[0073] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0074] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can 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 by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transfer the processed signals to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and radiate the signals as electromagnetic waves through the antenna 1.
[0075] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrated with at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering on the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on the signals, and radiate the signals as electromagnetic waves through the antenna 2.
[0076] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology.
[0077] The pressure sensor 180A is used to sense a pressure signal, which can be converted into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. A capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A.
[0078] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, and calculates the distance that the lens module needs to compensate based on the angle, so that the lens offsets the shaking of the electronic device 100 by reverse movement, achieving anti-shake.
[0079] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the barometric pressure sensor 180C, and assists in positioning and navigation.
[0080] The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the electronic device attitude, applied to landscape / portrait screen switching, pedometer, etc.
[0081] The keys 190 include a power key, a volume key, etc. The keys 190 can be mechanical keys. They can also be touch keys. The electronic device 100 can receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0082] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts and also for touch vibration feedback.
[0083] The electronic device 100 implements display functions through a GPU, the display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0084] The display screen 194 is configured to display images, videos, and the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.
[0085] The camera 193 is configured to capture still images or videos. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.
[0086] The SIM card interface 195 is configured to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by being inserted into or pulled out of the SIM card interface 195. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.
[0087] The embodiments of the present application do not particularly limit the specific structure of the execution subject of the network switching method, as long as the execution subject can run the code of the network switching method according to the embodiments of the present application to process according to the network switching method provided by the embodiments of the present application. For example, the execution subject of the network switching method provided by the embodiments of the present application can be a functional module capable of calling and executing programs in an electronic device, or a processing device applied to an electronic device, such as a chip.
[0088] As shown in the electronic device Figure 1 A plurality of applications can be installed and run in the electronic device, such as social communication applications, game applications, audio and video applications, news applications, and the like. These applications can establish network connections with other electronic devices (for example, servers corresponding to the applications) through the electronic devices.
[0089] As an example, the application A can establish a network connection with the server corresponding to the application A through a wireless network card (also known as a Wi-Fi card) in the electronic device in which the application A is located; the application A can also establish a network connection with the server corresponding to the application A through a data service network card in the electronic device in which the application A is located. The wireless network card is a device supporting Wireless Local Area Network (WLAN) online; the data service network card is a device supporting General packet radio service (GPRS), Enhanced Data Rate for GSM Evolution (EDGE), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), High Speed Downlink Packet Access (HSDPA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), 5th Generation Mobile Communication Technology (5G) and other mobile communication technologies.
[0090] For ease of description, the network channel established between one electronic device and other electronic devices through a wireless network card can be referred to as a Wi-Fi network. The network channel established between one electronic device and other electronic devices through a data service network card can be referred to as a cellular network.
[0091] In actual application, the quality of the network channel changes with the environment in which the user is located. For example, when the user is in a closed metal environment, such as an elevator, the metal door after the elevator is closed absorbs electromagnetic wave signals, causing attenuation of the Wi-Fi network signal, while the cellular network is less affected.
[0092] The influence of the environment in which the user is located on the quality of the network channel is described by taking the electronic device 100 as a mobile phone as an example. Referring to FIG. 1, the electronic device 100 is located in an elevator 1. Figure 2, the user uses the application A in the mobile phone to play a game, wherein the application A in the mobile phone establishes a network connection with the server A of the application A through the wireless network card in the mobile phone, and the data stream A (for example, a data stream generated during a game battle) generated between the application A and the server A is transmitted through the Wi-Fi network between the wireless network card on the mobile phone and the wireless router. When the user enters the elevator, the closing of the elevator causes a sudden drop in the Wi-Fi network signal, which in turn causes the data stream A to decrease, resulting in a lag phenomenon when the user uses the application A, thereby causing a poor user experience.
[0093] In the embodiments of the present application, the data sequence transmitted between two electronic devices is recorded as a data stream. In actual application, based on the application scenario of the data stream, the data stream can be a video stream, an audio stream, a download stream, a session stream, etc.
[0094] As shown in Figure 2 , the mobile phone can switch the 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 the data stream A with the server A through the cellular network, thereby reducing the online lag caused by the sudden drop of the Wi-Fi network signal. However, the timing of switching the Wi-Fi network to the cellular network by the above-mentioned mobile phone is to switch the Wi-Fi network to the cellular network after detecting that the user gets on the elevator by the acceleration sensor built-in the mobile phone, that is, the mobile phone judges whether to switch the Wi-Fi network to the cellular network by detecting the movement state of the user after the user gets on the elevator and the elevator runs. For the user, at this time, the elevator has already closed and run, which has already caused the data stream A of the application A to decrease, resulting in online lag of the user.
[0095] In view of this, the present application provides a network switching method, an electronic device and a storage medium, which can predict that the user enters the elevator in advance before the user enters the elevator, and switch the Wi-Fi network to the cellular network, that is, at this time, the Wi-Fi network signal strength has not weakened, thereby the network switching can be performed in advance before the data stream A has an impact, avoiding online lag of the user and improving the user experience.
[0096] Figure 3 is a network switching method flowchart provided by the embodiments of the present application. As shown in Figure 3 , the above-mentioned network switching method can be applied to the electronic device 100, which includes:
[0097] Step 301, the electronic device 100 predicts whether the user is waiting to enter the target elevator.
[0098] It should be noted that the electronic device 100 can learn the correspondence between the elevator and the Wi-Fi network connected when entering or exiting the elevator. For example, the electronic device 100 can indicate the user entering the target elevator through the fence data, so as to predict whether the user is waiting to enter the target elevator. For example, the electronic device 100 can create fence data 1 to indicate the target elevator scene of the user's office. For another example, the electronic device 100 can create fence data 2 to indicate the target elevator scene of the user's residence.
[0099] It can be understood that the fence is a geographical concept, which can refer to a geographical area with boundaries, see Figure 4 The geographical area indicated by the above fence data can include the location area of the target elevator where the user is located. Generally, the closer the geographical area indicated by the fence to the location area of the actual target elevator, the more accurate the indication of the target elevator. In this way, the electronic device 100 can also more accurately predict whether the user enters the target elevator.
[0100] In the embodiment of the present application, the fence data created by the electronic device 100 can be described by a Wi-Fi list. Referring to Figure 4 , the fence can be described by the Wi-Fi network access points within the fence, and if the Wi-Fi network access points are not in the corresponding Wi-Fi list of the fence, they are Wi-Fi network access points outside the fence.
[0101] Address of Wi-Fi network access point Network signal strength (dBm) Connected address 1 -50 Address 2 -60 Address 3 -70
[0102] Table 1
[0103] As shown in Table 1, the Wi-Fi list includes the addresses of the Wi-Fi network access points. The address of the Wi-Fi network access point includes the connection address 1 of the Wi-Fi network access point connected by the electronic device 100, and the addresses 2, 3 of the unconnected Wi-Fi network access points. In addition, the Wi-Fi list can also include the network signal strength corresponding to the Wi-Fi network access point address. In a possible implementation manner, the Wi-Fi list can also include the boot time and the center frequency, etc.
[0104] For example, the address of the Wi-Fi network access point can be the BSSID. The strength of the Wi-Fi network signal can be the received signal strength indication (RSSI).
[0105] Optionally, the electronic device 100 can determine the fence data corresponding to the target elevator based on the information collected in the actual scene. For example, the Wi-Fi list information of the electronic device 100 collected when the user exits or enters the elevator.
[0106] Optionally, the electronic device 100 stores at least one fence data. The fence data can indicate Wi-Fi list information searchable by the electronic device 100 in the vicinity of the elevator. The Wi-Fi list information can include addresses of Wi-Fi network access points.
[0107] Optionally, the electronic device 100 can collect current first Wi-Fi list information of the electronic device 100 in the case of predicting whether the user is waiting to enter the target elevator, and determine whether the user is waiting to enter the target elevator by the number of same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data.
[0108] Optionally, the current first Wi-Fi list information includes addresses of Wi-Fi network access points currently searchable by the electronic device 100.
[0109] For example, if the number of same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data is greater than a threshold value, the electronic device 100 can determine that the user is waiting to enter the target elevator.
[0110] Optionally, the threshold value can be 2, 3, 4 or a larger number. The specific value of the threshold value is not limited in the embodiment of the application. It can be understood that the more the number of same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data, the closer the actual scene where the electronic device 100 is to the corresponding target elevator.
[0111] Step 302, when the user is waiting to enter the target elevator, the electronic device 100 switches the currently connected Wi-Fi network to a cellular network.
[0112] The above network switching method provided by the embodiment of the application can predict whether the user is waiting to enter the elevator through the fence data, and switch the currently connected Wi-Fi network of the electronic device 100 to a cellular network before determining that the user is waiting to enter the target elevator and before entering the target elevator, that is, switching before the application data flow of the electronic device 100 is affected, which can avoid network lag and improve user experience.
[0113] Figure 5 is a network switching method flowchart provided by another embodiment of the application, as Figure 5 shown, the electronic device 100 stores at least one fence data, the fence data indicating Wi-Fi list information searchable by the electronic device 100 in the vicinity of the elevator, the Wi-Fi list information including addresses of Wi-Fi network access points, and the electronic device 100 of step 301 predicting whether the user is waiting to enter the target elevator, including:
[0114] At step 501, the electronic device 100 acquires target fence data from at least one of the fence data, and the target fence data contains the address of the Wi-Fi network access point currently connected by the electronic device 100.
[0115] Optionally, the correspondence between the fence data and the target elevator can be represented by the address of the connected Wi-Fi network access point. For example, in the scenario where the target elevator is in an office, the address of the Wi-Fi network access point connected by the user at the target elevator in the office can be used to correspond to the target elevator in the office. For another example, in the scenario where the target elevator is in a residence, the address of the Wi-Fi network access point connected by the user at the residence can be used to correspond to the target elevator in the residence.
[0116] Optionally, the target fence data containing the address of the currently connected Wi-Fi network access point can be that the address of the connected Wi-Fi network access point in the target data is the same as the address of the Wi-Fi network access point currently connected by the electronic device 100.
[0117] At step 502, the current first Wi-Fi list information of the electronic device 100 is acquired, and the current first Wi-Fi list information includes the address of the currently searchable Wi-Fi network access point.
[0118] At step 503, when the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data meets a first condition, it is determined that the user is waiting to enter the target elevator.
[0119] Optionally, the first condition can be that the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data exceeds a second threshold.
[0120] Optionally, the second threshold can be 1, 2, 3, 4 or a larger value, and the embodiments of the present application do not limit the specific value of the second threshold.
[0121] For example, taking the second threshold as 2 as an example, referring to Table 2, the same Wi-Fi network access point addresses between the current first Wi-Fi list and the target fence data are: connected address 1, address 2, address 4 and address 5, and the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list and the target fence data exceeds 2, so the electronic device 100 can determine that the user is waiting to enter the target elevator.
[0122]
[0123] Table 2
[0124] Optionally, the first condition can also be that a ratio of a number of same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data to a number of all Wi-Fi network access points in the target fence data exceeds a third threshold value.
[0125] Optionally, the third threshold value can be 50%, 60%, 70%, or 80%, and the embodiments of the present application do not limit the specific value of the third threshold value.
[0126] For example, taking the third threshold value of 70% as an example, referring to Table 2 again, the number of same Wi-Fi network access point addresses between the current first Wi-Fi list and the target fence data is 4, the number of all Wi-Fi network access points in the target fence data is 5, and the ratio of the number of same Wi-Fi network access point addresses is 80%, which exceeds the third threshold value of 70%. Therefore, the electronic device 100 can determine that the user is waiting to enter the target elevator.
[0127] The above network switching method provided by the embodiments of the present application can predict whether the user is waiting to enter the target elevator by comparing the fence data pre-stored by the electronic device 100 with the current first Wi-Fi network list. When the first condition is met, the electronic device 100 can determine that the user is waiting to enter the target elevator.
[0128] Figure 5 The Wi-Fi list information in the embodiments also includes network signal strengths of corresponding Wi-Fi network access point addresses. Before step 503 of determining that the user is waiting to enter the target elevator, the method further includes:
[0129] In step 5031, the number of matchable Wi-Fi network access points in the same Wi-Fi network access point addresses meets a second condition, and the matchable Wi-Fi network access points are Wi-Fi network access points with a difference between corresponding network signal strengths being less than a first threshold value.
[0130] Optionally, the first threshold value can be 5, 8, 10, or 12, and the embodiments of the present application do not limit the specific value of the first threshold value.
[0131] Exemplarily, taking the first threshold value of 10 as an example, referring to Table 2 again, the addresses of the same Wi-Fi network access points between the current first Wi-Fi list and the target fence data are: the connected address 1, the address 2, the address 4 and the address 5. Among them, the difference between the network signal strength between the connected address 1 of the current first Wi-Fi list and the connected address 1 of the target fence data is 2, which is less than the first threshold value, that is, the connected address 1 is a matchable Wi-Fi network access point. The difference between the network signal strength between the address 2 of the current first Wi-Fi list and the address 2 of the target fence data is 18, which is greater than the first threshold value, that is, the address 2 is not a matchable Wi-Fi network access point. Similarly, the address 4 is a matchable Wi-Fi network access point, and the address 5 is not a matchable Wi-Fi network access point.
[0132] Optionally, the second condition can be that the number of the matchable Wi-Fi network access points exceeds a fourth threshold value.
[0133] Optionally, the fourth threshold value can be 2, 3, 4 or a larger value, and the embodiments of the present application do not limit the specific value of the fourth threshold value.
[0134] Exemplarily, taking the fourth threshold value of 3 as an example, referring to Table 2 again, in combination with the above description of the matchable Wi-Fi network access points, the number of the matchable Wi-Fi network access points in Table 2 is 2, that is, the current first Wi-Fi list in Table 2 does not meet the second condition, and the electronic device 100 determines that the user does not wait to enter the target elevator.
[0135] Optionally, the second condition can be that the number of the matchable Wi-Fi network access points exceeds a fourth threshold value.
[0136] Optionally, the fifth threshold value can be 50%, 60%, 70% or 80%, and the embodiments of the present application do not limit the specific value of the fifth threshold value.
[0137] Exemplarily, taking the fifth threshold value of 70% as an example, referring to Table 2 again, in combination with the above description of the matchable Wi-Fi network access points, the number of the matchable Wi-Fi network access points in Table 2 is 2, the number of all Wi-Fi network access points in the target fence data in Table 2 is 5, and the ratio of the number of the matchable Wi-Fi network access points to the number of all Wi-Fi network access points in the target fence data is 40%, that is, the electronic device 100 determines that the user does not wait to enter the target elevator.
[0138] The network switching method provided by the embodiments of the present application can introduce network signal strength when predicting whether the same Wi-Fi network access point between the current first Wi-Fi network access point and the target fence data is predicted, increase the similarity of the fence data representing the geographical position of the corresponding target elevator, and improve the accuracy of the prediction.
[0139] It should be noted that in actual application, step 4031 can replace step 403.
[0140] Figure 6 The network switching method flowchart is provided by another embodiment of the present application. As shown in Figure 6 The at least one fence data stored by the electronic device 100 is obtained by the following steps in advance.
[0141] Step 601, when the user gets out of the elevator according to the change state of the acceleration, and the electronic device 100 is connected with the Wi-Fi network, the second Wi-Fi list information when the user gets out of the elevator is collected, and the second Wi-Fi list information is used as the fence data of the Wi-Fi network connected when the electronic device 100 gets out of the elevator.
[0142] Optionally, the electronic device 100 can determine that the user is in the elevator through the acceleration sensor. For example, the user holds the electronic device 100, when the user takes the elevator to go up and down, the electronic device 100 can monitor the acceleration change of the electronic device 100 through the acceleration sensor, and then perceive whether the user is in the elevator. If the acceleration increases from zero and then decreases to zero, the user takes the elevator and is about to get out of the elevator.
[0143] It can be understood that the collected Wi-Fi list information when the user gets out of the elevator can correspond to the Wi-Fi network environment when the user enters the elevator next time, and then the generated target fence data can be more close to the elevator position in the actual scene. For example, the user gets out of the elevator after taking the elevator from the first floor to the floor where the office is located, and then the user leaves the office and needs to take the elevator from the floor where the user gets out of the elevator to go down, and then the collected second Wi-Fi list information when the user gets out of the elevator can accurately correspond to the fence data of the target elevator.
[0144] It can be understood that if the user does not connect the Wi-Fi network after getting out of the elevator, the collected fence data does not correspond to the connected Wi-Fi network access point to represent, and then the electronic device 100 can not collect the second Wi-Fi list information. In addition, considering that the user may not immediately connect the Wi-Fi network after getting out of the elevator, if the electronic device 100 connects the Wi-Fi network after a certain time, the electronic device 100 can collect the second Wi-Fi list information when the user gets out of the elevator.
[0145] Optionally, the time period can be, for example, 2 seconds, 3 seconds, or 5 seconds, and this application embodiment does not specifically limit it.
[0146] It should be noted that, since the target fence data needs to correspond to the actual scenario of the target elevator, the Wi-Fi network that the electronic device 100 connects to when exiting the elevator can be used as the identifier for the fence data. For example, in the application scenario of taking an elevator up and down in a residence, the Wi-Fi network connected in the residence can be used as the fence data for the target elevator in that residence. Similarly, in the application scenario of taking an elevator up and down in an office, the Wi-Fi network connected in the office can be used as the identifier for the fence data for the target elevator in that office.
[0147] Understandably, using the Wi-Fi network connected when the electronic device 100 exits the elevator as an identifier for fence data allows for quick and accurate matching of the corresponding target fence data during steps 503 or 5031.
[0148] It should be noted that, considering that the fence data generated from a single collection may not accurately represent the actual geographical location of the target elevator, this embodiment of the application can generate fence data by collecting second Wi-Fi list information multiple times, for example... Figure 7 The example shown. Figure 7 As shown, at least one fence data stored in the electronic device 100 is obtained in advance through the following steps:
[0149] Step 701: When it is determined that the user has exited the elevator based on the change in acceleration, and the electronic device 100 is connected to a Wi-Fi network, the second Wi-Fi list information at the time the user exits the elevator is collected.
[0150] It is understandable that step 601 determines the user's exit from the elevator based on the change in acceleration, and the electronic device 100 is connected to a Wi-Fi network. Collecting the second Wi-Fi list information when the user exits the elevator is the same as step 701, and the same implementation method can be used, so it will not be described again here.
[0151] Step 702: When the number of records in the second Wi-Fi list information exceeds the sixth threshold, the electronic device 100 selects all Wi-Fi network access points with the same Wi-Fi network access point address in the second Wi-Fi list information as a Wi-Fi network access point for fence data, and the network signal strength of the Wi-Fi network access point for fence data is the average value of the network signal strength of the selected Wi-Fi network access points.
[0152] Optionally, the sixth threshold can be a value of 2, 3, 4 or larger, and this application embodiment does not limit this.
[0153] It can be understood that the second Wi-Fi list information in step 702 can refer to the addresses of the access points of the same Wi-Fi network to which the electronic device 100 is connected, and the second Wi-Fi list information is collected at different times when the user gets off the elevator.
[0154] Optionally, the second Wi-Fi list information collected at different times has the same connection address, i.e., the address of the access point of the Wi-Fi network to which the user is connected when getting off the elevator.
[0155] Taking the address of the Wi-Fi network access point as BSSID and the Wi-Fi network signal strength as RSSI as examples, the recording of the second Wi-Fi list information is exemplarily illustrated.
[0156]
[0157]
[0158] Table 3
[0159] Referring to Table 3, the second Wi-Fi list information recorded by the electronic device 100 each time can include the BSSID and RSSI of the connected Wi-Fi network access point, and the BSSID and RSSI of the Wi-Fi network access point searched by the electronic device 100 at that time.
[0160] Exemplarily, taking the sixth threshold value as 2, in combination with Table 3 and Table 4, step 702 is illustrated. When the number of records of the second Wi-Fi list information exceeds 2, the electronic device 100 selects the Wi-Fi network access points with the same address in all the second Wi-Fi list information as the Wi-Fi network access points of a fence data. For example, in Table 3, 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, and therefore the addresses of the Wi-Fi network access points in the generated fence data are 6c:16:32:17:3c:95, 6c:16:32:17:3c:51 and 6c:17:32:27:2c:92, as shown in Table 4.
[0161] Referring to Table 4 again, the RSSI of the BSSID 6c:16:32:17:3c:95 is -50 dBm and -48 dBm respectively, and the RSSI of the corresponding BSSID in the generated fence data is the average value -49 dBm of -50 dBm and -48 dBm, and the RSSI of the BSSID 6c:16:32:17:3c:51 is -61 dBm, and the RSSI of the BSSID 6c:17:32:27:2c:92 is -71 dBm.
[0162]
[0163] Table 4
[0164] The network switching method provided by the embodiments of the present application can generate the fence data of the same Wi-Fi network connected by the user when getting out of the elevator at different times by collecting the same Wi-Fi network connected by the user when getting out of the elevator at different times, taking the intersection of the records of the second Wi-Fi list information collected at different times, and calculating the average network signal strength, so that the generated fence data is closer to the actual geographic location where the target elevator is located, and the accuracy of the electronic device 100 predicting whether the user is waiting to enter the elevator is improved.
[0165] It should be noted that the condition for the electronic device 100 to trigger the prediction of whether the user is waiting to enter the target elevator can be to refer to the motion state of the user, for example, the user is in a walking state or a stopping state. Figure 8 In the embodiment shown in FIG. 8, the electronic device 100 can perceive that the user may be waiting to enter the target elevator according to the change of the motion state of the user. As shown in FIG. 8, before step 301 of predicting whether the user is waiting to enter the target elevator, the method further comprises: Figure 8
[0166] Step 801, when it is determined according to the change state of the speed that the user is converted from the motion state to the stopping state, and the electronic device 101 is connected to the Wi-Fi network, entering the step of predicting whether the user is waiting to enter the target elevator.
[0167] Optionally, the electronic device 100 can be provided with an acceleration sensor, a gyroscope sensor, etc. to identify whether the state of the user is a walking state or a stopping state.
[0168] It can be understood that when the user is waiting for the elevator, the user is usually converted from walking to stopping, and then the electronic device 100 can determine that the user is converted from the motion state to the stopping state by the change of the speed, trigger the prediction of whether the user is waiting to enter the target elevator, and further determine whether the user is waiting to enter the target elevator.
[0169] For example, referring to FIG. 8, the electronic device 100 can be provided with an acceleration sensor, a gyroscope sensor, etc. to identify whether the state of the user is a walking state or a stopping state. Figure 9 When the user is converted from the moving state to the stop state, it can not be waiting for the elevator, by triggering the step of predicting whether the user is waiting to enter the target elevator, such as steps 501-503 provided in the above embodiment, or steps 501-5031, to determine whether the current first Wi-Fi list information collected by the electronic device 101 at this time meets the first condition or the second condition compared with the target fence data, and further predict whether the user is waiting to enter the target elevator, if the first condition or the second condition is not met, the electronic device 100 can continue to determine the motion state of the user according to the change state of the speed, when the user is converted from the moving state to the stop state, enter steps 501-503 or steps 501-5031 again, and predict whether the user is waiting to enter the target elevator again, when the current first Wi-Fi list information collected by the electronic device 100 at this time meets the first condition or the second condition compared with the corresponding target fence data, it can be determined that the user is waiting to enter the target elevator.
[0170] It can be understood that when the user is waiting to enter the target elevator, the electronic device 100 can switch the currently connected Wi-Fi network to the cellular network.
[0171] Optionally, when the user is waiting to enter the target elevator, the electronic device 100 switches the currently connected Wi-Fi network to the cellular network, comprising:
[0172] Step 3021, when the user is waiting to enter the target elevator, and it is determined that the signal strength of the currently connected Wi-Fi network is less than the seventh threshold value, the currently connected Wi-Fi network is switched to the cellular network.
[0173] Optionally, the seventh threshold value can be -60dBm, -70dBm, -75dBm, etc., and the specific value of the seventh threshold value is not limited in the embodiment of the application.
[0174] It can be understood that when the signal strength of the currently connected Wi-Fi network is less than the seventh threshold value, it can be determined that the signal strength of the currently connected Wi-Fi network has dropped sharply, indicating that the metal door of the elevator is closed, at this time the electronic device 100 can switch the currently connected Wi-Fi network to the cellular network.
[0175] Optionally, the electronic device 100 switches the currently connected Wi-Fi network to the cellular network, comprising:
[0176] Step 3022, activating the cellular network.
[0177] Step 3021, switching all flows of the application to the cellular network.
[0178] It can be understood that at this time, the Wi-Fi network is affected by the closed environment of the elevator, and the data flow of all applications on the electronic device 100 is affected. The electronic device 100 can switch all application data flows to the cellular network to avoid causing user network lag and improve user experience.
[0179] After describing the network switching method provided by the embodiments of the present application, the technical implementation details of implementing the network switching method will be described below.
[0180] Referring to Figure 10 , a technical architecture diagram of a network switching method provided by the embodiments of the present application.
[0181] The technical architecture includes an application layer, a service layer, a policy layer, and a kernel layer. Figure 10 Only part of the layers and part of the components related to the embodiments of the present application are shown in the figure. In actual applications, layers and components not shown in the figure can also be included Figure 10 , of course, only part of the components shown in the figure can be included. Figure 10
[0182] Various applications exist in the application layer, such as the video application, the game application, etc. as described above.
[0183] The elevator awareness component, the motion state component, the fence data acquisition component, the fence database, the fence data generation component, the fence data prediction component, and the network connection management component exist in the service layer.
[0184] The elevator awareness component is used to perceive whether the user is out of the elevator. The elevator awareness component can notify the fence data acquisition component of the user's out-of-elevator time. The fence data acquisition component is used to acquire the current Wi-Fi list information of the electronic device 100. The fence database is used to store the data acquired by the fence data acquisition component. The fence data generation component is used to generate at least one fence data according to the data acquired by the fence data acquisition component, and each fence data can correspond to a Wi-Fi network connected when out of the elevator. The motion state component is used to identify the change of the user's motion state and stop state, and then trigger the fence data prediction component to predict whether the user is waiting to enter the elevator. The fence data prediction component is used to predict whether the user is waiting to enter the target elevator according to the Wi-Fi network currently connected by the electronic device 100 and the fence data, and initiate a network switching request to the network connection management component when predicting that the user is waiting to enter the target elevator. The network connection management component is used to manage the network, and activate the cellular network and notify the switching policy management component when receiving the network switching request initiated by the fence data prediction component.
[0185] It can be understood that the service layer can also include a network detection component. The network detection component can be used to detect the state (on or off, etc.) of the Wi-Fi network supported by the electronic device 100, and can also detect the state of the data service network supported by the electronic device. As an example, the electronic device 100 is provided with a wireless network card 1 of 2.4 GHz frequency band and a wireless network card 2 of 5.0 GHz frequency band. The network detection component can detect whether the wireless network of 2.4 GHz frequency band is in an on or off state; it can also detect whether the wireless network of 5.0 GHz frequency band is in an on or off state. The electronic device 100 is provided with a data service network card 1 of operator A and a data service network card 2 of operator B. The network detection component can detect whether the data service of operator A is in an on or off state; it can also detect whether the data service of operator B is in an on or off state.
[0186] The policy layer is provided with a switching policy management component and a traffic awareness component. The traffic awareness component is used to count the reported data flow and evaluate the network quality of each flow. The switching policy management component is used to issue a switching command to the switching policy execution component in the kernel layer.
[0187] The kernel layer has a switching policy execution component and a traffic reporting component. The traffic reporting component is used to collect data flow information and report the collected data flow information. The switching policy execution component is used to execute the switching of Wi-Fi network and cellular network.
[0188] For a clearer understanding of the above architecture diagram, see Figure 11 , the network switching method provided by the embodiment of the present application is based on Figure 10 The timing diagram of a network switching method implemented by each component shown in the figure. The embodiment of the present application is based on Figure 10 The network switching method implemented by each component shown in the figure includes three parts: one part is the generation method of the fence data, one part is the prediction method, and one part is the network switching method.
[0189] The generation method of the fence data in the embodiment of the present application is described in combination with Figure 11
[0190] Step 1101, the elevator awareness component senses the acceleration change, and notifies the fence data collection component of the elevator exit event.
[0191] Optionally, the elevator awareness component can monitor the acceleration change through the acceleration sensor, and then sense whether the user is in the elevator. If the acceleration increases from zero and then decreases to zero, the user takes the elevator and is about to exit the elevator.
[0192] Step 1102, the fence data collection component collects the second Wi-Fi list information when the user exits the elevator, and stores the collected second Wi-Fi list information to the fence database.
[0193] Optionally, the fence database is configured to store the data collected by the fence data collection component.
[0194] It can be understood that collecting the Wi-Fi list information when the user gets off the elevator can correspond to the Wi-Fi network environment when the user enters the elevator next time, and thus the target fence data generated can be more close to the actual scenario of the elevator position. For example, the user gets off the elevator after taking the elevator from the first floor to the floor where the office is located, and then the user leaves the office and needs to take the elevator from the floor where the user gets off the elevator to go downstairs, and thus the second Wi-Fi list information collected when the user gets off the elevator can accurately correspond to the fence data of the target elevator.
[0195] It can be understood that if the user does not connect to the Wi-Fi network after getting off the elevator, the fence data collected at this time does not have a corresponding connected Wi-Fi network access point to represent, and thus the electronic device 100 can not collect the second Wi-Fi list information. In addition, considering that the user may not immediately connect to the Wi-Fi network after getting off the elevator, if the electronic device 100 connects to the Wi-Fi network after a certain time, the electronic device 100 can collect the second Wi-Fi list information when the user gets off the elevator.
[0196] Optionally, the certain time may be 2s, 3s or 5s, which is not limited in the embodiments of the present application.
[0197] In step 1103, the fence data generation component obtains the data in the fence database, and generates at least one fence data according to the data in the fence data.
[0198] It can be understood that each fence data can correspond to the Wi-Fi network connected when getting off the elevator.
[0199] Optionally, when the number of records of the second Wi-Fi list information in the fence database exceeds the sixth threshold, the fence data generation component is notified to generate at least one fence data.
[0200] Optionally, the fence data generation component can select the Wi-Fi network access points with the same Wi-Fi network access point address in all the second Wi-Fi list information as the Wi-Fi network access points of one fence data, and the network signal strength of the Wi-Fi network access points of the fence data is the average value of the network signal strengths of the selected Wi-Fi network access points.
[0201] Optionally, the fence data generation component can store the at least one generated fence data to the fence database.
[0202] In combination Figure 11 The prediction method in the embodiments of the present application is described.
[0203] In step 1104, the motion state component determines that the user is converted from the motion state to the stop state according to the change of the speed, and the electronic device 101 is connected with the Wi-Fi network, and informs the fence data prediction component to predict whether the user is waiting to enter the elevator.
[0204] Optionally, the electronic device 100 can be provided with an acceleration sensor, a gyroscope sensor and the like to identify whether the state of the user is the walking state or the stop state. The motion state component can identify the state of the user according to the acceleration sensor, the gyroscope sensor and the like
[0205] It can be understood that the user is usually converted from walking to stopping when waiting for the elevator, and thus the change of the speed can be used to determine that the user is converted from the motion state to the stop state, to trigger the prediction of whether the user is waiting to enter the target elevator, and thus whether the user is waiting to enter the target elevator can be further determined.
[0206] In step 1105, the fence data prediction component determines that the address of the Wi-Fi network access point currently connected by the electronic device 100 exists in the target fence data, and acquires the current first Wi-Fi list information. When the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data satisfies a first condition, it is determined that the user is waiting to enter the target elevator.
[0207] In step 1106, the fence data prediction component determines that the user is waiting to enter the target elevator, and initiates a request for network switching to the network connection management component.
[0208] Optionally, the fence data prediction component determines that the address of the connected Wi-Fi network access point in the target fence data is the same as the address of the currently connected Wi-Fi network access point, and acquires the current first Wi-Fi list information. The current first Wi-Fi list information includes the address of the currently searchable Wi-Fi network access point.
[0209] Optionally, the first condition can be that the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data exceeds a second threshold value.
[0210] Optionally, the second threshold value can be 1, 2, 3, 4 or a larger value, and the embodiments of the present application do not limit the specific value of the second threshold value.
[0211] Optionally, the first condition can also be that the ratio of the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data to the number of all Wi-Fi network access points in the target fence data exceeds a third threshold value.
[0212] Optionally, the third threshold value can be 50%, 60%, 70%, or 80%, and the embodiments of the present application do not limit the specific value of the third threshold value.
[0213] The above network switching method provided by the embodiments of the present application can compare the fence data pre-stored by the electronic device 100 with the current first Wi-Fi network list when predicting whether the user is waiting to enter the target elevator, and when the first condition is met, it can be determined that the user is waiting to enter the target elevator.
[0214] As another example, the fence data prediction component predicting whether the user is waiting to enter the target elevator can include the following steps:
[0215] In step 1105-1, the fence data prediction component determines that the target fence data contains the Wi-Fi network access point address to which the electronic device 100 is currently connected, obtains the current first Wi-Fi list information, and when the number of matchable Wi-Fi network access points existing in the same Wi-Fi network access point address between the current first Wi-Fi list information and the target fence data meets the second condition, the matchable Wi-Fi network access points are the Wi-Fi network access points whose corresponding network signal strengths differ by less than a first threshold value.
[0216] Optionally, the first threshold value can be 5, 8, 10, or 12, etc., and the embodiments of the present application do not limit the specific value of the first threshold value.
[0217] Optionally, the second condition can be that the number of matchable Wi-Fi network access points exceeds a fourth threshold value.
[0218] Optionally, the fourth threshold value can be 2, 3, 4, or a larger value, and the embodiments of the present application do not limit the specific value of the fourth threshold value.
[0219] Optionally, the second condition can be that the ratio of the number of matchable Wi-Fi network access points to the number of all Wi-Fi network access points in the target fence data exceeds a fifth threshold value.
[0220] Optionally, the fifth threshold value can be 50%, 60%, 70%, or 80%, and the embodiments of the present application do not limit the specific value of the fifth threshold value.
[0221] The above network switching method provided by the embodiments of the present application can introduce network signal strength when predicting whether the user is waiting to enter the target elevator through the same Wi-Fi network access point addresses between the current first Wi-Fi network access point and the target fence data, increase the similarity of the fence data representing the geographical location of the corresponding target elevator, and improve the accuracy of the prediction.
[0222] in combination Figure 11 The network switching method in the embodiments of the present application is described.
[0223] In step 1107, the network connection management component receives the network switching request initiated by the fence data prediction component, activates the cellular network, and notifies the switching strategy management component.
[0224] In step 1108, the switching strategy management component obtains all current data streams through the traffic perception component, and issues a network switching command to switch all current data streams to the switching strategy execution component.
[0225] Optionally, the traffic perception component obtains all data streams of the current application through the traffic reporting component.
[0226] Optionally, the switching strategy management component determines that the signal strength of the currently connected Wi-Fi network is less than a seventh threshold value, and issues a network switching command to switch all current data streams to the switching strategy execution component.
[0227] Optionally, the seventh threshold value can be -60 dBm, -70 dBm, -75 dBm, etc., and the specific value of the seventh threshold value is not limited in the embodiments of the present application.
[0228] It can be understood that when the signal strength of the currently connected Wi-Fi network is less than the seventh threshold value, it can be determined that the signal strength of the currently connected Wi-Fi network has suddenly dropped, indicating that the metal door of the elevator is closed, and at this time the currently connected Wi-Fi network can be switched to the cellular network.
[0229] In step 1109, the switching strategy execution component is configured to execute the switching between the Wi-Fi network and the cellular network.
[0230] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0231] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in each method embodiment described above.
[0232] The embodiments of the present application also provide a computer program product, which, when running on a first device, enables the first device to implement the steps in each method embodiment described above.
[0233] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the computer program for instructing the relevant hardware to complete all or part of the processes in the above-mentioned embodiments can be stored in a computer readable storage medium, and the computer program can implement the steps of each method embodiment when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the first device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0234] The embodiments of the present application also provide a chip system, which includes a processor coupled with a memory. 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.
[0235] In the above embodiments, the description of each embodiment has its own focus. The parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0236] Those skilled in the art can appreciate that the units and method steps of the examples described in combination with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0237] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A network handover method, characterized by, The application is applied to an electronic device, comprising: When it is determined that the user is converted from a moving state to a stopping state according to a change state of speed, and the electronic device is connected with a Wi-Fi network, target fence data is acquired from at least one fence data; the electronic device stores at least one fence data, the fence data indicates Wi-Fi list information that can be searched by the electronic device near an elevator, the Wi-Fi list information comprises an address of a Wi-Fi network access point and network signal strength corresponding to the address of the Wi-Fi network access point; the target fence data contains the address of the currently connected Wi-Fi network access point; Current first Wi-Fi list information of the electronic device is acquired, the current first Wi-Fi list information comprises an address of a currently searchable Wi-Fi network access point; When the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data satisfies a first condition, and the number of the matchable Wi-Fi network access points in the same Wi-Fi network access point addresses satisfies a second condition, it is determined that the user is waiting to enter a target elevator; the matchable Wi-Fi network access point is a Wi-Fi network access point with a difference between corresponding network signal strengths less than a first threshold value in the same Wi-Fi network access point addresses; When the user is waiting to enter the target elevator, the electronic device switches the currently connected Wi-Fi network to a cellular network.
2. The method of claim 1, wherein, The first condition is that the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data exceeds a second threshold value, or The first condition is that a ratio of the number of the same Wi-Fi network access point addresses between the current first Wi-Fi list information and the target fence data to the number of all Wi-Fi network access points in the target fence data exceeds a third threshold value.
3. The method of claim 1, wherein, The second condition is that the number of the matchable Wi-Fi network access points exceeds a fourth threshold value, or The second condition is that a ratio of the number of the matchable Wi-Fi network access points to the number of all Wi-Fi network access points in the target fence data exceeds a fifth threshold value.
4. The method of claim 1, wherein, The at least one fence data stored by the electronic device is obtained in advance by the following steps: When it is determined that the user is out of the elevator according to a change state of acceleration, and the electronic device is connected with a Wi-Fi network, second Wi-Fi list information when the user is out of the elevator is collected, and the second Wi-Fi list information is taken as fence data corresponding to the Wi-Fi network connected when the electronic device is out of the elevator.
5. The method of claim 1, wherein, The at least one fence data stored by the electronic device is obtained in advance by the following steps: When it is determined that the user is out of the elevator according to a change state of acceleration, and the electronic device is connected with a Wi-Fi network, second Wi-Fi list information when the user is out of the elevator is collected, and the second Wi-Fi list information is taken as fence data corresponding to the Wi-Fi network connected when the electronic device is out of the elevator. When the record number of the second Wi-Fi list information exceeds a sixth threshold value, all Wi-Fi network access points with the same Wi-Fi network access point address in the second Wi-Fi list information are selected as Wi-Fi network access points of a fence data, and the network signal strength of the Wi-Fi network access points of the fence data is the average value of the network signal strengths of the selected Wi-Fi network access points.
6. The method of claim 1, wherein, The electronic device switches the currently connected Wi-Fi network to a cellular network when the user waits to enter the target elevator, and the electronic device comprises the following steps: The electronic device switches the currently connected Wi-Fi network to a cellular network when the user waits to enter the target elevator, and the electronic device comprises the following steps:
7. The method of claim 1, wherein, The electronic device switches the currently connected Wi-Fi network to a cellular network, and the method comprises the following steps: activating the cellular network; switching all flows of the application to the cellular network.
8. An electronic device, comprising: The electronic device comprises a processor, and the processor is used to run a computer program stored in a memory, so that the electronic device implements the method according to any one of claims 1 to 7.
9. A chip system, characterized by The electronic device comprises a processor, and the processor is used to run a computer program stored in a memory, so that the electronic device implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and the computer program is run on the processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Transfer method and device between unauthorized mobile access network and honeycomb communication network
CN101841876A
Method for realizing automatic floor positioning by using intelligent mobile phone Wi-Fi (Wireless Fidelity) function
CN103152697A
Method and device for accessing wireless access point, and computer readable storage medium
CN106922005A
Method and device for displaying release information
CN106952118A
Method for generating electronic fence, terminal and communication system
CN115065996A