CN112738745B - Method for controlling network connection and related product - Google Patents

Method for controlling network connection and related product Download PDF

Info

Publication number
CN112738745B
CN112738745B CN201910973431.9A CN201910973431A CN112738745B CN 112738745 B CN112738745 B CN 112738745B CN 201910973431 A CN201910973431 A CN 201910973431A CN 112738745 B CN112738745 B CN 112738745B
Authority
CN
China
Prior art keywords
network
electronic equipment
elevator
network connection
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910973431.9A
Other languages
Chinese (zh)
Other versions
CN112738745A (en
Inventor
李雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910973431.9A priority Critical patent/CN112738745B/en
Publication of CN112738745A publication Critical patent/CN112738745A/en
Application granted granted Critical
Publication of CN112738745B publication Critical patent/CN112738745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a method for controlling network connection and related products, which are applied to electronic equipment, wherein the method comprises the following steps: detecting the state of the electronic equipment in an elevator scene under the condition that the electronic equipment is connected with a first Wi-Fi network; detecting the signal strength of the first Wi-Fi network; and switching the network connection mode of the electronic equipment according to the signal intensity and the state of the electronic equipment in the elevator scene. According to the method and the system, the state of the electronic equipment in the elevator scene and the signal intensity of the first Wi-Fi network connected with the electronic equipment are detected, and the network connection mode of the electronic equipment in the elevator scene is determined, so that a user can smoothly use the network, and the user can have good Internet surfing experience in the elevator scene.

Description

Method for controlling network connection and related product
Technical Field
The present disclosure relates to the field of mobile communications, and in particular, to a method for controlling network connection and related products.
Background
Wi-Fi, also known as "Mobile hotspot" in Chinese, is a brand authentication of Wi-Fi alliance manufacturers as a product, and is a wireless local area network technology created in the IEEE 802.11 standard. The wireless network surfing can be simply understood as wireless surfing, and almost all smart phones, tablet computers and notebook computers support Wi-Fi surfing, so that the wireless network surfing is the most widely used wireless network transmission technology at present. Mobile communication is a modern technology for wireless communication, which is one of important achievements in development of electronic computers and mobile internet, and the mobile communication technology has been advanced into the fifth generation of development age.
The current Wi-Fi network is disconnected or switched to the data network, and the current Wi-Fi signal strength and the network speed are mainly detected, but the Wi-Fi signal is very weak, and the current Wi-Fi network cannot be disconnected or switched to the data network, so that the user surfing experience is poor.
Disclosure of Invention
The embodiment of the application provides a method for controlling network connection and related products thereof, which are applied to electronic equipment and can be used for rapidly switching network connection modes in an elevator scene.
In a first aspect, an embodiment of the present application provides a method for controlling network connection, applied to an electronic device, where the method includes:
detecting the state of the electronic equipment in an elevator scene under the condition that the electronic equipment is connected with a first Wi-Fi network;
detecting the signal strength of the first Wi-Fi network;
and switching the network connection mode of the electronic equipment according to the signal intensity and the state of the electronic equipment in the elevator scene.
In a second aspect, an embodiment of the present application provides an apparatus for controlling network connection, applied to an electronic device, where the apparatus includes a processing unit and a communication unit, where the processing unit is configured to determine, when the electronic device is connected to a first Wi-Fi network, a state of the electronic device in an elevator scene; and means for detecting a signal strength of the first Wi-Fi network; and the network connection mode of the electronic equipment is switched according to the signal intensity and the state of the electronic equipment in the elevator scene.
In a third aspect, embodiments of the present application provide an electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the first aspect of the embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a computer storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps as described in the first aspect of the present embodiment.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, according to the method for controlling network connection and the related products, the network connection mode of the electronic equipment in the elevator scene can be determined by detecting the state of the electronic equipment in the elevator scene and the signal strength of the Wi-Fi network connected with the electronic equipment, so that a user can smoothly use the network, and good internet surfing experience of the user in the elevator scene is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic back view of an electronic device according to an embodiment of the present application;
fig. 2 is a flow chart of a method for controlling network connection according to an embodiment of the present application;
fig. 2-1 is a display interface for switching network connection of an electronic device according to an embodiment of the present application;
FIG. 3 is a flow chart of another method for controlling network connections according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a functional unit block diagram of an apparatus for controlling network connection according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The electronic device according to the embodiment of the present application may be an electronic device with communication capability, where the electronic device may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and various types of User Equipment (UE), mobile Station (MS), terminal device (terminal device), and so on.
At present, the Wi-Fi network is disconnected or switched to the data network, mainly based on the detection of the network speed of the current Wi-Fi signal intensity, but the time required for the detection of the disconnection or network congestion from the Wi-Fi signal intensity is longer, and generally, even if the Wi-Fi signal is weak in the environment such as an elevator, the condition of disconnecting the network still cannot be achieved, so that a user cannot smoothly use the network, and the phenomenon of poor Internet surfing experience occurs.
In view of the foregoing, embodiments of the present application provide a method for controlling network connection and related products, and the embodiments of the present application are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, the electronic device 100 includes a control network connection module, and the electronic device 100 supports various network connection modes of the electronic device, and the electronic device 100 can switch and control the network connection of the electronic device in an elevator environment through the control network connection module.
Referring to fig. 2, fig. 2 is a flowchart of a method for controlling network connection according to an embodiment of the present application, where as shown in the drawing, the method for controlling network connection includes:
s201, detecting the state of the electronic equipment in an elevator scene under the condition that the electronic equipment is connected with a first Wi-Fi network.
The method for detecting the electronic equipment in the elevator scene comprises entering the elevator and leaving the elevator, the method for detecting the electronic equipment in the elevator scene comprises the step of utilizing the sensors, for example, by means of an acceleration sensor, when the elevator is detected to start moving, the state of the electronic equipment is judged to be entering the elevator, of course, the state of the electronic equipment can also be judged to be entering the elevator in the moving process of the elevator, and when the elevator is detected to finish moving and the horizontal moving action is detected, the state of the electronic equipment is judged to be leaving the elevator. The state of the electronic device in the elevator scene can be judged by the prompt tone in the elevator, for example, when the elevator prompt tone is heard for the first time, the state of the electronic device can be judged to be the state of entering the elevator, and when the elevator prompt tone is heard again and the horizontal movement is detected, the state of the electronic device is judged to be the state of leaving the elevator, wherein the elevator prompt tone can be the sound of the number of the elevator report layers, the sound of the elevator prompt ascending or descending, or the sound of the elevator prompt reaching the appointed floor.
S202, detecting the signal strength of the first Wi-Fi network.
The first Wi-Fi network is a network connection mode that the electronic equipment enters an elevator scene, the first Wi-Fi network connected with the electronic equipment has two states and comprises a private network and a public Wi-Fi network, the private network can be a home Wi-Fi or a mobile phone hot spot, and the public Wi-Fi can be a Wi-Fi network in a mall or a hotel, and the like.
And S203, switching the network connection mode of the electronic equipment according to the signal intensity and the state of the electronic equipment in the elevator scene.
The network connection modes of the electronic equipment are two types, namely wireless network connection, namely Wi-Fi network access, and mobile communication network connection, and particularly a cellular communication network accessed through a cellular network module.
It can be seen that in the embodiment of the application, through detecting the state of the electronic device in the elevator scene and judging the Wi-Fi network signal intensity connected with the electronic device, the network connection mode of the electronic device can be controlled, so that a user can smoothly use the electronic device in the elevator scene, the user does not need to manually switch the network connection mode of the electronic device, and the user is ensured to have good internet surfing experience.
In one possible example, the first Wi-Fi network is a private network; the switching the network connection mode of the electronic equipment according to the signal intensity and the state of the electronic equipment in the elevator scene comprises the following steps: if the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the electronic equipment enters an elevator, switching the network connection mode of the electronic equipment into mobile communication network connection; if the state of the electronic equipment is detected to be the state of leaving the elevator, scanning a second Wi-Fi network according to the electronic equipment; and comparing the signal strength of the private network with that of the second Wi-Fi network, and accessing the network with stronger signal strength or the mobile communication network by the electronic equipment.
The Wi-Fi network connected when the electronic equipment enters an elevator scene at first is a private network. The private network herein refers to a network with relatively small Wi-Fi signal coverage and most of which require passwords, such as home Wi-Fi network or cell phone hot spot, etc. When the state of the electronic equipment is in an elevator and the signal intensity is smaller than a certain preset threshold value, the network connection mode of the electronic equipment is switched to be connected with a mobile communication network, so that data transmission and the like can be smoothly carried out. Of course, if the state of the electronic device is leaving the elevator, the network connection may also be switched directly to the mobile communication network connection.
Referring to fig. 2-1, fig. 2-1 is a display interface for switching network connection of an electronic device according to an embodiment of the present application, where, as shown in the fig. and in the electronic device, when a user enters an elevator, the mobile phone senses movement of the elevator through an acceleration sensor, at this time, the mobile phone determines that the state of the mobile phone is that the user enters the elevator, then detects the signal strength of Wi-Fi connected to the mobile phone when the mobile phone enters the elevator, and determines whether to switch the network connection mode of the mobile phone according to comparing the detected signal strength with a preset signal strength threshold. For example, the detected Wi-Fi signal strength is-85 dbm, and the preset threshold is-40 dbm to-80 dbm, so that the Wi-Fi signal strength is smaller than the preset threshold, and in this case, the network connection mode of the mobile phone is switched from Wi-Fi connection to mobile communication network connection.
In this example, when the electronic device is connected to the private network when entering the elevator scene, the user can switch the network connection mode according to the signal strength of the private network connected to the electronic device no matter entering the elevator or leaving the elevator, so that the problem that the user is not fluent in surfing the internet because the network is switched when the Wi-Fi signal is required to be automatically disconnected when the Wi-Fi signal is low is avoided.
In one possible example, the comparing the signal strengths of the private network and the second Wi-Fi network, the electronic device accessing the network with stronger signal strength or the mobile communication network, includes: judging whether the signal strength of the network with stronger signal is larger than the preset threshold value; if yes, the electronic equipment is accessed to the network with the stronger signal; if not, switching the network connection mode of the electronic equipment to be the mobile communication network connection.
In this example, when the electronic device enters the elevator scene, a private network is connected and the state of the electronic device is a condition of leaving the elevator, the electronic device obtains a network with a stronger signal by comparing the signal intensity of the private network with the signal intensity of a second Wi-Fi network obtained by scanning, compares the network with a preset threshold value, switches the network connection of the electronic device to be a mobile communication network connection if the network connection is smaller than the preset threshold value, and enables the electronic device to be connected with the network with the stronger signal if the network connection is larger than the preset threshold value. The size of the preset threshold may be arbitrary, but it should be ensured that the strength of the signal within the preset threshold can ensure smooth network data transmission.
In this example, when the electronic device leaves the elevator, the final network connection mode of the electronic device is determined by comparing the network with a stronger signal with the signal strength of the preset threshold again, so that the network can be quickly switched, and smooth surfing of the user can be ensured.
In one possible example, the detecting that the signal strength is less than a preset threshold and the state of the electronic device is entering an elevator includes: judging whether a public Wi-Fi network exists in the elevator; if yes, judging whether the signal strength of the public Wi-Fi network is greater than the preset threshold value; if yes, the network connection mode is switched to be connected with the public Wi-Fi network.
The public Wi-Fi network can be public Wi-Fi in an elevator car or Wi-Fi outside the elevator connected through a wireless access point in the elevator under the condition that the electronic equipment enters a private network connected when the electronic equipment enters an elevator scene and the state of the electronic equipment enters the elevator. Therefore, when the signal intensity of the private network is smaller than a preset threshold value, whether the public Wi-Fi exists in the elevator or not is judged, the signal intensity of the public Wi-Fi is compared with the preset threshold value again, and if the signal intensity of the public Wi-Fi is larger than the preset threshold value, the electronic equipment is accessed into the public Wi-Fi in the elevator.
In this example, when the network is switched, whether the elevator has the public Wi-Fi is judged, and then the network connection mode of the electronic device is determined according to the signal strength of the public Wi-Fi, so that not only can the smooth internet surfing of the user be ensured, but also the mobile communication network connection mode can be used as little as possible, the mobile flow of the user can be saved, and the benefit of the user can be ensured on the basis that the user has good internet surfing experience is met.
In one possible example, the first Wi-Fi network is a public Wi-Fi network; the switching the network connection mode of the electronic equipment according to the signal intensity and the state of the electronic equipment in the elevator scene comprises the following steps:
if the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the electronic equipment enters an elevator, switching the network connection mode of the electronic equipment into mobile communication network connection; if the signal intensity is detected to be smaller than the preset threshold value and the state of the electronic equipment is that the electronic equipment leaves the elevator, switching the connection mode of the electronic equipment to be mobile communication network connection, and scanning a third Wi-Fi network with the signal intensity larger than the preset value according to the electronic equipment; and after the third Wi-Fi network is scanned, switching the mobile communication network connection to be connected with the third Wi-Fi network.
The example is that on the premise that a public Wi-Fi network is connected when the electronic equipment enters an elevator scene, the public Wi-Fi refers to the Wi-Fi network which has wide Wi-Fi signal coverage range and mostly does not need passwords, such as Wi-Fi networks in areas of markets, hospitals and the like, and of course, the independent Wi-Fi network in an elevator car can also be regarded as the public Wi-Fi network. When the state of the electronic equipment is that the elevator is entered, the network connection mode is switched to access the mobile communication network when the signal intensity of the public Wi-Fi network is detected to be smaller than a preset threshold value, when the state of the electronic equipment is that the elevator is left, the network connection mode is directly switched to access the mobile communication network when the signal intensity of the public Wi-Fi network is detected to be smaller than the preset threshold value, surrounding Wi-Fi is scanned, if a Wi-Fi network with the signal intensity larger than the preset threshold value can be scanned, the network is used as a third Wi-Fi network, the network connection mode of the electronic equipment is switched from the mobile communication network connection to the third Wi-Fi network, if a third Wi-Fi network meeting the condition is not scanned, the current network connection mode can be kept until the third Wi-Fi network is known to be scanned.
In this example, when the electronic device is connected to the public Wi-Fi network, the state of the electronic device and the signal strength of the public Wi-Fi network are detected, so that the network connection mode of the electronic device when the electronic device enters or leaves the elevator is determined, the network can be quickly switched, the switched network can be ensured to be smooth for a user to surf the internet, and when the electronic device leaves the elevator, the surrounding Wi-Fi network is continuously scanned to obtain the third Wi-Fi network, so that the mobile flow of the user can be saved as much as possible, and the benefit of the user is ensured.
In one possible example, after the switching the network connection manner of the electronic device is a mobile communication network connection, the method further includes: detecting again the status of the electronic device in the elevator scene; if the state of the electronic equipment is that the electronic equipment leaves the elevator, scanning a third Wi-Fi network with the signal strength larger than the preset value according to the electronic equipment; and after the third Wi-Fi network is scanned, switching the network connection mode of the electronic equipment to access the third Wi-Fi network.
When the state of the electronic device is changed from entering the elevator to leaving the elevator, and the network connection mode of the electronic device is switched from connecting the first Wi-Fi network to connecting the mobile communication network, in this case, if the state of the electronic device is detected to be leaving the elevator, the electronic device is utilized to scan nearby Wi-Fi, a Wi-Fi network with signal strength larger than a preset threshold value, namely a third Wi-Fi network is obtained, and after the third Wi-Fi network is obtained, the network connection mode of the electronic device is changed again to access the third Wi-Fi network.
It can be seen that, in this example, the electronic device is always in the elevator scene, but when the state of the electronic device changes, the network connection mode of the electronic device will also change accordingly, if the state of the electronic device changes from entering the elevator to leaving the elevator, even if the network connection mode of the electronic device at this time has changed to a mobile communication network connection, the electronic device will still scan surrounding Wi-Fi until a Wi-Fi network meeting the condition is found. Therefore, the electronic equipment can flexibly switch network connection modes under different states, and the smoothness of surfing the Internet of a user is ensured.
In one possible example, the switching the network connection mode is the mobile communication network connection, including: detecting whether the electronic device supports connection to a plurality of mobile communication networks; if yes, determining the finally connected mobile communication network according to the user selection.
In this case, supporting connection to a plurality of mobile communication networks means that when two or more SIM cards (subscriber identity cards, subscriber Identification Module) exist in the same electronic device, each SIM card can be connected to one mobile communication network. When this occurs, the electronic device may receive a selection instruction from the user, so as to determine the mobile communication network to be finally connected according to the selection of the user, where the selection of the user may be made immediately by a prompt of the electronic device, or the electronic device may directly determine according to the historical selection of the user, or may select the default mobile communication network set by the user as the network connection mode finally selected by the user.
In this example, if the electronic device can connect to multiple different mobile communication networks, the mobile communication network to be finally connected is to be determined according to the selection of the user during network switching, so that the user will be respected, an automatic network switching mode can be realized, and good internet surfing experience of the user is ensured.
Referring to fig. 3, fig. 3 is a schematic flow chart of another method for controlling network connection according to the embodiment of the present application, as shown in the fig. 2, the method for controlling network connection is applied to an electronic device, and the method includes:
s301, detecting the state of the electronic equipment in an elevator scene under the condition that the electronic equipment is connected with a first Wi-Fi network;
s302, detecting the signal strength of the first Wi-Fi network;
s303, the first Wi-Fi network is a private network, and when the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the electronic equipment enters an elevator, the network connection mode of the electronic equipment is switched to be mobile communication network connection;
s304, the first Wi-Fi network is a private network, and when the state of the electronic equipment is detected to be the state of leaving an elevator, a second Wi-Fi network is scanned according to the electronic equipment;
S305, comparing the signal strength of the private network and the signal strength of the second Wi-Fi network, and accessing the network with stronger signal strength or the mobile communication network by the electronic equipment.
It can be seen that, in this embodiment, when the first Wi-Fi network connected to the electronic device is a private network and the state of the electronic device is detected to be the state of entering the elevator, if the signal intensity of the private network is smaller than the preset threshold, the network connection mode of the electronic device is directly switched to be the mobile communication network connection, when the state of the electronic device is the state of leaving the elevator, the network connection mode is not switched but surrounding Wi-Fi is scanned to obtain a second Wi-Fi network, then the signal intensities of the private network and the second Wi-Fi network are compared, and the electronic device is connected to the network with a large signal intensity. Therefore, the user can also keep smooth network connection in an elevator scene, the internet surfing rate cannot be changed too much because of the fact that the user is in an elevator, and because the electronic equipment is connected to a private network at first and is connected to a mobile phone hot spot before the state of the electronic equipment leaves the elevator, when the state of the electronic equipment leaves the elevator, the user does not switch network connection modes but scans nearby Wi-Fi, and the signal intensity of Wi-Fi is compared, so that the frequency of switching network connection modes can be reduced, and the efficiency is improved.
Referring to fig. 4, in accordance with the embodiments shown in fig. 2 and fig. 3, fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, as shown in the fig. 4, the electronic device 400 includes an application processor 410, a memory 420, a communication interface 430, and one or more programs 421, where the one or more programs 421 are stored in the memory 420 and configured to be executed by the application processor 410, and the one or more programs 421 include instructions for executing any steps in the method embodiments.
In one possible example, the instructions in the program 421 are for performing the following operations: detecting the state of the electronic equipment in an elevator scene under the condition that the electronic equipment is connected with a first Wi-Fi network, and detecting the signal strength of the first Wi-Fi network; and switching the network connection mode of the electronic equipment according to the signal intensity and the state of the electronic equipment in the elevator scene.
It can be seen that, by the electronic device described in the embodiments of the present application, the state of the electronic device in the elevator scene and the signal strength of the first Wi-Fi connected to the electronic device can be detected, and the network connection mode of the electronic device can be controlled according to the detected state and signal strength of the electronic device. Therefore, even if a user enters the elevator or leaves the elevator, the network transmission rate of the electronic equipment is approximately stable, the network connection mode is not switched when the first Wi-Fi signal is low enough to be automatically disconnected, and the method can ensure the smoothness of surfing the internet under the elevator environment for the user.
In one possible example, the first Wi-Fi network is a private network; the program instructions 421 further comprise instructions for performing the following operations in terms of switching the network connection of the electronic device according to the signal strength and the status of the electronic device in the elevator scenario:
if the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the electronic equipment enters an elevator, switching the network connection mode of the electronic equipment into mobile communication network connection; if the state of the electronic equipment is detected to be the state of leaving the elevator, scanning a second Wi-Fi network according to the electronic equipment; and comparing the signal strength of the private network with that of the second Wi-Fi network, and accessing the network with stronger signal strength or the mobile communication network by the electronic equipment.
In one possible example, in said comparing the signal strengths of the private network and the second Wi-Fi network, the electronic device accesses the network or the mobile communication network with stronger signal strength, the program instructions 421 further comprise instructions for: judging whether the signal strength of the network with stronger signal is larger than the preset threshold value; if yes, the electronic equipment is accessed to the network with the stronger signal; if not, switching the network connection mode of the electronic equipment to be the mobile communication network connection.
In one possible example, in the event that the detected signal strength is less than a preset threshold and the state of the electronic device is an incoming elevator, the program instructions 421 further comprise instructions for: judging whether a public Wi-Fi network exists in the elevator; if yes, judging whether the signal strength of the public Wi-Fi network is greater than the preset threshold value; if yes, the network connection mode is switched to be connected with the public Wi-Fi network.
In one possible example, the first Wi-Fi network is a public Wi-Fi network; the program instructions 421 further comprise instructions for performing the following operations in terms of switching the network connection of the electronic device according to the signal strength and the status of the electronic device in the elevator scenario:
if the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the electronic equipment enters an elevator, switching the network connection mode of the electronic equipment into mobile communication network connection; if the signal intensity is detected to be smaller than the preset threshold value and the state of the electronic equipment is that the electronic equipment leaves the elevator, switching the connection mode of the electronic equipment to be mobile communication network connection, and scanning a third Wi-Fi network with the signal intensity larger than the preset value according to the electronic equipment; and after the third Wi-Fi network is scanned, switching the mobile communication network connection to be connected with the third Wi-Fi network.
In one possible example, after the switching the network connection manner of the electronic device is a mobile communication network connection, the program instructions 421 further include instructions for: detecting again the status of the electronic device in the elevator scene; if the state of the electronic equipment is that the electronic equipment leaves the elevator, scanning a third Wi-Fi network with the signal strength larger than the preset value according to the electronic equipment; and after the third Wi-Fi network is scanned, switching the network connection mode of the electronic equipment to access the third Wi-Fi network.
In one possible example, in terms of the switching the network connection mode to be the mobile communication network connection, the program instructions 421 further include instructions for: detecting whether the electronic device supports connection to a plurality of mobile communication networks; if yes, determining the finally connected mobile communication network according to the user selection.
The foregoing description of the embodiments of the present application has been presented primarily in terms of a method-side implementation. It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various steps described in connection with the embodiments provided herein may be implemented as hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional units of the electronic device according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units. It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice.
In accordance with the embodiments shown in fig. 2 and 3, please refer to fig. 5, and fig. 5 is a functional unit block diagram of an apparatus for controlling network connection according to an embodiment of the present application. The device for controlling network connection is applied to an electronic device supporting multiple network connection modes, the electronic device comprises a device for controlling network connection, the electronic device controls the network connection modes of the electronic device according to a method for controlling network connection, the device for controlling network connection comprises a processing unit 501 and a communication unit 502, wherein the processing unit 501 is used for executing any step in the embodiment of the method, and when data transmission such as acquisition is executed, the communication unit 502 is optionally invoked to complete corresponding operation. The following is a detailed description.
The processing unit 501 is configured to determine, when the electronic device is connected to the first Wi-Fi network, a state of the electronic device in an elevator scene; and means for detecting a signal strength of the first Wi-Fi network; and the network connection mode of the electronic equipment is switched according to the signal intensity and the state of the electronic equipment in the elevator scene.
In one possible embodiment, the first Wi-Fi network is a private network; the processing unit 501 may be further configured to detect that the signal strength is smaller than a preset threshold in terms of switching a network connection mode of the electronic device according to the signal strength and a state of the electronic device in the elevator scene, and if the state of the electronic device is that the electronic device enters an elevator, switch the network connection mode of the electronic device to be a mobile communication network connection; and the system is used for detecting that the state of the electronic equipment is that the electronic equipment leaves an elevator, and scanning a second Wi-Fi network according to the electronic equipment; and the electronic equipment is used for comparing the signal strength of the private network and the second Wi-Fi network, and is accessed to the network with stronger signal strength or the mobile communication network.
In a possible embodiment, in the aspect of comparing the signal strengths of the private network and the second Wi-Fi network, the electronic device accesses the network with stronger signal strength or the mobile communication network, the processing unit 501 may further be configured to determine whether the signal strength of the network with stronger signal is greater than the preset threshold; and if so, the electronic equipment is accessed to the network with stronger signal; and if not, switching the network connection mode of the electronic equipment to be the mobile communication network connection.
In a possible embodiment, in the aspect that the detected signal strength is less than a preset threshold and the state of the electronic device is entering an elevator, the processing unit 501 may be further configured to determine whether there is a public Wi-Fi network in the elevator; and if so, judging whether the signal strength of the public Wi-Fi network is greater than the preset threshold; and if yes, switching the network connection mode to connect the public Wi-Fi network.
In one possible embodiment, the first Wi-Fi network is a public Wi-Fi network; the processing unit 501 is further operable to,
If the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the electronic equipment enters an elevator, switching the network connection mode of the electronic equipment into mobile communication network connection; and the third Wi-Fi network is used for switching the connection mode of the electronic equipment to be mobile communication network connection and scanning the third Wi-Fi network with the signal intensity larger than the preset value according to the electronic equipment when the signal intensity is detected to be smaller than the preset threshold value and the state of the electronic equipment is that the electronic equipment leaves an elevator; and the mobile communication network is switched to be connected with the third Wi-Fi network after the third Wi-Fi network is scanned.
In a possible embodiment, after the switching of the network connection mode of the electronic device to a mobile communication network connection, the processing unit 501 is further configured to detect again the status of the electronic device in the elevator scene; and if the state of the electronic equipment is that the electronic equipment leaves the elevator, scanning a third Wi-Fi network with the signal strength larger than the preset value according to the electronic equipment; and after the third Wi-Fi network is scanned, switching the network connection mode of the electronic equipment to access the third Wi-Fi network.
In a possible embodiment, in terms of the switching the network connection mode to be the mobile communication network connection, the processing unit 501 may be further configured to detect whether the electronic device supports connection to a plurality of mobile communication networks; and if so, determining the finally connected mobile communication network according to the user selection.
The eye tracking control device 500 may further comprise a storage unit 503 for storing program codes and data of the electronic apparatus. The processing unit 501 may be a processor, the communication unit 502 may be a transceiver, and the storage unit 503 may be a memory.
It can be understood that, since the method embodiment and the apparatus embodiment are in different presentation forms of the same technical concept, the content of the method embodiment portion in the present application should be adapted to the apparatus embodiment portion synchronously, which is not described herein.
The embodiment of the application also provides a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, where the computer program causes a computer to execute part or all of the steps of any one of the methods described in the embodiments of the method, where the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the methods described in the method embodiments above. The computer program product may be a software installation package, said computer comprising an electronic device.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be implemented by a program that instructs associated hardware, and the program may be stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
The foregoing has outlined rather broadly the more detailed description of embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided solely to assist in the understanding of the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (8)

1. A method of controlling a network connection, for application to an electronic device, the method comprising:
detecting the state of the electronic equipment in an elevator scene under the condition that the electronic equipment is connected with a first Wi-Fi network;
Detecting the signal strength of the first Wi-Fi network;
if the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the elevator is entered under the condition that the first Wi-Fi network is a private network, judging whether a public Wi-Fi network exists in the elevator or not, wherein the public Wi-Fi network is a public Wi-Fi in an elevator car; if the public Wi-Fi network exists, judging whether the signal strength of the public Wi-Fi network is larger than the preset threshold value; if the network connection mode is larger than the preset threshold value, switching the network connection mode to connect the public Wi-Fi network; if the state of the electronic equipment is detected to be away from the elevator, scanning a second Wi-Fi network according to the electronic equipment; and comparing the signal strength of the private network with that of the second Wi-Fi network, and accessing the electronic equipment into the network with stronger signal strength.
2. The method of claim 1, wherein the comparing the signal strengths of the private network and the second Wi-Fi network, the method further comprises, prior to the electronic device accessing the network with the stronger signal strength:
judging whether the signal strength of the network with stronger signal strength is larger than the preset threshold value;
If yes, the electronic equipment is accessed to the network with the stronger signal;
if not, switching the network connection mode of the electronic equipment to be mobile communication network connection.
3. The method of claim 1, wherein in the case where the first Wi-Fi network is a public Wi-Fi network, the method further comprises:
if the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the electronic equipment enters an elevator, switching the network connection mode of the electronic equipment into mobile communication network connection;
if the signal intensity is detected to be smaller than the preset threshold value and the state of the electronic equipment is that the electronic equipment leaves the elevator, switching the connection mode of the electronic equipment to be mobile communication network connection, and scanning a third Wi-Fi network with the signal intensity larger than the preset threshold value according to the electronic equipment;
and after the third Wi-Fi network is scanned, switching the mobile communication network connection to be connected with the third Wi-Fi network.
4. The method according to claim 2, wherein after the switching the network connection manner of the electronic device is a mobile communication network connection, the method further comprises:
Detecting again the status of the electronic device in the elevator scene;
if the state of the electronic equipment is that the electronic equipment leaves the elevator, scanning a third Wi-Fi network with the signal strength larger than the preset threshold value according to the electronic equipment;
and after the third Wi-Fi network is scanned, switching the network connection mode of the electronic equipment to access the third Wi-Fi network.
5. The method according to claim 2, wherein the switching the network connection of the electronic device is a mobile communication network connection, comprising:
detecting whether the electronic device supports connection to a plurality of mobile communication networks;
if yes, determining the finally connected mobile communication network according to the user selection.
6. An apparatus for controlling a network connection, characterized in that it is applied to an electronic device, said apparatus comprising a processing unit and a communication unit, wherein,
the processing unit is used for judging the state of the electronic equipment in an elevator scene under the condition that the electronic equipment is connected with a first Wi-Fi network; and means for detecting a signal strength of the first Wi-Fi network; and the system is used for judging whether a public Wi-Fi network exists in the elevator or not if the signal intensity is detected to be smaller than a preset threshold value and the state of the electronic equipment is that the elevator enters the elevator under the condition that the first Wi-Fi network is a private network, and the public Wi-Fi network is the public Wi-Fi in an elevator car; if the public Wi-Fi network exists, judging whether the signal strength of the public Wi-Fi network is larger than the preset threshold value; if the network connection mode is larger than the preset threshold value, switching the network connection mode to connect the public Wi-Fi network; if the state of the electronic equipment is detected to be away from the elevator, scanning a second Wi-Fi network according to the electronic equipment; and comparing the signal strength of the private network with that of the second Wi-Fi network, and accessing the electronic equipment into the network with stronger signal strength.
7. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-5.
8. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-5.
CN201910973431.9A 2019-10-14 2019-10-14 Method for controlling network connection and related product Active CN112738745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910973431.9A CN112738745B (en) 2019-10-14 2019-10-14 Method for controlling network connection and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910973431.9A CN112738745B (en) 2019-10-14 2019-10-14 Method for controlling network connection and related product

Publications (2)

Publication Number Publication Date
CN112738745A CN112738745A (en) 2021-04-30
CN112738745B true CN112738745B (en) 2023-07-04

Family

ID=75588486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910973431.9A Active CN112738745B (en) 2019-10-14 2019-10-14 Method for controlling network connection and related product

Country Status (1)

Country Link
CN (1) CN112738745B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810938B (en) * 2021-06-29 2022-09-27 荣耀终端有限公司 Channel switching method, electronic device and storage medium
CN115002850B (en) * 2021-12-14 2023-02-21 荣耀终端有限公司 Network switching method and electronic equipment
CN115002849B (en) * 2021-12-14 2023-02-24 荣耀终端有限公司 Network switching method and terminal
CN114900452B (en) * 2022-05-05 2023-06-27 中国联合网络通信集团有限公司 Internet of things connection state monitoring method and device, electronic equipment and medium
CN116437158B (en) * 2023-06-13 2023-09-01 浙江大华技术股份有限公司 Video transmission method, video transmission device, and computer-readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102278510B1 (en) * 2014-03-26 2021-07-16 삼성전자주식회사 Apparatus and method for serving voice in a wireless network
CN109429293A (en) * 2017-08-31 2019-03-05 展讯通信(上海)有限公司 Network mode switching method, user terminal and computer readable storage medium
CN108307462A (en) * 2018-01-30 2018-07-20 努比亚技术有限公司 A kind of method for connecting network, terminal and computer readable storage medium
CN108419279B (en) * 2018-02-08 2020-07-31 四川速宝网络科技有限公司 Network switching system
CN109743764A (en) * 2018-12-29 2019-05-10 努比亚技术有限公司 A kind of identification elevator scene method and device, mobile terminal device and storage medium
CN110087267A (en) * 2019-04-12 2019-08-02 努比亚技术有限公司 Method for switching network, device, electronic equipment and readable storage medium storing program for executing
CN110035185A (en) * 2019-04-22 2019-07-19 联想(北京)有限公司 A kind of control method, device and electronic equipment

Also Published As

Publication number Publication date
CN112738745A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN112738745B (en) Method for controlling network connection and related product
CN111246399B (en) Method for discovering Bluetooth device and related product
CN108965306B (en) Call processing method and mobile terminal
CN111343699B (en) Icon display method and device, storage medium and electronic equipment
CN106230492B (en) Terminal antenna switching method and device and mobile terminal
CN110401938B (en) Wireless high-fidelity Wi-Fi connection control method and related product
EP3565308B1 (en) Method and device for registering to a cell
CN108111977B (en) Network scanning method, device, storage medium and electronic equipment
US20220150788A1 (en) Communication processing method, terminal device, and medium
CN114423057B (en) Channel switching method, device, AP equipment and storage medium
CN110933704A (en) Network communication method, device, storage medium and electronic equipment
CN107222937B (en) Data transmission method, device and terminal
CN111436059A (en) Terminal measurement processing method and terminal
CN107454660B (en) Network residing method and device after authentication failure
CN108093404A (en) A kind of information processing method and device
KR102191366B1 (en) Handover method and apparatus of electronic deivce in a wireless communication system
CN106028323B (en) network access method, terminal and access point
CN107248890A (en) Wireless communications method, device, storage medium and terminal
CN111010716B (en) Network control method, network control device, storage medium and electronic equipment
KR102305063B1 (en) Roaming handoff method, central control device, and station
CN107040985A (en) Radio frequency interference processing method, device, storage medium and terminal
CN112425191B (en) Network state display control method and device
CN105657532B (en) Smart television wireless network starting up method and device
CN112256335B (en) Method and device for loading drive file, storage medium and electronic equipment
US20130252555A1 (en) Apparatus and method for link setup using electric field

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant