CN112997528A - Network switching method and related equipment - Google Patents

Network switching method and related equipment Download PDF

Info

Publication number
CN112997528A
CN112997528A CN201880099423.XA CN201880099423A CN112997528A CN 112997528 A CN112997528 A CN 112997528A CN 201880099423 A CN201880099423 A CN 201880099423A CN 112997528 A CN112997528 A CN 112997528A
Authority
CN
China
Prior art keywords
network
electronic equipment
package
flow
mobile data
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.)
Granted
Application number
CN201880099423.XA
Other languages
Chinese (zh)
Other versions
CN112997528B (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
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co 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, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN112997528A publication Critical patent/CN112997528A/en
Application granted granted Critical
Publication of CN112997528B publication Critical patent/CN112997528B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints

Abstract

The embodiment of the application provides a network switching method and related equipment, which are applied to electronic equipment, and the network switching method comprises the following steps: detecting the network quality of a Wi-Fi network currently used by the electronic equipment; when the network quality of a Wi-Fi network used by the electronic equipment at present is detected to be less than or equal to the preset network quality, determining a flow package of a mobile data network used by the electronic equipment; and when the flow package is a non-flow-limiting package, starting the mobile data switch, and switching the wireless network of the electronic equipment to the mobile data network. By adopting the embodiment of the application, the automatic switching of the network can be realized when the network quality is not good, so that the network switching mode is simplified, and the user experience is improved.

Description

Network switching method and related equipment Technical Field
The present application relates to the field of communications technologies, and in particular, to a network switching method and a related device.
Background
Wireless-Fidelity (Wi-Fi) networks and mobile data networks are two types of Wireless networks that are currently in common use. The electronic equipment (such as a smart phone and the like) uses a Wi-Fi network to surf the internet, does not consume the flow of a mobile data network of the electronic equipment, and is a preferred internet surfing mode of people. At present, when the network quality of a Wi-Fi network is poor, the network cannot be intelligently switched in time, and the network rate is influenced.
Disclosure of Invention
The embodiment of the application provides a network switching method and related equipment, which are used for intelligently switching networks in time and improving the network speed when the network quality of a Wi-Fi network is poor.
In a first aspect, an embodiment of the present application provides a network switching method, which is applied to an electronic device, and the method includes:
detecting the network quality of a wireless fidelity Wi-Fi network currently used by the electronic equipment;
when the network quality of a Wi-Fi network used by the electronic equipment at present is detected to be less than or equal to the preset network quality, determining a flow package of a mobile data network used by the electronic equipment;
and when the flow package is a non-flow-limiting package, starting a mobile data switch, and switching the wireless network of the electronic equipment to a mobile data network.
In a second aspect, an embodiment of the present application provides a network switching apparatus, which is applied to an electronic device, and the apparatus includes:
the detection unit is used for detecting the network quality of a wireless fidelity Wi-Fi network currently used by the electronic equipment;
the determining unit is used for determining a flow package of a mobile data network used by the electronic equipment when the network quality of the Wi-Fi network used by the electronic equipment currently is detected to be less than or equal to the preset network quality;
and the switching unit is used for starting a mobile data switch and switching the wireless network of the electronic equipment to a mobile data network when the flow package is a non-flow-limiting package.
In a third aspect, an embodiment of the present application provides an electronic device, including 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 including instructions for performing the steps in the method according to the first aspect of the embodiment of the present application.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium for storing a computer program, where the computer program is executed by a processor to perform some or all of the steps described in the method according to the first aspect of embodiments of the present application.
In a fifth aspect, the present application provides a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps described in the method according to the first aspect of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, when detecting that the network quality of the Wi-Fi network currently used by the electronic device is less than or equal to the preset network quality, the electronic device determines the traffic package of the mobile data network used by the electronic device; and when the flow package is a non-flow-limiting package, starting a mobile data switch, and switching the currently used Wi-Fi network to the mobile data network. When the network quality of the Wi-Fi network is poor, the network switching can be timely and intelligently carried out, the network speed is improved, and the internet surfing experience is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1A is a schematic diagram of a program runtime space of a smart phone;
FIG. 1B is a system architecture diagram of an android system;
fig. 2 is a schematic flowchart of a network handover method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another network handover method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a network switching device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following are detailed below.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively 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 can be included in at least one embodiment of the application. The appearances of the phrase 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. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
As shown in fig. 1A, currently, an electronic device such as a smart phone is generally provided with a program running space, where the program running space includes a user space and an operating system space, where the user space runs one or more application programs, and the one or more application programs are third-party application programs installed in the electronic device.
The electronic device can specifically run an Android system, a mobile operating system iOS developed by apple Inc., and the like, and the electronic device is not limited herein. As shown in fig. 1B, for example that the electronic device runs an Android system, the corresponding user space includes an Application layer (Applications) in the Android system, and the operating system space may include an Application Framework layer (Application Framework) in the Android system, a system Runtime library layer (including system Runtime Libraries and Android Runtime runtimes), and a Linux Kernel layer (Linux Kernel). The application layer comprises various application programs which are directly interacted with the user or service programs which are written by Java language and run in the background. For example, programs that implement common basic functions on smartphones, such as Short Messaging Service (SMS) SMS, phone dialing, picture viewer, calendar, games, maps, World Wide Web (Web) browser, and other applications developed by developers. The application framework layer provides a series of class libraries required by Android application development, can be used for reusing components, and can also realize personalized extension through inheritance. And the system operation library layer is a support of an application program framework and provides services for each component in the Android system. The system operation library layer is composed of a system class library and Android operation. The Android runtime comprises two parts, namely a core library and a Dalvik virtual machine. The Linux kernel layer is used for realizing core functions such as hardware device driving, process and memory management, a network protocol stack, power management, wireless communication and the like.
Electronic devices may include a variety of handheld devices, vehicle-mounted devices, wearable devices (e.g., smartwatches, smartbands, pedometers, etc.), computing devices or other processing devices communicatively connected to wireless modems, as well as various forms of User Equipment (UE), Mobile Stations (MS), terminal Equipment (terminal device), and so forth having wireless communication capabilities. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices.
The following describes embodiments of the present application in detail.
Referring to fig. 2, fig. 2 is a schematic flowchart of a network switching method provided in an embodiment of the present application, and the method is applied to an electronic device, and includes the following steps:
step 201: detecting the network quality of a Wi-Fi network currently used by the electronic device.
Wherein the network quality comprises at least one of: signal strength, network delay, real-time network speed. Signal strength refers to the broadband received power over the channel bandwidth received by the electronic device. Network latency refers to the round-trip time for a data packet to be sent from the user's electronic device to the server and then immediately back from the server to the user's electronic device. The real-time network speed refers to the length of time for requesting and returning data when uploading and downloading data when the electronic equipment is on the internet.
Further, a specific way to detect the network quality of the Wi-Fi network currently used by the electronic device is as follows: acquiring current used WLAN information included in a network setting interface; and analyzing the WLAN information to obtain the network quality of the currently used Wi-Fi network.
Further, another specific way to detect the network quality of the Wi-Fi network currently used by the electronic device is to: determining whether a network analysis application is installed in the electronic device; if the network analysis application is installed, starting the network analysis application; and detecting the network quality of the Wi-Fi network currently used by the electronic equipment through the network analysis application to obtain the network quality of the Wi-Fi network currently used by the electronic equipment.
The network analysis application may be, for example, a Wi-Fi Universal Assistant, a Wi-Fi analyzer, a Wi-Fi Signal detection application, or other applications.
Step 202: when the network quality of the Wi-Fi network currently used by the electronic equipment is detected to be less than or equal to the preset network quality, determining a flow package of a mobile data network used by the electronic equipment.
The network quality of the Wi-Fi network currently used by the electronic equipment is less than or equal to the preset network quality, and the network quality includes at least one of the following: the signal intensity of the Wi-Fi network currently used by the electronic equipment is smaller than or equal to the preset signal intensity, the network delay of the Wi-Fi network currently used by the electronic equipment is larger than or equal to the preset network delay, and the average real-time network speed of the Wi-Fi network currently used by the electronic equipment is smaller than or equal to the preset average real-time network speed.
And the average real-time network speed is the average value of the real-time network speeds in the preset time. The predetermined time may be 5 minutes, 10 minutes, 15 minutes, or other values.
The traffic packages of the mobile data network include, for example, unlimited traffic packages, and the like.
Step 203: and when the flow package is a non-flow-limiting package, starting a mobile data switch, and switching the wireless network of the electronic equipment to a mobile data network.
The non-flow-limiting package comprises high-speed flow and low-speed flow, wherein the high-speed flow refers to the non-speed-limiting flow, and the low-speed flow refers to the flow of which the network speed is lower than a preset value after an operator limits the speed of a mobile network. High-speed traffic may be used under a fifth Generation mobile phone communication technology (5th-Generation with free mobile phone technology, 5G) network, a fourth Generation mobile phone communication technology (4th-Generation with free mobile phone technology, 4G) network. The low-speed traffic may be used in a 2-Generation wireless telephone technology (2G) network, a 3rd-Generation wireless telephone technology (2G) network.
The mobile data switch is used for switching on or off a mobile data network of the electronic equipment. After the mobile data switch is turned on, the Wi-Fi switch may be turned off or not, which is not limited herein. The Wi-Fi switch is used for switching on or off a Wi-Fi network of the electronic equipment.
It can be seen that, in the embodiment of the present application, when it is detected that the network quality of the currently used Wi-Fi network is less than or equal to the preset network quality, the traffic package of the mobile data network used by the currently used Wi-Fi network is determined; and when the flow package is a non-flow-limiting package, starting a mobile data switch, and switching the currently used Wi-Fi network to the mobile data network. When the network quality of the Wi-Fi network is poor, the network switching can be timely and intelligently carried out, the network speed is improved, and the internet surfing experience is further improved.
In an implementation manner of the present application, after switching the wireless network of the electronic device to a mobile data network, the method further includes:
closing at least one running application when the remaining flow of the high-speed flow of the unlimited flow package is determined to be less than or equal to a first threshold, wherein the at least one running application does not comprise a foreground running application, and the priority of the at least one running application is less than or equal to a preset priority.
The first threshold may be preset by the electronic device or set by the user, and may be, for example, 1G, 5G, 10G, or another value, which is not limited herein.
The running applications of the electronic device include a foreground running application and a background running application, the foreground running application may be one application or multiple applications, and the background running application may be one application or multiple applications, which is not limited herein.
The priority of the application may be a use priority of the application, an important priority of the application, or the like. When the priority of the application is the usage priority of the application, the priority may be determined by the electronic device based on the usage frequency of the application for a period of time, or may be user-defined, and is not limited herein. When the priority of the application is an important priority of the application, the priority may be determined by the electronic device based on the type of the application, and the type of the application may be security, instant messaging, news, audio/video, or the like, or may be user-defined, which is not limited herein.
It can be seen that, in the embodiment of the present application, when it is determined that the high-speed traffic of the unlimited traffic package is not multi-valued, some applications with lower priority in the background are closed, traffic consumption of the electronic device is reduced, and the transmission rate of the applications running in the foreground is increased.
In an implementation manner of the present application, the method further includes:
when the flow package is not a non-flow-limiting package, continuously detecting the network quality of the Wi-Fi network currently used by the electronic equipment; when the network quality of the Wi-Fi network currently used by the electronic equipment is detected to be still less than or equal to the preset network quality, outputting reminding information, wherein the reminding information is used for reminding network switching; and when a switching confirmation instruction aiming at the reminding information is detected, switching the wireless network of the electronic equipment to a mobile data network.
The mode of outputting the reminding information can be at least one of a display mode and a voice mode.
The confirmation instruction may be triggered by a user performing touch operation on a specified position of an operation interface, or triggered by the user pressing a specified key of the electronic device. The touch operation may be a single-click operation, a multi-click operation, a slide operation + a single-click operation, a slide operation + a multi-click operation, or the like.
It can be seen that, in the embodiment of the application, when the flow package is not the unlimited flow package, the network quality of the Wi-Fi network is continuously detected, if the network quality of the Wi-Fi network is still not good, the reminding information is output to remind the user of switching the network, and the user is reminded of not good network quality, so that the internet surfing experience is improved under the condition that the electronic equipment is not good in network quality for a long time.
In an implementation manner of the present application, the method further includes:
when the flow package is not a non-flow-limiting package, continuously detecting the network quality of the Wi-Fi network currently used by the electronic equipment; and when the network quality of the Wi-Fi network currently used by the electronic equipment is detected to be still less than or equal to the preset network quality, starting the mobile data switch, and starting a link aggregation function, wherein the Wi-Fi network and the mobile data network are simultaneously used by the electronic equipment under the link aggregation function.
Wherein after turning on the mobile data switch, the electronic device keeps the Wi-Fi switch turned on.
Further, after the electronic device enables the link aggregation function, the method further includes:
respectively acquiring current peak transmission rates of at least two wireless network modules for link aggregation; determining the shunting weight of the at least two wireless network modules according to the obtained at least two peak transmission rates; and shunting the at least two wireless network modules according to the determined at least two shunting weights.
The wireless network module includes, for example, a wifi module, a bluetooth module, a data network module, a Neighbor Awareness Network (NAN) network module, and the like. The data network module may support a second-Generation wireless telephone technology (2G) network, a third-Generation wireless telephone technology (3rd-Generation wireless telephone technology, 3G) network, a Long Term Evolution (LTE) network, a fifth-Generation wireless telephone technology (5th-Generation wireless telephone technology, 5G) network, and so on.
The stream splitting weight is used to indicate the degree of importance in splitting the data stream.
And the determined at least two shunt weights are in one-to-one correspondence with the at least two wireless network modules. The sum of the at least two splitting weights is equal to 1.
Further, the specific implementation manner of the shunting weights of the at least two wireless network modules is respectively determined according to the obtained at least two peak transmission rates: and respectively determining the shunting weight of the at least two wireless network modules according to the obtained at least two peak transmission rates and a set rule, wherein the preset rule is that the shunting weight is equal to the sum of the peak transmission rate divided by the at least two peak transmission rates.
Further, a specific implementation manner for shunting the at least two wireless network modules according to the determined at least two shunting weights includes: and shunting the at least two wireless network modules according to the number of the data streams currently established by the electronic equipment and the determined at least two shunting weights.
For example, assuming that the wireless network modules for link aggregation are a wifi module and a data network module, step 203 determines that the offloading weight of the wifi module is 1/3 and the offloading weight of the data network module is 2/3, if there are 3 data streams currently established by the electronic device, the electronic device offloads 1 data stream to the wifi module and offloads 2 data streams to the data network module. For another example, assuming that the wireless network modules for link aggregation are a wifi module and a data network module, step 203 determines that the offloading weight of the wifi module is 1/3 and the offloading weight of the data network module is 2/3, and if there are 4 data streams currently established by the electronic device, the electronic device offloads 1 data stream to the wifi module and offloads 3 data streams to the data network module.
The data stream is a set of packets of the same data type, for example, a video-type packet belongs to one data stream, a picture-type packet belongs to one data stream, and the like.
It can be seen that, in the embodiment of the present application, in a link aggregation state, the electronic device respectively obtains current peak transmission rates of at least two wireless network modules for link aggregation, then respectively determines offloading weights of the at least two wireless network modules based on the determined at least two peak transmission rates, and finally offloads the at least two wireless network modules based on the determined at least two offloading weights, so that offloading of different wireless network modules in the link aggregation state is achieved, and further stability of data transmission is improved.
In an implementation manner of the present application, a specific implementation manner of determining a traffic package of a mobile data network used by the electronic device is as follows:
acquiring a short message related to a flow package stored in the electronic equipment; analyzing the short message to obtain at least one keyword; when the at least one keyword contains a preset keyword, determining that a flow package of a mobile data network used by the electronic equipment is an unlimited flow package, wherein the preset keyword is associated with the unlimited flow package; and when the at least one keyword does not contain a preset keyword, determining that the flow package of the mobile data network used by the electronic equipment is not a non-flow-limiting package.
The preset keywords are, for example, unlimited amount, high-speed flow, low-speed flow, and the like.
In an implementation of the present application, before determining that a remaining flow of the high-speed flow of the unrestricted flow package is less than the first threshold, the method further comprises:
sending a traffic query request to an operator, wherein the traffic query request is used for requesting to query traffic use information of the electronic equipment; and receiving traffic use information sent by the operator for the traffic query request, wherein the traffic use information comprises the residual traffic of the high-speed traffic of the unlimited traffic package.
The traffic query request may be, for example, a preset short message, a preset WeChat message, or a preset telephone number. For example, the call inquiry method of the traffic use information of the china mobile is call 10086 and dialing 2, and the short message inquiry method is sending 103 to 10086; the call query method of the traffic use information of China Unicom is call 10011, and the short message query method is sending cxll to 10010; the call inquiry method of the traffic utilization information of the Chinese telecommunication is call 10000, and the short message inquiry method is sending 108 to 10001.
It can be seen that, in the embodiment of the application, the traffic use information of the electronic device is determined by sending the traffic query request to the operator, so that the accuracy of information acquisition is ensured.
In an implementation manner of the present application, a specific implementation manner of determining a traffic package of a mobile data network used by the electronic device is as follows: under a first condition, determining a flow package of a mobile data network used by the electronic equipment; the first condition includes at least one of: and no other connectable Wi-Fi network except the currently used Wi-Fi network exists, the number of the currently running applications is larger than or equal to a second threshold value, and the current running application in the foreground is a preset application.
Wherein, no other connectable Wi-Fi network comprises a Wi-Fi network which can be received but can not be connected, a Wi-Fi network which can not be received, and the like. The second threshold may be a threshold set by the system or a threshold set by the user, and may be, for example, 5, 8, 10, or other values. The preset application may be, for example, a video application, a game application, an audio application, or other applications.
In an implementation manner of the present application, the method further includes:
when the flow package is not a non-flow-limiting package, continuously detecting the network quality of the Wi-Fi network currently used by the electronic equipment; when detecting that the network quality of the Wi-Fi network currently used by the electronic equipment is still less than or equal to a preset network quality, detecting network connection information of a router associated with the Wi-Fi network, wherein the network connection information comprises at least one of the following: frequency band, bandwidth, channel; and adjusting the network connection information of the router.
Among them, there are two common frequency bands: a 2.4G band and a 5G band. The frequency range of the 2.4G frequency band is 2.4 GHZ-2.4835 GHZ. The frequency range of 5G is 5.15 GHZ-5.825 GHZ. Wherein a channel refers to an operating channel of a router. The 2.4G frequency band is provided with 14 channels in total, but only the first 13 channels are allowed to be used in China. Each channel is 22MHZ wide, only 20MHZ is actually used to transmit data, and 2MHZ is used to isolate the channels. 2.4G is available at 83.5MHZ, and there is mostly overlap between channels. The center frequencies of each channel are spaced 5MHZ apart. 2.4 mapping of channels, center frequencies and frequency ranges in GH is shown in Table 1.
TABLE 1
Channel with a plurality of channels Center frequency (MHZ) Frequency range (MHZ)
01 2412 2401-2423
02 2417 2406-2428
03 2422 2411-2433
04 2427 2416-2438
05 2432 2421-2443
06 2437 2426-2448
07 2442 2431-453
08 2447 2426-2448
09 2452 2441-2463
10 2457 2446-2468
11 2462 2451-2473
12 2467 2456-2478
13 2472 2461-2483
The bandwidth is divided into 20MHz and 40 MHz. Since there is mostly overlap between channels, there is collision between channels, and the transmission efficiency of 40MHZ bandwidth is lower than that of 20MHZ bandwidth.
Further, a specific implementation manner for adjusting the network connection information is as follows:
detecting the number of electronic equipment accessing to a channel; acquiring a management website, a login account and a login password of the router; and switching the current channel of the router to the channel with the least access to the electronic equipment.
Further, another specific implementation manner for adjusting the network connection information is as follows:
detecting a rating of the channel; acquiring a management website, a login account and a login password of the router; switching the current channel of the router to the highest ranked channel.
Further, another specific implementation manner for adjusting the network connection information is as follows:
detecting the number of electronic devices accessing a frequency band; acquiring a management website, a login account and a login password of the router; and switching the current frequency band of the router to the frequency band with the least access to the electronic equipment.
Further, another specific implementation manner for adjusting the network connection information is as follows:
detecting the current access bandwidth; acquiring a management website, a login account and a login password of the router; and switching the current bandwidth of the router to another frequency band.
Referring to fig. 3, fig. 3 is a schematic flow chart of another network handover method provided in the embodiment of the present application, and the method is applied to an electronic device, and includes:
step 301: detecting a network quality of a wireless fidelity Wi-Fi network currently used by the electronic device.
Step 302: and when the network quality of the Wi-Fi network currently used by the electronic equipment is detected to be less than or equal to the preset network quality, acquiring the short message related to the flow package stored in the electronic equipment.
Step 303: and analyzing the short message to obtain at least one keyword.
Step 304: and when the at least one keyword contains a preset keyword, determining that the flow package of the mobile data network used by the electronic equipment is the unlimited flow package, wherein the preset keyword is associated with the unlimited flow package.
Step 305: and when the at least one keyword does not contain a preset keyword, determining that the flow package of the mobile data network used by the electronic equipment is not a non-flow-limiting package.
Step 306: and when the flow package is a non-flow-limit package, starting a mobile data switch, and switching the Wi-Fi network currently used by the electronic equipment to a mobile data network.
Step 307: and sending a traffic query request to an operator, wherein the traffic query request is used for requesting to query traffic use information of the electronic equipment.
Step 308: and receiving traffic use information sent by the operator for the traffic query request, wherein the traffic use information comprises the residual traffic of the high-speed traffic of the unlimited traffic package.
Step 309: and closing at least one running application when the remaining flow of the high-speed flow of the unlimited flow package is determined to be less than the first threshold, wherein the at least one running application does not comprise the application currently running in the foreground, and the priority of the at least one running application is less than or equal to the preset priority.
Step 310: and when the flow package is not the unlimited flow package, continuously detecting the network quality of the Wi-Fi network currently used by the electronic equipment.
And when detecting that the network quality of the Wi-Fi network currently used by the electronic equipment is still less than or equal to the preset network quality, executing step 311 or step 313.
Step 311: and outputting reminding information, wherein the reminding information is used for reminding the switching network.
Step 312: and when a switching confirmation instruction aiming at the reminding information is detected, switching the wireless network of the electronic equipment to a mobile data network.
Step 313: the method comprises the steps of starting a mobile data switch and starting a link aggregation function, wherein under the link aggregation function, the electronic equipment simultaneously uses a Wi-Fi network and a mobile data network.
It should be noted that, for the specific implementation process of the present embodiment, reference may be made to the specific implementation process described in the above method embodiment, and a description thereof is omitted here.
In accordance with the embodiments shown in fig. 2 and fig. 3, please refer to fig. 4, fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, the electronic device including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for performing the following steps:
detecting the network quality of a wireless fidelity Wi-Fi network currently used by the electronic equipment;
when the network quality of a Wi-Fi network used by the electronic equipment at present is detected to be less than or equal to the preset network quality, determining a flow package of a mobile data network used by the electronic equipment;
and when the flow package is a non-flow-limiting package, starting a mobile data switch, and switching the wireless network of the electronic equipment to a mobile data network.
In an implementation manner of the present application, after the wireless network of the electronic device is switched to the mobile data network, the program includes instructions for further performing the following steps:
closing at least one running application when the remaining flow of the high-speed flow of the unlimited flow package is determined to be less than or equal to a first threshold, wherein the at least one running application does not comprise a foreground running application, and the priority of the at least one running application is less than or equal to a preset priority.
In an implementation manner of the present application, the program includes instructions for further performing the following steps:
when the flow package is not a non-flow-limiting package, continuously detecting the network quality of the Wi-Fi network currently used by the electronic equipment; when the network quality of the Wi-Fi network currently used by the electronic equipment is detected to be still less than or equal to the preset network quality, outputting reminding information, wherein the reminding information is used for reminding network switching; and when a switching confirmation instruction aiming at the reminding information is detected, switching the wireless network of the electronic equipment to a mobile data network.
In an implementation manner of the present application, the program includes instructions for further performing the following steps:
when the flow package is not a non-flow-limiting package, continuously detecting the network quality of the Wi-Fi network currently used by the electronic equipment; and when the network quality of the Wi-Fi network currently used by the electronic equipment is detected to be still less than or equal to the preset network quality, starting the mobile data switch, and starting a link aggregation function, wherein the Wi-Fi network and the mobile data network are simultaneously used by the electronic equipment under the link aggregation function.
In an implementation of the present application, in determining a traffic package of a mobile data network used by the electronic device, the program includes instructions specifically configured to:
acquiring a short message related to a flow package stored in the electronic equipment; analyzing the short message to obtain at least one keyword; when the at least one keyword contains a preset keyword, determining that a flow package of a mobile data network used by the electronic equipment is an unlimited flow package, wherein the preset keyword is associated with the unlimited flow package; and when the at least one keyword does not contain a preset keyword, determining that the flow package of the mobile data network used by the electronic equipment is not a non-flow-limiting package.
In one implementation of the present application, before determining that the remaining flow rate of the high-speed flow rate of the unlimited flow rate package is less than the first threshold, the program includes instructions further for:
sending a traffic query request to an operator, wherein the traffic query request is used for requesting to query traffic use information of the electronic equipment; and receiving traffic use information sent by the operator for the traffic query request, wherein the traffic use information comprises the residual traffic of the high-speed traffic of the unlimited traffic package.
In an implementation of the present application, in determining a traffic package of a mobile data network used by the electronic device, the program includes instructions specifically configured to:
under a first condition, determining a flow package of a mobile data network used by the electronic equipment; the first condition includes at least one of: no other connectable Wi-Fi network except the Wi-Fi network currently used by the electronic device, the number of running applications is greater than or equal to a second threshold, and the foreground currently running application is a predetermined application.
It should be noted that, for the specific implementation process of the present embodiment, reference may be made to the specific implementation process described in the above method embodiment, and a description thereof is omitted here.
Referring to fig. 5, fig. 5 is a network switching device provided in an embodiment of the present application, and the network switching device is applied to an electronic device, and the network switching device includes:
a detecting unit 501, configured to detect network quality of a wireless fidelity Wi-Fi network currently used by the electronic device;
a determining unit 502, configured to determine a traffic package of a mobile data network used by the electronic device when it is detected that network quality of a Wi-Fi network currently used by the electronic device is less than or equal to a preset network quality;
a switching unit 503, configured to turn on a mobile data switch and switch the wireless network of the electronic device to a mobile data network when the flow package is a non-flow-limit package.
In an implementation manner of the present application, after the wireless network of the electronic device is switched to the mobile data network by the switching unit 503, the apparatus further includes:
a control unit 504, configured to close at least one running application when the determination unit 502 determines that the remaining flow of the high-speed flow of the unlimited flow package is smaller than the first threshold, where the at least one running application does not include an application running in the foreground, and the priority of the at least one running application is smaller than or equal to a predetermined priority.
In an implementation manner of the present application, the detecting unit 501 is further configured to continue to detect the network quality of the Wi-Fi network currently used by the electronic device when the flow package is not an unlimited flow package; the apparatus further includes an output unit 505, configured to output a reminding message when the detection unit 501 detects that the network quality of the Wi-Fi network currently used by the electronic device is still less than or equal to the predetermined network quality, where the reminding message is used to remind a user to switch networks; the switching unit 503 is further configured to switch the wireless network of the electronic device to a mobile data network when the detection unit 501 detects a switching confirmation instruction for the reminder information.
In an implementation manner of the present application, the detecting unit 501 is further configured to continue to detect the network quality of the Wi-Fi network currently used by the electronic device when the flow package is not an unlimited flow package; the control unit 504 is further configured to, when it is detected that the network quality of the Wi-Fi network currently used by the electronic device is still less than or equal to the predetermined network quality, turn on the mobile data switch, and enable a link aggregation function, where the Wi-Fi network and the mobile data network are used by the electronic device at the same time.
In an implementation manner of the present application, in determining, by the determining unit 502, a traffic package of a mobile data network used by the electronic device, the apparatus further includes:
an obtaining unit 506, configured to obtain a short message about a flow package stored in the electronic device;
an analyzing unit 507, configured to analyze the short message to obtain at least one keyword;
the determining unit 502 is further configured to determine that a flow package of a mobile data network used by the electronic device is an unlimited flow package when the at least one keyword includes a preset keyword, where the preset keyword is associated with the unlimited flow package; and when the at least one keyword does not contain a preset keyword, determining that the flow package of the mobile data network used by the electronic equipment is not a non-flow-limiting package.
In an implementation manner of the present application, before determining, by the determining unit 502, that the remaining flow of the high-speed flow of the unlimited flow package is smaller than the first threshold, the apparatus further includes:
a communication unit 508, configured to send a traffic query request to an operator, where the traffic query request is used to request to query traffic usage information of the electronic device; and receiving traffic use information sent by the operator for the traffic query request, wherein the traffic use information comprises the residual traffic of the high-speed traffic of the unlimited traffic package.
In an implementation manner of the present application, the determining unit 502: the method also comprises determining a traffic package of a mobile data network used by the electronic device under a first condition; the first condition includes at least one of: and no other connectable Wi-Fi network except the Wi-Fi network currently used by the electronic equipment exists, the number of the currently running applications is greater than or equal to a second threshold value, and the applications running in the foreground are preset applications.
It should be noted that the detection unit 501, the determination unit 502, the switching unit 503, the control unit 504, the output unit 505, the acquisition unit 506, and the analysis unit 507 may be implemented by a processor, and the communication unit 508 may be implemented by a communication interface.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and 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 of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

  1. A network switching method is applied to electronic equipment and comprises the following steps:
    detecting the network quality of a wireless fidelity Wi-Fi network currently used by the electronic equipment;
    when the network quality of a Wi-Fi network used by the electronic equipment at present is detected to be less than or equal to the preset network quality, determining a flow package of a mobile data network used by the electronic equipment;
    and when the flow package is a non-flow-limiting package, starting a mobile data switch, and switching the wireless network of the electronic equipment to a mobile data network.
  2. The method of claim 1, wherein after the switching the wireless network of the electronic device to a mobile data network, the method further comprises:
    closing at least one running application when the remaining flow of the high-speed flow of the unlimited flow package is determined to be less than or equal to a first threshold, wherein the at least one running application does not comprise a foreground running application, and the priority of the at least one running application is less than or equal to a preset priority.
  3. The method according to claim 1 or 2, characterized in that the method further comprises:
    when the flow package is not a non-flow-limiting package, continuously detecting the network quality of the Wi-Fi network currently used by the electronic equipment;
    when the network quality of the Wi-Fi network currently used by the electronic equipment is detected to be still less than or equal to the preset network quality, outputting reminding information, wherein the reminding information is used for reminding network switching;
    and when a switching confirmation instruction aiming at the reminding information is detected, switching the wireless network of the electronic equipment to a mobile data network.
  4. The method according to claim 1 or 2, characterized in that the method further comprises:
    when the flow package is not a non-flow-limiting package, continuously detecting the network quality of the Wi-Fi network currently used by the electronic equipment;
    and when the network quality of the Wi-Fi network currently used by the electronic equipment is detected to be still less than or equal to the preset network quality, starting the mobile data switch, and starting a link aggregation function, wherein the Wi-Fi network and the mobile data network are simultaneously used by the electronic equipment under the link aggregation function.
  5. The method of any of claims 1-4, wherein determining the traffic package for the mobile data network used by the electronic device comprises:
    acquiring a short message related to a flow package stored in the electronic equipment;
    analyzing the short message to obtain at least one keyword;
    when the at least one keyword contains a preset keyword, determining that a flow package of a mobile data network used by the electronic equipment is an unlimited flow package, wherein the preset keyword is associated with the unlimited flow package;
    and when the at least one keyword does not contain a preset keyword, determining that the flow package of the mobile data network used by the electronic equipment is not a non-flow-limiting package.
  6. The method of any of claims 2-5, wherein prior to determining that the remaining flow of the high-speed flow of the unrestricted flow package is less than the first threshold, the method further comprises:
    sending a traffic query request to an operator, wherein the traffic query request is used for requesting to query traffic use information of the electronic equipment;
    and receiving traffic use information sent by the operator for the traffic query request, wherein the traffic use information comprises the residual traffic of the high-speed traffic of the unlimited traffic package.
  7. The method of any of claims 1-6, wherein determining the traffic package for the mobile data network used by the electronic device comprises:
    under a first condition, determining a flow package of a mobile data network used by the electronic equipment;
    the first condition includes at least one of: no other connectable Wi-Fi network except the Wi-Fi network to which the electronic device is currently connected, the number of running applications is greater than or equal to a second threshold, and the foreground running application is a predetermined application.
  8. A network switching device applied to an electronic device, the device comprising:
    the detection unit is used for detecting the network quality of a wireless fidelity Wi-Fi network currently used by the electronic equipment;
    the determining unit is used for determining a flow package of a mobile data network used by the electronic equipment when the network quality of the Wi-Fi network used by the electronic equipment currently is detected to be less than or equal to the preset network quality;
    and the switching unit is used for starting a mobile data switch and switching the wireless network of the electronic equipment to a mobile data network when the flow package is a non-flow-limiting package.
  9. 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-7.
  10. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, which is executed by a processor to implement the method according to any of claims 1-7.
CN201880099423.XA 2018-12-29 2018-12-29 Network switching method and related equipment Active CN112997528B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/125680 WO2020133433A1 (en) 2018-12-29 2018-12-29 Network switching method and related apparatus

Publications (2)

Publication Number Publication Date
CN112997528A true CN112997528A (en) 2021-06-18
CN112997528B CN112997528B (en) 2022-12-27

Family

ID=71125796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880099423.XA Active CN112997528B (en) 2018-12-29 2018-12-29 Network switching method and related equipment

Country Status (2)

Country Link
CN (1) CN112997528B (en)
WO (1) WO2020133433A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002848A (en) * 2021-11-17 2022-09-02 荣耀终端有限公司 Network switching method, medium, program product and electronic device
CN115696483A (en) * 2021-07-30 2023-02-03 荣耀终端有限公司 Network link switching method based on electronic equipment state and electronic equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113993103B (en) * 2021-10-22 2024-01-19 安徽江淮汽车集团股份有限公司 Network automatic interconnection method for vehicle-mounted terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105554831A (en) * 2016-01-28 2016-05-04 努比亚技术有限公司 Network switching device and method
WO2017092678A1 (en) * 2015-11-30 2017-06-08 华为技术有限公司 Network switching method for terminal, and terminal device
WO2017166678A1 (en) * 2016-03-29 2017-10-05 乐视控股(北京)有限公司 Method and apparatus for monitoring mobile data usage amount, mobile phone, and electronic device
CN108494464A (en) * 2018-03-13 2018-09-04 广东欧珀移动通信有限公司 Method of controlling antenna, antenna module, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011127858A2 (en) * 2011-05-17 2011-10-20 华为技术有限公司 Flow control method and apparatus
CN105764104A (en) * 2016-04-07 2016-07-13 上海斐讯数据通信技术有限公司 Terminal application network switching method and device based on flow
CN106412983A (en) * 2016-11-18 2017-02-15 宇龙计算机通信科技(深圳)有限公司 Terminal-flow-based control method and apparatus
CN108990110B (en) * 2018-07-26 2022-02-22 Oppo广东移动通信有限公司 Network traffic management method, device, storage medium and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017092678A1 (en) * 2015-11-30 2017-06-08 华为技术有限公司 Network switching method for terminal, and terminal device
CN106817731A (en) * 2015-11-30 2017-06-09 华为终端(东莞)有限公司 The method for switching network and terminal device of terminal
CN105554831A (en) * 2016-01-28 2016-05-04 努比亚技术有限公司 Network switching device and method
WO2017166678A1 (en) * 2016-03-29 2017-10-05 乐视控股(北京)有限公司 Method and apparatus for monitoring mobile data usage amount, mobile phone, and electronic device
CN108494464A (en) * 2018-03-13 2018-09-04 广东欧珀移动通信有限公司 Method of controlling antenna, antenna module, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696483A (en) * 2021-07-30 2023-02-03 荣耀终端有限公司 Network link switching method based on electronic equipment state and electronic equipment
CN115696483B (en) * 2021-07-30 2023-10-31 荣耀终端有限公司 Network link switching method based on electronic equipment state and electronic equipment
CN115002848A (en) * 2021-11-17 2022-09-02 荣耀终端有限公司 Network switching method, medium, program product and electronic device
CN115002848B (en) * 2021-11-17 2023-06-16 荣耀终端有限公司 Network switching method, medium, program product and electronic device

Also Published As

Publication number Publication date
CN112997528B (en) 2022-12-27
WO2020133433A1 (en) 2020-07-02

Similar Documents

Publication Publication Date Title
JP7370479B2 (en) Configuration information transmission method and device, communication equipment and storage medium
CN109803325B (en) Data distribution method and device, mobile terminal and storage medium
US20210360650A1 (en) Packet offloading method, mobile terminal, and storage medium
CN108199786B (en) Method and device for adjusting transmission power
CN106851782B (en) Data transmission method and device
CN109618372B (en) Data transmission method and related device
US8606290B2 (en) Method and apparatus for performing a demotion in a cellular communications network
CN112003785B (en) Link aggregation method and related product
KR101693282B1 (en) Cooperative communication method, cloud server, and core network server
CN112997528B (en) Network switching method and related equipment
CN109379498B (en) Electromagnetic interference control method and related device
US20210368571A1 (en) Method for link connection, electronic device and storage medium
CN108712778B (en) Channel selection method and related product
US20160119833A1 (en) Network Switching Method and Terminal Device
US20210289388A1 (en) Network Offload Method and Relevant Device
US20230300703A1 (en) Cell switching method and apparatus, storage medium, and electronic device
US11558799B2 (en) Pre-steering traffic within a telecommunications network
CN108200660B (en) Data transmission method and device
CN115119324A (en) Resource scheduling method and device
CN106231051B (en) Video decoding test method and related equipment
CN108200604B (en) Data transmission method and device
CN109495931B (en) Data transmission method for link aggregation and related device
CN108156653B (en) Data transmission method and device
CN108322943B (en) Local area network allocation method, terminal and storage medium
CN110856162A (en) Network configuration method and related device

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