Communication method and related apparatus
By acquiring elevator scene feature information, the terminal automatically identifies and switches networks, solving the network lag problem caused by Wi-Fi signal attenuation in elevator scenarios and improving the user experience.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-10-16
- Publication Date
- 2026-04-23
AI Technical Summary
When a user enters the elevator, the Wi-Fi signal weakens or disappears instantly. The terminal cannot detect this quickly, causing network lag. The user needs to manually switch networks, which is cumbersome and affects the internet experience.
The terminal identifies elevator scenes by acquiring scene feature information, such as magnetic field strength, Wi-Fi signal strength, and acceleration information, and disconnects the Wi-Fi connection or switches to other networks after identifying the elevator scene.
This technology enables terminals to quickly identify and switch networks before entering elevators, reducing network lag time, improving the user's internet experience, and eliminating the need for manual operation.
Smart Images

Figure CN2025127955_23042026_PF_FP_ABST
Abstract
Description
A communication method and related apparatus
[0001] This application claims priority to Chinese Patent Application No. 202411469527.9, filed on October 18, 2024, entitled “A Communication Method and Related Device”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communications, and more particularly to a communication method and related apparatus. Background Technology
[0003] Once a terminal establishes a communication connection with a wireless access point (AP) via Wi-Fi technology (also known as a Wi-Fi connection), the terminal can transmit data through that Wi-Fi connection. However, when a user leaves the Wi-Fi coverage area and enters an elevator, the Wi-Fi signal usually weakens or disappears momentarily. The terminal cannot quickly detect the change in Wi-Fi signal and will remain on the previous Wi-Fi network for a long time, causing internet lag. Users typically need to manually disable the wireless local area network (WLAN) function when Wi-Fi lag occurs to use other communication networks, which is cumbersome and results in a poor user experience. Summary of the Invention
[0004] This application provides a communication method and related apparatus that enables a terminal to quickly identify whether it is in an elevator scene, and when it is determined that the terminal is in an elevator scene, disconnect the Wi-Fi connection and access other networks, or switch to other networks, thereby improving the user's Internet experience.
[0005] Firstly, this application provides a communication method applied to a terminal, comprising: establishing a Wi-Fi communication connection with a wireless access device; acquiring scene feature information; determining, based on the scene feature information, whether the terminal is in an elevator scene; and, after determining that the terminal is in an elevator scene, disconnecting the Wi-Fi connection or switching the communication network. In this way, when establishing a Wi-Fi communication connection with the wireless access device, the terminal can acquire scene feature information and determine whether the terminal is in an elevator scene based on the scene feature information. This allows the terminal to disconnect the Wi-Fi connection or switch the communication network more quickly when entering an elevator scene, reducing the time the terminal spends on a sluggish Wi-Fi network in an elevator scene, improving the user's internet experience, and eliminating the need for the user to manually switch communication networks, thus reducing cumbersome operations.
[0006] In one possible implementation, scene feature information includes magnetic field strength information. Based on this information, the system determines that the terminal is in an elevator scene. Specifically, this involves detecting that the magnetic field strength gradually decreases or increases within a first time period, and that the absolute value of the difference between the first magnetic field strength information at a first moment and the second magnetic field strength information at a second moment within the first time period is greater than a preset magnetic field strength threshold. The second moment is later than the first moment. Since elevators are typically made of metal, there is a significant difference in magnetic field strength between the outside and inside the elevator car. The terminal can detect changes in magnetic field strength as it enters the elevator car from outside. Therefore, the terminal can determine whether it has entered the elevator car based on the magnetic field strength information. Upon determining that the terminal has entered the elevator car, it is identified as being in an elevator scene. The terminal can recognize the elevator scene as soon as the user steps into the elevator, and disconnect from the Wi-Fi network and switch to another communication network before Wi-Fi network lag occurs, resulting in smoother internet access.
[0007] In one possible implementation, the scene feature information includes Wi-Fi signal strength information. Based on the scene feature information, it is determined that the terminal is in an elevator scene. Specifically, this includes detecting that the Wi-Fi signal strength gradually decreases within a second time period, and that the absolute value of the difference between the first Wi-Fi signal strength at the third moment within the second time period and the second Wi-Fi signal strength at the fourth moment within the second time period is greater than a preset signal strength threshold, thus determining that the terminal is in an elevator scene. The fourth moment is later than the third moment. In this way, since the elevator door blocks the Wi-Fi signal, the Wi-Fi signal received by the terminal inside the elevator weakens after the elevator door closes. The terminal can determine whether it is in an elevator environment based on the change in Wi-Fi signal strength. When the elevator door closes, the terminal can determine that it is in an elevator scene based on the Wi-Fi signal strength information, allowing the terminal to switch networks before its Wi-Fi network becomes unresponsive, reducing the probability of network lag.
[0008] In one possible implementation, the scene feature information includes magnetic field strength information and Wi-Fi signal strength information. Based on the scene feature information, it is determined that the terminal is in an elevator scene. Specifically, this includes: detecting that the magnetic field strength information gradually decreases or increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at a first moment and the second magnetic field strength information at a second moment within the first time period is greater than a preset magnetic field strength threshold; and / or detecting that the Wi-Fi signal strength information gradually decreases within a second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at a third moment and the second Wi-Fi signal strength information at a fourth moment within the second time period is greater than a preset signal strength threshold, thus determining that the terminal is in an elevator scene, where the second moment is later than the first moment, and the fourth moment is later than the third moment. In this way, the terminal determines whether it has entered the elevator car based on the magnetic field strength information and whether the elevator door is closed based on the Wi-Fi signal strength information. The terminal can identify the elevator scene more quickly and save time when determining that it is in one of the two scene feature information types. When the terminal determines that it is in an elevator scene only after detecting that both acquired scene feature information indicate that the terminal is in an elevator scene, it can identify the elevator scene based on multiple scene feature information, thereby improving the accuracy of the terminal in identifying the elevator scene.
[0009] In one possible implementation, the fourth moment is later than the second moment. This way, since in most cases the terminal first detects entering the elevator car and then detects the elevator doors closing, the terminal can determine that it is in an elevator scene when these two events are determined sequentially based on scene feature information, which is more consistent with the user's entire elevator ride.
[0010] In one possible implementation, the scene feature information includes magnetic field strength information and acceleration information. Based on the scene feature information, it is determined that the terminal is in an elevator scene. Specifically, this includes detecting that the magnetic field strength information gradually decreases or increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at the first moment and the second magnetic field strength information at the second moment within the first time period is greater than a preset magnetic field strength threshold; and / or detecting that the acceleration information in the vertical direction at the fifth moment is greater than a preset acceleration information threshold, thus determining that the terminal is in an elevator scene, where the second moment is later than the first moment. In this way, the terminal determines whether it has entered the elevator car based on the magnetic field strength information and whether the elevator is running based on the acceleration information. When the terminal can determine that it is in an elevator scene by detecting that one of the two scene feature information indicates that it is in an elevator scene, it can identify the elevator scene more quickly, saving time. When the terminal can determine that it is in an elevator scene only after detecting that both of the acquired scene feature information indicate that it is in an elevator scene, it can identify the elevator scene based on multiple scene feature information, improving the accuracy of the terminal in identifying the elevator scene.
[0011] In one possible implementation, the fifth moment is later than the second moment. This way, since in most cases the terminal first detects entering the elevator car and then detects the elevator's movement, the terminal can determine that it is in an elevator scene when these two events are determined sequentially based on scene feature information, which is more consistent with the user's entire elevator ride.
[0012] In one possible implementation, the scene feature information includes Wi-Fi signal strength information and acceleration information. Based on the scene feature information, it is determined that the terminal is in an elevator scene. Specifically, this includes detecting that the Wi-Fi signal strength gradually decreases within a second time period, and that the absolute value of the difference between the first Wi-Fi signal strength at the third moment within the second time period and the second Wi-Fi signal strength at the fourth moment within the second time period is greater than a preset signal strength threshold; and / or detecting that the vertical acceleration information at the fifth moment is greater than a preset acceleration information threshold, thus determining that the terminal is in an elevator scene, where the fourth moment is later than the third moment. In this way, the terminal determines whether the elevator door is closed based on the Wi-Fi signal strength information and whether the elevator is running based on the acceleration information. When the terminal can determine that it is in an elevator scene by detecting that one of the two scene feature information indicates that it is in an elevator scene, it can identify the elevator scene more quickly. When the terminal can determine that it is in an elevator scene only after detecting that both of the acquired scene feature information indicate that it is in an elevator scene, the accuracy of the terminal's elevator scene identification can be improved.
[0013] In one possible implementation, the fifth moment is later than the fourth moment. This way, since in most cases the terminal first detects the elevator door closing and then the elevator starting, the terminal can determine that it is in an elevator scene when it sequentially identifies these two events based on scene feature information, which is more consistent with the user's entire elevator ride.
[0014] In one possible implementation, the scene feature information includes magnetic field strength information, Wi-Fi signal strength information, and acceleration information. Based on the scene feature information, it is determined that the terminal is in an elevator scene, specifically including: detecting that the magnetic field strength information gradually decreases or gradually increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at a first moment within the first time period and the second magnetic field strength information at a second moment within the first time period is greater than a preset magnetic field strength threshold; and detecting that the Wi-Fi signal strength information gradually decreases within a second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at a third moment within the second time period and the second Wi-Fi signal strength information at a fourth moment within the second time period is greater than a preset signal strength threshold, wherein the second moment is later than the first moment, the fourth moment is later than the third moment, or...
[0015] The system detects that the magnetic field strength information gradually decreases or gradually increases within the first time period, and the absolute value of the difference between the first magnetic field strength information at the first moment and the second magnetic field strength information at the second moment within the first time period is greater than a preset magnetic field strength threshold. Furthermore, the system detects that the acceleration information in the vertical direction at the fifth moment is greater than a preset acceleration information threshold.
[0016] The system detects that the Wi-Fi signal strength gradually decreases during the second time period, and that the absolute value of the difference between the first Wi-Fi signal strength at the third moment and the second Wi-Fi signal strength at the fourth moment during the second time period is greater than a preset signal strength threshold. Furthermore, it detects that the vertical acceleration at the fifth moment is greater than a preset acceleration threshold. Therefore, the system determines that the terminal is in an elevator scene. In this way, the terminal can identify an elevator scene based on three scene feature information. By detecting two scene feature information indicating that the terminal is in an elevator scene, the system determines that the terminal is in an elevator scene, which not only improves the accuracy of elevator scene identification but also allows for faster identification.
[0017] In one possible implementation, the scene feature information includes magnetic field strength information, Wi-Fi signal strength information, and acceleration information. Based on the scene feature information, it is determined that the terminal is in an elevator scene. Specifically, this includes: detecting that the magnetic field strength gradually decreases or increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at the first moment and the second magnetic field strength information at the second moment within the first time period is greater than a preset magnetic field strength threshold; or detecting that the Wi-Fi signal strength gradually decreases within a second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at the third moment and the second Wi-Fi signal strength information at the fourth moment within the second time period is greater than a preset signal strength threshold; or detecting that the vertical acceleration information at the fifth moment is greater than a preset acceleration information threshold, where the second moment is later than the first moment and the fourth moment is later than the third moment. In this way, the terminal collects three types of scene feature information. As long as one of these scene feature information indicates that the terminal is in an elevator scene, it is determined that the terminal is in an elevator scene. Multiple scene feature information can be detected simultaneously, allowing for faster identification of elevator scenes.
[0018] In one possible implementation, the scene feature information includes magnetic field strength information, Wi-Fi signal strength information, and acceleration information. Based on the scene feature information, it is determined that the terminal is in an elevator scene, specifically including: detecting that the magnetic field strength information gradually decreases or gradually increases within a first time period, and that the absolute value of the difference between the first magnetic field strength information at a first moment within the first time period and the second magnetic field strength information at a second moment within the first time period is greater than a preset magnetic field strength threshold, wherein the second moment is later than the first moment; and...
[0019] It was detected that the Wi-Fi signal strength gradually decreased during the second time period, and the absolute value of the difference between the first Wi-Fi signal strength at the third moment of the second time period and the second Wi-Fi signal strength at the fourth moment of the second time period was greater than a preset signal strength threshold, indicating that the fourth moment was later than the third moment; furthermore,
[0020] If the vertical acceleration at the fifth moment exceeds a preset acceleration threshold, the terminal is determined to be in an elevator scene. Thus, the terminal identifies itself as being in an elevator scene only after recognizing all three scene feature information. Combining multiple scene feature information allows for more accurate elevator scene identification and reduces the probability of misidentification.
[0021] In some examples, the third moment is later than the second moment, and the fifth moment is later than the fourth moment. In this way, the terminal detects different scene feature information sequentially according to the elevator riding process, increasing the probability of correctly identifying the elevator scene.
[0022] In one possible implementation, the scene feature information includes magnetic field strength information, acceleration information within a third time period, and acceleration information within a fourth time period. Based on the scene feature information, it is determined that the terminal is in an elevator scene. Specifically, this includes: determining that the terminal is walking within the third time period based on the acceleration information; detecting a magnetic field strength greater than a preset maximum strength threshold; generating an acceleration information curve based on the acceleration information within the fourth time period; and determining that the acceleration information curve includes a specified waveform to confirm that the terminal is in an elevator scene. Thus, when the terminal determines that it is walking based on acceleration information, it tends to assume that the user carrying the terminal may be entering an elevator car. When the accuracy of determining the magnetic field strength information is low, but the terminal detects vertical acceleration based on acceleration information, it tends to assume that the user carrying the terminal is on a moving elevator, and the terminal can thus determine that it is in an elevator scene.
[0023] In one possible implementation, the scene feature information includes acceleration information within a third time period and magnetic field strength information within a fifth time period. Based on the scene feature information, it is determined that the terminal is in an elevator scene. Specifically, this includes: determining that the terminal is walking within the third time period based on the acceleration information; detecting that there is no magnetic field strength information greater than a preset maximum strength threshold; generating a magnetic field strength information variance curve based on the magnetic field strength information within the fifth time period; detecting that the magnetic field strength information variance curve includes a first inflection point; and determining that the terminal is in an elevator scene, where the variance value of the first inflection point is the maximum variance value in the magnetic field strength information variance curve. Thus, when the terminal determines that it is walking based on the acceleration information, it tends to assume that the user carrying the terminal may be entering an elevator car. When the first inflection point is present based on the magnetic field strength information, the terminal tends to assume that it has entered the elevator, and the terminal can thus determine that it is in an elevator scene.
[0024] In one possible implementation, the scene feature information also includes acceleration information within a fourth time period; determining that the terminal is in an elevator scene specifically includes: generating an acceleration information curve based on the acceleration information within the fourth time period, detecting that the acceleration information curve includes a specified waveform, and determining that the terminal is in an elevator scene. Thus, when the terminal detects vertical acceleration based on the acceleration information, it tends to assume that the user carrying the terminal is in a moving elevator, and the terminal can thus determine that it is in an elevator scene.
[0025] In one possible implementation, acquiring scene feature information specifically includes: after receiving a door closing notification from the smart lock, the terminal acquires the scene feature information. This way, the terminal begins acquiring scene feature information after the user leaves home, enabling more accurate identification of elevator scenarios and saving power consumption when acquiring scene feature information within the user's home.
[0026] In a second aspect, this application provides a terminal, comprising: one or more processors and one or more memories and a transceiver; the transceiver, the one or more memories being coupled to the one or more processors, the one or more memories being used to store a computer program, and when the one or more processors are executing the computer program, executing the communication method in any of the possible implementations of the first aspect above.
[0027] Thirdly, this application provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the communication method in any of the possible implementations of the first aspect above.
[0028] Fourthly, this application provides a chip system including a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processing circuit. The processing circuit is used to execute the code instructions to perform the communication method in any possible implementation of the first aspect above.
[0029] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the communication method in any of the possible implementations of the first aspect above. Attached Figure Description
[0030] Figure 1 is a schematic diagram of a communication system 10 provided in an embodiment of this application;
[0031] Figure 2 is a schematic diagram of an elevator scenario provided in an embodiment of this application;
[0032] Figure 3 is a schematic diagram of another elevator scenario provided in an embodiment of this application;
[0033] Figure 4 is a schematic diagram of an elevator operation scenario provided in an embodiment of this application;
[0034] Figure 5 is a schematic diagram of a scenario of entering an elevator provided by an embodiment of this application;
[0035] Figure 6 is a schematic flowchart provided in an embodiment of this application;
[0036] Figure 7 is a schematic diagram of a magnetic field strength provided in an embodiment of this application;
[0037] Figure 8 is a schematic diagram of another elevator scenario provided in an embodiment of this application;
[0038] Figure 9 is a flowchart provided in an embodiment of this application;
[0039] Figure 10 is a schematic diagram of signal strength provided in an embodiment of this application;
[0040] Figure 11 is a schematic diagram of an elevator scenario provided in an embodiment of this application;
[0041] Figure 12 is a schematic diagram of a terminal 100 judging an elevator scenario according to an embodiment of this application;
[0042] Figure 13A is a schematic flowchart provided in an embodiment of this application;
[0043] Figure 13B is a waveform diagram provided in an embodiment of this application;
[0044] Figure 14 is a schematic diagram of the hardware structure of a terminal 100 provided in an embodiment of this application;
[0045] Figure 15 is a schematic diagram of the software structure of a terminal 100 provided in an embodiment of this application;
[0046] Figure 16 is a schematic diagram of the hardware structure of a wireless access device 200 provided in an embodiment of this application;
[0047] Figure 17 is a schematic diagram of the structure of a communication device provided in an embodiment of this application;
[0048] Figure 18 is a schematic diagram of another communication device provided in an embodiment of this application. Detailed Implementation
[0049] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0050] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0051] The following describes a communication system 10 provided in an embodiment of this application.
[0052] For example, as shown in FIG1, the communication system 10 may include, but is not limited to, a terminal 100 and a wireless access device 200. The terminal 100 and the wireless access device 200 establish a Wi-Fi connection.
[0053] As shown in Figure 1, terminal 100 connects to wireless access device 200 as a station in a wireless local area network (WLAN). Wireless access device 200 can periodically broadcast beacon frames (e.g., beacon frames), which notify stations in the WLAN to establish communication connections with the wireless access device. When terminal 100 connects to wireless access device 200, it can detect the periodically sent beacon frames to obtain relevant messages from wireless access device 200. Afterward, terminal 100 can establish a Wi-Fi connection with wireless access device 200.
[0054] The terminal 100 can be any electronic device that supports Wi-Fi technology. For example, the terminal 100 can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. The specific type of electronic device is not particularly limited in this application embodiment.
[0055] The wireless access device 200 can be a computer network device that can bridge wired and wireless networks. For example, the hardware structure diagram of the wireless access device 200 can be found in Figure 14.
[0056] In one possible implementation, terminal 100 establishes a Wi-Fi connection with wireless access device 200. Terminal 100 can receive beacon frames sent by a nearby wireless access device (e.g., wireless access device 200). Terminal 100 can disconnect the Wi-Fi connection with wireless access device 200 after a preset timeout period has elapsed since it detected that no beacon frames have been received. Thus, when terminal 100 enters an elevator, the Wi-Fi network typically becomes unavailable, and terminal 100 can disconnect the Wi-Fi connection upon detecting that it is in an elevator environment.
[0057] In some examples, terminal 100 can access other networks, such as cellular networks, when the Wi-Fi connection is disconnected. This reduces the time terminal 100 spends on slow Wi-Fi networks.
[0058] In other examples, terminal 100 can switch to another network after a preset timeout period has elapsed since it detected that no beacon frames have been received. This allows terminal 100 to switch to another network for data services in elevator scenarios without disconnecting the Wi-Fi connection, avoiding the impact of poor Wi-Fi signal on data services and ensuring smooth data service operation. Since terminal 100 does not disconnect the Wi-Fi connection, it may be able to continue using the Wi-Fi network after the user exits the elevator. In subsequent embodiments, when terminal 100 detects that it is in an elevator scenario, it will either disconnect the Wi-Fi network and access another network, or switch to another network for writing.
[0059] For example, as shown in Figure 2, when terminal 100 enters the elevator, the probability of terminal 100 receiving beacon frames decreases due to the obstruction of the elevator door. Terminal 100 can disconnect the Wi-Fi connection in the manner described above and switch to other available networks, reducing the time terminal 100 spends on a laggy Wi-Fi network.
[0060] However, because it takes a relatively long time for terminal 100 to detect Wi-Fi network lag by receiving beacon frames, users usually already notice the prolonged network lag by the time terminal 100 can accurately detect it. Furthermore, since terminal 100 can still receive beacon frames for a period of time after entering the elevator, this further prolongs the time it takes for terminal 100 to detect whether it has entered the elevator, still impacting the user's network service experience.
[0061] In one possible implementation, since wireless signals (or other environmental features) exhibit spatial differences at different locations, the wireless signal features (or other environmental features) at different locations in space can be used as wireless signal fingerprints for that location. For example, wireless signal features may include, but are not limited to, one or more of cellular signal features, Wi-Fi signal features, and location-based services (LBS) features. Terminal 100 can obtain a location fingerprint database, which includes wireless signal fingerprints collected from one or more location points within a preset signal fence. The preset signal fence may include one or more areas centered on the elevator.
[0062] After establishing a Wi-Fi connection with the wireless access device 200, the terminal 100 collects a wireless signal fingerprint. The terminal 100 can use the similarity relationship between the collected wireless signal fingerprint and the wireless signal fingerprints in the location fingerprint database to determine whether the currently collected wireless signal fingerprint belongs to the location fingerprint database. If the terminal 100 determines that the collected wireless signal fingerprint belongs to the location fingerprint database, it can determine that it has entered a preset signal fence. The terminal 100 can then disconnect the Wi-Fi connection and switch to another available network. Thus, when entering a preset signal fence, the terminal 100 can determine that it is in an elevator scenario. The terminal 100 can then disconnect the Wi-Fi connection and access another available network, or it can switch to another network.
[0063] In some examples, a wireless signal fingerprint can include, but is not limited to, one or more of the following: identifiers (IDs) of communication signals such as wireless networks, base stations, Bluetooth, ZigBee, etc.; received signal strength indication (RSSI); communication channels; signal round-trip time or signal delay; information collected by location-related sensors (e.g., geomagnetic sensors); base station information; satellite information; wireless access point (AP) information, etc. For example, the wireless network can be a Wi-Fi network, a 4G network, a 5G network, etc.
[0064] It should be noted that wireless signal fingerprints can be of various types. Any characteristic that differs at different locations can be used as a wireless signal fingerprint. For example, the multipath structure of communication signals at a location, whether a wireless access device or base station (such as a cellular network base station or satellite network base station) can be detected at a location, the received signal strength of the signal from the wireless access device or base station detected at a location, the round-trip time or delay of the signal during communication at a location, etc., can all be used as a wireless signal fingerprint, or they can be combined to form a wireless signal fingerprint.
[0065] For example, as shown in Figure 3, terminal 100 establishes a Wi-Fi connection with wireless access device 200. Terminal 100 can collect a wireless signal fingerprint. This wireless signal fingerprint is obtained from data sent by multiple devices. These multiple devices may include wireless access device 200. These multiple devices may also include, but are not limited to, one or more of satellites 41 and 42, base stations 43 and 44, and wireless access device 45. Based on the acquired wireless signal fingerprint, terminal 100 can determine whether it has entered a preset signal fence, which includes the area where elevator 21 is located. When terminal 100 detects that the similarity between the collected wireless signal fingerprint and the stored wireless signal fingerprint is greater than a preset similarity threshold, it determines that terminal 100 has entered the preset signal fence. If terminal 100 determines that it is in a scenario such as an elevator where Wi-Fi network lag may occur, it can disconnect the Wi-Fi connection and access another network, or switch to another network. In this way, terminal 100 can identify the elevator scene when it is near the elevator. Since the probability of Wi-Fi network lag is high in the elevator scene, terminal 100 switches to other networks to improve the Internet experience.
[0066] However, due to the limited availability of wireless signal fingerprints near some elevators—for example, fewer wireless access devices near elevators or failure of location-based services (LBS) satellite acquisition—the probability of terminal 100 accurately matching the wireless signal fingerprint is very low. Furthermore, using wireless signal fingerprints to match whether terminal 100 is in an elevator scenario is prone to significant errors, such as a deviation of 1 meter or more. This often results in the terminal 100 being mistakenly identified as being in an elevator scenario before even entering it. If the user is merely passing by the elevator, the Wi-Fi connection will be disconnected, forcing the user to switch to a Wi-Fi network. Moreover, when terminal 100 is not in the elevator, the Wi-Fi signal strength is relatively strong, and switching networks should not be performed in this situation.
[0067] In one possible implementation, terminal 100 establishes a Wi-Fi connection with wireless access device 200. Terminal 100 can acquire acceleration information through sensors (e.g., gravity sensors or accelerometers) and detect whether it is in an elevator scenario based on this acceleration information. When terminal 100 determines that its acceleration information meets a preset acceleration change trend, it can then determine that it is in an elevator scenario. At this point, terminal 100 can disconnect the Wi-Fi connection and access or switch to another network. Thus, since the elevator is running, terminal 100 inside the elevator will experience vertical acceleration. By recognizing the elevator scenario as it begins to run and switching networks accordingly, terminal 100 can reduce the probability of network lag and improve the user's internet experience.
[0068] Specifically, after establishing a Wi-Fi connection with the wireless access device 200, terminal 100 can acquire acceleration information at preset intervals. Based on the acquired acceleration information, terminal 100 can determine that it is in an elevator scenario when its acceleration information meets a preset acceleration change trend. For example, terminal 100 can determine that its acceleration information meets a preset acceleration change trend when it determines that the vertical acceleration reaches a preset acceleration threshold. Terminal 100 can determine that it is not in an elevator scenario when it determines that its vertical acceleration change trend does not meet the preset acceleration change trend.
[0069] For example, as shown in Figure 4, when elevator 21 is stationary, it starts to move, generating upward or downward acceleration in the vertical direction. The acceleration of terminal 100 on elevator 21 also changes accordingly. Terminal 100 can determine that it is in an elevator scenario when the change in its vertical acceleration reaches a preset acceleration threshold as detected by a sensor.
[0070] However, when terminal 100 identifies that it is in an elevator scene through the sensor, the elevator is already running, and terminal 100 may have been unable to communicate via Wi-Fi network before the elevator started running.
[0071] In one possible implementation, terminal 100 establishes a Wi-Fi connection with wireless access device 200. Terminal 100 can acquire magnetic field strength information through a magnetic sensor. Terminal 100 can detect whether it is in an elevator scenario based on the magnetic field strength information. When the detected magnetic field strength information meets a preset magnetic field strength change trend, terminal 100 determines that it is in an elevator scenario. Once terminal 100 determines that it is in an elevator scenario, it can disconnect the Wi-Fi connection and access another network, or switch to another network. In this way, since elevators are usually made of metal, the magnetic field strength near terminal 100 will change significantly before and after entering the elevator. Terminal 100 can identify the elevator scenario when entering the elevator and switch to the appropriate network, reducing the probability of network lag and improving the user's internet experience.
[0072] Specifically, after establishing a Wi-Fi connection with the wireless access device 200, terminal 100 can acquire magnetic field strength information at preset intervals. Terminal 100 can determine that it is in an elevator scenario when it detects that the magnetic field strength information meets a preset magnetic field strength change trend. Terminal 100 can determine that it is not in an elevator scenario when it detects that the magnetic field strength information does not meet the preset magnetic field strength change trend.
[0073] For example, as shown in Figure 5, terminal 100 collects magnetic field strength information 1 near the elevator. After entering the elevator car through the elevator door, terminal 100 collects magnetic field strength information 2. The magnetic field strength information collected by terminal 100 during entry into the elevator exhibits a gradually decreasing or increasing trend, and the absolute value of the difference between magnetic field strength information 1 and magnetic field strength information 2 is greater than a preset magnetic field strength threshold. Therefore, when the collected magnetic field strength information gradually decreases or increases, and the absolute value of the difference between two magnetic field strength information is greater than or equal to the preset magnetic field strength threshold, terminal 100 determines that the magnetic field strength information meets the preset magnetic field strength change trend, and terminal 100 is in an elevator scenario. Conversely, when the absolute value of the difference between any two magnetic field strength information during the gradual decrease or increase of the collected magnetic field strength information is less than the preset magnetic field strength threshold, terminal 100 determines that the magnetic field strength information does not meet the preset magnetic field strength change trend, and terminal 100 is not in an elevator scenario.
[0074] In some examples, terminal 100 can determine a preset magnetic field strength threshold based on the varying degrees of influence of different elevators on the magnetic field. Terminal 100 can collect multiple magnetic field strength data points within an elevator scenario. Terminal 100 can use the product of the absolute value of the difference between the maximum and minimum values of these multiple magnetic field strength data points and a preset proportion (e.g., 80%) as the preset magnetic field strength threshold. Terminal 100 can then determine whether it is in an elevator scenario using one or more of the above methods. Optionally, terminal 100 can also determine whether it is in an elevator scenario by considering whether there is Wi-Fi network lag. In this way, terminal 100 can collect magnetic field strength information within a defined elevator scenario, facilitating the determination of a more suitable preset magnetic field strength threshold for determining whether it is in an elevator scenario.
[0075] In this way, terminal 100 can identify the current scene as an elevator scene before the elevator starts moving, for example, when it is at the elevator door, stepping into the elevator, or waiting inside the elevator. Compared with the above methods, it can identify the elevator scene at least 5 seconds in advance, switch networks faster, reduce the probability of data lag on terminal 100, and improve the user's Internet experience.
[0076] In some application scenarios, when terminal 100 is near an elevator, or when passing through a metal door, it may be mistakenly identified as being in an elevator environment. This misidentification of the elevator environment could negatively impact the user's Wi-Fi browsing experience.
[0077] The following is a flowchart provided by an embodiment of this application.
[0078] For example, as shown in Figure 6, the process by which terminal 100 identifies elevator scenarios to avoid data service lag includes the following steps:
[0079] S601. Terminal 100 establishes a Wi-Fi connection with wireless access device 200; Terminal 100 collects magnetic field strength information at preset intervals.
[0080] After the terminal 100 establishes a Wi-Fi connection with the wireless access device 200, the terminal 100 can collect magnetic field strength information at preset intervals. The magnetic field strength information can represent the magnetic field strength near the terminal 100.
[0081] S602. Terminal 100 detects whether the magnetic field strength information meets the preset magnetic field strength change trend.
[0082] Terminal 100 can detect whether multiple recently collected magnetic field strength information values meet a preset magnetic field strength change trend. If terminal 100 detects that the magnetic field strength information is gradually decreasing or increasing, and the absolute value of the difference between two magnetic field strength information values is greater than or equal to a preset magnetic field strength threshold, it determines that the magnetic field strength information meets the preset magnetic field strength change trend. In this case, terminal 100 is in an elevator scenario, and terminal 100 can execute step S603. If, during the process of detecting that the magnetic field strength information is gradually decreasing or increasing, the absolute value of the difference between any two magnetic field strength information values is less than the preset magnetic field strength threshold, it determines that the magnetic field strength information does not meet the preset magnetic field strength change trend. In this case, terminal 100 is not in an elevator scenario, and terminal 100 can continue executing step S601 until terminal 100 disconnects the Wi-Fi connection and accesses another network, or switches to another network.
[0083] For example, Figure 7 shows the magnetic field strength information collected by terminal 100 over a period of time. In Figure 7, the horizontal axis of the coordinate system represents time in seconds, and the vertical axis represents magnetic field strength in microtesla (μT). As shown in Figure 7, the magnetic field strength information collected by terminal 100 at time t11 is m1, and the magnetic field strength information collected by terminal 100 at time t12 is m2. If the preset magnetic field strength threshold set by terminal 100 is 18 μT, since the magnetic field strength information collected by terminal 100 between time t11 and time t12 shows a gradually decreasing trend, and the difference between magnetic field strength information m1 and magnetic field strength information m2 is greater than the preset magnetic field strength threshold, terminal 100 can determine that it is in an elevator scenario after time t12. It should be noted that the magnetic field strength information shown in Figure 7 is only an example and should not constitute a specific limitation on the magnetic field strength information collected by terminal 100 in actual application scenarios.
[0084] S603. Terminal 100 disconnects the Wi-Fi connection or switches to another network.
[0085] Terminal 100 identifies that it is in an elevator scene by using magnetic field strength information, disconnects the Wi-Fi connection with wireless access device 200 and accesses other networks, or switches to other networks.
[0086] In one possible implementation, terminal 100 establishes a Wi-Fi connection with wireless access device 200. Terminal 100 can obtain Wi-Fi signal strength information. Terminal 100 can detect whether it is in an elevator scenario based on the Wi-Fi signal strength information. Terminal 100 can determine that it is in an elevator scenario when it detects that the Wi-Fi signal strength information meets a preset signal strength change trend. Once terminal 100 determines that it is in an elevator scenario, it can disconnect the Wi-Fi connection and access another network, or switch to another network. In this way, since elevators are usually made of metal, they will block Wi-Fi signals. Before and after the elevator doors close, the Wi-Fi signal strength of terminal 100 will weaken. Terminal 100 can identify the elevator scenario when the elevator doors close, switch the network it uses, reduce the probability of network lag, and improve the user's internet experience.
[0087] For example, as shown in Figure 8, when terminal 100 establishes a Wi-Fi connection with wireless access device 200, if it moves from the Wi-Fi coverage area into an elevator and the elevator door closes, the Wi-Fi signal received by terminal 100 may weaken, or terminal 100 may be unable to receive the Wi-Fi signal from wireless access device 200. Recognizing that it is in an elevator scenario, terminal 100 can switch its Wi-Fi network to another network. Here, if the Wi-Fi and cellular network signals are strong outside the elevator, but the Wi-Fi signal is weak inside the elevator while the cellular network signal remains strong, terminal 100 can switch to the cellular network to maintain its current network connectivity.
[0088] Specifically, after establishing a Wi-Fi connection with the wireless access device 200, terminal 100 can acquire Wi-Fi signal strength information at preset intervals. Based on the acquired Wi-Fi signal strength information, terminal 100 can determine that it is in an elevator scenario when the Wi-Fi signal strength information meets a preset signal strength change trend. Conversely, based on the acquired Wi-Fi signal strength information, terminal 100 can determine that it is not in an elevator scenario when the Wi-Fi signal strength information does not meet the preset signal strength change trend.
[0089] The following is a flowchart provided by an embodiment of this application.
[0090] For example, as shown in Figure 9, the process by which terminal 100 identifies elevator scenarios to ensure smooth data services includes the following steps:
[0091] S901. Terminal 100 establishes a Wi-Fi connection with the wireless access device; Terminal 100 collects Wi-Fi signal strength information at preset intervals.
[0092] After the terminal 100 establishes a Wi-Fi connection with the wireless access device 200, the terminal 100 can collect Wi-Fi signal strength information at preset intervals. The Wi-Fi signal strength information can represent the Wi-Fi signal strength near the terminal 100.
[0093] In some examples, terminal 100 can perform preprocessing operations on the acquired Wi-Fi signal strength information. These preprocessing operations may include, but are not limited to, removing invalid values from the Wi-Fi signal strength information. In this way, terminal 100 can remove erroneous signal strength information and retain correct signal strength information, enabling terminal 100 to more accurately identify elevator scenarios.
[0094] Optionally, preprocessing operations may also include averaging the Wi-Fi signal strength information. This makes the Wi-Fi signal strength information acquired by terminal 100 smoother, facilitating terminal 100's detection of Wi-Fi signal strength change trends. In some application scenarios, averaging the signal strength may reduce the value of Wi-Fi signal strength changes, making it difficult to identify elevator scenarios.
[0095] Optionally, terminal 100 can also calculate the signal strength change rate based on Wi-Fi signal strength information. The signal strength change rate can represent the change in Wi-Fi signal strength information per unit time. Terminal 100 can determine that it is in an elevator scenario when the signal strength change rate is greater than or equal to a preset change rate threshold. Terminal 100 can determine that it is not in an elevator scenario when the signal strength change rate is less than the preset change rate threshold. For example, if the Wi-Fi signal strength information changes from -60 dBm to -70 dBm within a unit time, the signal strength change rate is 10 dBm. If the preset change rate threshold is 8 dBm, it indicates that terminal 100 is in an elevator scenario. Thus, terminal 100 can determine whether it is in an elevator scenario by the speed of signal strength change. Typically, when terminal 100 is in an elevator scenario, the signal strength changes rapidly.
[0096] S902. Terminal 100 detects whether the Wi-Fi signal strength information meets the preset signal strength change trend.
[0097] Terminal 100 can detect whether changes in Wi-Fi signal strength meet a preset Wi-Fi signal strength change trend based on multiple recently collected Wi-Fi signal strength information. For example, if terminal 100 detects that the Wi-Fi signal strength information indicated by the Wi-Fi signal strength information is gradually decreasing, and the absolute value of the difference between two Wi-Fi signal strength information is greater than or equal to a preset Wi-Fi signal strength threshold, it determines that the Wi-Fi signal strength information meets the preset Wi-Fi signal strength change trend, and determines that terminal 100 is in an elevator scenario. Terminal 100 can then execute step S903. Alternatively, if, during the process of detecting a gradual decrease in Wi-Fi signal strength information, the absolute value of the difference between any two Wi-Fi signal strength information is less than the preset Wi-Fi signal strength threshold, it determines that the Wi-Fi signal strength information does not meet the preset Wi-Fi signal strength change trend, and determines that terminal 100 is not in an elevator scenario. Terminal 100 can then continue executing step S901 until terminal 100 disconnects the Wi-Fi connection and accesses another network, or switches to another network.
[0098] For example, Figure 10 shows the Wi-Fi signal strength information collected by terminal 100 over a period of time. In Figure 10, the horizontal axis of the coordinate system represents time in seconds, and the vertical axis represents the Wi-Fi signal strength information in decibels (dBm). As shown in Figure 10, terminal 100 collects Wi-Fi signal strength information d1 at time t21 and Wi-Fi signal strength information d2 at time t22. If the preset Wi-Fi signal strength threshold set by terminal 100 is 25dBm, since the Wi-Fi signal strength information collected by terminal 100 between time t21 and time t22 shows a gradually decreasing trend, and the difference between Wi-Fi signal strength information d1 and Wi-Fi signal strength information d2 is equal to the preset Wi-Fi signal strength threshold, terminal 100 can determine that it is in an elevator scenario after time t22. It should be noted that the Wi-Fi signal strength information shown in Figure 10 is only an example and should not constitute a specific limitation on the Wi-Fi signal strength information collected by the terminal 100 in actual application scenarios.
[0099] It should be noted that when updating Wi-Fi signal strength information, terminal 100 typically decreases the Wi-Fi signal strength value gradually, and after the Wi-Fi signal strength reaches its minimum value, it waits for a period of time before switching to the network, resulting in prolonged network service lag. Therefore, through the embodiment shown in Figure 9, terminal 100 can more quickly identify changes in Wi-Fi signal strength and immediately switch to the network when it determines that the Wi-Fi signal strength meets a preset signal strength change trend, reducing the probability of service lag and, even if lag does occur, minimizing the duration of the lag.
[0100] S903. Terminal 100 disconnects the Wi-Fi connection or switches to another network.
[0101] Terminal 100 identifies that it is in an elevator scene by using Wi-Fi signal strength information, disconnects the Wi-Fi connection with wireless access device 200 and accesses other networks, or switches to other networks.
[0102] This application provides a communication method. Terminal 100 establishes a Wi-Fi connection with wireless access device 200. Terminal 100 can acquire scene feature information. This scene feature information may include, but is not limited to, one or more of acceleration information, magnetic field strength information, and Wi-Fi signal strength information. Terminal 100 can detect whether it is in an elevator scene based on the scene feature information. When it is detected that it is in an elevator scene based on the scene feature information, terminal 100 can disconnect the Wi-Fi connection and access another network, or switch to another network. When it is detected that it is not in an elevator scene based on the scene feature information, terminal 100 can continue to acquire scene feature information until it disconnects the Wi-Fi connection. Thus, as shown in Figure 11(A), terminal 100 can acquire changes in magnetic field strength using a magnetic sensor before and after entering the elevator. As shown in Figure 11(B), it can acquire changes in Wi-Fi signal strength using a Wi-Fi chip before and after the elevator doors close. As shown in Figure 11(C), it can acquire changes in elevator startup using an acceleration sensor. Terminal 100 can combine any one or more of the above changes to determine whether terminal 100 is currently in an elevator scenario, so that terminal 100 can disconnect the Wi-Fi network or switch to another network when it is determined to be in an elevator scenario.
[0103] In one possible implementation, the scene feature information acquired by terminal 100 includes one of acceleration information, magnetic field strength information, and Wi-Fi signal strength information. Terminal 100 can determine that it is in an elevator scene when the acquired scene feature information meets a corresponding preset change trend. Terminal 100 can determine that it is not in an elevator scene when the acquired scene feature information does not meet a corresponding preset change trend. The preset change trend corresponding to the acceleration information is the aforementioned preset acceleration change trend, the preset change trend corresponding to the magnetic field strength information is the aforementioned preset magnetic field strength change trend, and the preset change trend of the Wi-Fi signal strength is the aforementioned preset signal strength change trend. Specifically, the steps performed by terminal 100 in detecting whether it is currently in an elevator scene under different scenarios can be found in the above embodiments and will not be repeated here.
[0104] In one possible implementation, the scene feature information acquired by terminal 100 includes two of the following: acceleration information, magnetic field strength information, and Wi-Fi signal strength information. Terminal 100 can determine that it is in an elevator scene when one of the acquired scene feature information satisfies a corresponding preset change trend. Terminal 100 can determine that it is not in an elevator scene when neither of the acquired scene feature information satisfies the corresponding preset change trend. Thus, when terminal 100 acquires multiple scene feature information, it can determine that it is in an elevator scene when any scene feature information indicates that the scene feature satisfies the preset change trend corresponding to that scene feature. This allows terminal 100 to determine whether it is in an elevator scene more quickly, and to switch networks more quickly when an elevator scene is identified, reducing network lag time. Furthermore, the time spent by terminal 100 in collecting and processing different scene feature information may vary, and the order in which terminal 100 determines whether two scene feature information satisfy the preset change trend may also differ, allowing terminal 100 to identify elevator scenes more quickly.
[0105] For example, if the scene feature information includes magnetic field strength information and Wi-Fi signal strength information, the preset change trend corresponding to the magnetic field strength information is the aforementioned preset magnetic field strength change trend. The Wi-Fi signal strength change trend is the aforementioned preset signal strength change trend. Terminal 100 can determine that it is in an elevator scene when it detects that the magnetic field strength information in the scene feature information meets the preset magnetic field strength change trend, or when it detects that the Wi-Fi signal strength information in the scene feature information meets the preset signal strength change trend. Terminal 100 can also determine that it is not in an elevator scene when, based on the scene feature information, it detects that the magnetic field strength information does not meet the preset magnetic field strength change trend, and detects that the Wi-Fi signal strength information meets the preset signal strength change trend.
[0106] Similarly, if the scene feature information includes Wi-Fi signal strength information and acceleration information, terminal 100 can determine that it is in an elevator scene when it detects that the acceleration information meets a preset acceleration change trend, or when it detects that the Wi-Fi signal strength information meets a preset signal strength change trend. Terminal 100 can determine that it is not in an elevator scene when it detects that both the acceleration information and the Wi-Fi signal strength information do not meet a preset signal strength change trend.
[0107] Similarly, if the scene feature information includes magnetic field strength information and acceleration information, terminal 100 can determine that it is in an elevator scene when it detects that the acceleration information meets a preset acceleration change trend, or when it detects that the magnetic field strength information meets a preset magnetic field strength change trend. Terminal 100 can also determine that it is not in an elevator scene if, based on the scene feature information, it detects that both the acceleration information and the magnetic field strength information do not meet a preset magnetic field strength change trend.
[0108] In some examples, terminal 100 can determine that it is in an elevator scene when both of the acquired scene feature information meet the corresponding preset conditions. Terminal 100 can also determine that it is not in an elevator scene when at least one of the acquired scene feature information does not meet the corresponding preset condition. In this way, when terminal 100 detects that all scene feature information meets the corresponding preset change trend, it can more accurately determine whether it is in an elevator scene, reducing the probability of incorrectly identifying some scenes as elevator scenes.
[0109] For example, if the scene feature information includes magnetic field strength information and Wi-Fi signal strength information, terminal 100 can determine that it is in an elevator scene when it detects that both the magnetic field strength information and the Wi-Fi signal strength information meet a preset trend of change. Terminal 100 can determine that it is not in an elevator scene when it detects that either the magnetic field strength information does not meet the preset trend of change, or the Wi-Fi signal strength information does not meet the preset trend of change.
[0110] Similarly, if the scene feature information includes Wi-Fi signal strength information and acceleration information, terminal 100 can determine that it is in an elevator scene when it detects that the acceleration information meets a preset acceleration change trend and the Wi-Fi signal strength information meets a preset signal strength change trend. Terminal 100 can determine that it is not in an elevator scene when it detects that the acceleration information does not meet the preset acceleration change trend, or when it detects that the Wi-Fi signal strength information does not meet the preset signal strength change trend.
[0111] Similarly, if the scene feature information includes magnetic field strength information and acceleration information, terminal 100 can determine that it is in an elevator scene when it detects that the acceleration information meets a preset acceleration change trend and the magnetic field strength information meets a preset magnetic field strength change trend. Terminal 100 can also determine that it is not in an elevator scene if, based on the scene feature information, it detects that the acceleration information does not meet a preset acceleration change trend, or that the magnetic field strength information does not meet a preset magnetic field strength change trend.
[0112] In other examples, the scene feature information acquired by terminal 100 includes first scene feature information and second scene feature information. Terminal 100 can detect whether the first scene feature information meets the corresponding preset change trend. When terminal 100 determines that the first scene feature information does not meet the corresponding preset change trend, it determines that terminal 100 is not in an elevator scene. When terminal 100 determines that the first scene feature information meets the corresponding preset change trend, it detects whether the second scene information meets the corresponding preset change trend. Terminal 100 can determine that terminal 100 is in an elevator scene when it detects that the second scene information meets the corresponding preset change trend. When terminal 100 determines that the second scene feature information does not meet the corresponding preset change trend, it determines that terminal 100 is not in an elevator scene. In this way, terminal 100 can more accurately identify elevator scenes according to the order in which the preset change trends corresponding to various scene feature information appear.
[0113] For example, the first scene feature information is magnetic field strength information, and the second scene feature information is Wi-Fi signal strength information. After establishing a communication connection with the wireless access device 200, the terminal 100 can first obtain the magnetic field strength information. When the terminal 100 determines that the magnetic field strength information meets a preset magnetic field strength change trend, it obtains the Wi-Fi signal strength information. When the terminal 100 determines that the Wi-Fi signal strength information meets a preset signal strength change trend, it determines that the terminal 100 is in an elevator scene. In this way, after determining that the elevator door has closed, the terminal 100 determines that it is inside the elevator car, which can more accurately detect that the terminal 100 is in an elevator scene.
[0114] Similarly, the first scene feature information is Wi-Fi signal strength information, and the second scene feature information is acceleration information. After establishing a communication connection with the wireless access device 200, terminal 100 can first obtain Wi-Fi signal strength information. When terminal 100 determines that the Wi-Fi signal strength information meets a preset signal strength change trend, it obtains acceleration information. When terminal 100 determines that the acceleration information meets a preset acceleration change trend, it determines that terminal 100 is in an elevator scene. In this way, after determining that the elevator is running, terminal 100 can more accurately detect that it is in an elevator scene by determining that it is inside the elevator car.
[0115] Similarly, the first scene feature information is magnetic field strength information, and the second scene feature information is acceleration information. After establishing a communication connection with the wireless access device 200, terminal 100 can first obtain the magnetic field strength information. When terminal 100 determines that the magnetic field strength information meets a preset magnetic field strength change trend, it obtains the acceleration information. When terminal 100 determines that the acceleration information meets a preset acceleration change trend, it determines that the scene feature information meets a preset scene feature change trend, and terminal 100 is in an elevator scene. In this way, after determining that the elevator is running, terminal 100 can determine that it is inside the elevator car, and can more accurately detect that terminal 100 is in an elevator scene.
[0116] In one possible implementation, the scene feature information acquired by terminal 100 includes three of the following: acceleration information, magnetic field strength information, and Wi-Fi signal strength information. Terminal 100 can determine that it is in an elevator scene when it finds that one of the acquired scene feature information satisfies a corresponding preset change trend (e.g., the magnetic field strength information satisfies a preset magnetic field strength change trend, the acceleration information satisfies a preset acceleration change trend, and the Wi-Fi signal strength information satisfies a preset signal strength change trend). Terminal 100 can also determine that it is not in an elevator scene when it finds that none of the three acquired scene feature information satisfies the corresponding preset change trend. Thus, when terminal 100 acquires multiple scene feature information, it can more quickly determine that it is in an elevator scene when it determines that the scene feature indicated by any one of the scene feature information satisfies the preset change trend corresponding to that scene feature.
[0117] In some examples, scene feature information includes three of the following: magnetic field strength information, Wi-Fi signal strength information, and acceleration information. Terminal 100 can determine that it is in an elevator scene when it detects that any two of the scene feature information meet the corresponding preset change trend. Terminal 100 can determine that it is not in an elevator scene when it detects that two or more of the scene feature information do not meet the corresponding preset change trend. Thus, when terminal 100 acquires multiple scene feature information, it can more quickly determine that it is in an elevator scene when it determines that any two scene feature information indicates a scene feature that meets the preset change trend corresponding to that scene feature. Terminal 100 can also more accurately identify elevator scenes based on multiple scene feature information.
[0118] For example, as shown in Figure 12, terminal 100 establishes a Wi-Fi connection with wireless access device 200. Terminal 100 can acquire scene feature information at preset intervals, including magnetic field strength information, Wi-Fi signal strength information, and acceleration information. Terminal 100 can determine that it is in an elevator scene when it detects the following three conditions.
[0119] Case 1: Terminal 100 detects that the acceleration information meets the preset acceleration change trend, and the magnetic field strength information meets the preset magnetic field strength change trend.
[0120] Scenario 2: Terminal 100 detects that the acceleration information meets the preset acceleration change trend, and the Wi-Fi signal strength information meets the preset signal strength change trend.
[0121] Scenario 3: Terminal 100 detects that the magnetic field strength information meets the preset magnetic field strength change trend, and the Wi-Fi signal strength information meets the preset signal strength change trend.
[0122] In other examples, the scene feature information includes three of the following: magnetic field strength information, Wi-Fi signal strength information, and acceleration information. Terminal 100 can determine that it is in an elevator scene when it detects that any three scene feature information meets the corresponding preset change trend. Terminal 100 can determine that it is not in an elevator scene when it detects that none of the scene feature information meets the corresponding preset change trend. In this way, terminal 100 can more accurately identify elevator scenes based on multiple scene feature information. It is understandable that the time spent by terminal 100 in collecting and processing different scene feature information may vary, and the order in which terminal 100 determines whether two scene feature information meets the preset change trend may also differ.
[0123] In other examples, the scene feature information includes first scene feature information, second scene feature information, and third scene feature information. Terminal 100 can detect whether the first scene feature information meets a corresponding preset change trend. When terminal 100 determines that the first scene feature information does not meet the corresponding preset change trend, it determines that terminal 100 is not in an elevator scene. When terminal 100 determines that the first scene feature information meets the corresponding preset change trend, it detects whether the second scene information meets the corresponding preset change trend. When terminal 100 detects that the second scene information meets the corresponding preset change trend, it detects whether the third scene information meets the corresponding preset change trend. When terminal 100 determines that the second scene feature information does not meet the corresponding preset change trend, it determines that terminal 100 is not in an elevator scene. When terminal 100 detects that the third scene feature information meets the corresponding preset change trend, it determines that terminal 100 is in an elevator scene. When terminal 100 determines that the third scene feature information does not meet the corresponding preset change trend, it determines that terminal 100 is not in an elevator scene. In this way, the terminal 100 can more accurately identify elevator scenarios by following the order of appearance of preset change trends corresponding to various scenario feature information.
[0124] For example, the first scene feature information can be magnetic field strength information, the second scene feature information can be Wi-Fi signal strength information, and the third scene feature information can be acceleration information.
[0125] It should be noted that the collection of scene feature information is not limited to every preset interval. When the terminal 100 obtains multiple scene feature information, the terminal 100 can collect the multiple scene feature information independently. The interval between the collection of each scene feature information by the terminal 100 can be the same or different. This application embodiment does not limit this.
[0126] In some examples, terminal 100 can perform preprocessing operations on the collected scene feature information, such as removing invalid values. For details, please refer to the embodiments described above. This allows terminal 100 to obtain more accurate scene feature information, increasing the accuracy of elevator scene recognition.
[0127] It should also be noted that, in addition to acceleration information, magnetic field strength information and WiFi signal strength information, scene feature information may also include, but is not limited to, the aforementioned wireless signal fingerprints, etc., and this application embodiment does not limit this.
[0128] In some examples, terminal 100 establishes a Wi-Fi connection with wireless access device 200. Terminal 100 can acquire scene feature information after detecting that a user has left home. For example, terminal 100 can determine that a user has left home when it detects that the user has stepped out of the house. For example, terminal 100 can determine that a user has left home when it receives a door closing notification sent by a smart door lock. In this way, since users often take the elevator after leaving home, causing Wi-Fi network lag, collecting scene feature information after detecting that the user has left home can save the power consumption of terminal 100 in collecting information and can more accurately identify elevator scenes.
[0129] In some examples, the scene feature information acquired by terminal 100 includes acceleration information and magnetic field strength information. Terminal 100 can determine that it is in an elevator scene when it determines that the acceleration information meets a preset acceleration change trend and the magnetic field strength information meets a preset magnetic field strength change trend. For example, the preset acceleration change trend could be that the acceleration information collected within duration 1 indicates that the user carrying terminal 100 is walking and / or the acceleration information collected within duration 2 indicates that the elevator has started running, with duration 2 following duration 1. The preset magnetic field strength change trend could be that the magnetic field strength information collected within duration 3 indicates that terminal 100 has entered the elevator, with duration 1 including part or all of duration 3.
[0130] Optionally, the preset acceleration change trend can also include acceleration information collected within duration 4 indicating that the user carrying terminal 100 is not riding a vehicle or bicycle (i.e., terminal 100 is neither riding nor riding a vehicle), duration 4 is before duration 1, or duration 4 is within duration 1. In this way, terminal 100 can detect first when the user is not riding a vehicle or bicycle and tend to assume that the user cannot take the elevator, thus more accurately identifying elevator scenarios.
[0131] For example, as shown in Figure 13A, the scene feature information includes acceleration information and magnetic field strength information. The process by which terminal 100 detects whether it is in an elevator scene may include the following steps:
[0132] S1301. Terminal 100 establishes a Wi-Fi connection with wireless access device 200; Terminal 100 acquires scene feature information, including acceleration information and magnetic field strength information.
[0133] The terminal 100 can acquire acceleration information through sensors such as an accelerometer at preset acquisition intervals A. The terminal 100 can acquire magnetic field strength information through a magnetic sensor at preset acquisition intervals B. The preset acquisition intervals A and B can be the same or different.
[0134] S1302. Terminal 100 determines whether the user is riding a bicycle or taking a vehicle based on acceleration information.
[0135] Terminal 100 can detect whether the user carrying terminal 100 is cycling or riding a vehicle based on acceleration information (also known as detecting whether terminal 100 is in a cycling or riding state). For example, terminal 100 can determine whether the user is cycling or riding a vehicle when the acceleration indicated by the acceleration information exceeds a preset walking threshold. If terminal 100 determines that the user has not entered the elevator, terminal 100 can continue to execute step S1301 until terminal 100 disconnects the Wi-Fi connection and connects to another network, or switches to another network.
[0136] Specifically, if the acceleration indicated by the acceleration information does not exceed a preset walking threshold, the terminal 100 can determine that the user is neither cycling nor taking a vehicle, and the terminal 100 can execute step S1303. In this way, users usually cannot take the elevator while cycling or taking a vehicle. Therefore, by using the user's current acceleration, it is possible to determine whether the user is cycling or taking a vehicle, and to more quickly determine whether the user is likely to take the elevator.
[0137] In some examples, terminal 100 can detect whether a user is riding a bicycle or a vehicle using activity recognition (AR) technology based on acceleration information.
[0138] In other examples, terminal 100 can determine whether the user carrying terminal 100 is walking based on acceleration information. Terminal 100 can execute step S1303 or step S1304 when it determines that the user is walking. If terminal 100 determines that the user is not walking based on acceleration information, it can execute step S1301. Thus, since users typically walk into elevators, their acceleration can be used to determine whether they are walking. After determining that the user is walking, terminal 100 can determine whether the user is taking the elevator more quickly through the following steps.
[0139] In other examples, terminal 100 can acquire speed information. Based on this speed information, terminal 100 can detect whether it is in a cycling or riding state. Specifically, if the acquired speed information indicates that the horizontal speed of terminal 100 is greater than or equal to a preset speed threshold, terminal 100 determines that it is in a cycling or riding state. If the acquired speed information indicates that the horizontal speed of terminal 100 is less than the preset speed threshold, terminal 100 determines that it is neither in a cycling nor riding state. In this way, by acquiring the horizontal speed information, terminal 100 can more accurately identify whether the user is cycling or riding.
[0140] Optionally, the terminal 100 can detect whether it is in a cycling or riding state based on both acceleration and speed information. For example, the terminal 100 can determine whether the user is cycling or riding a vehicle when the acceleration indicated by the acceleration information exceeds a preset walking threshold and the acquired speed information indicates that the horizontal speed of the terminal 100 is greater than or equal to a preset speed threshold.
[0141] Understandably, terminal 100 can also detect whether it is in a walking state based on speed information. For example, terminal 100 can determine that it is in a walking state when it determines that the speed information is within a preset walking speed range.
[0142] S1303. Terminal 100 determines whether the user has been walking in the last n seconds based on acceleration information.
[0143] When terminal 100 determines that the user has neither taken a vehicle nor ridden a bicycle, it can determine whether the user has walked within the last n seconds based on acceleration information, where n is a positive integer, for example, n can be 7. When terminal 100 determines that the user has been walking within the last n seconds based on acceleration information, it can execute step S1304. When terminal 100 determines that the user has not walked within the last n seconds based on acceleration information, it can execute step S1301. Thus, since the user needs to walk continuously into the elevator car before taking the elevator, terminal 100 can detect whether the user is walking continuously based on acceleration information to determine whether the user may be entering the elevator car. For example, terminal 100 can determine that the user is walking if it determines that there is acceleration information within a preset walking range in the acceleration information acquired within the last n seconds. Terminal 100 can determine that the user is not walking if it determines that there is no acceleration information within a preset walking range in the acceleration information acquired within the last n seconds.
[0144] It should be noted that the determination of whether a user is riding a bicycle or a vehicle is not limited to the acceleration information obtained by the accelerometer sensor. The terminal 100 can also determine whether a user is riding a bicycle or a vehicle by using data collected by sensors such as an inertial measurement unit. This application embodiment does not limit this method.
[0145] S1304. Terminal 100 detects whether the magnetic field strength exceeds the preset maximum strength threshold based on the magnetic field strength information.
[0146] Terminal 100, after determining that the user has been walking for the last n seconds, can detect whether the magnetic field strength exceeds a preset maximum strength threshold (e.g., 65 microtesla (µT)) based on the acquired magnetic field strength information. The preset maximum strength threshold (also called the preset maximum threshold) can be a pre-set minimum magnetic field strength that may be collected when entering an elevator. Terminal 100 can execute step S1306 if it detects that the acquired magnetic field strength exceeds the preset maximum strength threshold. Terminal 100 can execute step S1305 if it detects that the acquired magnetic field strength does not exceed the preset maximum strength threshold. Thus, when the magnetic field strength acquired by terminal 100 exceeds the preset maximum strength threshold, it indicates that the currently acquired magnetic field strength information may be inaccurate, and terminal 100 does not use the magnetic field strength information, directly determining whether the user is in an elevator scenario based on acceleration information. When the magnetic field strength acquired by terminal 100 does not exceed the preset maximum strength threshold, it indicates that the currently acquired magnetic field strength information is highly accurate, and terminal 100 can use the magnetic field strength information to more accurately determine whether the user is in an elevator scenario.
[0147] S1305. Terminal 100 detects whether a specified inflection point exists in the magnetic field strength variance curve based on magnetic field strength information.
[0148] Terminal 100 can generate a magnetic field strength variance curve based on the collected magnetic field strength information. The horizontal axis of the magnetic field strength variance curve is time, and the vertical axis is the variance of the magnetic field strength.
[0149] For example, terminal 100 can collect 100 magnetic field strength data points per second using a magnetometer. Terminal 100 can generate the variance of the first magnetic field strength based on the first to the 100th magnetic field strength data points. Terminal 100 can generate the variance of the second magnetic field strength based on the second to the 101st magnetic field strength data points. Terminal 100 can generate the variance of the third magnetic field strength based on the third to the 102nd magnetic field strength data points, and so on. Terminal 100 can fit the variances of multiple magnetic field strengths in chronological order to obtain a magnetic field strength variance curve.
[0150] Terminal 100 can detect whether the variance is greater than a preset variance during the process of generating the variance of the magnetic field strength. When terminal 100 determines that the variance of the i-th magnetic field strength is greater than the preset variance, it uses the variance of the i-th magnetic field strength as a preliminary inflection point. When terminal 100 determines that the variance of the i-th magnetic field strength is the largest among the variances of the i-th to (i+500)-th magnetic field strengths, it can use the variance of the i-th magnetic field strength as a specified inflection point.
[0151] When terminal 100 determines, during the process of generating the variances of the (i+1)th to (i+500)th magnetic field strengths, that the value of the variance of the i-th magnetic field strength is less than the value of the variance of the (i+y)th magnetic field strength, it can use the variance of the (i+y)th magnetic field strength as a preliminary inflection point. When terminal 100 determines that, among the variances of the (i+y)th to (i+y+500)th magnetic field strengths, the variance of the (i+y)th magnetic field strength is the largest, it can use the variance of the (i+y)th magnetic field strength as a specified inflection point.
[0152] When terminal 100 determines that the variance of the i-th magnetic field strength is less than the variance of the (i+y+z)-th magnetic field strength during the process of generating the variance of the (i+y+500)-th magnetic field strength, the variance of the (i+y+z)-th magnetic field strength can be used as a preliminary inflection point. This process continues until terminal 100 determines the specified inflection point, where i, y, and z are positive integers.
[0153] It should be noted that the above description of generating the magnetic field strength variance curve is only an example. For example, the terminal 100 can generate a magnetic field strength variance based on more or less magnetic field strength information, etc. This application embodiment does not limit this.
[0154] Terminal 100 may execute step S1306 if a specified inflection point is detected in the magnetic field strength variance curve. Terminal 100 may determine that it is not in an elevator scenario if a specified inflection point is not detected in the magnetic field strength variance curve, and then execute step S1301. Furthermore, terminal 100 may determine that a specified inflection point is not detected in the magnetic field strength variance curve if the execution time of step S1305 reaches m seconds without detecting the specified inflection point.
[0155] It is understood that, not limited to determining that terminal 100 has entered the elevator when a specified inflection point is detected in the magnetic field strength variance curve, terminal 100 may also determine that terminal 100 has entered the elevator when the magnetic field strength curve gradually increases or decreases and the change value of the magnetic field strength is greater than a preset magnetic field strength threshold, etc. The embodiments of this application do not limit this.
[0156] In this way, the terminal 100 can determine whether the magnetic field strength has changed significantly based on whether a specified inflection point occurs, and thus determine whether the user may enter the elevator.
[0157] S1306. Terminal 100 detects whether a specified waveform exists in the acceleration curve based on acceleration information.
[0158] Terminal 100 can generate an acceleration curve based on acceleration information collected after the specified inflection point appears, after detecting a specified inflection point in the magnetic field strength variance curve. For example, terminal 100 can generate an acceleration curve based on acceleration information collected within t seconds (e.g., 2 seconds) after the specified inflection point appears. The horizontal axis of the acceleration curve represents time, and the vertical axis represents the acceleration value. It detects whether a specified waveform appears in the acceleration information; the specified waveform can be a waveform indicating an increase in acceleration value. Terminal 100 can execute step S1307 if it detects the presence of the specified waveform in the acceleration curve. If it detects the absence of the specified waveform in the acceleration curve, terminal 100 determines that it is not in an elevator scenario and can execute step S1301.
[0159] Alternatively, after detecting that the magnetic field strength is greater than a preset maximum strength threshold, the terminal 100 can generate an acceleration curve based on the collected acceleration information. For example, the terminal 100 can generate an acceleration curve based on the acceleration information collected within t seconds (e.g., 2 seconds) after detecting that the magnetic field strength is greater than the preset maximum strength threshold.
[0160] It should be noted that, not limited to detecting the presence of a specified waveform, terminal 100 can also determine whether a user is riding an elevator when it detects an increase in acceleration relative to gravity in the vertical direction within t seconds. It should also be noted that, not limited to an accelerometer, terminal 100 can also detect the presence of acceleration perpendicular to the ground plane using a gravity sensor or similar device to determine whether a user is riding an elevator.
[0161] For example, as a user enters an elevator while holding terminal 100, scene feature information is collected through an accelerometer and a magnetic sensor. Terminal 100 acquires acceleration information through the accelerometer and generates an acceleration curve as shown in Figure 13B. Terminal 100 acquires magnetic field strength information through the magnetic sensor and generates a magnetic field strength (magnetic, magn) curve as shown in Figure 13B. Terminal 100 can also generate a magnetic field strength variance (magneS2) curve as shown in Figure 13B. When terminal 100 detects a user walking, it determines that the user may be entering the elevator. The acceleration curve generated by terminal 100 during the user's walking can be seen in the 0s-10s acceleration curve in Figure 13B. The magnetic field strength curve in Figure 13B shows that the elevator doors close within 0s-10s, and the magnetic field strength changes significantly during the user's entry into the elevator. Terminal 100 can divide the magnetic field strength variance curve into five segments. Terminal 100 can determine a specified inflection point as inflection point 1 based on the magnetic field strength variance curve shown in Figure 13B. After determining inflection point 1, terminal 100 can delay for 1 second and check whether a specified waveform appears in the acceleration curve. The specified waveform indicates that terminal 100 detects a gradually increasing acceleration in the vertical direction, where the acceleration direction is the same as the velocity direction. After detecting the specified waveform, terminal 100 can record the starting point t1 of the specified waveform in the acceleration curve. After determining the starting point t1, terminal 100 can determine that the elevator has started running. Terminal 100 can use the time corresponding to inflection point 1 as the time when terminal 100 enters the elevator. The time when terminal 100 detects that terminal 100 is in the elevator scene can be t2. The waveform between t1 and t2 can be called the specified waveform.
[0162] In some examples, when terminal 100 detects the existence of inflection point 1, it can determine that terminal 100 is in an elevator scenario.
[0163] S1307. Terminal 100 determines that it is in an elevator scene.
[0164] After determining that the acceleration curve has a specified waveform, terminal 100 can determine that terminal 100 is in an elevator scenario.
[0165] In other examples, terminal 100 can determine that it is in an elevator scene after determining that the magnetic field strength exceeds a preset maximum strength threshold. Terminal 100 can also determine that it is in an elevator scene when it detects a specified inflection point in the magnetic field strength variance curve. Thus, terminal 100 can directly determine that it is in an elevator scene when it detects that it has entered an elevator based on magnetic field strength information. Terminal 100 no longer determines whether the elevator is running based on acceleration information, i.e., it does not execute step S1306, and can determine that it is in an elevator scene more quickly in most elevator scenarios, saving time in identifying whether it is in an elevator scene.
[0166] It should be noted that, not limited to the execution order of each step shown in Figure 13A, the terminal 100 can simultaneously collect acceleration information and magnetic field strength information. After detecting that the acceleration information indicates that the user is walking, and the magnetic field strength variance curve shows a specified inflection point and the acceleration curve has a specified waveform, it can be determined that the terminal 100 has entered the elevator. This application embodiment does not limit this.
[0167] In this way, the terminal 100 can detect whether the user has entered the elevator based on the order of their actions during the process of entering the elevator, so as to determine whether the terminal 100 is in an elevator scene, making elevator scene recognition more accurate.
[0168] In one possible implementation, after the terminal 100 disconnects from the Wi-Fi connection, it can re-establish a Wi-Fi connection with the wireless access device when it detects that the terminal 100 has left the elevator. For example, after disconnecting the Wi-Fi connection, the terminal 100 can determine that it has left the elevator by detecting a beacon frame, detecting that it is not within a preset signal fence, detecting acceleration in the vertical direction opposite to the velocity direction, detecting magnetic field information that meets a preset magnetic field strength change trend, or detecting that the Wi-Fi signal strength has increased. In this way, the terminal 100 can rejoin the Wi-Fi network after the user leaves the elevator, saving the data traffic consumed during cellular network communication.
[0169] In some examples, after terminal 100 disconnects from the Wi-Fi connection, it can re-establish a Wi-Fi connection with the wireless access device after a preset waiting time (e.g., 1 minute, 3 minutes, 5 minutes, etc.).
[0170] The terminal 100 provided in the embodiments of this application is described below.
[0171] Figure 14 shows a schematic diagram of the hardware structure of terminal 100.
[0172] For example, as shown in FIG14, the terminal 100 may include, but is not limited to, 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, one or more antennas, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.
[0173] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal 100. In other embodiments of this application, the terminal 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0174] Processor 110 may include one or more processing units, such as application processors, modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0175] The controller can serve as the central nervous system and command center of the terminal 100. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0176] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0177] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0178] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal 100. In other embodiments of this application, the terminal 100 may also adopt different interface connection methods or a combination of multiple interface connection methods as described in the above embodiments.
[0179] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the terminal 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0180] The power management module 141 connects 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, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0181] The wireless communication function of terminal 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0182] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0183] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the terminal 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0184] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0185] The wireless communication module 160 can provide wireless communication solutions for use on the terminal 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), and satellite communication modules. 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 antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0186] In this embodiment, the wireless communication module 160 can be used to acquire signal strength information to detect whether the terminal 100 has entered the elevator.
[0187] In some embodiments, antenna 1 of terminal 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling terminal 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0188] Terminal 100 implements display functions through a GPU, display screen 194, and application processor. 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 and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0189] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, terminal 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0190] Terminal 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0191] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits this electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0192] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, terminal 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0193] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when terminal 100 selects a frequency point, the DSP can perform Fourier transforms on the frequency energy.
[0194] Video codecs are used to compress or decompress digital video. Terminal 100 may support one or more video codecs. Thus, terminal 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0195] NPU stands for Neural Network (NN) Computing Processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable intelligent cognitive applications in terminals, such as image recognition, facial recognition, speech recognition, and text understanding.
[0196] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the terminal 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0197] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of terminal 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of terminal 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0198] Terminal 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0199] 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 signal. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. Microphone 170C, also called a "microphone" or "microphone unit," is used to convert sound signals into electrical signals.
[0200] Pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 194. Gyroscope sensor 180B can be used to determine the motion posture of terminal 100. Barometric pressure sensor 180C is used to measure barometric pressure.
[0201] The magnetic sensor 180D includes a Hall sensor, which can be used to detect the opening and closing of the flip-top cover. In this embodiment, the terminal 100 can obtain magnetic field strength information through the magnetic sensor 180D to determine whether the user is near an elevator.
[0202] Accelerometer 180E can detect the magnitude of acceleration of terminal 100 in various directions (generally three axes). Distance sensor 180F is used to measure distance. In this embodiment, terminal 100 can obtain acceleration information through accelerometer 180E to determine whether the user is riding the elevator.
[0203] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The terminal 100 emits infrared light outward through the LED. The terminal 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal 100. When insufficient reflected light is detected, the terminal 100 can determine that there is no object near the terminal 100. The terminal 100 may use the proximity sensor 180G to detect when the user holds the terminal 100 close to their ear for a call (i.e., determine that the terminal 100 is in earpiece mode), so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and screen locking.
[0204] An ambient light sensor 180L is used to sense ambient light intensity. A fingerprint sensor 180H is used to collect fingerprints. A temperature sensor 180J is used to detect temperature. A touch sensor 180K, also known as a "touch panel," can be placed on the display screen 194. The touch sensor 180K and the display screen 194 together form a touchscreen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some embodiments, the touch sensor 180K can also be placed on the surface of the terminal 100, in a different position than the display screen 194. A bone conduction sensor 180M can acquire vibration signals. Buttons 190 include a power button, volume buttons, etc. A motor 191 can generate vibration cues. An indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc.
[0205] The SIM card interface 195 is used to connect SIM cards, such as SIM1, SIM2, and SIM3. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the terminal 100. The terminal 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, and other SIM cards. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. These multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The terminal 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the terminal 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal 100 and cannot be separated from the terminal 100.
[0206] In this embodiment, the terminal's software system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment uses a layered mobile operating system as an example to illustrate the terminal's software structure.
[0207] Figure 15 is a schematic diagram of the software structure of the terminal 100 according to an embodiment of this application.
[0208] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, a mobile operating system is divided into four layers, from top to bottom: the application layer, the application framework / core service layer, the underlying libraries and runtime, and the kernel layer.
[0209] The application layer can include a series of application packages.
[0210] As shown in Figure 15, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0211] The program framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The program framework layer includes a set of predefined functions.
[0212] As shown in Figure 15, the program framework layer may include, but is not limited to, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and a communication management module 1501.
[0213] The window manager manages window programs. The content provider stores and retrieves data, making it accessible to applications. This data may include video, images, audio, made and received calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, images, and signal strength. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon may include views for displaying text and views for displaying images. The phone manager provides communication functionality for the terminal, such as managing call status (including connection and disconnection). The resource manager provides various resources to applications, such as localized strings, icons, images, layout files, video files, etc. The notification manager allows applications to display notifications in the status bar, conveying informational messages that disappear automatically after a short pause without user interaction. For example, the notification manager is used to notify of download completion or message alerts.
[0214] The communication management module 1501 can detect whether the terminal 100 is in an elevator scenario when establishing a Wi-Fi communication connection with the wireless access device 200. If the communication management module 1501 determines that the terminal 100 is in an elevator scenario, it can switch to another network or disconnect the Wi-Fi connection via a WLAN application. Optionally, after the terminal 100 disconnects the Wi-Fi connection, the communication management module 1501 can access another network (e.g., a cellular network) and transmit data through that network.
[0215] Runtime can refer to all the code libraries, frameworks, etc., required for a program to run. For example, for the C language, the runtime includes a series of function libraries required for C programs to run. For the Java language, in addition to the core libraries, the runtime also includes the virtual machine required for Java programs to run. The aforementioned core libraries can include the functionalities that the Java language needs to call.
[0216] The underlying library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0217] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0218] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0219] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0220] A 2D graphics engine is a graphics engine for 2D drawing.
[0221] The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, and a WLAN driver. The sensor driver may include, but is not limited to, a magnetic sensor driver and an accelerometer driver. For example, a WLAN application can control the wireless communication module 160 to implement WLAN functionality through the WLAN driver. The magnetic sensor driver can be used to control the magnetic sensor 180D to collect magnetic field strength information and send the magnetic field strength information to the communication management module 1501. The accelerometer driver can be used to control the accelerometer sensor 180E to collect acceleration information and send the acceleration information to the communication management module 1501.
[0222] The following is a schematic diagram of a hardware structure of the wireless access device 200.
[0223] As shown in Figure 16, the wireless access device 200 may include a processor 1601, a memory 1602, a WLAN communication module 1603, and an antenna 1604; optionally, the wireless access device 200 may also include a wired local area network (LAN) communication processing module 1605.
[0224] The processor 1601 is used to read and execute computer-readable instructions. Specifically, the processor 1601 mainly includes a controller, an arithmetic logic unit (ALU), and registers. The controller is primarily responsible for instruction decoding and issuing control signals for the operations corresponding to the instructions. The ALU is primarily responsible for storing register operands and intermediate operation results temporarily stored during instruction execution. Specifically, the hardware architecture of the processor 1601 can be an application-specific integrated circuit (ASIC), MIPS, ARM, or NP architecture, etc. The processor 1601 is primarily responsible for the operation of the wireless access device 200.
[0225] Memory 1602 is coupled to processor 1601 and is used to store various software programs and / or multiple sets of instructions. In specific implementations, memory 1602 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 1602 may store an operating system, such as uCOS, VxWorks, RTLinux, or other embedded operating systems. Memory 1602 may also store communication programs that can be used to communicate with other devices. Memory 1602 may also store the current configuration, routing table, and forwarding table. The routing table is used to store routing information and is typically maintained by routing protocols and routing table management modules, including more information (network address, next hop, timeout, etc.). The forwarding table can be generated based on the routing table and is used by the router during actual forwarding; the wireless access device 200 can send data packets to the next-hop device according to the forwarding table.
[0226] The WLAN communication module 1603 can be used to modulate and demodulate electromagnetic wave signals. The WLAN communication module 1603 can convert information and instructions issued by the processor 1601 into electromagnetic wave signals. It converts the received electromagnetic wave signals into digital signals, which are then processed by the processor 1601.
[0227] Antenna 1604 can be used to transmit and receive electromagnetic wave signals. Antennas from different communication modules can be reused or used independently to improve antenna utilization.
[0228] The wired LAN communication processing module may include one or more LAN physical interfaces, which can be used to allow other electronic devices to establish connections with the wireless access device 200 via a network cable.
[0229] The wireless access device 200 may also include a wired wide area network (WAN) communication processing module, which may include a WAN physical interface that can be used to connect the wireless access device 200 to the Internet.
[0230] It should be noted that the wireless access device 200 shown in Figure 16 is merely one implementation of an embodiment of this application. In actual applications, the device may include more or fewer components, which is not limited here. In this embodiment, the hardware structure of the wireless access device 200 can be referred to the description of the wireless access device 200 in the embodiment shown in Figure 16, and will not be repeated here. The wireless access device 200, and other electronic devices having the hardware structure shown in Figure 16, can all be collectively referred to as wireless access devices.
[0231] The foregoing details the method provided in this application. In order to facilitate better implementation of the above-described solutions in the embodiments of this application, the embodiments of this application also provide corresponding devices or equipment.
[0232] This application embodiment can divide the terminal 100 into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0233] The communication device of the present application embodiment will now be described in detail with reference to FIG17.
[0234] Referring to FIG17, which is a schematic diagram of the structure of a communication device 1700 provided in an embodiment of this application, the communication device 1700 can be the terminal 100 in the above embodiments. Optionally, the communication device 1700 can be a chip / chip system. As shown in FIG17, the communication device 1700 may include a transceiver unit 1710 and a processing unit 1720.
[0235] The transceiver unit 1710 can also be used to perform the sending and receiving functions performed by the terminal 100 in the above embodiments of this application.
[0236] The processing unit 1720 can also be used to perform the functional steps related to identifying elevator scenes and switching communication networks performed by the terminal 100 in the above embodiments of this application.
[0237] It should be understood that the communication device 1700 in this design can perform the method steps executed by the terminal 100 in the aforementioned embodiment, and for the sake of brevity, it will not be described again here.
[0238] The terminal 100 of this application embodiment has been described above. It should be understood that any product with the functions of the communication device 1700 described in FIG17 above falls within the protection scope of this application embodiment.
[0239] As a possible product form, the terminal 100 described in this application embodiment can be implemented using a general bus architecture.
[0240] Referring to Figure 18, which is a schematic diagram of the structure of a communication device 1800 provided in an embodiment of this application, the communication device 1800 may be a terminal 100, or a device therein. As shown in Figure 18, the communication device 1800 includes a processor 1801 and a transceiver 1802 internally connected and communicating with the processor 1801. The processor 1801 may be a general-purpose processor or a dedicated processor, for example, a central processing unit and / or an NFC controller. The transceiver 1802 may be referred to as a transceiver unit, transceiver, or transceiver circuit, etc., and is used to implement transceiver functions. The transceiver 1802 may include a receiver and a transmitter. The receiver may be referred to as a receiver or receiving circuit, etc., and is used to implement a receiving function, such as a WLAN receiving function; the transmitter may be referred to as a transmitter or transmitting circuit, etc., and is used to implement a transmitting function, such as a WLAN transmitting function. Optionally, the communication device 1800 may also include an antenna 1803 and / or a radio frequency unit (not shown in Figure 18), for example, a radio frequency antenna. The antenna 1803 and / or radio frequency unit may be located inside the communication device 1800 or separate from the communication device 1800, that is, the antenna 1803 and / or radio frequency unit may be deployed remotely or in a distributed manner.
[0241] Optionally, the communication device 1800 may include one or more memories 1804, which may store instructions, which may be computer programs, that can be executed on the communication device 1800 to cause the communication device 1800 to perform the method steps described in the above embodiments of this application. Optionally, the memory 1804 may also store data. The communication device 1800 and the memory 1804 may be provided separately or integrated together.
[0242] The processor 1801, transceiver 1802, and memory 1804 can be connected via a communication bus.
[0243] In one design, the communication device 1800 can be used to perform the functions of the terminal 100 in the aforementioned embodiments: the processor 1801 can be used to perform the functional steps related to Wi-Fi protocol parsing and encapsulation, data service processing flow, elevator scene identification flow, etc., performed by the terminal 100 in the aforementioned embodiments of this application, and / or other processes used in the technology described herein; the transceiver 1802 can be used to perform the functional steps related to sending and receiving, etc., performed by the terminal 100 in the aforementioned embodiments of this application, and / or other processes used in the technology described herein.
[0244] In any of the above designs, the processor 1801 may include a transceiver for implementing receive and transmit functions. For example, the transceiver may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing receive and transmit functions may be separate or integrated. The aforementioned transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or it may be used for transmitting or relaying signals.
[0245] In any of the above designs, the processor 1801 may store instructions, which may be computer programs. These computer programs, running on the processor 1801, cause the communication device 1800 to execute the method steps executed by the terminal 100 in the above embodiments of this application. The computer program may be embedded in the processor 1801; in this case, the processor 1801 may be implemented in hardware.
[0246] In one implementation, the communication device 1800 may include circuitry capable of performing the functions of transmitting, receiving, or communicating as described in the foregoing method embodiments. The processor and transceiver described in this application can be implemented on integrated circuits (ICs), analog ICs, radio frequency integrated circuits (RFICs), mixed-signal ICs, application-specific integrated circuits (ASICs), printed circuit boards (PCBs), electronic devices, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductors (CMOS), n-metal-oxide-semiconductor (NMOS), p-type metal oxide semiconductors (PMOS), bipolar junction transistors (BJTs), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
[0247] The scope of the communication device described in this application is not limited thereto, and the structure of the communication device is not limited to that shown in FIG18. Communication device 1800 may be a standalone device or part of a larger device. For example, the communication device 1800 may be:
[0248] (1) A standalone integrated circuit IC, or chip, or chip system or subsystem; (2) A collection of one or more ICs, optionally including storage components for storing data or computer programs; (3) An ASIC, such as an NFC chip; (4) A module that can be embedded in other devices; (5) A receiver, terminal, smart terminal, cellular phone, wireless device, handheld device, mobile unit, vehicle device, network device, cloud device, artificial intelligence device, etc.; (6) Others, etc.
[0249] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps executed by the terminal 100 in the above-described method embodiments.
[0250] This application also provides a computer program product, including a computing program, which, when run on a computer, enables the computer to perform the steps executed by the terminal 100 in the above-described method embodiments.
[0251] This application also provides a chip system, which includes a processing circuit and an interface circuit. The interface circuit receives code instructions and transmits them to the processing circuit. The processing circuit executes the code instructions to enable the chip system to perform the steps executed by the terminal 100 in any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.
[0252] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A communication method applied to a terminal, characterized in that, include: Establish a wireless Fidelity Wi-Fi communication connection with wireless access devices; Obtain scene feature information; Based on the scene feature information, it is determined that the terminal is in an elevator scene; After determining that the terminal is in the elevator scenario, disconnect the Wi-Fi connection or switch the communication network.
2. The method of claim 1, wherein, The scene feature information includes magnetic field strength information; determining that the terminal is in an elevator scene based on the scene feature information specifically includes: If the magnetic field strength information is detected to gradually decrease or gradually increase within a first time period, and the absolute value of the difference between the first magnetic field strength information at the first moment within the first time period and the second magnetic field strength information at the second moment within the first time period is greater than a preset magnetic field strength threshold, it is determined that the terminal is in an elevator scenario, and the second moment is later than the first moment.
3. The method of claim 1, wherein, The scene feature information includes Wi-Fi signal strength information; determining that the terminal is in an elevator scene based on the scene feature information specifically includes: If the Wi-Fi signal strength information gradually decreases during the second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at the third moment during the second time period and the second Wi-Fi signal strength information at the fourth moment during the second time period is greater than a preset signal strength threshold, it is determined that the terminal is in an elevator scenario, and the fourth moment is later than the third moment.
4. The method of claim 1, wherein, The scene feature information includes magnetic field strength information and Wi-Fi signal strength information; determining that the terminal is in an elevator scene based on the scene feature information specifically includes: The system detects that the magnetic field strength information gradually decreases or gradually increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at a first moment within the first time period and the second magnetic field strength information at a second moment within the first time period is greater than a preset magnetic field strength threshold; and / or, If the Wi-Fi signal strength information gradually decreases during the second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at the third moment during the second time period and the second Wi-Fi signal strength information at the fourth moment during the second time period is greater than a preset signal strength threshold, it is determined that the terminal is in an elevator scenario, the second moment is later than the first moment, and the fourth moment is later than the third moment.
5. The method of claim 4, wherein, The fourth moment is later than the second moment.
6. The method of claim 1, wherein, The scene feature information includes magnetic field strength information and acceleration information; determining that the terminal is in an elevator scene based on the scene feature information specifically includes: The system detects that the magnetic field strength information gradually decreases or gradually increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at a first moment within the first time period and the second magnetic field strength information at a second moment within the first time period is greater than a preset magnetic field strength threshold; and / or, If the acceleration information in the vertical direction at the fifth moment is detected to be greater than the preset acceleration information threshold, it is determined that the terminal is in an elevator scenario, and the second moment is later than the first moment.
7. The method of claim 6, wherein, The fifth moment is later than the second moment.
8. The method of claim 1, wherein, The scene feature information includes Wi-Fi signal strength information and acceleration information; determining that the terminal is in an elevator scene based on the scene feature information specifically includes: The Wi-Fi signal strength information is detected to gradually decrease within the second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at the third moment within the second time period and the second Wi-Fi signal strength information at the fourth moment within the second time period is greater than a preset signal strength threshold; and / or, If the acceleration information in the vertical direction at the fifth moment is detected to be greater than the preset acceleration information threshold, it is determined that the terminal is in an elevator scenario, and the fourth moment is later than the third moment.
9. The method of claim 8, wherein, The fifth time point is later than the fourth time point.
10. The method of claim 1, wherein, The scene feature information includes magnetic field strength information, Wi-Fi signal strength information, and acceleration information; determining that the terminal is in an elevator scene based on the scene feature information specifically includes: The system detects that the magnetic field strength information gradually decreases or increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at a first moment and the second magnetic field strength information at a second moment within the first time period is greater than a preset magnetic field strength threshold. Furthermore, the system detects that the Wi-Fi signal strength information gradually decreases within a second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at a third moment and the second Wi-Fi signal strength information at a fourth moment within the second time period is greater than a preset signal strength threshold. The second moment is later than the first moment, and the fourth moment is later than the third moment. Alternatively, The system detects that the magnetic field strength information gradually decreases or gradually increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at the first moment and the second magnetic field strength information at the second moment within the first time period is greater than a preset magnetic field strength threshold. Furthermore, the system detects that the acceleration information in the vertical direction at the fifth moment is greater than a preset acceleration information threshold. If the Wi-Fi signal strength information gradually decreases during the second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at the third moment of the second time period and the second Wi-Fi signal strength information at the fourth moment of the second time period is greater than a preset signal strength threshold, and if the acceleration information in the vertical direction at the fifth moment is greater than a preset acceleration information threshold, it is determined that the terminal is in an elevator scenario.
11. The method of claim 1, wherein, The scene feature information includes magnetic field strength information, Wi-Fi signal strength information, and acceleration information; determining that the terminal is in an elevator scene based on the scene feature information specifically includes: The system detects that the magnetic field strength information gradually decreases or gradually increases within a first time period, and the absolute value of the difference between the first magnetic field strength information at a first moment within the first time period and the second magnetic field strength information at a second moment within the first time period is greater than a preset magnetic field strength threshold, wherein the second moment is later than the first moment; and... The Wi-Fi signal strength information was detected to gradually decrease within the second time period, and the absolute value of the difference between the first Wi-Fi signal strength information at the third moment within the second time period and the second Wi-Fi signal strength information at the fourth moment within the second time period was greater than a preset signal strength threshold, wherein the fourth moment is later than the third moment; and, If the acceleration information in the vertical direction at the fifth moment is detected to be greater than the preset acceleration information threshold, it is determined that the terminal is in an elevator scenario.
12. The method of claim 1, wherein, The scene feature information includes magnetic field strength information, acceleration information within the third time period, and acceleration information within the fourth time period. Determining that the terminal is in an elevator scene based on the scene feature information specifically includes: Based on the acceleration information within the third time period, it is determined that the terminal is in a walking state during the third time period. A magnetic field strength exceeding a preset maximum strength threshold has been detected. An acceleration information curve is generated based on the acceleration information within the fourth time period. If the acceleration information curve is detected to include a specified waveform, it is determined that the terminal is in an elevator scene.
13. The method of claim 1, wherein, The scene feature information includes acceleration information within the third time period and magnetic field strength information within the fifth time period. Determining that the terminal is in an elevator scene based on the scene feature information specifically includes: Based on the acceleration information within the third time period, it is determined that the terminal is in a walking state during the third time period. No magnetic field strength information greater than the preset maximum strength threshold was detected; Based on the magnetic field strength information within the fifth time period, a magnetic field strength information variance curve is generated. The magnetic field strength information variance curve is detected to include a first inflection point, and it is determined that the terminal is in an elevator scenario. The variance value of the first inflection point is the maximum variance value in the magnetic field strength information variance curve.
14. The method of claim 13, wherein, The scene feature information also includes acceleration information within the fourth time period; determining that the terminal is in an elevator scene specifically includes: An acceleration information curve is generated based on the acceleration information within the fourth time period. If the acceleration information curve is detected to include a specified waveform, it is determined that the terminal is in an elevator scene.
15. A terminal, characterized by include: One or more processors, one or more memories, and a transceiver, wherein the transceiver, the one or more memories, are coupled to the one or more processors, the one or more memories being used to store a computer program, and when the one or more processors execute the computer program, performing the communication method as described in any one of claims 1-14.
16. A computer readable storage medium characterized by: The device contains a computer program that, when executed by a processor, implements the communication method as described in any one of claims 1-14.
17. A chip system, characterized by It includes a processing circuit and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to execute the code instructions to perform the communication method as described in any one of claims 1-14.
18. A computer program product, characterised in that, Includes a computer program that, when executed by a processor, performs the communication method as described in any one of claims 1-14.
Citation Information
Patent Citations
Method for controlling network connection and related products
CN112738745A
Signal switching method, mobile terminal and computer readable storage medium
CN113490241A
Network switching method and terminal
CN115002849A
Network switching method, electronic equipment and storage medium
CN116456406A
Elevator Scenario Detection and Operation for Wireless Devices
US20200383024A1